(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["otherpages/member/address/address"],{"00c7":function(e,t,s){"use strict";var n=s("f32e"),r=s.n(n);r.a},"1f9e":function(e,t,s){"use strict";s.r(t);var n=s("9054"),r=s("7d73");for(var o in r)"default"!==o&&function(e){s.d(t,e,(function(){return r[e]}))}(o);s("00c7");var a,i=s("f0c5"),d=Object(i["a"])(r["default"],n["b"],n["c"],!1,null,"6cb8469e",null,!1,n["a"],a);t["default"]=d.exports},6608:function(e,t,s){"use strict";(function(e){s("6b76");n(s("66fd"));var t=n(s("1f9e"));function n(e){return e&&e.__esModule?e:{default:e}}e(t.default)}).call(this,s("543d")["createPage"])},"7d73":function(e,t,s){"use strict";s.r(t);var n=s("c19f"),r=s.n(n);for(var o in n)"default"!==o&&function(e){s.d(t,e,(function(){return n[e]}))}(o);t["default"]=r.a},9054:function(e,t,s){"use strict";var n={nsEmpty:function(){return s.e("components/ns-empty/ns-empty").then(s.bind(null,"211f"))},loadingCover:function(){return s.e("components/loading-cover/loading-cover").then(s.bind(null,"cd2f"))},nsShowToast:function(){return Promise.all([s.e("common/vendor"),s.e("components/ns-show-toast/ns-show-toast")]).then(s.bind(null,"f505"))}},r=function(){var e=this,t=e.$createElement,s=(e._self._c,e.$lang("modify")),n=e.$lang("del"),r=e.$lang("newAddAddress"),o=e.$lang("getAddress"),a=e.$lang("newAddAddress"),i=e.$lang("getAddress");e.$mp.data=Object.assign({},{$root:{m0:s,m1:n,m2:r,m3:o,m4:a,m5:i}})},o=[];s.d(t,"b",(function(){return r})),s.d(t,"c",(function(){return o})),s.d(t,"a",(function(){return n}))},c19f:function(e,t,s){"use strict";(function(e){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=r(s("4c22"));s("bfe4");function r(e){return e&&e.__esModule?e:{default:e}}var o=function(){Promise.all([s.e("common/vendor"),s.e("components/ns-show-toast/ns-show-toast")]).then(function(){return resolve(s("f505"))}.bind(null,s)).catch(s.oe)},a={data:function(){return{addressList:[],back:"",redirect:"redirectTo",isIndex:!1,showEmpty:!1}},components:{nsShowToast:o},mixins:[n.default],onLoad:function(e){e.back&&(this.back=e.back),e.redirect&&(this.redirect=e.redirect)},onShow:function(){this.$langConfig.refresh(),this.addressList=[],this.$refs.mescroll&&this.$refs.mescroll.refresh()},methods:{getListData:function(e){var t=this;this.showEmpty=!1,this.$api.sendRequest({url:"/api/memberaddress/page",data:{page:e.num,page_size:e.size},success:function(s){t.showEmpty=!0;var n=[],r=s.message;0==s.code&&s.data?n=s.data.list:t.$util.showToast({title:r}),e.endSuccess(n.length),1==e.num&&(t.addressList=[]),t.addressList=t.addressList.concat(n),t.$refs.loadingCover&&t.$refs.loadingCover.hide()},fail:function(s){e.endErr(),t.$refs.loadingCover&&t.$refs.loadingCover.hide()}})},addAddress:function(e,t){var s={};"edit"==e&&(s.id=t),this.back&&(s.back=this.back),this.$util.redirectTo("/otherpages/member/address_edit/address_edit",s)},deleteAddress:function(t,s){var n=this;e.showModal({title:"操作提示",content:"确定要删除该地址吗？",success:function(e){if(e.confirm){if(1==s)return void n.$util.showToast({title:"默认地址，不能删除"});n.$api.sendRequest({url:"/api/memberaddress/delete",data:{id:t},success:function(e){0==e.code?n.$util.showToast({title:"删除成功"}):n.$util.showToast({title:"删除失败"}),n.$refs.mescroll.refresh()},fail:function(e){mescroll.endErr()}})}}})},setDefault:function(t){var s=this;this.$api.sendRequest({url:"/api/memberaddress/setdefault",data:{id:t},success:function(t){if(t.data>0)if(s.$refs.mescroll.refresh(),""!=s.back){for(var n=!0,r=getCurrentPages().reverse(),o=0;o<r.length;o++)if(-1!=s.back.indexOf(r[o].route)){n=!1,e.navigateBack({delta:o});break}n&&s.$util.redirectTo(s.back,{},"redirectTo")}else s.$refs.mescroll.refresh(),s.$util.showToast({title:"修改默认地址成功"});else s.$util.showToast({title:t.message})}})},getChooseAddress:function(){var t=this;e.chooseAddress({success:function(e){"chooseAddress:ok"==e.errMsg?t.saveAddress({name:e.userName,mobile:e.telNumber,province:e.provinceName,city:e.cityName,district:e.countyName,address:e.detailInfo,full_address:e.provinceName+"-"+e.cityName+"-"+e.countyName}):t.$util.showToast({title:e.errMsg})}})},saveAddress:function(e){var t=this;this.$api.sendRequest({url:"/api/memberaddress/addthreeparties",data:e,success:function(e){e.code>=0?t.$refs.mescroll.refresh():t.$util.showToast({title:e.message})}})}}};t.default=a}).call(this,s("543d")["default"])},f32e:function(e,t,s){}},[["6608","common/runtime","common/vendor"]]]);