|
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-order-list"],{"2ba7":function(t,e,a){"use strict";a.r(e);var r=a("ddac"),n=a("958e");for(var s in n)"default"!==s&&function(t){a.d(e,t,(function(){return n[t]}))}(s);a("7576");var i,o=a("f0c5"),d=Object(o["a"])(n["default"],r["b"],r["c"],!1,null,"1446f1ab",null,!1,r["a"],i);e["default"]=d.exports},"3b1f":function(t,e,a){var r=a("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-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},"595c":function(t,e,a){"use strict";var r=a("4ea4");a("99af"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,a("96cf");var n=r(a("1da1")),s=r(a("8832")),i=r(a("359f")),o=(a("42b5"),a("c0d4")),d={components:{BsEmpty:s.default,UiButton:i.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,n.default)(regeneratorRuntime.mark((function e(){var a,r,n;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.loadingStatus="loading",e.next=3,(0,o.ApiGetOrderList)({length:t.pageSize,pageIndex:t.pageIndex,orderStatus:t.currentTabKey>-1?t.currentTabKey:null});case 3:if(a=e.sent,r=a.error,n=a.result,!r){e.next=9;break}return uni.$u.toast(r.message),e.abrupt("return",!1);case 9:n.records.length||(t.loadingStatus="nomore"),t.orderListData=t.orderListData.concat(n.records);case 11:case"end":return e.stop()}}),e)})))()},next:function(){if("nomore"===this.loadingStatus)return!1;this.pageIndex++,this.getOrderList()}}};e.default=d},7576:function(t,e,a){"use strict";var r=a("af19"),n=a.n(r);n.a},"958e":function(t,e,a){"use strict";a.r(e);var r=a("595c"),n=a.n(r);for(var s in r)"default"!==s&&function(t){a.d(e,t,(function(){return r[t]}))}(s);e["default"]=n.a},af19:function(t,e,a){var r=a("3b1f");"string"===typeof r&&(r=[[t.i,r,""]]),r.locals&&(t.exports=r.locals);var n=a("4f06").default;n("14adf03c",r,!0,{sourceMap:!1,shadowMode:!1})},ddac:function(t,e,a){"use strict";a.d(e,"b",(function(){return n})),a.d(e,"c",(function(){return s})),a.d(e,"a",(function(){return r}));var r={uLoadmore:a("c153").default},n=function(){var t=this,e=t.$createElement,r=t._self._c||e;return r("v-uni-view",[r("v-uni-view",{staticClass:"tabs"},t._l(t.tabListData,(function(e){return r("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():r("BsEmpty",{attrs:{tips:"暂无订单记录呢~",icon:a("5151")}},[r("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 r("v-uni-view",{key:e.orderId,staticClass:"orders"},[r("v-uni-view",{staticClass:"orders--title"},[r("v-uni-text",{staticClass:"orders--name"},[t._v("官方自营")]),r("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 r("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)}}},[r("v-uni-image",{staticClass:"orders--item-image",attrs:{mode:"widthFix",src:a.productImageUrl}}),r("v-uni-view",[r("v-uni-view",{staticClass:"orders--item-con"},[r("v-uni-text",{staticClass:"orders--item-title"},[t._v(t._s(a.productName))]),r("v-uni-text",{staticClass:"orders--item-pirce"},[t._v("¥"+t._s(a.realAmount))])],1),r("v-uni-view",{staticClass:"orders--item-desc"},[r("v-uni-text",[t._v(t._s(a.skuDescribe))]),r("v-uni-text",{staticClass:"orders--item-num"},[t._v("x"+t._s(a.quantity))])],1)],1)],1)})),r("v-uni-view",{staticClass:"orders--total"},[r("v-uni-text",[t._v("合计")]),r("v-uni-text",{staticClass:"orders--total__amount"},[t._v("¥"+t._s(e.totalAmount))]),r("v-uni-text",{staticClass:"orders--total__pay"},[t._v("应付")]),r("v-uni-text",{staticClass:"orders--total__amount orders--total__pay"},[t._v("¥"+t._s(e.payAmount))])],1),r("v-uni-view",{staticClass:"orders--footer"},[1===e.orderStatus?r("v-uni-button",{staticClass:"orders--footer-btn orders--footer-btn__red"},[t._v("去支付")]):t._e(),2===e.orderStatus?r("v-uni-button",{staticClass:"orders--footer-btn"},[t._v("查看详情")]):t._e(),[3,4,7].includes(e.orderStatus)?r("v-uni-button",{staticClass:"orders--footer-btn"},[t._v("查看物流")]):t._e(),4==e.orderStatus?r("v-uni-button",{staticClass:"orders--footer-btn orders--footer-btn__red"},[t._v("确认收货")]):t._e()],1)],2)})),t.orderListData.length?r("u-loadmore",{attrs:{status:t.loadingStatus}}):t._e()],2)},s=[]}}]); |