(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/address/edit/edit"],{"0736":function(e,t,i){"use strict";i.r(t);var n=i("3ab1"),a=i("6249");for(var o in a)"default"!==o&&function(e){i.d(t,e,(function(){return a[e]}))}(o);i("ff8e");var s,c=i("f0c5"),r=Object(c["a"])(a["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],s);t["default"]=r.exports},"0d93":function(e,t,i){},"3ab1":function(e,t,i){"use strict";var n;i.d(t,"b",(function(){return a})),i.d(t,"c",(function(){return o})),i.d(t,"a",(function(){return n}));var a=function(){var e=this,t=e.$createElement;e._self._c},o=[]},6249:function(e,t,i){"use strict";i.r(t);var n=i("8b1a"),a=i.n(n);for(var o in n)"default"!==o&&function(e){i.d(t,e,(function(){return n[e]}))}(o);t["default"]=a.a},"8b1a":function(e,t,i){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(){Promise.all([i.e("common/vendor"),i.e("components/mpvue-citypicker/mpvueCityPicker")]).then(function(){return resolve(i("fe29"))}.bind(null,i)).catch(i.oe)},a={components:{mpvueCityPicker:n},data:function(){return{editType:"edit",id:"",name:"",tel:"",detailed:"",isDefault:!1,cityPickerValue:[0,0,1],themeColor:"#007AFF",region:{label:"请点击选择地址",value:[],cityCode:""}}},methods:{onCancel:function(e){console.log(e)},chooseCity:function(){this.$refs.mpvueCityPicker.show()},onConfirm:function(e){this.region=e,this.cityPickerValue=e.value},isDefaultChange:function(e){this.isDefault=e.detail.value},del:function(){var t=this;e.showModal({title:"删除提示",content:"你将删除这个收货地址",success:function(i){i.confirm?e.setStorage({key:"delAddress",data:{id:t.id},success:function(){e.navigateBack()}}):i.cancel&&console.log("用户点击取消")}})},save:function(){var t={name:this.name,head:this.name.substr(0,1),tel:this.tel,address:{region:this.region,detailed:this.detailed},isDefault:this.isDefault};"edit"==this.editType&&(t.id=this.id),t.name?t.tel?t.address.detailed?0!=t.address.region.value.length?(e.showLoading({title:"正在提交"}),setTimeout((function(){e.setStorage({key:"saveAddress",data:t,success:function(){e.hideLoading(),e.navigateBack()}})}),300)):e.showToast({title:"请选择收件地址",icon:"none"}):e.showToast({title:"请输入收件人详细地址",icon:"none"}):e.showToast({title:"请输入收件人电话号码",icon:"none"}):e.showToast({title:"请输入收件人姓名",icon:"none"})}},onLoad:function(t){var i=this;this.editType=t.type,"edit"==t.type&&e.getStorage({key:"address",success:function(e){i.id=e.data.id,i.name=e.data.name,i.tel=e.data.tel,i.detailed=e.data.address.detailed,i.isDefault=e.data.isDefault,i.cityPickerValue=e.data.address.region.value,i.region=e.data.address.region}})},onBackPress:function(){if(this.$refs.mpvueCityPicker.showPicker)return this.$refs.mpvueCityPicker.pickerCancel(),!0},onUnload:function(){this.$refs.mpvueCityPicker.showPicker&&this.$refs.mpvueCityPicker.pickerCancel()}};t.default=a}).call(this,i("543d")["default"])},a261:function(e,t,i){"use strict";(function(e){i("185d");n(i("66fd"));var t=n(i("0736"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,i("543d")["createPage"])},ff8e:function(e,t,i){"use strict";var n=i("0d93"),a=i.n(n);a.a}},[["a261","common/runtime","common/vendor"]]]);