|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-account-address-list"],{"0a81":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-page-body[data-v-7276360b]{background:#f8f8f8;padding-bottom:%?200?%}.address[data-v-7276360b]{background:#fff}.address-item[data-v-7276360b]{height:%?188?%;padding:0 %?40?% 0 %?30?%;display:flex;justify-content:space-between;align-items:center}.address-item--radio[data-v-7276360b]{-webkit-transform:scale(60%);transform:scale(60%)}.address-item--con[data-v-7276360b]{flex:1;margin-left:%?10?%}.address-item--city[data-v-7276360b]{font-size:%?24?%;color:#999}.address-item--detail[data-v-7276360b]{font-size:%?28?%;color:#333;margin:%?20?% 0}.address-item--info uni-text[data-v-7276360b]{font-size:%?24?%;color:#999}.address-item--name[data-v-7276360b]{margin-right:%?46?%}.address-item--edit[data-v-7276360b]{width:%?26?%;height:%?26?%}.address-item__default .address-item--city[data-v-7276360b]{display:flex;align-items:center}.address-item__default .address-item--city[data-v-7276360b]::after{display:block;content:"默认";background:#ff512b;color:#fff;border-radius:%?4?%;padding:%?4?% %?6?%;margin-left:%?20?%;width:%?62?%}.address-item__last[data-v-7276360b]{border:0}.addAddress[data-v-7276360b]{position:fixed;bottom:%?89?%;left:%?30?%;display:flex;align-items:center;justify-content:center;width:%?670?%}body.?%PAGE?%[data-v-7276360b]{background:#f8f8f8}',""]),t.exports=e},2702:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={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=r},"34b0":function(t,e,n){"use strict";var r=n("4ea4");n("7db0"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("96cf");var a=r(n("1da1")),i=r(n("8832")),o=r(n("359f")),s=n("87c9"),u=r(n("5a25")),d={components:{BsEmpty:i.default,UiButton:o.default,UiWhiteBox:u.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,a.default)(regeneratorRuntime.mark((function e(){var n,r,a;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.isLoading=!0,e.next=3,(0,s.ApiGetAddress)();case 3:if(n=e.sent,r=n.error,a=n.result,t.isLoading=!1,!r){e.next=10;break}return uni.$u.toast(r.message),e.abrupt("return",!1);case 10:t.addresList=a,t.$store.commit("SET_ADDRESS",a),"submitOrder"===t.query.source&&uni.$emit("changeAddress",t.addresList.find((function(e){return e.id==t.selectedId}))||{},t.query.source);case 13:case"end":return e.stop()}}),e)})))()},changeAds:function(t){this.selectedId=t.id,this.$Router.back()}}};e.default=d},"359f":function(t,e,n){"use strict";n.r(e);var r=n("7f16"),a=n("a5d5");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("9f0b");var o,s=n("f0c5"),u=Object(s["a"])(a["default"],r["b"],r["c"],!1,null,"4c357d64",null,!1,r["a"],o);e["default"]=u.exports},"41ba":function(t,e,n){"use strict";n("99af"),n("d3b7"),n("4d63"),n("ac1f"),n("25f0"),n("466d"),n("5319"),n("1276"),Object.defineProperty(e,"__esModule",{value:!0}),e.createUUID=e.formatDate=e.IsDouble=e.IsInteger=e.IsNumber=e.IsPhone=e.Debounce=e.ToAsyncAwait=void 0;var r=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e?t.then((function(t){return{error:null,result:t}})).catch((function(t){return{error:t,result:null}})):t};e.ToAsyncAwait=r;var a=function(t,e){var n;return function(){var r=this,a=arguments;n&&clearTimeout(n),n=setTimeout((function(){t.apply(r,a)}),e)}};e.Debounce=a;var i=function(t){return/^(1[3-9]\d{9})$/.test(t)};e.IsPhone=i;var o=function(t){return!(!isDouble(t)&&!isInteger(t))};e.IsNumber=o;var s=function(t){if(null==t||""==t)return!1;var e=t.match(/^[-\+]?\d+$/);return null!=e};e.IsInteger=s;var u=function(t){if(null==t||""==t)return!1;var e=t.match(/^[-\+]?\d+(\.\d+)?$/);return null!=e};e.IsDouble=u;var d=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"yyyy/mm/dd";if(t.constructor===String){t=t.replace(/\D+/gi,"/");var n=t.split("/");if(n.length>3){var r=" ".concat(n[3],":").concat(n[4],":").concat(n[5]);n.length=3,t=n.join("/")+r}}try{t=t?t.constructor===Date?t:new Date(t):new Date}catch(s){throw new Error("不能识别的时间格式")}var a={"m+":t.getMonth()+1,"d+":t.getDate(),"h+":t.getHours(),"i+":t.getMinutes(),"s+":t.getSeconds(),"q+":Math.floor((t.getMonth()+3)/3),"l+":t.getMilliseconds()};for(var i in/(y+)/i.test(e)&&(e=e.replace(RegExp.$1,t.getFullYear().toString().substr(4-RegExp.$1.length))),a)if(new RegExp("(".concat(i,")"),"i").test(e)){var o=a[i].toString();e=e.replace(RegExp.$1,1===RegExp.$1.length?o:"0".concat(o).substr(o.length-1))}return e};e.formatDate=d;var c=function(t,e){var n="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),r=[],a=0;if(e=e||n.length,t)for(a=0;a<t;a++)r[a]=n[0|Math.random()*e];else{var i=0;for(r[8]=r[13]=r[18]=r[23]="-",r[14]="4",a=0;a<36;a++)r[a]||(i=0|16*Math.random(),r[a]=n[19==a?3&i|8:i])}return r.join("")};e.createUUID=c},"453d":function(t,e,n){"use strict";n.r(e);var r=n("91a7"),a=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},"47e4":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={data:function(){return{}},props:{icon:{type:String,default:n("7a1a")},tips:{type:String,default:"亲,暂无相关数据"}},mounted:function(){},methods:{}};e.default=r},5726:function(t,e,n){var r=n("fc54");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=n("4f06").default;a("ee1499be",r,!0,{sourceMap:!1,shadowMode:!1})},5767:function(t,e,n){"use strict";var r=n("dbce"),a=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0});var i={};e.default=void 0;var o=a(n("5530")),s=r(n("41ba"));Object.keys(s).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return s[t]}}))}));var u=r(n("d071"));Object.keys(u).forEach((function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(e,t,{enumerable:!0,get:function(){return u[t]}}))}));var d=(0,o.default)((0,o.default)({},s),u);e.default=d},5871:function(t,e,n){var r=n("fe9e");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=n("4f06").default;a("3023f3a0",r,!0,{sourceMap:!1,shadowMode:!1})},"5a25":function(t,e,n){"use strict";var r;n.r(e);var a,i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"ui-white-box"},[t._t("default")],2)},o=[],s=(n("c557"),n("f0c5")),u={},d=Object(s["a"])(u,i,o,!1,null,"7e14885a",null,!1,r,a);e["default"]=d.exports},"5a44":function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.ui-btn[data-v-4c357d64]{display:inline-block;padding:0 %?50?%;border-radius:%?50?%}.ui-btn[data-v-4c357d64]::after{display:none}.ui-btn__normal[data-v-4c357d64]{height:%?70?%;line-height:%?70?%;font-size:%?28?%}.ui-btn__min[data-v-4c357d64]{height:%?60?%;line-height:%?60?%;font-size:%?28?%}.ui-btn__small[data-v-4c357d64]{height:%?50?%;line-height:%?50?%;font-size:%?28?%}.ui-btn__max[data-v-4c357d64]{height:%?80?%;line-height:%?80?%;font-size:%?32?%}.ui-btn__gradual[data-v-4c357d64]{background:linear-gradient(270deg,#ff7f39,#ffa35b);color:#fff}.ui-btn__solid[data-v-4c357d64]{background:#ff875b;color:#fff}.ui-btn__line[data-v-4c357d64]{background:none;color:#333;border:1px solid #999}.ui-btn__primaryLine[data-v-4c357d64]{background:none;color:#ff875b;border:1px solid #ff875b}.ui-btn__disabed[data-v-4c357d64]{opacity:.5}',""]),t.exports=e},"6b19":function(t,e,n){"use strict";n("a9e3"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r={props:{status:{type:String,default:uni.$u.props.loadmore.status},bgColor:{type:String,default:uni.$u.props.loadmore.bgColor},icon:{type:Boolean,default:uni.$u.props.loadmore.icon},fontSize:{type:[String,Number],default:uni.$u.props.loadmore.fontSize},color:{type:String,default:uni.$u.props.loadmore.color},loadingIcon:{type:String,default:uni.$u.props.loadmore.loadingIcon},loadmoreText:{type:String,default:uni.$u.props.loadmore.loadmoreText},loadingText:{type:String,default:uni.$u.props.loadmore.loadingText},nomoreText:{type:String,default:uni.$u.props.loadmore.nomoreText},isDot:{type:Boolean,default:uni.$u.props.loadmore.isDot},iconColor:{type:String,default:uni.$u.props.loadmore.iconColor},marginTop:{type:[String,Number],default:uni.$u.props.loadmore.marginTop},marginBottom:{type:[String,Number],default:uni.$u.props.loadmore.marginBottom},height:{type:[String,Number],default:uni.$u.props.loadmore.height},line:{type:Boolean,default:uni.$u.props.loadmore.line}}};e.default=r},7985:function(t,e,n){"use strict";n.r(e);var r=n("47e4"),a=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},"7a1a":function(t,e,n){t.exports=n.p+"static/img/empty.bdec362e.png"},"7c34":function(t,e,n){"use strict";n.r(e);var r=n("34b0"),a=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},"7e69":function(t,e,n){"use strict";var r=n("8a42"),a=n.n(r);a.a},"7f16":function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-button",{class:"ui-btn ui-btn__"+t.type+" ui-btn__"+t.size+" "+(t.disable?" x ui-btn__disabed":" xx"),on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click.apply(void 0,arguments)}}},[t._t("default")],2)},i=[]},"87c9":function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApiDeleteAddress=e.ApiPutAddress=e.ApiPostAddress=e.ApiGetAddress=void 0;var r=n("5767"),a="/mall/base",i=function(){return(0,r.ToAsyncAwait)(r.MsbRequestTk.get("".concat(a,"/receiveAddress")))};e.ApiGetAddress=i;var o=function(t){return(0,r.ToAsyncAwait)(r.MsbRequestTk.post("".concat(a,"/receiveAddress"),t))};e.ApiPostAddress=o;var s=function(t){return(0,r.ToAsyncAwait)(r.MsbRequestTk.put("".concat(a,"/receiveAddress"),t))};e.ApiPutAddress=s;var u=function(t){return(0,r.ToAsyncAwait)(r.MsbRequestTk.delete("".concat(a,"/receiveAddress?idList=").concat(t.idList)))};e.ApiDeleteAddress=u},8832:function(t,e,n){"use strict";n.r(e);var r=n("b867"),a=n("7985");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("f35f");var o,s=n("f0c5"),u=Object(s["a"])(a["default"],r["b"],r["c"],!1,null,"54c060f6",null,!1,r["a"],o);e["default"]=u.exports},"8a42":function(t,e,n){var r=n("0a81");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=n("4f06").default;a("1976c766",r,!0,{sourceMap:!1,shadowMode:!1})},"91a7":function(t,e,n){"use strict";var r=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(n("6b19")),i={name:"u-loadmore",mixins:[uni.$u.mpMixin,uni.$u.mixin,a.default],data:function(){return{dotText:"●"}},computed:{loadTextStyle:function(){return{color:this.color,fontSize:uni.$u.addUnit(this.fontSize),lineHeight:uni.$u.addUnit(this.fontSize),backgroundColor:this.bgColor}},showText:function(){var t="";return t="loadmore"==this.status?this.loadmoreText:"loading"==this.status?this.loadingText:"nomore"==this.status&&this.isDot?this.dotText:this.nomoreText,t}},methods:{loadMore:function(){"loadmore"==this.status&&this.$emit("loadmore")}}};e.default=i},"92fd":function(t,e,n){var r=n("5a44");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=n("4f06").default;a("4898df4d",r,!0,{sourceMap:!1,shadowMode:!1})},9444:function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var r={uLine:n("3e06").default,uLoadingIcon:n("891e").default},a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"u-loadmore",style:[t.$u.addStyle(t.customStyle),{backgroundColor:t.bgColor,marginBottom:t.$u.addUnit(t.marginBottom),marginTop:t.$u.addUnit(t.marginTop),height:t.$u.addUnit(t.height)}]},[t.line?n("u-line",{attrs:{length:"140rpx",color:"#E6E8EB",hairline:!1}}):t._e(),n("v-uni-view",{staticClass:"u-loadmore__content",class:"loadmore"==t.status||"nomore"==t.status?"u-more":""},["loading"===t.status&&t.icon?n("v-uni-view",{staticClass:"u-loadmore__content__icon-wrap"},[n("u-loading-icon",{attrs:{color:t.iconColor,size:"17",mode:t.loadingIcon}})],1):t._e(),n("v-uni-text",{staticClass:"u-line-1",class:["nomore"==t.status&&1==t.isDot?"u-loadmore__content__dot-text":"u-loadmore__content__text"],style:[t.loadTextStyle],on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.loadMore.apply(void 0,arguments)}}},[t._v(t._s(t.showText))])],1),t.line?n("u-line",{attrs:{length:"140rpx",color:"#E6E8EB",hairline:!1}}):t._e()],1)},i=[]},"9c40":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var r={uLoadmore:n("c153").default},a=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-uni-view",{staticClass:"container"},[t.isLoading||t.addresList.length?t._e():r("BsEmpty",{attrs:{tips:"暂无收货地址呢~"}}),t.isLoading?r("u-loadmore",{attrs:{status:"loading"}}):t._e(),t._l(t.addresList,(function(e){return r("UiWhiteBox",{key:e.id,staticClass:"address-item",class:{"address-item__default":e.isDefault}},["submitOrder"==t.query.source?r("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(),r("v-uni-view",{staticClass:"address-item--con"},[r("v-uni-view",{staticClass:"address-item--city"},[t._v(t._s(e.province)+t._s(e.city)+t._s(e.area))]),r("v-uni-view",{staticClass:"address-item--detail"},[t._v(t._s(e.detailAddress))]),r("v-uni-view",{staticClass:"address-item--info"},[r("v-uni-text",{staticClass:"address-item--name"},[t._v(t._s(e.name))]),r("v-uni-text",[t._v(t._s(e.phone))])],1)],1),r("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)})),r("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)},i=[]},"9f0b":function(t,e,n){"use strict";var r=n("92fd"),a=n.n(r);a.a},a5d5:function(t,e,n){"use strict";n.r(e);var r=n("2702"),a=n.n(r);for(var i in r)"default"!==i&&function(t){n.d(e,t,(function(){return r[t]}))}(i);e["default"]=a.a},aced:function(t,e,n){"use strict";n.r(e);var r=n("9c40"),a=n("7c34");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("7e69");var o,s=n("f0c5"),u=Object(s["a"])(a["default"],r["b"],r["c"],!1,null,"7276360b",null,!1,r["a"],o);e["default"]=u.exports},b867:function(t,e,n){"use strict";var r;n.d(e,"b",(function(){return a})),n.d(e,"c",(function(){return i})),n.d(e,"a",(function(){return r}));var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"empty"},[t._t("icon",[n("v-uni-image",{staticClass:"empty--icon",attrs:{src:t.icon,mode:"widthFix"}})]),n("v-uni-view",{staticClass:"empty--tips"},[t._v(t._s(t.tips))]),t._t("btn")],2)},i=[]},c153:function(t,e,n){"use strict";n.r(e);var r=n("9444"),a=n("453d");for(var i in a)"default"!==i&&function(t){n.d(e,t,(function(){return a[t]}))}(i);n("c6b9");var o,s=n("f0c5"),u=Object(s["a"])(a["default"],r["b"],r["c"],!1,null,"17ee0c9a",null,!1,r["a"],o);e["default"]=u.exports},c557:function(t,e,n){"use strict";var r=n("dd95"),a=n.n(r);a.a},c6b9:function(t,e,n){"use strict";var r=n("5871"),a=n.n(r);a.a},c997:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.ui-white-box[data-v-7e14885a]{margin:%?20?% %?30?%;background:#fff;border-radius:%?20?%}',""]),t.exports=e},d071:function(t,e,n){"use strict";var r=n("4ea4");n("4de4"),n("caad"),n("d3b7"),n("ac1f"),n("2532"),n("38cf"),n("5319"),Object.defineProperty(e,"__esModule",{value:!0}),e.MsbRequestTk=e.MsbRequest=void 0;var a=r(n("5530")),i=r(n("fda4")),o=r(n("4308")),s="prod",u={test:"https://like-app.mashibing.com/test",release:"",prod:"https://like-app.mashibing.com"},d=function(t,e){if(p(e),200===t.statusCode){var n=t.data;return"SUCCESS"===n.code?n.data:"TOKEN_EXPIRE"===n.code?(uni.navigateTo({url:"/login"}),n):Promise.reject(n)}return t},c=function(t,e){return p(e),{message:t.errMsg,code:t.statusCode}},l=[],f=function(t){var e={url:t.url,method:t.method,data:t.data};return l.includes(JSON.stringify(e))?Promise.reject({message:"请勿频繁操作"}):(l.push(JSON.stringify(e)),!1)},p=function(t){l=l.filter((function(e){return e!==JSON.stringify({url:t.url,method:t.method,data:t.data})}))},v=new i.default;e.MsbRequest=v,v.baseUrl=u[s],v.use("request",(function(t){if(t.header.repeat){var e=f(t);if(e)return e}return t})),v.use("success",d),v.use("error",c);var h=new i.default;e.MsbRequestTk=h,h.baseUrl=u[s],h.use("request",(function(t){var e=o.default.state.token;if(e){if(t.header=(0,a.default)((0,a.default)({},t.header),{},{Authorization:e}),t.header.repeat){var n=f(t);if(n)return n}return t}var r=getCurrentPages(),i=r[r.length-1];return i.$Router.replace("/login"),Promise.reject({message:"要先登录才能操作哦~"})})),h.use("success",d),h.use("error",c)},dd95:function(t,e,n){var r=n("c997");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var a=n("4f06").default;a("36cf71ae",r,!0,{sourceMap:!1,shadowMode:!1})},f35f:function(t,e,n){"use strict";var r=n("5726"),a=n.n(r);a.a},fc13:function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAaCAMAAACelLz8AAAAAXNSR0IArs4c6QAAALpQTFRFAAAAAAAAJCQkICAgKioqMzMzLCwsKioqLi4uMTExLy8vMDAwMjIyMDAwMzMzNDQ0MTExMDAwNDQ0MjIyNDQ0MjIyNDQ0MzMzMTExMjIyMjIyMzMzMzMzMzMzMzMzMzMzMzMzMjIyMzMzMjIyMzMzMjIyMzMzMjIyMjIyMjIyMzMzMzMzMjIyMzMzMjIyMzMzMzMzMzMzMzMzMzMzMzMzMjIyMzMzMzMzMjIyMzMzMzMzMzMzMjIyMzMziWtizwAAAD10Uk5TAAQHCAwUFxgcHyswMzs8QERFT1JUXGNkaGtsb36Dh4uMj5KTm6Orsre7w8TFx8vNz9PX293f5+3z9/v8/qW7KhoAAADGSURBVCjPddHXEoIwFATQi6Jg7zU2FBHF3kX3/3/LAIIQzT7tzJlkwkL0m2xOpb9pnwDXzv+CsoSfR12U1AKY6FTe4K4LZ7hMvaIeYCRpzq+6Fr3WwTEhBjA44l7itYKLIIy0wBj2olBg+gXDhIz94tkONy2SEaI3ZRz+XbVI2FdIdfCUyApuVSrNuFjRIAnpcVFCseLSeMmEZlhLhLb+CB9BK/4jHih/hcVHLcBNB00U6ocbG6KQCVMitEdXIioksUk5y+gN3e0uRauYuucAAAAASUVORK5CYII="},fc54:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */.empty[data-v-54c060f6]{box-sizing:border-box;padding:%?50?%;text-align:center;background:#fff;margin:%?20?% %?30?%;border-radius:%?16?%}.empty--tips[data-v-54c060f6]{font-size:%?26?%;color:#999;margin:%?30?% 0 %?50?%}.empty--icon[data-v-54c060f6]{width:%?380?%;height:%?240?%}',""]),t.exports=e},fda4:function(t,e,n){"use strict";var r=n("4ea4");n("d3b7"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(n("5530")),i=r(n("d4ec")),o=r(n("bee2")),s=function(){function t(e){(0,i.default)(this,t),this.baseUrl="",this.header={repeat:!0},this.hook={request:null,success:null,error:null}}return(0,o.default)(t,[{key:"method",value:function(t){var e=this;if(t.header=(0,a.default)((0,a.default)({},this.header),t.header),t.url=this.baseUrl+t.url,this.hook.request&&(t=this.hook.request(t)),!t)throw new Error("没有请求配置,或是request拦截未做return");return t.constructor===Promise?t:new Promise((function(n,r){uni.request((0,a.default)((0,a.default)({},t),{},{success:function(a){var i=a||a[1];if(i.statusCode>=200&&i.statusCode<400){if(e.hook.success){var o=e.hook.success(i,t);o&&o.constructor===Promise?o.then((function(t){n(t)}),(function(t){r(t)})):n(o)}else n(i);return!1}r(e.hook.error?e.hook.error(i,t):i)},fail:function(n){r(e.hook.error?e.hook.error(n,t):n)}}))}))}},{key:"use",value:function(t,e){this.hook[t]=e}},{key:"get",value:function(t,e,n){return this.method({method:"GET",url:t,data:e,header:n})}},{key:"post",value:function(t,e,n){return this.method({method:"POST",url:t,data:e,header:n})}},{key:"put",value:function(t,e,n){return this.method({method:"PUT",url:t,data:e,header:n})}},{key:"delete",value:function(t,e,n){return this.method({method:"DELETE",url:t,data:e,header:n})}}]),t}(),u=s;e.default=u},fe9e:function(t,e,n){var r=n("24fb");e=r(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 文字基本颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 透明度 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 间距 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */uni-view[data-v-17ee0c9a], uni-scroll-view[data-v-17ee0c9a], uni-swiper-item[data-v-17ee0c9a]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-loadmore[data-v-17ee0c9a]{display:flex;flex-direction:row;align-items:center;justify-content:center;flex:1}.u-loadmore__content[data-v-17ee0c9a]{margin:0 15px;display:flex;flex-direction:row;align-items:center;justify-content:center}.u-loadmore__content__icon-wrap[data-v-17ee0c9a]{margin-right:8px}.u-loadmore__content__text[data-v-17ee0c9a]{font-size:14px;color:#606266}.u-loadmore__content__dot-text[data-v-17ee0c9a]{font-size:15px;color:#909193}',""]),t.exports=e}}]); |