(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/addressManage"],{"0f31":function(e,t,n){"use strict";n.r(t);var i=n("1524"),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},1524:function(e,t,n){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=n("7eca"),a=function(){n.e("components/uni-list/uni-list").then(function(){return resolve(n("1373"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/uni-list-item/uni-list-item").then(function(){return resolve(n("5e30"))}.bind(null,n)).catch(n.oe)},r=function(){n.e("components/uni-popup/uni-popup").then(function(){return resolve(n("b8d4"))}.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("aafc3"))}.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?/(^((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){t.$api.prePage().refreshList(),e.showToast({title:"提交成功",duration:2e3}),setTimeout((function(){e.navigateBack()}),800)})):this.$api.msg("请填写门牌号信息"):this.$api.msg("请在地图选择所在位置"):this.$api.msg("请填写收货人姓名")}}};t.default=c}).call(this,n("543d")["default"])},4568:function(e,t,n){"use strict";var i=n("b911"),a=n.n(i);a.a},"697e":function(e,t,n){"use strict";(function(e){n("856e");i(n("66fd"));var t=i(n("f049"));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"])},"699b":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,"1373"))},uniListItem:function(){return n.e("components/uni-list-item/uni-list-item").then(n.bind(null,"5e30"))}},a=function(){var e=this,t=e.$createElement;e._self._c},s=[]},b911:function(e,t,n){},f049:function(e,t,n){"use strict";n.r(t);var i=n("699b"),a=n("0f31");for(var s in a)"default"!==s&&function(e){n.d(t,e,(function(){return a[e]}))}(s);n("4568");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}},[["697e","common/runtime","common/vendor"]]]);