(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/set/addressManage"],{"0873":function(t,e,n){"use strict";n.r(e);var i=n("0d46"),a=n("8978");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);n("2107");var r=n("f0c5"),o=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=o.exports},"0d46":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,"f52a"))},uniListItem:function(){return n.e("components/uni-list-item/uni-list-item").then(n.bind(null,"d158"))}},a=function(){var t=this.$createElement;this._self._c},s=[]},1015:function(t,e,n){"use strict";(function(t,e){var i=n("4ea4");n("3e39");i(n("66fd"));var a=i(n("0873"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(a.default)}).call(this,n("bc2e")["default"],n("543d")["createPage"])},2107:function(t,e,n){"use strict";var i=n("426f"),a=n.n(i);a.a},"426f":function(t,e,n){},8978:function(t,e,n){"use strict";n.r(e);var i=n("e239"),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},e239:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("5635"),a={components:{uniList:function(){n.e("components/uni-list/uni-list").then(function(){return resolve(n("f52a"))}.bind(null,n)).catch(n.oe)},uniListItem:function(){n.e("components/uni-list-item/uni-list-item").then(function(){return resolve(n("d158"))}.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("89cb"))}.bind(null,n)).catch(n.oe)},uniPopup:function(){n.e("components/uni-popup/uni-popup").then(function(){return resolve(n("9fd5"))}.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?/(^1[1|2|3|4|5|6|7|8|9][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=a}).call(this,n("543d")["default"])}},[["1015","common/runtime","common/vendor"]]]);