You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
7.0 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/OrderSubmission/index"],{"050d":function(e,t,o){"use strict";(function(e){o("0371");n(o("66fd"));var t=n(o("9233"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,o("543d")["createPage"])},"4b51":function(e,t,o){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=o("2559"),i=o("2f62"),r=o("0510"),s=(o("183b"),o("8c38"));function a(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function d(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?a(Object(o),!0).forEach((function(t){c(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):a(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function c(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var u=function(){o.e("components/OrderGoods").then(function(){return resolve(o("52fa"))}.bind(null,o)).catch(o.oe)},l=function(){o.e("components/CouponListWindow").then(function(){return resolve(o("f182"))}.bind(null,o)).catch(o.oe)},h=function(){o.e("components/AddressWindow").then(function(){return resolve(o("f40b"))}.bind(null,o)).catch(o.oe)},p="OrderSubmission",f=(0,s.isWeixin)(),g={name:p,components:{OrderGoods:u,CouponListWindow:l,AddressWindow:h},props:{},data:function(){return{offlinePayStatus:2,from:this.$deviceType,deduction:!0,enableIntegral:!0,enableIntegralNum:0,isWeixin:f,pinkId:0,active:"weixin",showCoupon:!1,showAddress:!1,addressInfo:{},couponId:0,orderGroupInfo:{priceGroup:{}},usableCoupon:{},addressLoaded:!1,useIntegral:!1,orderPrice:{payPrice:"计算中"},mark:"",systemStore:{},shipping_type:0,contacts:"",contactsTel:"",storeSelfMention:0,cartid:"",isIntegral:!1,isEnough:!0}},computed:(0,i.mapGetters)(["userInfo","storeItems"]),watch:{useIntegral:function(){this.computedPrice()},shipping_type:function(){this.computedPrice()}},onLoad:function(){var e=this;console.log("loadddddddd"),this.$store.dispatch("getUser",!0),e.getCartInfo(),console.log(e.$yroute),void 0!==e.$yroute.query.pinkid&&(e.pinkId=e.$yroute.query.pinkid),this.isIntegral="true"==e.$yroute.query.isIntegral,this.useIntegral=this.isIntegral,this.isIntegral&&(this.active="integral"),void 0!==e.$yroute.query.id&&(e.cartid=e.$yroute.query.id,console.log(e.cartid))},methods:{showStoreList:function(){this.$store.commit("get_to","orders"),this.$yrouter.push({path:"/pages/shop/StoreList/index"})},addressType:function(t){!t||this.systemStore.id?(console.log(this),this.shipping_type=t):e.showToast({title:"暂无门店信息,您无法选择到店自提!",icon:"none",duration:2e3})},changeUseIntegral:function(e){this.isIntegral||(this.useIntegral=e.mp.detail.value[0])},computedPrice:function(){var e=this,t=this.shipping_type;(0,n.postOrderComputed)(this.orderGroupInfo.orderKey,{addressId:this.addressInfo.id,useIntegral:this.useIntegral?1:0,couponId:this.usableCoupon.id||0,shipping_type:parseInt(t)+1}).then((function(t){var o=t.data;"EXTEND_ORDER"===o.status?e.$yrouter.replace({path:"/pages/order/OrderDetails/index",query:{id:o.result.orderId}}):e.orderPrice=o.result}))},getCartInfo:function(){var t=this,o=this.$yroute.query.id;if(!o)return e.showToast({title:"参数有误",icon:"none",duration:2e3}),this.$yrouter.back();(0,n.postOrderConfirm)(o).then((function(e){console.log(e,999999),console.log(e.data.systemStore||{},999999),t.offlinePayStatus=e.data.offline_pay_status,t.orderGroupInfo=e.data,t.deduction=e.data.deduction,t.usableCoupon=e.data.usableCoupon||{},t.addressInfo=e.data.addressInfo||{},t.systemStore=e.data.systemStore||{},t.storeSelfMention=e.data.storeSelfMention,t.isEnough=e.data.isEnough,t.computedPrice()})).catch((function(t){console.log(t),e.showToast({title:"加载订单数据失败",ic