(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesMall/address/add"],{"06f8":function(t,e,a){},2336:function(t,e,a){"use strict";a.r(e);var n=a("86af"),o=a("98ec");for(var i in o)["default"].indexOf(i)<0&&function(t){a.d(e,t,(function(){return o[t]}))}(i);a("bf9a");var r=a("828b"),s=Object(r["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);e["default"]=s.exports},"86af":function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return o})),a.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.formData.is_default=1==t.formData.is_default?0:1})},o=[]},"92b2":function(t,e,a){"use strict";(function(t){var n=a("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=n(a("7ca3")),i=a("8f59");function r(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,n)}return a}var s={data:function(){return{loadEnd:!1,pageTitle:"",formData:{name:"",tel:"",address:"",is_default:0},delayer:null}},computed:function(t){for(var e=1;e<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?r(Object(a),!0).forEach((function(e){(0,o.default)(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):r(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))}))}return t}({},(0,i.mapState)({themeColor:function(t){return t.app.themeColor}})),onLoad:function(t){var e=this;t.addressData&&(this.formData=JSON.parse(t.addressData)),this.formData.id?this.pageTitle="编辑地址":this.pageTitle="添加地址",this.$nextTick((function(){e.loadEnd=!0}))},onUnload:function(){clearTimeout(this.delayer)},methods:{handleSubmit:function(){var e=this;if(this.formData.name)if(this.formData.tel)if(this.$util.validation("phone",this.formData.tel))if(this.formData.address){t.showLoading({title:"加载中",mask:!0});var a="";a=this.formData.id?"mall.address.edit":"mall.address.add",this.$util.request(a,this.formData).then((function(a){t.hideLoading(),1==a.code?(t.showToast({title:e.formData.id?"编辑成功":"添加成功",icon:"success",mask:!0,duration:1500}),e.delayer=setTimeout((function(){t.navigateBack()}),1500)):t.showToast({title:a.msg,icon:"none"})})).catch((function(e){t.hideLoading(),console.error("添加/编辑地址 ",e)}))}else t.showToast({icon:"none",title:"请输入收货地址"});else t.showToast({icon:"none",title:"请输入正确的手机号"});else t.showToast({icon:"none",title:"请输入收件人手机号"});else t.showToast({icon:"none",title:"请输入收件人姓名"})},chooseLocation:function(){var e=this;t.chooseLocation({success:function(t){e.formData.address=t.address}})}}};e.default=s}).call(this,a("df3c")["default"])},"98ec":function(t,e,a){"use strict";a.r(e);var n=a("92b2"),o=a.n(n);for(var i in n)["default"].indexOf(i)<0&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=o.a},b64c:function(t,e,a){"use strict";(function(t,e){var n=a("47a9");a("aa6c");n(a("3240"));var o=n(a("2336"));t.__webpack_require_UNI_MP_PLUGIN__=a,e(o.default)}).call(this,a("3223")["default"],a("df3c")["createPage"])},bf9a:function(t,e,a){"use strict";var n=a("06f8"),o=a.n(n);o.a}},[["b64c","common/runtime","common/vendor"]]]);