(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/address/address"],{"081b":function(e,t,s){"use strict";s.r(t);var a=s("1227"),i=s.n(a);for(var n in a)"default"!==n&&function(e){s.d(t,e,(function(){return a[e]}))}(n);t["default"]=i.a},1227:function(e,t,s){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=function(){s.e("components/page-component/app-shipping-address/app-shipping-address").then(function(){return resolve(s("0763"))}.bind(null,s)).catch(s.oe)},i={name:"address",components:{"app-shipping-address":a},data:function(){return{page:1,args:"",load:"",list:null,manual_btn_bg:"",is_refund_address:0,is_hide_default_btn:0,address_url:"",destroy_url:""}},onLoad:function(t){this.is_hide_default_btn=t.is_hide_default_btn?t.is_hide_default_btn:0,this.is_refund_address=t.is_refund_address?t.is_refund_address:0,this.manual_btn_bg=t.manual_btn_bg?t.manual_btn_bg:"#ff4544",this.is_refund_address>0?(this.address_url=this.$api.app_admin.refund_address,this.destroy_url=this.$api.app_admin.address_destroy,e.setNavigationBarTitle({title:"退货地址"})):(this.address_url=this.$api.user.address,this.destroy_url=this.$api.user.address_destroy)},onShow:function(){this.init()},onReachBottom:function(){var e=this;if(!e.args&&!e.load){e.load=!0;var t=e.page+1;this.$request({url:e.$api.user.address,data:{page:t}}).then((function(s){if(0===s.code){var a=[t,0===s.data.list.length,e.list.concat(s.data.list)];e.page=a[0],e.args=a[1],e.list=a[2]}e.load=!1}))}},methods:{init:function(){var t=this;t.address_url&&(e.showLoading({title:"加载中"}),t.page=1,t.$request({url:t.address_url}).then((function(s){if(e.hideLoading(),0===s.code){var a=[1,s.data.list];t.page=a[0],t.list=a[1]}})).catch((function(t){e.hideLoading(),console.error(t)})))},address:function(e){console.log(e),this.init()},manual:function(){e.navigateTo({url:"/pages/address/address-edit?is_refund_address="+this.is_refund_address})},getauto:function(){var t=this;e.chooseAddress({success:function(s){t.$request({url:t.$api.user.wechat_district,data:{national_code:s.nationalCode,province_name:s.provinceName,city_name:s.cityName,county_name:s.countyName}}).then((function(a){if(0===a.code){var i=a.data.district["province"]["id"],n=a.data.district["city"]["id"],d=a.data.district["district"]["id"],r={id:"",name:s.userName,ids:[i,n,d],province_id:i,city_id:n,district_id:d,mobile:s.telNumber,detail:s.detailInfo};e.navigateTo({url:"/pages/address/address-edit?form="+JSON.stringify(r)+"&is_refund_address="+t.is_refund_address})}else console.error(a.msg)}))},fail:function(e){console.error(e)}})}}};t.default=i}).call(this,s("543d")["default"])},"160c":function(e,t,s){"use strict";s.r(t);var a=s("b20c"),i=s("081b");for(var n in i)"default"!==n&&function(e){s.d(t,e,(function(){return i[e]}))}(n);s("3813");var d,r=s("f0c5"),o=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"0119485f",null,!1,a["a"],d);t["default"]=o.exports},3813:function(e,t,s){"use strict";var a=s("753f"),i=s.n(a);i.a},"753f":function(e,t,s){},b20c:function(e,t,s){"use strict";var a;s.d(t,"b",(function(){return i})),s.d(t,"c",(function(){return n})),s.d(t,"a",(function(){return a}));var i=function(){var e=this,t=e.$createElement;e._self._c},n=[]},de12:function(e,t,s){"use strict";(function(e){s("ecb4");a(s("66fd"));var t=a(s("160c"));function a(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,s("543d")["createPage"])}},[["de12","common/runtime","common/vendor"]]]);