(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/address"],{"2f28":function(e,n,t){"use strict";(function(e,n){var o=t("47a9");t("9861");o(t("3240"));var r=o(t("a96d"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(r.default)}).call(this,t("a261")["default"],t("a261")["createPage"])},"5a60":function(e,n,t){"use strict";(function(e){var o=t("47a9"),r=t("3b2d");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i,a=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var t=c(n);if(t&&t.has(e))return t.get(e);var o={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var u=i?Object.getOwnPropertyDescriptor(e,a):null;u&&(u.get||u.set)?Object.defineProperty(o,a,u):o[a]=e[a]}o.default=e,t&&t.set(e,o);return o}(t("680b")),u=o(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:{chooseAddress:function(){e.chooseAddress({success:function(e){console.log(e)},fail:function(e){console.log(e)}})},queryList:function(n,t){var o=this,r={};r.page=n,r.size=t,a.data(r).then((function(n){if(e.hideLoading(),1!==n.code)return o.$refs.paging.complete(!1),!1;o.$refs.paging.complete(n.data.rows)}))},checkAddress:function(n){if(2==i.type){var t=getCurrentPages(),o=t[t.length-2];o.$vm.getBackInfo(n),e.navigateBack()}},del:function(e){i.$dialog.showError("确定要删除该地址信息吗？",(function(n){n.confirm&&a.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(){e.getLocation({type:"gcj02",success:function(e){console.log(e)},complete: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,a.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 o=t("5a60"),r=t.n(o);for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);n["default"]=r.a},a96d:function(e,n,t){"use strict";t.r(n);var o=t("e2b6"),r=t("a79e");for(var i in r)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return r[e]}))}(i);t("f77e");var a=t("828b"),u=Object(a["a"])(r["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=u.exports},e2b6:function(e,n,t){"use strict";t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return o}));var o={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"))}},r=function(){var e=this.$createElement;this._self._c},i=[]},f77e:function(e,n,t){"use strict";var o=t("995a"),r=t.n(o);r.a}},[["2f28","common/runtime","common/vendor"]]]);