(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/address/address"],{"2eeb":function(e,t,a){"use strict";a.r(t);var s=a("8a84"),i=a.n(s);for(var n in s)"default"!==n&&function(e){a.d(t,e,(function(){return s[e]}))}(n);t["default"]=i.a},"315a":function(e,t,a){},"3c17":function(e,t,a){"use strict";a.r(t);var s=a("732f"),i=a("2eeb");for(var n in i)"default"!==n&&function(e){a.d(t,e,(function(){return i[e]}))}(n);a("66a9");var d,r=a("f0c5"),o=Object(r["a"])(i["default"],s["b"],s["c"],!1,null,"15474cdd",null,!1,s["a"],d);t["default"]=o.exports},"4ff7":function(e,t,a){"use strict";(function(e){a("8748");s(a("66fd"));var t=s(a("3c17"));function s(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,a("543d")["createPage"])},"66a9":function(e,t,a){"use strict";var s=a("315a"),i=a.n(s);i.a},"732f":function(e,t,a){"use strict";var s,i=function(){var e=this,t=e.$createElement;e._self._c},n=[];a.d(t,"b",(function(){return i})),a.d(t,"c",(function(){return n})),a.d(t,"a",(function(){return s}))},"8a84":function(e,t,a){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var s=function(){a.e("components/page-component/app-shipping-address/app-shipping-address").then(function(){return resolve(a("7848"))}.bind(null,a)).catch(a.oe)},i={name:"address",components:{"app-shipping-address":s},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(a){if(0===a.code){var s=[t,0===a.data.list.length,e.list.concat(a.data.list)];e.page=s[0],e.args=s[1],e.list=s[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(a){if(e.hideLoading(),0===a.code){var s=[1,a.data.list];t.page=s[0],t.list=s[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(a){t.$request({url:t.$api.user.wechat_district,data:{national_code:a.nationalCode,province_name:a.provinceName,city_name:a.cityName,county_name:a.countyName}}).then((function(s){if(0===s.code){var i=s.data.district["province"]["id"],n=s.data.district["city"]["id"],d=s.data.district["district"]["id"],r={id:"",name:a.userName,ids:[i,n,d],province_id:i,city_id:n,district_id:d,mobile:a.telNumber,detail:a.detailInfo};e.navigateTo({url:"/pages/address/address-edit?form="+JSON.stringify(r)+"&is_refund_address="+t.is_refund_address})}else console.error(s.msg)}))},fail:function(e){console.error(e)}})}}};t.default=i}).call(this,a("543d")["default"])}},[["4ff7","common/runtime","common/vendor"]]]);