| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/buy"],{"06f6":function(e,t,n){"use strict";n.r(t);var o=n("e027"),r=n("42ec");for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("4eb9");var u,c=n("f0c5"),s=Object(c["a"])(r["default"],o["b"],o["c"],!1,null,"144d8d98",null,!1,o["a"],u);t["default"]=s.exports},1572:function(e,t,n){},"42ec":function(e,t,n){"use strict";n.r(t);var o=n("7a3d"),r=n.n(o);for(var i in o)"default"!==i&&function(e){n.d(t,e,(function(){return o[e]}))}(i);t["default"]=r.a},"4eb9":function(e,t,n){"use strict";var o=n("1572"),r=n.n(o);r.a},"52b9":function(e,t,n){"use strict";(function(e){n("6cdc"),n("921b");o(n("66fd"));var t=o(n("06f6"));function o(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,n("543d")["createPage"])},"7a3d":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("2f62"),r=n("5f87"),i=n("01ea"),u=n("3a10");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var l=function(){return n.e("components/plugin/tabs").then(n.bind(null,"f58d"))},d=function(){return n.e("components/plugin/list-cell").then(n.bind(null,"1861"))},f=function(){return n.e("components/app-delivery").then(n.bind(null,"c7ce"))},p=function(){return n.e("components/module/app-trademark").then(n.bind(null,"ea75"))},m=function(){return n.e("components/module/app-order-list").then(n.bind(null,"7d55"))},h=function(){return Promise.all([n.e("common/vendor"),n.e("components/app-coupon-sel")]).then(n.bind(null,"3c3e"))},b=function(){return n.e("components/plugin/alert").then(n.bind(null,"a366"))},g=n("90f4"),y={name:"order-buy",components:{AppTabs:l,AppDeliveryModule:f,TuiListCell:d,AppListModule:m,AppCouponSel:h,AppTrademark:p,AlertModule:b},data:function(){return{goodsInfo:{},tabIndex:0,tabs:[{name:"配送"},{name:"我要自提"}],showAlert:!1,form:{anonymity:"0",sendDistance:"",goodsId:"",goodsStyleId:"",goodsNum:"",couponId:"0",receiveLat:"",receiveLong:""},mentionForm:{bookMobile:""},discountArr:!1}},computed:s({},(0,o.mapGetters)({orderShop:"getOrderShop"}),{},(0,o.mapGetters)({shopUser:"getShopUser"}),{totalPrice:function(){var e=this.goodsInfo.price*this.option.goodsNum,t=this.$util.isEmpty(this.shopUser)?this.shopUser.userAsset.discount*e:1*e;return t/=10,t.toFixed(2)}}),onLoad:function(e){},methods:{init:function(){var t=this,n=e.getStorageSync("buyGoodsDetil");(0,i.getOrderShop)().then((function(){t.$refs.couponSel._getUserDiscount().then((function(e){t.discountArr=e}))})),(0,r.getShopUser)(),n.buyNum=this.option.goodsNum,this.goodsInfo=n,Object.keys(this.form).forEach((function(e,n){t.form[e]=t.option[e]}))},createOrderFn:function(){var t=this,n={},o=0==this.tabIndex?this.$refs.appDelivery.form:this.mentionForm,r=0==this.tabIndex?this.$refs.appDelivery.region:{};this.$refs.couponSel&&(n.couponId=this.$refs.couponSel.couponId),(0,u.createOrder)(s({needSend:0==this.tabIndex?"1":"0"},o,{},this.form,{},n,{},r)).then((function(n){e.removeStorageSync("buyGoodsDetil"),t.$util.pageTo({url:"/pages/callback/index",query:s({pagestatus:1},n.data)})}))},confirmFn:function(){console.log(this.$refs.appDelivery),this.createOrderFn()},tabChange:function(e){this.tabIndex=e.index},hideAlert:function(){this.showAlert=!1},anonymityChange:function(e){this.form.anonymity=1==this.form.anonymity?0:1},formSubmit:function(e){console.log(e);var t=[],n=e.detail.value,o=g.validation(n,t);o?this.$msg(o):this.confirmFn()}}};t.default=y}).call(this,n("543d")["default"])},e027:function(e,t,n){"use strict";var o,r=function(){var e=this,t=e.$createElement,n=(e._self._c,e.$util.isEmpty(e.goodsInfo)),o=e.$util.isEmpty(e.discountArr);e.$mp.data=Object.assign({},{$root:{g0:n,g1:o}})},i=[];n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return o}))}},[["52b9","common/runtime","common/vendor"]]]);
|