ParcelExpress.js 5.7 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pageB/ParcelExpress"],{"28fc":function(n,t,o){"use strict";(function(n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={data:function(){return{deal:-1,checkboxValue1:[],expressinfo:{},topadd:{},bottomadd:{},province_id:"",goodinfo:{},sum:"",internationalshow:!1,content:"",contenttitle:"",language:"zh-CN"}},onLoad:function(t){this.expressinfo=JSON.parse(decodeURIComponent(t.expressinfo)),""!=n.getStorageSync("language")&&(this.language=n.getStorageSync("language"))},computed:{i18n:function(){return this.$t("index")}},methods:{close:function(){this.internationalshow=!1},internationalshowa:function(){this.internationalshow=!0,this.international()},international:function(){var t=this;n.$u.http.get("/api/agreement",{params:{code:"international_express_service"}}).then((function(n){console.log(n),"zh-CN"==t.language&&(t.content=n.content_cn,t.contenttitle=n.name_cn),"en-US"==t.language&&(t.content=n.content_en,t.contenttitle=n.name_en),"es-ES"==t.language&&(t.content=n.content_es,t.contenttitle=n.content_ita),"it-IT"==t.language&&(t.content=n.content_cn,t.contenttitle=n.name_ita)})).catch((function(){}))},changeadd:function(){var n;n=this.topadd,this.topadd=this.bottomadd,this.bottomadd=n,this.province_id=this.bottomadd.province_id},replacePhoneToStar:function(n){if(n)return n.replace(/(\d{3})\d{4}(\d{4})/,"$1****$2")},addbook:function(t){var o=this;n.navigateTo({url:"/pageC/addressManagement/addressManagement?index="+t,events:{getadd:function(n){0==t?(o.topadd=n,console.log("topadd",o.topadd)):(o.bottomadd=n,console.log("bottom",o.bottomadd),o.province_id=o.bottomadd.province_id)}}})},goods:function(){if("{}"!=JSON.stringify(this.topadd))if("{}"!=JSON.stringify(this.bottomadd)){var t=this;n.navigateTo({url:"/pageB/goods",events:{goodinfo:function(n){t.goodinfo=n,t.calculate()}}})}else this.$u.toast("请填写收件地址");else this.$u.toast("请填写寄件地址")},send:function(){n.navigateTo({url:"/pageB/Senderinfor"})},recipirnt:function(){n.navigateTo({url:"/pageB/recipientinfo"})},checkboxChange:function(n){console.log("change",n)},next:function(){var t=this;"{}"!==JSON.stringify(this.topadd)?"{}"!==JSON.stringify(this.bottomadd)?"{}"!==JSON.stringify(this.goodinfo)?0!=this.checkboxValue1.length?n.$u.http.post("/api/express-order/group-create",{group_package_id:this.expressinfo.id,from_address_id:this.topadd.id,to_address_id:this.bottomadd.id,goods_name:this.goodinfo.goodname,goods_num:this.goodinfo.number,goods_weight:this.goodinfo.weight,goods_length:Number(this.goodinfo.length),goods_width:Number(this.goodinfo.width),goods_height:Number(this.goodinfo.height)}).then((function(o){t.orderinfo=o,n.navigateTo({url:"/pageB/account?goodinfo="+encodeURIComponent(JSON.stringify(t.goodinfo))+"&topadd="+encodeURIComponent(JSON.stringify(t.topadd))+"&bottomadd="+encodeURIComponent(JSON.stringify(t.bottomadd))+"&expressinfo="+encodeURIComponent(JSON.stringify(t.expressinfo))+"&orderinfo="+encodeURIComponent(JSON.stringify(t.orderinfo))})})).catch((function(){})):this.$u.toast("请勾选协议"):this.$u.toast("请填写物品信息"):this.$u.toast("请填写收货地址"):this.$u.toast("请填写寄货地址")},calculate:function(){var t=this;n.$u.http.post("/api/express-order/group-calculate",{group_package_id:this.expressinfo.id,weight:this.goodinfo.weight,length:this.goodinfo.length,width:this.goodinfo.width,height:this.goodinfo.height}).then((function(n){t.sum=n.amount})).catch((function(){}))}}};t.default=o}).call(this,o("df3c")["default"])},"4e20":function(n,t,o){},"6bd4":function(n,t,o){"use strict";var e=o("4e20"),i=o.n(e);i.a},ad00:function(n,t,o){"use strict";o.r(t);var e=o("f362"),i=o("d990");for(var a in i)["default"].indexOf(a)<0&&function(n){o.d(t,n,(function(){return i[n]}))}(a);o("6bd4");var d=o("828b"),r=Object(d["a"])(i["default"],e["b"],e["c"],!1,null,"39739bc3",null,!1,e["a"],void 0);t["default"]=r.exports},d990:function(n,t,o){"use strict";o.r(t);var e=o("28fc"),i=o.n(e);for(var a in e)["default"].indexOf(a)<0&&function(n){o.d(t,n,(function(){return e[n]}))}(a);t["default"]=i.a},f362:function(n,t,o){"use strict";o.d(t,"b",(function(){return i})),o.d(t,"c",(function(){return a})),o.d(t,"a",(function(){return e}));var e={uNavbar:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-navbar/u-navbar")]).then(o.bind(null,"f3ae"))},uIcon:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-icon/u-icon")]).then(o.bind(null,"b73a"))},uCheckboxGroup:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-checkbox-group/u-checkbox-group")]).then(o.bind(null,"c952"))},uCheckbox:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-checkbox/u-checkbox")]).then(o.bind(null,"5fa3"))},uPopup:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-popup/u-popup")]).then(o.bind(null,"f1b1"))},uParse:function(){return Promise.all([o.e("common/vendor"),o.e("uview-ui/components/u-parse/u-parse")]).then(o.bind(null,"aca6"))}},i=function(){var n=this,t=n.$createElement,o=(n._self._c,n.expressinfo.transit_full_address.slice(0,6)),e=JSON.stringify(n.topadd),i="{}"!==e?n.replacePhoneToStar(n.topadd.mobile):null,a=JSON.stringify(n.bottomadd),d="{}"!==a?n.replacePhoneToStar(n.bottomadd.mobile):null,r=JSON.stringify(n.goodinfo);n._isMounted||(n.e0=function(t){return n.uni.navigateBack()}),n.$mp.data=Object.assign({},{$root:{g0:o,g1:e,m0:i,g2:a,m1:d,g3:r}})},a=[]},fb4e:function(n,t,o){"use strict";(function(n,t){var e=o("47a9");o("abeb");e(o("3240"));var i=e(o("ad00"));n.__webpack_require_UNI_MP_PLUGIN__=o,t(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])}},[["fb4e","common/runtime","common/vendor"]]]);