(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/addressManage"],{"45cd":function(t,e,n){"use strict";n.r(e);var i=n("dbda"),a=n("ccbc");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("5667");var d=n("f0c5"),r=Object(d["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=r.exports},5667:function(t,e,n){"use strict";var i=n("b3f5"),a=n.n(i);a.a},6106:function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("12d5");i(n("66fd"));var a=i(n("45cd"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},b3f5:function(t,e,n){},ccbc:function(t,e,n){"use strict";n.r(e);var i=n("db70"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},db70:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("36af"),a={components:{uniList:function(){n.e("components/uni-list/uni-list").then(function(){return resolve(n("10a8"))}.bind(null,n)).catch(n.oe)},uniListItem:function(){n.e("components/uni-list-item/uni-list-item").then(function(){return resolve(n("51f0"))}.bind(null,n)).catch(n.oe)},pickerAddress:function(){Promise.all([n.e("common/vendor"),n.e("components/wangding-pickerAddress/wangding-pickerAddress")]).then(function(){return resolve(n("8702"))}.bind(null,n)).catch(n.oe)},uniPopup:function(){n.e("components/uni-popup/uni-popup").then(function(){return resolve(n("f197"))}.bind(null,n)).catch(n.oe)}},data:function(){return{addressDetail:"",addressData:{name:"",mobile:"",address:{province:"",city:"",district:""},area:"",default:!1}}},onLoad:function(e){var n="新增收货地址";if("edit"===e.type){n="编辑收货地址";var i=JSON.parse(e.data);console.log(i),this.addressData={name:i.real_name,mobile:i.phone,address:{province:i.province,city:i.city,district:i.district},area:i.detail,default:1==i.is_default,id:i.id},this.addressDetail=i.province+i.city+i.district}this.manageType=e.type,t.setNavigationBarTitle({title:n})},methods:{onCityClick:function(t){var e=t.data,n=this.addressData.address;n.province=e[0],n.city=e[1],n.district=e[2],this.addressDetail=e.join("")},chooseLocation:function(){var e=this;t.chooseLocation({success:function(t){console.log(t),e.addressData.addressName=t.name,e.addressData.address=t.name}})},switchChange:function(t){this.addressData.default=t.value},confirm:function(){var e=this,n=this.addressData;n.name?/(^((13[0-9])|(15[^4])|(166)|(17[0-8])|(18[0-9])|(19[8-9])|(147,145))\\d{8}$)/.test(n.mobile)?this.$api.msg("请输入正确的手机号码"):n.address?n.area?(0,i.addressEdit)({real_name:n.name,phone:n.mobile,address:{province:n.address.province,city:n.address.city,district:n.address.district},detail:n.area,is_default:n.default,id:n.id||"",type:1}).then((function(n){e.$api.prePage().refreshList(),t.showToast({title:"提交成功",duration:2e3}),setTimeout((function(){t.navigateBack()}),800)})):this.$api.msg("请填写门牌号信息"):this.$api.msg("请在地图选择所在位置"):this.$api.msg("请填写收货人姓名")}}};e.default=a}).call(this,n("543d")["default"])},dbda:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return s})),n.d(e,"a",(function(){return i}));var i={uniList:function(){return n.e("components/uni-list/uni-list").then(n.bind(null,"10a8"))},uniListItem:function(){return n.e("components/uni-list-item/uni-list-item").then(n.bind(null,"51f0"))}},a=function(){var t=this.$createElement;this._self._c},s=[]}},[["6106","common/runtime","common/vendor"]]]);