(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order/buy"],{"06f6":function(e,t,n){"use strict";n.r(t);var o=n("d8cf"),r=n("42ec");for(var i in r)"default"!==i&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("f814");var u=n("5511"),s=Object(u["a"])(r["default"],o["a"],o["b"],!1,null,"28c2c0ae",null);t["default"]=s.exports},"42ec":function(e,t,n){"use strict";n.r(t);var o=n("9bfc"),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},"8bb7":function(e,t,n){},"9bfc":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n("08c1"),r=n("5f87"),i=n("01ea"),u=n("3a10");function s(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 c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){a(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(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"))},f=function(){return n.e("components/plugin/list-cell").then(n.bind(null,"1861"))},p=function(){return n.e("components/app-delivery").then(n.bind(null,"c7ce"))},d=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"))},b=function(){return Promise.all([n.e("common/vendor"),n.e("components/app-coupon-sel")]).then(n.bind(null,"3c3e"))},h=function(){return n.e("components/plugin/alert").then(n.bind(null,"a366"))},g=n("90f4"),y={name:"order-buy",components:{AppTabs:l,AppDeliveryModule:p,TuiListCell:f,AppListModule:m,AppCouponSel:b,AppTrademark:d,AlertModule:h},data:function(){return{goodsInfo:{},tabIndex:0,tabs:[{name:"配送"},{name:"我要自提"}],showAlert:!1,form:{anonymity:"0",sendDistance:"",goodsId:"",goodsStyleId:"",goodsNum:"",couponId:"0",receiveLat:"",receiveLong:""},mentionForm:{bookMobile:""}}},computed:c({},(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)(),(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)(c({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:c({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("d1ae")["default"])},d8cf:function(e,t,n){"use strict";var o=function(){var e=this,t=e.$createElement,n=(e._self._c,e.$util.isEmpty(e.goodsInfo)),o=e.$util.isEmpty(e.shopUser);e.$mp.data=Object.assign({},{$root:{g0:n,g1:o}})},r=[];n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return r}))},f814:function(e,t,n){"use strict";var o=n("8bb7"),r=n.n(o);r.a}},[["52b9","common/runtime","common/vendor"]]]);