1 line
24 KiB
JavaScript
1 line
24 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-restaurant-index-index_nx"],{"165a":function(t,e,n){var a=n("5876");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var r=n("967d").default;r("356b05a6",a,!0,{sourceMap:!1,shadowMode:!1})},"24a6":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"content"},[n("v-uni-view",{staticClass:"banner"},[n("v-uni-image",{staticClass:"img",attrs:{src:t.qnyurl("nx_indexback.png","nx"),mode:"widthFix"}})],1),n("v-uni-view",{staticClass:"stote-operate"},[n("v-uni-navigator",{staticStyle:{width:"100%",height:"auto"},attrs:{url:"/pages/restaurant/home/home","hover-class":"none"}},[n("v-uni-view",{staticClass:"stote-operate-order"},[n("v-uni-image",{staticClass:"img",attrs:{src:t.qnyurl("place.png","nx")}})],1)],1),n("v-uni-view",{staticClass:"stote-operate-orders",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.oreder.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"tishi"},[n("v-uni-text",{staticClass:"title"},[t._v("我的订单")]),n("v-uni-text",{staticClass:"text"},[t._v("柜台扫码取餐")])],1),n("v-uni-image",{staticClass:"img",attrs:{src:t.qnyurl("orders.png","nx")}})],1),n("v-uni-view",{staticClass:"stote-operate-service",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.location.apply(void 0,arguments)}}},[n("v-uni-view",{staticClass:"tishi"},[n("v-uni-view",{staticClass:"title"},[t._v("在线客服")]),n("v-uni-view",{staticClass:"text"},[t._v("服务时间 09:00-24:00")])],1),n("v-uni-image",{staticClass:"img",attrs:{src:t.qnyurl("service.png","nx")}})],1)],1)],1)},r=[]},5876:function(t,e,n){var a=n("c86c");e=a(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */.skeleton[data-v-99c7b0e6]{background-color:#f1f2f4!important;color:#f1f2f4!important;margin:var(--skeleton)}\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */uni-page-body[data-v-99c7b0e6]{width:100%;min-height:100%;background-color:#f7f7f7}body.?%PAGE?%[data-v-99c7b0e6]{background-color:#f7f7f7}.banner[data-v-99c7b0e6]{width:100%}.banner .img[data-v-99c7b0e6]{width:100%;height:100%}.stote-operate[data-v-99c7b0e6]{width:100%;height:auto;padding:%?32?%;display:flex;flex-wrap:wrap;justify-content:space-between;position:fixed;top:41%}.stote-operate .stote-operate-order[data-v-99c7b0e6]{width:100%;height:%?241?%;position:relative}.stote-operate .stote-operate-order .diancan[data-v-99c7b0e6]{position:absolute;top:68px;left:%?78?%;width:%?181?%;height:%?64?%;background:#fff;box-shadow:0 %?10?% %?16?% 0 rgba(44,94,255,.24);border-radius:%?32?%;color:#4b6fe7;text-align:center;line-height:%?60?%;font-weight:800}.stote-operate .stote-operate-order .img[data-v-99c7b0e6]{width:100%;height:100%}.stote-operate .stote-operate-orders[data-v-99c7b0e6],\n.stote-operate .stote-operate-service[data-v-99c7b0e6]{width:%?332?%;height:%?217?%;margin-top:%?30?%;position:relative}.stote-operate .stote-operate-orders .tishi[data-v-99c7b0e6],\n.stote-operate .stote-operate-service .tishi[data-v-99c7b0e6]{position:absolute;left:0;top:0;z-index:1;display:flex;flex-direction:column;padding:%?32?%}.stote-operate .stote-operate-orders .tishi .title[data-v-99c7b0e6],\n.stote-operate .stote-operate-service .tishi .title[data-v-99c7b0e6]{font-size:%?32?%}.stote-operate .stote-operate-orders .tishi .text[data-v-99c7b0e6],\n.stote-operate .stote-operate-service .tishi .text[data-v-99c7b0e6]{font-size:%?24?%;color:#666}.stote-operate .stote-operate-orders .img[data-v-99c7b0e6],\n.stote-operate .stote-operate-service .img[data-v-99c7b0e6]{width:100%;height:100%}',""]),t.exports=e},"79de":function(t,e,n){"use strict";(function(t){n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.subgiftSharing=e.consumerCard=e.XBKSharing=e.TeamSharing=e.RXrestaurant=e.KFCrestaurant=e.GetUserInvitationCode=void 0;var r=a(n("2634")),i=a(n("2fdc")),o=n("1bcb"),c=function(){var e=(0,i.default)((0,r.default)().mark((function e(){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,(0,o.infoAPI)();case 2:return n=e.sent,t.log(n["data"],"Info"),e.abrupt("return",n["data"]);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e.GetUserInvitationCode=c;var s=function(){var e=(0,i.default)((0,r.default)().mark((function e(){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:return n=e.sent,t.log(n),e.abrupt("return",{title:"我在白马晶选领到了消费补贴卡,话费充值和购物都补贴优惠了,真香,分享给你也点进来领一张!",path:"/sub_card/index/index?bm_yq_code=".concat(n["userInfo"]["invite_code"]),imageUrl:"https://img.agrimedia.cn/chwl/newsh.jpg"});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e.consumerCard=s;var u=function(){var e=(0,i.default)((0,r.default)().mark((function e(){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:return n=e.sent,t.log(n),e.abrupt("return",{title:"这里有一份超值肯德基补贴券,分享给你哦!生活好滋味,尽在肯德基。",path:"/pages/restaurant/index/index_kdj?bm_yq_code=".concat(n["userInfo"]["invite_code"],"&brand_id=1&brand_name=肯德基"),imageUrl:"https://img.agrimedia.cn/chwl/v2/KFC_share.jpg"});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e.KFCrestaurant=u;var d=function(){var e=(0,i.default)((0,r.default)().mark((function e(){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:return n=e.sent,t.log(n),e.abrupt("return",{title:"美好时光,一起小蓝杯,一起瑞幸,点击这里,尽享5折哦",path:"/pages/restaurant/index/index_rx?bm_yq_code=".concat(n["userInfo"]["invite_code"],"&brand_id=13&brand_name=瑞幸"),imageUrl:"https://img.agrimedia.cn/chwl/rx/RX_share.jpg"});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e.RXrestaurant=d;var l=function(){var e=(0,i.default)((0,r.default)().mark((function e(){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:return n=e.sent,t.log(n),e.abrupt("return",{title:"和你一起来享受星巴克时光 ,美好生活快来点这里有折扣哦",path:"/pages/restaurant/index/index_xbk?bm_yq_code=".concat(n["userInfo"]["invite_code"],"&brand_id=10&brand_name=星巴克"),imageUrl:"https://img.agrimedia.cn/chwl/xbk/xbk_sharing.jpg"});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e.XBKSharing=l;var p=function(){var e=(0,i.default)((0,r.default)().mark((function e(){var n;return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,c();case 2:return n=e.sent,t.log(n),e.abrupt("return",{title:"我发现了一个超多折扣补贴的小程序,线上线下啥都有,快点开领取吧",path:"/pages/index/index?bm_yq_code=".concat(n["userInfo"]["invite_code"]),imageUrl:"https://img.agrimedia.cn/chwl/v2/Team_sharing.jpg"});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e.TeamSharing=p;var f=function(){var e=(0,i.default)((0,r.default)().mark((function e(n){return(0,r.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.log(n,"value"),e.abrupt("return",{title:"好友喊你领取消费补贴啦",path:"/pages/pages-recharge/shareRedEnvelopes/index?code=".concat(n),imageUrl:"https://img.agrimedia.cn/chwl/newsh.jpg",desc:"消费补贴卡权益覆盖餐饮、话费、电商、影音娱乐、外卖打车等多种消费场景,消费补贴当钱花,快来领取吧!"});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();e.subgiftSharing=f}).call(this,n("ba7c")["default"])},"80e1":function(t,e,n){"use strict";(function(t){n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("c223"),n("5ef2"),n("5c47"),n("0506"),n("aa9c"),n("64aa"),n("c9b5"),n("bf0f"),n("ab80"),n("a1c1"),n("e966"),n("d4b5"),n("7a76");var r=a(n("fcf3")),i=a(n("9b1b")),o=(n("35ff"),n("03cc")),c=n("1bcb"),s=n("8f59"),u=n("4e62"),d={computed:{},methods:(0,i.default)((0,i.default)({},(0,s.mapMutations)(["GetState"])),{},{qnyurl:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"v2";return"https://img.agrimedia.cn/chwl/".concat(e,"/").concat(t)},RetainDecimalPoint:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=2;e&&(t/=100);var a=""+t;if(-1!=a.indexOf(".")){var r=a.indexOf("."),i=a.substring(r+1,a.length);if(!(i["length"]<n))return a.substring(0,r+3);for(var o=0;o<n-i["length"];o++)a+="0";return a}var c=/(^[1-9]\d*$)/;if(c.test(t)){for(var s=[],u="",d=0;d<a["length"];d++)s.push(a[d]);for(var l=0;l<s.length;l++)if(u+=s[l],l>=s.length-1){u+=".";for(var p=0;p<n;p++)u+="0"}return u}return a},RetainDecimalPoints:function(e){var n=e.num,a=void 0===n?0:n,r=e.iscarry,i=void 0===r||r,o=e.toFixed,c=void 0===o?2:o;if(t.log(a.__proto__.constructor.name,"numnum"),"string"!==a.__proto__.constructor.name&&"string"!==typeof a)throw"所传参数不是字符串";c=Number(c),i&&(a=""+a/100);var s=a.indexOf(".");if(-1!=s)if(c>0){var u=a.substring(s+1,a.length);if(u["length"]>c)a=a.substring(0,s+1+c);else for(var d=0;d<c-u["length"];d++)a+="0"}else a=a.substring(0,s);else{if(/(^[1-9]\d*$)/.test(a)){var l,p="";l=a.split("");for(var f=0;f<l.length;f++)if(p+=l[f],f>=l.length-1){p+=".";for(var g=0;g<c;g++)p+="0"}a=p}}return a},_commission:function(t){return this.RetainDecimalPoints({num:String(t),iscarry:!1,toFixed:4})},_amount:function(t){return this.RetainDecimalPoints({num:String(t),iscarry:!0,toFixed:2})},__amount:function(t){return this.RetainDecimalPoints({num:String(t),iscarry:!1,toFixed:2})},_deduction_prop_:function(e,n,a){var r=this.RetainDecimalPoints({num:String(n*(e/100)),iscarry:!1,toFixed:0});t.log(r,"补贴了多少");var i=this.RetainDecimalPoints({num:String(n-r),iscarry:!0,toFixed:2});t.log(i,"补贴后的价格");var o={Subsidyprice:this.RetainDecimalPoints({num:String(r),iscarry:!0,toFixed:2}),AfterSubsidy:i};return a?o[a]:o},calc:function(t,e,n){var a,r,i,o,c,s,u,d,l=0,p=0,f=1;switch(a=t.toString(),r=e.toString(),s=-1!=a.indexOf("."),u=-1!=r.indexOf("."),s&&(l=a.split(".")[1].length),u&&(p=r.split(".")[1].length),i=l>p?l:p,o=l<p?l:p,n){case"+":case"-":case"/":c=i-o;for(var g=0;g<c;g++)l==o?a+="0":r+="0";break;case"*":i+=o;break;default:return"暂不支持的计算类型,现已支持的有加法、减法、乘法、除法"}a=a.replace(".",""),r=r.replace(".","");for(g=0;g<i;g++)f*=10;switch(t=parseInt(a),e=parseInt(r),n){case"+":d=(t+e)/f;break;case"-":d=(t-e)/f;break;case"*":d=t*e/f;break;case"/":d=t/e;break;default:return"暂不支持的计算类型,现已支持的有加法、减法、乘法、除法"}return d},leftClick:function(t,e){t?uni.redirectTo({url:e}):uni.navigateBack({delta:1})},location:function(t){function e(){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(){var e,n=null===(e=getApp()["globalData"]["parameters"])||void 0===e?void 0:e.isWechat;t.log("是否小程序环境",getApp()["globalData"]["parameters"]),n?wx.miniProgram.navigateTo({url:"/pages/wxpay/openCustomerServiceChat?url=".concat(u.RXSERVICE)}):location.href="https://work.weixin.qq.com/kfid/kfc2f4d0cb26562ffe1"})),ImgSplicing:function(t){return"https://img.agrimedia.cn/chwl/H5card/".concat(t)},openLocation:function(){uni.showToast({title:"定位功能正在维护",icon:"none"})},payment:function(e){var n;uni.showLoading({title:"加载中"});var a=e.order_sn,r=e.type,i=e.redirect_url,o=void 0===i?"":i;t.log(a,r,o,"支付方法参数1"),null!==(n=getApp()["globalData"]["parameters"])&&void 0!==n&&n.isWechat?(t.log("呼呼1"),this._H5WXPAY(e).then((function(e){uni.hideLoading(),t.log(e["data"],"微信支付参数");var n={timeStamp:encodeURIComponent(e["data"]["result"]["timestamp"]),nonceStr:encodeURIComponent(e["data"]["result"]["nonceStr"]),package:encodeURIComponent(e["data"]["result"]["package"]),signType:encodeURIComponent(e["data"]["result"]["signType"]),paySign:encodeURIComponent(e["data"]["result"]["paySign"]),order_sn:e["data"]["out_trade_no"],type:r,business:"H5Environment",return_url:o};t.log(encodeURIComponent(JSON.stringify(n)),"编码"),wx.miniProgram.navigateTo({url:"/pages/wxpay/wxpay?data=".concat(encodeURIComponent(JSON.stringify(n)),"&isencodeURL=true")})}))):(t.log("呼呼2"),(0,c.WXpayH5API)({order_sn:a,type:r,redirect_url:"".concat(getApp()["globalData"]["urlfileName"],"/pages/pay/index?order_sn=").concat(a,"&type=").concat(r,"&redirect_url=").concat(o)}).then((function(e){t.log("".concat(getApp()["globalData"]["urlfileName"],"/pages/pay/index?order_sn=").concat(a,"&type=").concat(r,"&redirect_url=").concat(o)),t.log(e["data"]["redirect_url"],"支付方法地址"),window.location.replace(e["data"]["redirect_url"])})))},_H5WXPAY:function(t){if(3==t["type"]){var e=t.order_sn,n=t.money;return(0,o.WXpayAPI)({out_order_num:e,money:n})}if(4==t["type"]){var a=t.order_sn;return(0,o.WXpayDYPAPI)({orderNo:a})}if(7==t["type"]){var r=t.order_sn,i=t.type,s=t.redirect_url;return(0,c.WXpayH5API)({order_sn:r,type:i,redirect_url:s})}},pay_statepage:function(e,n){var a="";if(a+=n,t.log(a,"判断跳转链接"),t.log("拼接参数"),"undefined"!==typeof e)for(var r in e)-1!=a.indexOf("?")?a+="&".concat(r,"=").concat(e[r]):a+="?".concat(r,"=").concat(e[r]);t.log(a,"地址"),n&&uni.redirectTo({url:a})},initScrollView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:data,n=e.el,a=e.bottomlb,i=void 0===a?0:a,o=this;return new Promise((function(e,a){uni.getSystemInfo({success:function(a){"string"===typeof n?uni.createSelectorQuery().in(o).select(".".concat(n)).boundingClientRect((function(r){t.log(r,o["NAVHEIGHT"],i,"元素高度"),0==r["height"]&&"OrderToggleType"==n&&(i=45),e((a.windowHeight-(r["height"]+o["NAVHEIGHT"]+i))*(750/a["windowWidth"]))})).exec():"object"===(0,r.default)(n)&&function(){for(var e=[],a=0;a<n["length"];a++)uni.createSelectorQuery().in(o).select(".".concat(n[a])).boundingClientRect((function(n){e.push(n["height"]),t.log(e,"高度")})).exec()}()}})}))},deepClone:function(t){function e(e){return t.apply(this,arguments)}return e.toString=function(){return t.toString()},e}((function(t){if(!t||"object"!==(0,r.default)(t))throw new Error("error arguments","shallowClone");var e=t.constructor===Array?[]:{};for(var n in t)t.hasOwnProperty(n)&&(t[n]&&"object"===(0,r.default)(t[n])?(e[n]=t[n].constructor===Array?[]:{},e[n]=deepClone(t[n])):e[n]=t[n]);return e})),Copy:function(t){uni.setClipboardData({data:t,success:function(){uni.showToast({title:"复制成功",icon:"none"})}})},GetUserchooseLocation:function(){return new Promise((function(e,n){uni.chooseLocation({success:function(a){getCityName2(a["latitude"],a["longitude"]).then((function(n){t.log(n,"eeeeeeeeeee");var a=n.result,r=a.address,i=a.ad_info,o=i.province,c=i.city,s=i.district,u=i.location,d=i.city_code,l=i.name,p=a.formatted_addresses.recommend;e({province:o,city:c,district:s,location:u,city_code:d,name:l,recommend:p,address:r})})).catch((function(t){n(t)}))}})}))},handleOpen:function(){},regYuanToFen:function(t,e){var n=0,a=t.toString(),r=e.toString();try{n+=a.split(".")[1].length}catch(i){}try{n+=r.split(".")[1].length}catch(i){}return Number(a.replace(".",""))*Number(r.replace(".",""))/Math.pow(10,n)},getUrlParams:function(t){try{for(var e=t.split("?")[1],n={},a=e.split("&"),r=0,i=a.length;r<i;r++){var o=a[r].split("=");n[o[0]]=o[1]}return n}catch(c){return!1}}}),filters:{OrderState:function(t){switch(t){case 0:return"待支付";case 1:return"待发货";case 2:return"待收货";case 3:return"已退款";case 4:return"已取消";case 5:return"完成"}}}};e.default=d}).call(this,n("ba7c")["default"])},acef:function(t,e,n){"use strict";n.r(e);var a=n("24a6"),r=n("c294");for(var i in r)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(i);n("d310");var o=n("828b"),c=Object(o["a"])(r["default"],a["b"],a["c"],!1,null,"99c7b0e6",null,!1,a["a"],void 0);e["default"]=c.exports},bf7d:function(t,e,n){"use strict";n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;n("8f59");var r=n("4e62"),i=a(n("80e1")),o=a(n("d5ee")),c=(n("79de"),{mixins:[i.default,o.default],data:function(){return{showw:!1}},onShow:function(){this.SETNAVINDEX(0)},onLoad:function(){this.SETBRANDINFOR({brand_id:2,brand_name:"奈雪的茶"}),this.$wx.miniProgram.postMessage({data:{title:"奈雪的茶——人生亦如茶,经历沉浮,方能回甘,喝奈雪,点这里",imageUrl:"https://img.agrimedia.cn/chwl/nx/nxshare.jpg",ISH5:!0,CallbackUrl:"https://jc.agrimedia.cn/privilege/pages/restaurant/index/index_nx"}})},methods:{oreder:function(){var t=this;uni.navigateTo({url:"/pages/restaurant/home/home",success:function(){t.SETNAVINDEX(1)}})},service:function(){window.location.href=r.RXSERVICE}},onShareAppMessage:function(){return XBKSharing()}});e.default=c},c294:function(t,e,n){"use strict";n.r(e);var a=n("bf7d"),r=n.n(a);for(var i in a)["default"].indexOf(i)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(i);e["default"]=r.a},d310:function(t,e,n){"use strict";var a=n("165a"),r=n.n(a);r.a},d5ee:function(t,e,n){"use strict";(function(t){n("6a54");var a=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("c223"),n("aa9c"),n("fd3c"),n("8f71"),n("bf0f"),n("d4b5");var r=a(n("b7c7")),i=a(n("9b1b")),o=n("6d1d"),c=a(n("b248")),s=n("8f59"),u=n("03cc"),d={data:function(){return{shopid:0,countDown:0,wait_for:"",SER_USERINFOR:o.SER_USERINFOR,OrderStatus0:0,OrderStatus1:1,OrderStatus2:2,OrderStatus3:3,OrderStatus4:4,OrderStatus5:5}},filters:{OrderState:function(t){switch(t){case 0:return"待支付";case 1:return"待出餐";case 2:return"已出餐";case 3:return"已退款";case 4:return"已出餐(部分退款)";case 5:return"已关闭"}},OrderStateText:function(t){switch(t){case 0:return"待支付";case 1:return"实付";case 2:return"实付";case 3:return"实付";case 4:return"实付";case 5:return"待支付"}}},computed:(0,i.default)((0,i.default)({BrandStyle:function(){}},(0,s.mapState)({cartList:"shopping/cartList"})),(0,s.mapGetters)({UserArae1:"GetUserArae",GetcityInfor:"GetcityInfor",UserArae2:"GetcityInfor",GetCityCode:"GetCityCode",BrandInfor:"shopping/BrandInfor",GetShopInfor:"shopping/GetShopInfor",Getnavindex:"shopping/Getnavindex",GetCartList:"shopping/GetCartList",GetCartList2:"shopping/Getshopshopping",GetMODE:"shopping/GetMODE",getPhone:"shopping/getPhone"})),methods:(0,i.default)((0,i.default)((0,i.default)({},(0,s.mapMutations)({SetcommodityInfor:"shopping/SETINFOR",SETNAVINDEX:"shopping/SETNAVINDEX",SETSHOPDETAIL:"shopping/SETSHOPDETAIL",MODEAL:"shopping/MODEAL",SETREPLACE:"shopping/SETREPLACE",SETBRANDINFOR:"shopping/SETBRANDINFOR",INIT_BUYCART:"shopping/INIT_BUYCART",SETMODE:"shopping/SETMODE",SETPHONE:"shopping/SETPHONE"})),(0,s.mapActions)({EMPTY:"shopping/EMPTY",ADD_CART:"shopping/ADD_CART",REDUCE_CART:"shopping/REDUCE_CART"})),{},{Brand:function(){return c.default["Brand_".concat(this["BrandInfor"]["brand_id"])]},tiem:function(e,n,a){var r=this;if(0===e){var i=new Date(1e3*n);i.setMinutes(i.getMinutes()+15),this["countDown"]=setTimeout((function(){var o=i.getTime(),c=(new Date).getTime(),s=new Date(o-c);if(t.log(o-c,"执行2",a),o-c<=0)try{r["InforData"]["status"]=5}catch(l){}else{r.tiem(e,n,a);var u=s.getMinutes();u=u>9?u:"0".concat(u);var d=s.getSeconds();d=d>9?d:"0".concat(d),r["wait_for"]="".concat(u,":").concat(d)}}),1e3)}},openLocation:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:+this["GetShopInfor"]["latitude"],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:+this["GetShopInfor"]["longitude"];t.log(e,n),uni.openLocation({latitude:e,longitude:n,success:function(){t.log("success")}})},screensku_rx:function(){for(var t=[],e=this["skuinfor"]["details"]["specifications"],n=0;n<e["length"];n++){var a=e[n];t.push.apply(t,(0,r.default)(a["ingredients"]))}var i=t.filter((function(t){return t["checked"]})).map((function(t){return t["name"]}));return{sku:i,text:i.join("/")}},screensku_xbk:function(){for(var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this["skuinfor"]["details"]["optional"],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this["skuinfor"]["pay_price"],n=0,a=[],i=+JSON.parse(JSON.stringify(e)),o=t,c=0;c<o["length"];c++){var s=o[c];a.push.apply(a,(0,r.default)(s["sku_infos"]))}var u=a.filter((function(t){if(t["checked"])return null!==t&&void 0!==t&&t.price&&(n=100*t["price"],i+=n),t})).map((function(t){return t["name"]}));return{sku:u,pay:i,add_price:n}},navigateBack:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;e&&this.SETNAVINDEX(n),uni.navigateBack({delta:t})},againpayment:function(e){var n,a,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;t.log(this["BrandInfor"]["brand_id"],"品牌ID"),a=1==this["BrandInfor"]["brand_id"]||5==this["BrandInfor"]["brand_id"]?"/pages/restaurant/order/order-status/order-status":"/pages/restaurant/order/order-details/details";var i=null===(n=getApp()["globalData"]["parameters"])||void 0===n?void 0:n.isWechat;i?this.payment({order_sn:e,type:3,redirect_url:a,money:r}):(0,u.agOrderPayAPI)({order_sn:e,type:3,redirect_url:"".concat(getApp()["globalData"]["urlfileName"],"/pages/pay/index?order_sn=").concat(e,"&type=",3,"&redirect_url=").concat(a)}).then((function(t){location.href=t["data"]["redirect_url"]}))},computedOrder:function(){var t=this;(0,u.computedOfflineOrder)(this.FormInfor).then((function(e){t.computedTotal=e.data,e.data.used_broker||(t.use_broker=!1),e.data.used_coin||(t.use_coin=!1)}))},Reorder:function(e){t.log(e,"重新下单商品"),uni.showLoading({title:"加载中..."});var n=this,a=0,r=e[0],i=r.restaurant_id,o=r.latitude,c=r.longitude,s=r.restaurant_address,u=r.restaurant_name;this.SETSHOPDETAIL({city_name:"",close_time:"",distance:"",open_time:"",province_name:"",regoin_name:"",special:!1,latitude:o,longitude:c,restaurant_address:s,restaurant_id:i,restaurant_name:u});this.EMPTY(e[0]["restaurant_id"]).then((function(r){t.log(r),setTimeout((function(){(function r(){t.log("第".concat(a,"个,总共有").concat(e["length"])),t.log(e[a]["sku_code"],"sku_code"),n.ADD_CART({commodity:e[a],quantity:e[a]["num"]}).then((function(){if(a>=e["length"]-1)return uni.hideLoading(),void uni.navigateTo({url:"/pages/restaurant/home/shop_home/shop_home?restaurant_id=".concat(i)});a+=1,r()}))})()}),1e3)}))},MPAPI:function(t,e,n){var a="";if("Android"==plus.os.name){var r=plus.runtime.isApplicationExist({pname:"com.baidu.BaiduMap",action:"baidumap://"}),i="baidumap://map/marker?location=".concat(t,",").concat(e,"&title=").concat(n,"&coord_type=gcj02&src=andr.baidu.openAPIdemo");r?plus.runtime.openURL(i):plus.nativeUI.alert("未安装地图APP")}else plus.nativeUI.actionSheet({title:"选择地图应用",cancel:"取消",buttons:[{title:"Apple地图"},{title:"百度地图"}]},(function(r){switch(r.index){case 1:a="http://maps.apple.com/?q=%e6%95%b0%e5%ad%97%e5%a4%a9%e5%a0%82&ll=".concat(t,",").concat(e,"&spn=0.008766,0.019441");break;case 2:a="baidumap://map/marker?location=".concat(t,",").concat(e,"&title=").concat(n,"&content=").concat(n,"&src=ios.baidu.openAPIdemo&coord_type=gcj02");break;default:break}""!=a&&plus.runtime.openURL(a,(function(t){plus.nativeUI.alert("未安装地图APP")}))}))}}),beforeDestroy:function(){clearTimeout(this["countDown"])}},l=d;e.default=l}).call(this,n("ba7c")["default"])}}]); |