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.9 KiB

1 year ago
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_address/index"],{"5e89":function(t,i,e){"use strict";e.d(i,"b",(function(){return n})),e.d(i,"c",(function(){return s})),e.d(i,"a",(function(){}));var n=function(){var t=this,i=t.$createElement,e=(t._self._c,t.$t("姓名")),n=t.$t("请输入姓名"),s=t.$t("联系电话"),o=t.$t("请输入联系电话"),r=t.$t("所在地区"),d=t.$t("详细地址"),c=t.$t("请填写具体地址"),a=t.$t("设置为默认地址"),u=t.$t("立即保存"),l=t.id?null:t.$t("导入微信地址");t.$mp.data=Object.assign({},{$root:{m0:e,m1:n,m2:s,m3:o,m4:r,m5:d,m6:c,m7:a,m8:u,m9:l}})},s=[]},"645a":function(t,i,e){"use strict";e.r(i);var n=e("5e89"),s=e("d392");for(var o in s)["default"].indexOf(o)<0&&function(t){e.d(i,t,(function(){return s[t]}))}(o);e("e305");var r=e("f0c5"),d=Object(r["a"])(s["default"],n["b"],n["c"],!1,null,"d5d95488",null,!1,n["a"],void 0);i["default"]=d.exports},b46b:function(t,i,e){"use strict";(function(t){var n=e("4ea4");Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var s=e("8ba8"),o=e("d322"),r=e("666f"),d=e("26cb"),c=n(e("66ca")),a={components:{authorize:function(){e.e("components/Authorize").then(function(){return resolve(e("b29f"))}.bind(null,e)).catch(e.oe)},home:function(){Promise.all([e.e("common/vendor"),e.e("components/home/index")]).then(function(){return resolve(e("03ff"))}.bind(null,e)).catch(e.oe)}},mixins:[c.default],data:function(){return{regionDval:[this.$t("浙江省"),this.$t("杭州市"),this.$t("滨江区")],cartId:"",pinkId:0,couponId:0,id:0,userAddress:{is_default:!1},region:[this.$t("省"),this.$t("市"),this.$t("区")],valueRegion:[0,0,0],isAuto:!1,isShowAuth:!1,district:[],multiArray:[],multiIndex:[0,0,0],cityId:0,defaultRegion:[this.$t("广东省"),this.$t("广州市"),this.$t("番禺区")],defaultRegionCode:"110101",news:"",noCoupon:0}},computed:(0,d.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,i){t&&this.getUserAddress()},deep:!0}},onLoad:function(i){this.isLogin?(this.cartId=i.cartId||"",this.pinkId=i.pinkId||0,this.couponId=i.couponId||0,this.id=i.id||0,this.noCoupon=i.noCoupon||0,this.news=i.new||"",t.setNavigationBarTitle({title:i.id?this.$t("修改地址"):this.$t("添加地址")}),this.getUserAddress(),this.getCityList()):(0,r.toLogin)()},methods:{getCityList:function(){var t=this,i=this;(0,o.getCity)().then((function(e){t.district=e.data,i.initialize()}))},initialize:function(){var t=this,i=[],e=[],n=[],s=this.district[0].c||[];s.length&&s[0].c;this.district.forEach((function(e,n){i.push(e.n),e.n===t.region[0]&&(t.valueRegion[0]=n,t.multiIndex[0]=n)})),this.district[this.valueRegion[0]].c.forEach((function(i,n){t.region[1]==i.c&&(t.valueRegion[1]=n,t.multiIndex[1]=n),e.push(i.n)})),this.district[this.valueRegion[0]].c[this.valueRegion[1]].c.forEach((function(i,e){t.region[2]==i.c&&(t.valueRegion[2]=e,t.multiIndex[2]=e),n.push(i.n)})),this.multiArray=[i,e,n]},bindRegionChange:function(t){var i=this.multiIndex,e=this.district[i[0]]||{c:[]},n=e.c[i[1]]||{v:0},s=this.multiArray,o=t.detail.value;this.region=[s[0][o[0]],s[1][o[1]],s[2][o[2]]],this.cityId=n.v,this.valueRegion=[0,0,0],this.initialize()},bindMultiPickerColumnChange:function(t){var i=t.detail.column,e=t.detail.value,n=this.district[e]||{c:[]},s=this.multiArray,o=this.multiIndex;switch(o[i]=e,i){case 0:var r=n.c[0]||{c:[]};s[1]=n.c.map((function(t){return t.n})),s[2]=r.c.map((function(t){return t.n}));break;case 1:var d=this.district[o[0]].c[o[1]].c||[];s[2]=d.map((function(t){return t.n}));break;case 2:break}this.$set(this.multiArray,0,s[0]),this.$set(this.multiArray,1,s[1]),this.$set(this.multiArray,2,s[2]),this.multiIndex=o},onLoadFun:function(){this.getUserAddress()},authColse:function(t){this.isShowAuth=t},toggleTab:function(t){this.$refs[t].show()},onConfirm:function(t){this.region=t.checkArr[0]+"-"+t.checkArr[1]+"-"+t.checkArr[2]},getUserAddress:function(){if(!this.id)return!1;var t=this;(0,s.getAddressDetail)(this.id).then((function(i){var e=[i.data.province,i.data.city,i.data.dist