(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/addressManage"],{3957:function(t,e,n){},3960:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("f9a9"),a=function(){n.e("components/uni-list/uni-list").then(function(){return resolve(n("a71c"))}.bind(null,n)).catch(n.oe)},s=function(){n.e("components/uni-list-item/uni-list-item").then(function(){return resolve(n("7b82"))}.bind(null,n)).catch(n.oe)},r=function(){n.e("components/uni-popup/uni-popup").then(function(){return resolve(n("1bfb"))}.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("1e43"))}.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(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?/(^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){e.$api.prePage().refreshList(),t.showToast({title:"提交成功",duration:2e3}),setTimeout((function(){t.navigateBack()}),800)})):this.$api.msg("请填写门牌号信息"):this.$api.msg("请在地图选择所在位置"):this.$api.msg("请输入正确的手机号码"):this.$api.msg("请填写收货人姓名")}}};e.default=c}).call(this,n("543d")["default"])},"5cf6":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,"a71c"))},uniListItem:function(){return n.e("components/uni-list-item/uni-list-item").then(n.bind(null,"7b82"))}},a=function(){var t=this,e=t.$createElement;t._self._c},s=[]},"7eb6":function(t,e,n){"use strict";n.r(e);var i=n("3960"),a=n.n(i);for(var s in i)"default"!==s&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},b0db:function(t,e,n){"use strict";var i=n("3957"),a=n.n(i);a.a},cbe5:function(t,e,n){"use strict";(function(t){n("30ba");i(n("66fd"));var e=i(n("daa4"));function i(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=n,t(e.default)}).call(this,n("543d")["createPage"])},daa4:function(t,e,n){"use strict";n.r(e);var i=n("5cf6"),a=n("7eb6");for(var s in a)"default"!==s&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("b0db");var r,o=n("f0c5"),c=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],r);e["default"]=c.exports}},[["cbe5","common/runtime","common/vendor"]]]);