webpackJsonp([16],{CVL0:function(t,e){},EcNh:function(t,e,s){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=s("Dd8w"),a=s.n(i),n=(s("vAZe"),{props:{isDefault:{type:Boolean,default:!1},item:{type:Object}},computed:{iconUrl:function(){return this.isDefault?s("Hq5k"):s("nXob")},detailAddress:function(){var t="";if(this.item)for(var e=this.item.regions,s=0;s<e.length;s++){t+=e[s].name}return t+=this.item.address}},methods:{onDefault:function(){this.$emit("onDefault")},onEdit:function(){this.$emit("onEdit")},onDelete:function(){this.$emit("onDelete")}}}),o={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"container"},[i("div",{staticClass:"top-wrapper"},[i("div",{staticClass:"title-wrapper"},[i("label",{staticClass:"title"},[t._v(t._s(t.item.name))]),t._v(" "),i("label",{staticClass:"title"},[t._v(t._s(t.item.mobile))])]),t._v(" "),i("label",{staticClass:"desc address-text",staticStyle:{"-webkit-box-orient":"vertical"}},[t._v(t._s(t.detailAddress))]),t._v(" "),i("div",{staticClass:"bottom-line"})]),t._v(" "),i("div",{staticClass:"bottom-wrapper"},[i("div",{staticClass:"bottom-left-wrapper",on:{click:t.onDefault}},[i("img",{staticClass:"indicator",attrs:{src:t.iconUrl}}),t._v(" "),i("label",{staticClass:"subtitle"},[t._v("默认地址")])]),t._v(" "),i("div",{staticClass:"bottom-right-wrapper"},[i("div",{staticClass:"edit-wrapper",on:{click:t.onEdit}},[i("img",{staticClass:"indicator",attrs:{src:s("q/hk")}}),t._v(" "),i("label",{staticClass:"subtitle"},[t._v("编辑")])]),t._v(" "),i("div",{staticClass:"edit-wrapper delete-wrapper",on:{click:t.onDelete}},[i("img",{staticClass:"indicator",attrs:{src:s("km4y")}}),t._v(" "),i("label",{staticClass:"subtitle"},[t._v("删除")])])])])])},staticRenderFns:[]};var r=s("VU/8")(n,o,!1,function(t){s("bL7l")},"data-v-314f0050",null).exports,c=s("Au9i"),d=s("NYxO"),l=s("J6os"),u={components:{ManageItem:r},computed:a()({},Object(d.e)({defaultItem:function(t){return t.address.defaultItem},items:function(t){return t.address.items}}),{isEmpty:function(){return!(!this.items||0!==this.items.length)}}),created:function(){var t=this;l.c().then(function(e){var s=e.consignees;t.saveAddressItems(s)},function(t){Object(c.Toast)(t.errorMsg)}),this.fetchRegions()},methods:a()({},Object(d.d)(["saveAddressItems","setDefaultAddress","removeAddressItem","selectAddressItem"]),Object(d.b)({fetchRegions:"fetchRegions"}),{isDefaultItem:function(t){return!(!t||!this.defaultItem||t.id!==this.defaultItem.id)},goBack:function(){this.$router.go(-1)},onDefault:function(t){var e=this,s=this.defaultItem;s&&s.id===t.id||(c.Indicator.open(),l.d(t.id).then(function(s){c.Indicator.close(),e.setDefaultAddress(t),e.selectAddressItem(t)},function(t){c.Indicator.close(),Object(c.Toast)(t.errorMsg)}))},onEdit:function(t){this.goAddressEdit("edit",t)},onDelete:function(t){var e=this;c.MessageBox.confirm("确定要删除这条收货地址？","确认删除").then(function(s){"confirm"===s&&(c.Indicator.open(),l.b(t.id).then(function(s){e.removeAddressItem(t.id),c.Indicator.close()},function(t){c.Indicator.close(),Object(c.Toast)(t.errorMsg)}))})},addAddress:function(){this.goAddressEdit("add",null)},goAddressEdit:function(t,e){var s=this.$route.query.isFromCheckout,i=s?-3:-1;this.$router.push({name:"addressEdit",query:{mode:t,item:e,isFromCheckout:s,goBackLevel:i}})}})},m={render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"container"},[i("mt-header",{staticClass:"header",attrs:{fixed:"",title:"管理收货地址"}},[i("header-item",{attrs:{slot:"left",isBack:!0},on:{onclick:t.goBack},slot:"left"})],1),t._v(" "),i("div",{staticClass:"list"},[t.isEmpty?i("div",{staticClass:"empty-wrapper"},[i("img",{attrs:{src:s("Jh6e")}}),t._v(" "),i("label",[t._v("您还没有添加收货地址")])]):t._e(),t._v(" "),t._l(t.items,function(e){return i("manage-item",{key:e.id,attrs:{item:e,isDefault:t.isDefaultItem(e)},on:{onDefault:function(s){t.onDefault(e)},onEdit:function(s){t.onEdit(e)},onDelete:function(s){t.onDelete(e)}}})}),t._v(" "),i("gk-button",{staticClass:"button",attrs:{type:"primary"},on:{click:t.addAddress}},[t._v("添加收货地址")])],2)],1)},staticRenderFns:[]};var A=s("VU/8")(u,m,!1,function(t){s("CVL0")},"data-v-05204a98",null);e.default=A.exports},Jh6e:function(t,e,s){t.exports=s.p+"static/img/address_empty@2x.4eede8f.png"},bL7l:function(t,e){},km4y:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA5CAYAAAB9E9gIAAACZ0lEQVR4AWJwL/ABtGsPsHIGQRzAa9tuo9qN67h2G9VBEau2d2duZnu17Qa1zahGUDOuzS0uU3/Z17zbft0k/+Dj/B5n9jaWCbAomTt3bk4A6qGAp36MiRKNpDVy/4/3FvYSxsylFdDZj3nvEg10TxHV9w6mgNY7omTOegVbt25ddgX0xBUkY7/z3sBmzJhR4JsCkeYvXrw4T5RopNHyXm1MTW9hGnhO1HsBeHiABdj/AFPInTQyRv3HKqORZ4nibM5Fvhf42DcwoOVONQCTTnDv9+/fZ03BNFEL+9BYBKlXCgZA/eIC00hjUzAiKqKATv77ML5IRFVSMNFB5JL/PBXQK3HTRnkuHVFILCF6xozKX88ZY3JH/qv4DQx5XbpHEQUEEqZmzCgjz8cMFmABFmDJZLK4LUojzWDmSrGBKeSFomXaHR8Y0CFR0PX4wJAOi4JupBsWYIjJOkRULaMw2yIBmEZ29Eg7TAFPSF0DZrArTCVMBwX05sugutQH2GXRKO93hVmMuOaZBzC6Koa8o64wBbRaXPMmwAIswAIswAIswH6aADsvh0hXmBhGbR75ABv4pXl9oROmqysMgJtYkL1GI0/0YmwxxhTSy5blz+jYYld0EecXC4Nm2mFAy0RBB+K0/FbO/nHQQCvtpB0WTAMswOIPeyjapc0ewGZKmN0K6Ajjg+JBT213kC6UZq6tgO6LFbFrzhtYNNIwAfualx/zPJPz4id1zHaG2Q/bFdBpD3cI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