You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
shop-app/h5/static/js/pages-account-address-list....

1 line
20 KiB

3 years ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-account-address-list"],{2702:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={props:{type:{type:String,default:"line"},size:{type:String,default:"normal"},disable:{type:Boolean,default:!1}},methods:{click:function(){!this.disable&&this.$emit("click")}}};e.default=a},"34b0":function(t,e,n){"use strict";var a=n("4ea4");n("7db0"),n("ac1f"),n("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("96cf");var i=a(n("1da1")),r=a(n("8832")),s=a(n("359f")),o=n("87c9"),d=a(n("5a25")),u={components:{BsEmpty:r.default,UiButton:s.default,UiWhiteBox:d.default},data:function(){var t=this.$Route.query;return{query:{id:t.id,source:t.source},addresList:[],isLoading:!0}},computed:{selectedId:{get:function(){var t=this.query.id,e=this.addresList.find((function(t){return t.isDefault}))||{};return t||e.id},set:function(t){uni.$emit("changeAddress",this.addresList.find((function(e){return e.id==t}))||{},this.query.source)}}},onShow:function(t){this.getAddressList()},methods:{getAddressList:function(){var t=this;return(0,i.default)(regeneratorRuntime.mark((function e(){var n,a,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.next=3,(0,o.ApiGetAddress)();case 3:if(n=e.sent,a=n.error,i=n.result,t.isLoading=!1,!a){e.next=10;break}return uni.$u.toast(a.message),e.abrupt("return",!1);case 10:t.addresList=i,i.length||t.$Router.replace("/addressCreate?first=".concat(!i.length)),t.$store.commit("SET_ADDRESS",i),"submitOrder"===t.query.source&&uni.$emit("changeAddress",t.addresList.find((function(e){return e.id==t.selectedId}))||{},t.query.source);case 14:case"end":return e.stop()}}),e)})))()},changeAds:function(t){this.selectedId=t.id,this.$Router.back()}}};e.default=u},"359f":function(t,e,n){"use strict";n.r(e);var a=n("7f16"),i=n("a5d5");for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);n("9f0b");var s,o=n("f0c5"),d=Object(o["a"])(i["default"],a["b"],a["c"],!1,null,"4c357d64",null,!1,a["a"],s);e["default"]=d.exports},3968:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return a}));var a={uLoadmore:n("c153").default},i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"container"},[t.isLoading||t.addresList.length?t._e():a("BsEmpty",{attrs:{tips:"暂无收货地址呢~"}}),t.isLoading?a("u-loadmore",{attrs:{status:"loading"}}):t._e(),t._l(t.addresList,(function(e){return a("UiWhiteBox",{key:e.id,staticClass:"address-item",class:{"address-item__default":e.isDefault}},["submitOrder"==t.query.source?a("v-uni-radio",{staticClass:"address-item--radio",attrs:{color:"#FF875B",checked:e.id==t.selectedId},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.changeAds(e)}}}):t._e(),a("v-uni-view",{staticClass:"address-item--con"},[a("v-uni-view",{staticClass:"address-item--city"},[t._v(t._s(e.province)+t._s(e.city)+t._s(e.area))]),a("v-uni-view",{staticClass:"address-item--detail"},[t._v(t._s(e.detailAddress))]),a("v-uni-view",{staticClass:"address-item--info"},[a("v-uni-text",{staticClass:"address-item--name"},[t._v(t._s(e.name))]),a("v-uni-text",[t._v(t._s(e.phone))])],1)],1),a("v-uni-image",{staticClass:"address-item--edit",attrs:{src:n("fc13")},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.$Router.push("/addressEdit?id="+e.id)}}})],1)})),a("UiButton",{staticClass:"addAddress",attrs:{type:"solid",size:"max"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$Router.push("/addressCreate?first="+!t.addresList.length)}}},[t._v("新增地址")])],2)},r=[]},"453d":function(t,e,n){"use strict";n.r(e);var a=n("91a7"),i=n.n(a);for(var r in a)"default"!==r&&function(t){n.d(e,t,(function(){return a[t]}))}(r);e["default"]=i.a},"47e4":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a={data:function(){return{}},props:{icon:{type:String,default:n("7a1a")},tips:{t