|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-list"],{"16a8":function(t,e,a){"use strict";var n;a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}));var r=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-button",{class:"ui-btn ui-btn__"+t.type+" ui-btn__"+t.size+(t.disabed?" ui-btn__disabed":""),on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.click.apply(void 0,arguments)}}},[t._t("default")],2)},i=[]},2702:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n={props:{type:{type:String,default:"line"},size:{type:String,default:"normal"},disabed:{type:Boolean,default:!1}},methods:{click:function(){!this.disabed&&this.$emit("click")}}};e.default=n},"2ba7":function(t,e,a){"use strict";a.r(e);var n=a("ddac"),r=a("958e");for(var i in r)"default"!==i&&function(t){a.d(e,t,(function(){return r[t]}))}(i);a("7576");var o,s=a("f0c5"),u=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,"1446f1ab",null,!1,n["a"],o);e["default"]=u.exports},"359f":function(t,e,a){"use strict";a.r(e);var n=a("16a8"),r=a("a5d5");for(var i in r)"default"!==i&&function(t){a.d(e,t,(function(){return r[t]}))}(i);a("c95f");var o,s=a("f0c5"),u=Object(s["a"])(r["default"],n["b"],n["c"],!1,null,"5577a645",null,!1,n["a"],o);e["default"]=u.exports},"3b1f":function(t,e,a){var n=a("24fb");e=n(!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-1446f1ab]{background:#f8f8f8;overflow:hidden}.tabs[data-v-1446f1ab]{height:%?100?%;background:#fff;display:flex;justify-content:space-between;align-items:center;padding:0 %?40?%;font-size:%?28?%;color:#666}.tabs__active[data-v-1446f1ab]{color:#ff875b;position:relative}.tabs__active[data-v-1446f1ab]::after{display:block;content:"";height:%?4?%;background:#ff875b;border-radius:%?4?%;position:absolute;bottom:%?-20?%;left:45%;width:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.orders[data-v-1446f1ab]{background:#fff;padding:%?30?%;margin:%?20?% 0}.orders--title[data-v-1446f1ab]{display:flex;justify-content:space-between;align-items:center}.orders--name[data-v-1446f1ab]{font-size:%?32?%;color:#333}.orders--status[data-v-1446f1ab]{font-size:%?24?%;color:#999}.orders--status__warn[data-v-1446f1ab]{color:#ff875b}.orders--item[data-v-1446f1ab]{display:flex;justify-content:space-between;padding:%?30?% 0 0}.orders--item-image[data-v-1446f1ab]{width:%?180?%;height:%?180?%;margin-right:%?30?%}.orders--item-con[data-v-1446f1ab]{width:%?510?%;display:flex;justify-content:space-between;font-size:%?28?%;color:#333;line-height:%?39?%}.orders--item-title[data-v-1446f1ab]{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.orders--item-pirce[data-v-1446f1ab]{font-size:%?22?%;margin-left:%?60?%}.orders--item-desc[data-v-1446f1ab]{width:%?510?%;font-size:%?24?%;color:#999;margin-top:%?20?%;line-height:%?39?%;display:flex;justify-content:space-between}.orders--item-num[data-v-1446f1ab]{font-size:%?28?%;margin-left:%?60?%}.orders--total[data-v-1446f1ab]{font-size:%?24?%;color:#999;display:flex;align-items:center;justify-content:end;margin-top:%?30?%}.orders--total__amount[data-v-1446f1ab]{font-size:%?28?%;margin-right:%?20?%}.orders--total__pay[data-v-1446f1ab]{color:#333}.orders--footer[data-v-1446f1ab]{display:flex;justify-content:end;align-items:center;margin-top:%?30?%}.orders--footer-btn[data-v-1446f1ab]{height:%?58?%;line-height:%?58?%;border-radius:%?30?%;margin:0 0 0 %?30?%;border:1px solid #333;color:#333;background:none;font-size:%?26?%}.orders--footer-btn__red[data-v-1446f1ab]{background:linear-gradient(270deg,#ff7f39,#ffa35b);color:#fff;border:0;height:%?60?%;line-height:%?60?%}body.?%PAGE?%[data-v-1446f1ab]{background:#f8f8f8}',""]),t.exports=e},"3ccf":function(t,e,a){var n=a("5640");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=a("4f06").default;r("20e9ce27",n,!0,{sourceMap:!1,shadowMode:!1})},"42b5":function(t,e,a){"use strict";var n=a("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.DictOrderStatus=void 0;var r=n(a("b296")),i=new r.default([{key:"1",name:"待支付",value:"awaitPay"},{key:"2",name:"已关闭",value:"close"},{key:"3",name:"待发货",value:"awaitSend"},{key:"4",name:"已发货",value:"finishSend"},{key:"6",name:"已收货",value:"finishReceiving"},{key:"7",name:"已完成",value:"end"}]);e.DictOrderStatus=i},5151:function(t,e,a){t.exports=a.p+"static/img/empty.c4b1f0ad.png"},5640:function(t,e,a){var n=a("24fb");e=n(!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-5577a645]{display:inline-block;padding:0 %?50?%;border-radius:%?50?%}.ui-btn__normal[data-v-5577a645]{height:%?70?%;line-height:%?70?%;font-size:%?28?%}.ui-btn__max[data-v-5577a645]{width:%?690?%;height:%?80?%;line-height:%?80?%;font-size:%?32?%}.ui-btn__gradual[data-v-5577a645]{background:linear-gradient(270deg,#ff7f39,#ffa35b);color:#fff}.ui-btn__solid[data-v-5577a645]{background:#ff875b;color:#fff}.ui-btn__line[data-v-5577a645]{background:none;color:#333;border:1px solid #c0b9b9}.ui-btn__primaryLine[data-v-5577a645]{background:none;color:#ff875b;border:1px solid #ff875b}.ui-btn__disabed[data-v-5577a645]{opacity:.8}',""]),t.exports=e},"595c":function(t,e,a){"use strict";var n=a("4ea4");a("99af"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var r=n(a("1da1")),i=n(a("8832")),o=n(a("359f")),s=(a("42b5"),a("c0d4")),u={components:{BsEmpty:i.default,UiButton:o.default},data:function(){return{tabListData:[{key:"-1",name:"全部"},{key:"1",name:"待付款"},{key:"3",name:"待发货"},{key:"4",name:"待收货"},{key:"6",name:"待评价"}],currentTabKey:"-1",orderListData:[],loadingStatus:"loading",pageIndex:1,pageSize:10}},onLoad:function(){this.getOrderList()},onReachBottom:function(){this.next()},methods:{changeTab:function(t){this.currentTabKey=t,this.pageIndex=1,this.orderListData=[],this.getOrderList()},getOrderList:function(){var t=this;return(0,r.default)(regeneratorRuntime.mark((function e(){var a,n,r;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loadingStatus="loading",e.next=3,(0,s.ApiGetOrderList)({length:t.pageSize,pageIndex:t.pageIndex,orderStatus:t.currentTabKey>-1?t.currentTabKey:null});case 3:if(a=e.sent,n=a.error,r=a.result,!n){e.next=9;break}return uni.$u.toast(n.message),e.abrupt("return",!1);case 9:r.records.length||(t.loadingStatus="nomore"),t.orderListData=t.orderListData.concat(r.records);case 11:case"end":return e.stop()}}),e)})))()},next:function(){if("nomore"===this.loadingStatus)return!1;this.pageIndex++,this.getOrderList()}}};e.default=u},7576:function(t,e,a){"use strict";var n=a("af19"),r=a.n(n);r.a},"958e":function(t,e,a){"use strict";a.r(e);var n=a("595c"),r=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=r.a},a5d5:function(t,e,a){"use strict";a.r(e);var n=a("2702"),r=a.n(n);for(var i in n)"default"!==i&&function(t){a.d(e,t,(function(){return n[t]}))}(i);e["default"]=r.a},af19:function(t,e,a){var n=a("3b1f");"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var r=a("4f06").default;r("14adf03c",n,!0,{sourceMap:!1,shadowMode:!1})},b296:function(t,e,a){"use strict";var n=a("4ea4");a("c975"),a("d81d"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=n(a("d4ec")),i=n(a("bee2")),o=function(){function t(e){var a=this;(0,r.default)(this,t);var n=[],i=[];if(!Array.isArray(e))throw new Error("param is not an array!");e.map((function(t){t.key&&t.name&&(n.push(t.key),i.push(t.value),a[t.key]=t,t.key!==t.value&&(a[t.value]=t))})),this.data=e,this.keyArr=n,this.valueArr=i}return(0,i.default)(t,[{key:"keyOf",value:function(t){return this.data[this.keyArr.indexOf(t)]}},{key:"valueOf",value:function(t){return this.data[this.valueArr.indexOf(t)]}},{key:"getNameByKey",value:function(t){var e=this.keyOf(t);if(!e)throw new Error("No enum constant"+t);return e.name}},{key:"getNameByValue",value:function(t){var e=this.valueOf(t);if(!e)throw new Error("No enum constant"+t);return e.name}},{key:"getValueByKey",value:function(t){var e=this.keyOf(t);if(!e)throw new Error("No enum constant"+t);return e.key}},{key:"getData",value:function(){return this.data}}]),t}(),s=o;e.default=s},c0d4:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.ApiPostWxPay=e.ApiPutCancelOrder=e.ApiPostSubmitOrder=e.ApiGetOrderDetail=e.ApiGetBeforeCartOrder=e.ApiGetBeforeOrder=e.ApiGetOrderList=void 0;var n=a("5767"),r="/mall/trade",i=function(t){return(0,n.ToAsyncAwait)(n.MsbRequestTk.get("".concat(r,"/app/tradeOrder/page"),t))};e.ApiGetOrderList=i;var o=function(t){return(0,n.ToAsyncAwait)(n.MsbRequestTk.get("".concat(r,"/app/tradeOrder/buyAdvanceOrder"),t))};e.ApiGetBeforeOrder=o;var s=function(t){return(0,n.ToAsyncAwait)(n.MsbRequestTk.get("".concat(r,"/app/tradeOrder/cartAdvanceOrder"),t))};e.ApiGetBeforeCartOrder=s;var u=function(t){return(0,n.ToAsyncAwait)(n.MsbRequestTk.get("".concat(r,"/app/tradeOrder/").concat(t)))};e.ApiGetOrderDetail=u;var d=function(t){return(0,n.ToAsyncAwait)(n.MsbRequestTk.post("".concat(r,"/app/tradeOrder/submitOrder"),t))};e.ApiPostSubmitOrder=d;var c=function(t){return(0,n.ToAsyncAwait)(n.MsbRequestTk.post("".concat(r,"/app/tradeOrder/cancel"),t))};e.ApiPutCancelOrder=c;var f=function(t){return(0,n.ToAsyncAwait)(n.MsbRequestTk.post("".concat(r,"/pay/wxPay/app"),t))};e.ApiPostWxPay=f},c95f:function(t,e,a){"use strict";var n=a("3ccf"),r=a.n(n);r.a},ddac:function(t,e,a){"use strict";a.d(e,"b",(function(){return r})),a.d(e,"c",(function(){return i})),a.d(e,"a",(function(){return n}));var n={uLoadmore:a("c153").default},r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[n("v-uni-view",{staticClass:"tabs"},t._l(t.tabListData,(function(e){return n("v-uni-text",{key:e.key,class:e.key===t.currentTabKey&&"tabs__active",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.changeTab(e.key)}}},[t._v(t._s(e.name))])})),1),t.orderListData.length||"nomore"!==t.loadingStatus?t._e():n("BsEmpty",{attrs:{tips:"暂无订单记录呢~",icon:a("5151")}},[n("ui-button",{attrs:{slot:"btn",type:"line"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.$Router("/")}},slot:"btn"},[t._v("去逛逛")])],1),t._l(t.orderListData,(function(e){return n("v-uni-view",{key:e.orderId,staticClass:"orders"},[n("v-uni-view",{staticClass:"orders--title"},[n("v-uni-text",{staticClass:"orders--name"},[t._v("官方自营")]),n("v-uni-text",{staticClass:"orders--status",class:[1,3].includes(e.orderStatus)&&"orders--status__warn"},[t._v(t._s(e.orderStatusDesc))])],1),t._l(e.products,(function(a){return n("v-uni-view",{key:a.productId,staticClass:"orders--item",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.$Router.push("/orderDetail?id="+e.orderId)}}},[n("v-uni-image",{staticClass:"orders--item-image",attrs:{mode:"widthFix",src:a.productImageUrl}}),n("v-uni-view",[n("v-uni-view",{staticClass:"orders--item-con"},[n("v-uni-text",{staticClass:"orders--item-title"},[t._v(t._s(a.productName))]),n("v-uni-text",{staticClass:"orders--item-pirce"},[t._v("¥"+t._s(a.realAmount))])],1),n("v-uni-view",{staticClass:"orders--item-desc"},[n("v-uni-text",[t._v(t._s(a.skuDescribe))]),n("v-uni-text",{staticClass:"orders--item-num"},[t._v("x"+t._s(a.quantity))])],1)],1)],1)})),n("v-uni-view",{staticClass:"orders--total"},[n("v-uni-text",[t._v("合计")]),n("v-uni-text",{staticClass:"orders--total__amount"},[t._v("¥"+t._s(e.totalAmount))]),n("v-uni-text",{staticClass:"orders--total__pay"},[t._v("应付")]),n("v-uni-text",{staticClass:"orders--total__amount orders--total__pay"},[t._v("¥"+t._s(e.payAmount))])],1),n("v-uni-view",{staticClass:"orders--footer"},[1===e.orderStatus?n("v-uni-button",{staticClass:"orders--footer-btn orders--footer-btn__red"},[t._v("去支付")]):t._e(),2===e.orderStatus?n("v-uni-button",{staticClass:"orders--footer-btn"},[t._v("查看详情")]):t._e(),[3,4,7].includes(e.orderStatus)?n("v-uni-button",{staticClass:"orders--footer-btn"},[t._v("查看物流")]):t._e(),4==e.orderStatus?n("v-uni-button",{staticClass:"orders--footer-btn orders--footer-btn__red"},[t._v("确认收货")]):t._e()],1)],2)})),t.orderListData.length?n("u-loadmore",{attrs:{status:t.loadingStatus}}):t._e()],2)},i=[]}}]); |