(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/address/address"],{"058c":function(t,e,n){},"24bc":function(t,e,n){"use strict";n.r(e);var a=n("e79c"),i=n.n(a);for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=i.a},5749:function(t,e,n){"use strict";(function(t){n("2d0a");a(n("66fd"));var e=a(n("6540"));function a(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},6540:function(t,e,n){"use strict";n.r(e);var a=n("7858"),i=n("24bc");for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n("86fa");var s,d=n("f0c5"),o=Object(d["a"])(i["default"],a["b"],a["c"],!1,null,"71bd8c4a",null,!1,a["a"],s);e["default"]=o.exports},7858:function(t,e,n){"use strict";var a;n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return a}));var i=function(){var t=this,e=t.$createElement;t._self._c;t._isMounted||(t.e0=function(e){t.search=!1},t.e1=function(e){t.getFocus=!0},t.e2=function(e){e.stopPropagation(),t.keyword=""})},r=[]},"86fa":function(t,e,n){"use strict";var a=n("058c"),i=n.n(a);i.a},e79c:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=n("2f62");function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach((function(e){s(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function s(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var d=function(){n.e("components/page-component/app-shipping-address/app-shipping-address").then(function(){return resolve(n("0dc6"))}.bind(null,n)).catch(n.oe)},o={name:"address",components:{"app-shipping-address":d},data:function(){return{page:1,args:"",load:"",allList:[],manual_btn_bg:null,is_refund_address:0,is_hide_default_btn:0,address_url:"",destroy_url:"",keyword:"",search:!0,getFocus:!1}},computed:r(r({},(0,a.mapGetters)("mallConfig",{getTheme:"getTheme"})),{},{list:function(){var t=this.allList,e=this.keyword;return t.filter((function(t){var n=new RegExp(e);return n.test(t.mobile)||n.test(t.name)}))}}),onLoad:function(e){this.$commonLoad.onload(e),this.is_hide_default_btn=e.is_hide_default_btn?e.is_hide_default_btn:0,this.is_refund_address=e.is_refund_address?+e.is_refund_address:0,e.manual_btn_bg&&"admin"==e.manual_btn_bg?this.manual_btn_bg={background:"#446dfd",color:"#446dfd"}:this.manual_btn_bg=e.manual_btn_bg?e.manual_btn_bg:this.getTheme,this.is_refund_address>0?(this.address_url=this.$api.app_admin.refund_address,this.destroy_url=this.$api.app_admin.address_destroy,t.setNavigationBarTitle({title:"退货地址"})):(this.address_url=this.$api.user.address,this.destroy_url=this.$api.user.address_destroy)},onShow:function(){this.init()},onReachBottom:function(){var t=this;if(!t.args&&!t.load){t.load=!0;var e=t.page+1;this.$request({url:t.$api.user.address,data:{page:e}}).then((function(n){if(0===n.code){var a=[e,0===n.data.allList.length,t.allList.concat(n.data.list)];t.page=a[0],t.args=a[1],t.allList=a[2]}t.load=!1}))}},methods:{inputBlur:function(){var t=this;setTimeout((function(e){t.getFocus=!1,""===t.keyword&&(t.search=!0)}),300)},init:function(){var e=this;e.address_url&&(t.showLoading({title:"加载中"}),e.page=1,e.$request({url:e.address_url}).then((function(n){if(t.hideLoading(),0===n.code){var a=[1,n.data.list];e.page=a[0],e.allList=a[1]}})).catch((function(){t.hideLoading()})))},address:function(){this.init()},manual:function(){t.navigateTo({url:"/pages/address/address-edit?is_refund_address="+this.is_refund_address})},getauto:function(){var e=this;t.chooseAddress({success:function(n){e.$request({url:e.$api.user.wechat_district,data:{national_code:n.nationalCode,province_name:n.provinceName,city_name:n.cityName,county_name:n.countyName}}).then((function(a){if(0===a.code){var i=a.data.district["province"]["id"],r=a.data.district["city"]["id"],s=a.data.district["district"]["id"],d={id:"",name:n.userName,ids:[i,r,s],province_id:i,city_id:r,district_id:s,mobile:n.telNumber,detail:n.detailInfo};t.navigateTo({url:"/pages/address/address-edit?form="+JSON.stringify(d)+"&is_refund_address="+e.is_refund_address})}}))}})}}};e.default=o}).call(this,n("543d")["default"])}},[["5749","common/runtime","common/vendor"]]]);