(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/addressManage"],{"0d81":function(e,t,n){"use strict";(function(e){n("e27b");i(n("66fd"));var t=i(n("ee22"));function i(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=n,e(t.default)}).call(this,n("543d")["createPage"])},"228b":function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("ef8a"),a=function(){n.e("components/uni-list/uni-list").then(function(){return resolve(n("7e12"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/uni-list-item/uni-list-item").then(function(){return resolve(n("39e5"))}.bind(null,n)).catch(n.oe)},r=function(){n.e("components/uni-popup/uni-popup").then(function(){return resolve(n("bf97"))}.bind(null,n)).catch(n.oe)},o=function(){Promise.all([n.e("common/vendor"),n.e("components/wangding-pickerAddress/wangding-pickerAddress")]).then(function(){return resolve(n("99c8"))}.bind(null,n)).catch(n.oe)},c={components:{uniList:a,uniListItem:s,pickerAddress:o,uniPopup:r},data:function(){return{addressDetail:"",addressData:{name:"",mobile:"",address:{province:"",city:"",district:""},area:"",default:!1}}},onLoad:function(t){var n="新增收货地址";if("edit"===t.type){n="编辑收货地址";var i=JSON.parse(t.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=t.type,e.setNavigationBarTitle({title:n})},methods:{onCityClick:function(e){var t=e.data,n=this.addressData.address;n.province=t[0],n.city=t[1],n.district=t[2],this.addressDetail=t.join("")},chooseLocation:function(){var t=this;e.chooseLocation({success:function(e){console.log(e),t.addressData.addressName=e.name,t.addressData.address=e.name}})},switchChange:function(e){this.addressData.default=e.value},confirm:function(){var t=this,n=this.addressData;n.name?/(^1[3|4|5|7|8][0-9]{9}$)/.test(n.mobile)?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){t.$api.prePage().refreshList(),e.showToast({title:"提交成功",duration:2e3}),setTimeout((function(){e.navigateBack()}),800)})):this.$api.msg("请填写门牌号信息"):this.$api.msg("请在地图选择所在位置"):this.$api.msg("请输入正确的手机号码"):this.$api.msg("请填写收货人姓名")}}};t.default=c}).call(this,n("543d")["default"])},"96a0":function(e,t,n){"use strict";var i=n("e387"),a=n.n(i);a.a},b3c6:function(e,t,n){"use strict";n.r(t);var i=n("228b"),a=n.n(i);for(var s in i)"default"!==s&&function(e){n.d(t,e,(function(){return i[e]}))}(s);t["default"]=a.a},bb47:function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return s})),n.d(t,"a",(function(){return i}));var i={uniList:function(){return n.e("components/uni-list/uni-list").then(n.bind(null,"7e12"))},uniListItem:function(){return n.e("components/uni-list-item/uni-list-item").then(n.bind(null,"39e5"))}},a=function(){var e=this,t=e.$createElement;e._self._c},s=[]},e387:function(e,t,n){},ee22:function(e,t,n){"use strict";n.r(t);var i=n("bb47"),a=n("b3c6");for(var s in a)"default"!==s&&function(e){n.d(t,e,(function(){return a[e]}))}(s);n("96a0");var r,o=n("f0c5"),c=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],r);t["default"]=c.exports}},[["0d81","common/runtime","common/vendor"]]]);