12 |
- require('./common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageA/order"],{235:function(n,e,i){"use strict";(function(n,e){var t=i(4);i(26);t(i(25));var o=t(i(236));n.__webpack_require_UNI_MP_PLUGIN__=i,e(o.default)}).call(this,i(1)["default"],i(2)["createPage"])},236:function(n,e,i){"use strict";i.r(e);var t=i(237),o=i(239);for(var s in o)["default"].indexOf(s)<0&&function(n){i.d(e,n,(function(){return o[n]}))}(s);i(241);var a,u=i(37),c=Object(u["default"])(o["default"],t["render"],t["staticRenderFns"],!1,null,"2e3811f3",null,!1,t["components"],a);c.options.__file="pageA/order.vue",e["default"]=c.exports},237:function(n,e,i){"use strict";i.r(e);var t=i(238);i.d(e,"render",(function(){return t["render"]})),i.d(e,"staticRenderFns",(function(){return t["staticRenderFns"]})),i.d(e,"recyclableRender",(function(){return t["recyclableRender"]})),i.d(e,"components",(function(){return t["components"]}))},238:function(n,e,i){"use strict";var t;i.r(e),i.d(e,"render",(function(){return o})),i.d(e,"staticRenderFns",(function(){return a})),i.d(e,"recyclableRender",(function(){return s})),i.d(e,"components",(function(){return t}));try{t={uIcon:function(){return Promise.all([i.e("common/vendor"),i.e("uview-ui/components/u-icon/u-icon")]).then(i.bind(null,860))},uPopup:function(){return Promise.all([i.e("common/vendor"),i.e("uview-ui/components/u-popup/u-popup")]).then(i.bind(null,885))}}}catch(u){if(-1===u.message.indexOf("Cannot find module")||-1===u.message.indexOf(".vue"))throw u;console.error(u.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var o=function(){var n=this,e=n.$createElement,i=(n._self._c,n.addinfo?n.replacePhoneToStar(n.addinfo.mobile):null),t="shop"!=n.typea&&1==n.goodinfo.is_discount?Number(1e3*n.sku_info.price):null,o="shop"!=n.typea&&1==n.goodinfo.is_discount?Number(1e3*n.value):null,s="shop"!=n.typea&&1!=n.goodinfo.is_discount?Number(1e3*n.sku_info.discount_price):null,a="shop"!=n.typea&&1!=n.goodinfo.is_discount?Number(n.value):null,u=n.__map(n.swiptlist,(function(e,i){var t=n.__get_orig(e),o=0==e.is_discount?e.discount_price.slice(0,-3):null,s=0!=e.is_discount?e.price.slice(0,-3):null,a=0==e.is_discount?e.discount_price.slice(-3):null,u=0!=e.is_discount?e.price.slice(-3):null;return{$orig:t,g0:o,g1:s,g2:a,g3:u}})),c="shop"!=n.typea&&1==n.goodinfo.is_discount?Number(100*n.sku_info.price):null,r="shop"!=n.typea&&1==n.goodinfo.is_discount?Number(100*n.value):null,d="shop"!=n.typea&&1!=n.goodinfo.is_discount?Number(100*n.sku_info.discount_price):null,h="shop"!=n.typea&&1!=n.goodinfo.is_discount?Number(100*n.value):null,l="shop"!=n.typea&&1==n.goodinfo.is_discount?Number(100*n.sku_info.price):null,p="shop"!=n.typea&&1==n.goodinfo.is_discount?Number(100*n.value):null,m="shop"!=n.typea&&1!=n.goodinfo.is_discount?Number(100*n.sku_info.discount_price):null,g="shop"!=n.typea&&1!=n.goodinfo.is_discount?Number(100*n.value):null,_="shop"==n.typea?Number(1e4*n.sum+1e4*Number(n.goodsPrice)):null,f="shop"!=n.typea&&1==n.goodinfo.is_discount?Number(1e4*n.sum+Number(n.sku_info.price)*Number(n.value)*1e4):null,v="shop"!=n.typea&&0==n.goodinfo.is_discount?Number(1e4*n.sum+Number(n.sku_info.discount_price)*Number(n.value)*1e4):null;n.$mp.data=Object.assign({},{$root:{m0:i,m1:t,m2:o,m3:s,m4:a,l0:u,m5:c,m6:r,m7:d,m8:h,m9:l,m10:p,m11:m,m12:g,m13:_,m14:f,m15:v}})},s=!1,a=[];o._withStripped=!0},239:function(n,e,i){"use strict";i.r(e);var t=i(240),o=i.n(t);for(var s in t)["default"].indexOf(s)<0&&function(n){i.d(e,n,(function(){return t[n]}))}(s);e["default"]=o.a},240:function(n,e,i){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i={data:function(){return{value:1,show:!1,index:"",show1:!1,datechan:"",sku_info:{},goodinfo:{},swiptlist:[],language:"zh-CN",containerList:[],province_id:"",transport_type_id:"",containlist:[],containid:"",containname:"",type:"",containname1:"",type1:"",sum:"",unit_price:"",recommend_weight:"",sum1:"",unit_price1:"",recommend_weight1:"",max_weight:"",min_weight:"",unit_fee:"",addinfo:"",huoid:"",selelist:[],typea:"",goodsPrice:"",goodsWeight:"",stringcheck:"",cartid:"",weight_total:"",valuenum:!1}},computed:{i18n:function(){return this.$t("index")}},onLoad:function(n){n.typea?(console.log(22222),this.typea=n.typea,this.selelist=JSON.parse(decodeURIComponent(n.selelist)),this.goodsPrice=n.goodsPrice,this.goodsWeight=n.goodsWeight,this.stringcheck=n.stringcheck,this.cartid=n.cartid):n&&(this.value=n.value,this.sku_info=JSON.parse(decodeURIComponent(n.sku)),this.goodinfo=JSON.parse(decodeURIComponent(n.goodinfo)),n.share_merchant_id&&(this.share_merchant_id=n.share_merchant_id))},onShow:function(){""!=n.getStorageSync("language")&&(this.language=n.getStorageSync("language")),this.recommend()},methods:{changwu:function(){this.addinfo?this.show=!0:this.$u.toast(this.i18n.shippingaddress)},valChange:function(){this.valuenum=!0},todetail:function(e){n.navigateTo({url:"/pageA/productdetails?id="+e})},replacePhoneToStar:function(n){if(n)return n.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")},recommendweight:function(){var e=this;n.$u.http.get("/api/express-order/recommend-container",{params:{container_id:this.containid,type:0==this.goodinfo.cate?"normal":"special"}}).then((function(n){console.log(n),e.max_weight=n.max_weight,e.min_weight=n.min_weight,e.unit_fee=n.unit_fee})).catch((function(){}))},transport:function(){var e=this;n.$u.http.get("/api/transport-type",{params:{province_id:this.province_id}}).then((function(n){e.containerList=n,e.transport_type_id=n[0].id,"zh-CN"==e.language&&(e.type=n[0].name_cn),"en-US"==e.language&&(e.type=n[0].name_en),"es-ES"==e.language&&(e.type=n[0].name_es),"it-IT"==e.language&&(e.type=n[0].name_ita)})).catch((function(){}))},toadd:function(){var e=this;n.navigateTo({url:"/pageC/addressManagement/addressManagement?tabs="+Number(0),events:{getadd:function(n){e.addinfo=n,e.province_id=n.province_id,e.transport()}}})},container:function(){var e=this;this.containlist=[],n.$u.http.get("/api/container-base",{params:{is_page:0,province_id:this.province_id,transport_type_id:this.transport_type_id,weight:"shop"==this.typea?"":Number(this.sku_info.weight)*this.value,type:"shop"==this.typea?"":0==this.goodinfo.cate?"normal":"special",length:"shop"==this.typea?"":Number(this.sku_info.length)*this.value,width:this.sku_info.width,height:this.sku_info.height,cart_id:this.cartid}}).then((function(n){n.forEach((function(n){0!=n.sum&&e.containlist.push(n),console.log(e.containlist)})),0==e.cartid.length&&"shop"==e.typea&&(console.log("his.cartid.length",e.cartid.length),e.sum=0),0==e.goodinfo.is_shipping?e.sum=0:e.sum=e.containlist[0].sum,0==e.goodinfo.is_shipping?e.unit_price=0:e.unit_price=e.containlist[0].unit_price,e.recommend_weight=e.containlist[0].recommend_weight,e.weight_total=e.containlist[0].weight_total,e.containid=e.containlist[0].id,"zh-CN"==e.language&&(e.containname=e.containlist[0].name_cn),"en-US"==e.language&&(e.containname=e.containlist[0].name_en),"es-ES"==e.language&&(e.containname=e.containlist[0].name_es),"it-IT"==e.language&&(e.containname=e.containlist[0].name_ita)})).catch((function(){}))},config:function(){var e=this;n.$u.http.get("/api/config",{params:{module:"free_shipping"}}).then((function(n){Number(e.goodsPrice)>n.free_shipping&&"shop"==e.typea&&(console.log("goodsPrice",e.goodsPrice),console.log("res.free_shipping",n.free_shipping),e.sum=0,e.unit_price=0);var i="";1==e.goodinfo.is_discount?(i=Number(100*e.sku_info.price)*Number(100*e.value)/1e4,console.log("that.sum",e.sum),console.log("that.goodsum",i),i>n.free_shipping&&(e.sum=0,e.unit_price=0)):(i=Number(100*e.sku_info.discount_price)*Number(100*e.value)/1e4,i>n.free_shipping&&(e.sum=0,e.unit_price=0))})).catch((function(){}))},recommend:function(){var e=this;n.$u.http.post("/api/goods/recommend",{keyword:""}).then((function(n){e.swiptlist=n})).catch((function(){}))},change:function(n,e){this.transport_type_id=n.id,this.index=e,"zh-CN"==this.language&&(this.type=n.name_cn),"en-US"==this.language&&(this.type=n.name_en),"es-ES"==this.language&&(this.type=n.name_es),"it-IT"==this.language&&(this.type=n.name_ita)},next:function(){this.show=!1,this.show1=!0,this.type1=this.type,this.container()},activea:function(n,e){this.datechan=e,this.sum=n.sum,this.unit_price=n.unit_price,this.recommend_weight=n.recommend_weight,this.containid=n.id,this.weight_total=n.weight_total,"zh-CN"==this.language&&(this.containname=n.name_cn),"en-US"==this.language&&(this.containname=n.name_en),"es-ES"==this.language&&(this.containname=n.name_es),"it-IT"==this.language&&(this.containname=n.name_ita)},confirm:function(){this.valuenum=!1,this.show1=!1,this.containname1=this.containname,this.recommendweight(),this.config()},close:function(){this.show=!1,this.show1=!1},topay:function(){var e=this;this.valuenum?this.$u.toast(this.i18n.newcontainer):n.$u.http.post("/api/order",{address_id:this.addinfo.id,goods_id:this.goodinfo.id,goods_num:this.value,sku_item_id:this.sku_info.id,cart_ids:this.stringcheck,remark:"",merchant_goods_id:this.goodinfo.merchant_goods_id||"",container_id:this.containid,share_member_id:this.share_merchant_id,belong:this.goodinfo.source||""}).then((function(i){console.log("share_merchant_id",e.share_merchant_id),console.log(i),n.navigateTo({url:"/pageA/payorder?orderid="+i.id+"&sum="+i.amount})})).catch((function(){}))}}};e.default=i}).call(this,i(2)["default"])},241:function(n,e,i){"use strict";i.r(e);var t=i(242),o=i.n(t);for(var s in t)["default"].indexOf(s)<0&&function(n){i.d(e,n,(function(){return t[n]}))}(s);e["default"]=o.a},242:function(n,e,i){}},[[235,"common/runtime","common/vendor"]]]);
- //# sourceMappingURL=../../.sourcemap/mp-weixin/pageA/order.js.map
|