(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/address"],{"2f28":function(e,n,t){"use strict";(function(e,n){var r=t("47a9");t("9861");r(t("3240"));var a=r(t("a96d"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(a.default)}).call(this,t("a261")["default"],t("a261")["createPage"])},"5a60":function(e,n,t){"use strict";(function(e){var r=t("47a9"),a=t("3b2d");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,o=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!==typeof e)return{default:e};var t=c(n);if(t&&t.has(e))return t.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(t("680b")),u=r(t("0c84"));function c(e){if("function"!==typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(c=function(e){return e?t:n})(e)}var s={data:function(){return{type:1,mode:"add",regionName:null,formData:{},disabled:!1,dataList:[]}},onLoad:function(e){var n=e.type;i=this,i.type=n},methods:{queryList:function(n,t){var r=this,a={};a.page=n,a.size=t,o.data(a).then((function(n){if(e.hideLoading(),1!==n.code)return r.$refs.paging.complete(!1),!1;r.$refs.paging.complete(n.data.rows)}))},checkAddress:function(n){if(2==i.type){var t=getCurrentPages(),r=t[t.length-2];r.$vm.getBackInfo(n),e.navigateBack()}},del:function(e){i.$dialog.showError("确定要删除该地址信息吗？",(function(n){n.confirm&&o.del({id:e}).then((function(e){if(0==e.code)return i.$dialog.showSuccess(e.msg);i.$dialog.showSuccess(e.msg),i.queryList(1,10)}))}))},edit:function(e){i.formData=e,i.mode="edit",i.regionName=e.region,i.$refs.popup.open()},bindPickerChange:function(e){var n="",t=e.detail.value;t.forEach((function(e){n+=e})),i.regionName=n},close:function(){i.$refs.popup.close()},add:function(){i.mode="add",i.$refs.popup.open()},submit:function(){var e=this.formData;e.region=i.regionName;var n=JSON.parse(JSON.stringify(e)),t=u.default.validation(n,[{name:"username",rule:["required"],msg:["请输入联系姓名"]},{name:"mobile",rule:["required","isMobile"],msg:["请输入手机号","手机号格式错误"]},{name:"region",rule:["required"],msg:["请选择地区"]},{name:"address",rule:["required"],msg:["请输入详细地址"]}]);if(t)return i.$dialog.showSuccess(t);i.disabled=!0,o.save(n).then((function(e){if(i.disabled=!1,0==e.code)return i.$dialog.showSuccess(e.msg);i.$refs.popup.close(),i.$dialog.showSuccess(e.msg),i.queryList(1,10)}))}}};n.default=s}).call(this,t("a261")["default"])},"995a":function(e,n,t){},a79e:function(e,n,t){"use strict";t.r(n);var r=t("5a60"),a=t.n(r);for(var i in r)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(i);n["default"]=a.a},a96d:function(e,n,t){"use strict";t.r(n);var r=t("ef23"),a=t("a79e");for(var i in a)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(i);t("f77e");var o=t("828b"),u=Object(o["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);n["default"]=u.exports},ef23:function(e,n,t){"use strict";t.d(n,"b",(function(){return a})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return r}));var r={zPaging:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/z-paging/components/z-paging/z-paging")]).then(t.bind(null,"bd3f"))},uniPopup:function(){return t.e("uni_modules/uni-popup/components/uni-popup/uni-popup").then(t.bind(null,"39e2"))}},a=function(){var e=this.$createElement;this._self._c},i=[]},f77e:function(e,n,t){"use strict";var r=t("995a"),a=t.n(r);a.a}},[["2f28","common/runtime","common/vendor"]]]);