(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/order-submit/address-pick"],{"270d":function(t,e,n){"use strict";var i,a=function(){var t=this,e=t.$createElement;t._self._c},o=[];n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}))},"3e15":function(t,e,n){"use strict";var i=n("797d"),a=n.n(i);a.a},"3f38":function(t,e,n){"use strict";n.r(e);var i=n("d60d"),a=n.n(i);for(var o in i)"default"!==o&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=a.a},"57a1":function(t,e,n){},"797d":function(t,e,n){},"86d6":function(t,e,n){"use strict";var i=n("57a1"),a=n.n(i);a.a},ab27:function(t,e,n){"use strict";(function(t){n("8748");i(n("66fd"));var e=i(n("f4b2"));function i(t){return t&&t.__esModule?t:{default:t}}t(e.default)}).call(this,n("543d")["createPage"])},d60d:function(t,e,n){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("2f62");function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function o(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var s=function(){n.e("components/page-component/app-shipping-address/app-shipping-address").then(function(){return resolve(n("7848"))}.bind(null,n)).catch(n.oe)},d={name:"address-pick",components:{appShippingAddress:s},data:function(){return{mchIndex:null,list:null,hasCity:!1,notInPointList:null,sign:"",page:1,noMore:!1,destroy_url:this.$api.user.address_destroy}},computed:o({},(0,i.mapState)({theme:function(t){return t.mallConfig.theme}})),onLoad:function(t){this.hasCity=t.hasCity,this.sign=t.sign},onShow:function(){this.page=1,this.loadData()},onReachBottom:function(){this.more()},methods:{address:function(t){this.page=1,this.loadData()},more:function(){this.noMore||(this.page++,this.loadData("add"))},loadData:function(){var e=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"current";t.showLoading({mask:!0,title:"加载中"}),this.$request({url:this.$api.user.address,data:{hasCity:this.hasCity,page:this.page}}).then((function(i){t.hideLoading(),0===i.code&&(i.data.list&&i.data.list.length||i.data.notInPointList&&i.data.notInPointList.length||(e.noMore=!0),e.list="add"===n?e.list.concat(i.data.list):i.data.list,e.notInPointList="add"===n?e.notInPointList.concat(i.data.notInPointList):i.data.notInPointList,console.log("this.list--\x3e",e.list))})).catch((function(e){t.hideLoading()}))},setData:function(e){if("gift"===this.sign){var n=this.$store.state.gift.address_id;n=e,this.$store.commit("gift/addressId",n)}else{var i=this.$store.state.orderSubmit.formData;i.address_id=e,this.$store.commit("orderSubmit/mutSetFormData",i)}t.navigateBack()},editAddress:function(e){t.navigateTo({url:"/pages/address/address-edit?id="+e})},wechatAddAddress:function(){var e=this;t.chooseAddress({success:function(n){console.log(n),"chooseAddress:ok"===n.errMsg&&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(e){if(0===e.code){var i=e.data.district["province"]["id"],a=e.data.district["city"]["id"],o=e.data.district["district"]["id"],r={id:"",name:n.userName,ids:[i,a,o],province_id:i,city_id:a,district_id:o,mobile:n.telNumber,detail:n.detailInfo};t.navigateTo({url:"/pages/address/address-edit?form="+JSON.stringify(r)})}else console.error(e.msg)}))}})}}};e.default=d}).call(this,n("543d")["default"])},f4b2:function(t,e,n){"use strict";n.r(e);var i=n("270d"),a=n("3f38");for(var o in a)"default"!==o&&function(t){n.d(e,t,(function(){return a[t]}))}(o);n("86d6"),n("3e15");var r,s=n("f0c5"),d=Object(s["a"])(a["default"],i["b"],i["c"],!1,null,"bda47310",null,!1,i["a"],r);e["default"]=d.exports}},[["ab27","common/runtime","common/vendor"]]]);