2 lines
2.9 KiB
JavaScript
2 lines
2.9 KiB
JavaScript
|
"use strict";const e=require("../../../common/vendor.js"),t=require("../../../sheep/index.js"),o=require("../../../sheep/util/index.js"),a=require("../../../sheep/api/trade/brokerage.js"),n=require("../../../sheep/hooks/useGoods.js");if(!Array){(e.resolveComponent("su-tabs")+e.resolveComponent("su-sticky")+e.resolveComponent("s-empty")+e.resolveComponent("uni-load-more")+e.resolveComponent("s-layout")+e.resolveComponent("layout-default-uni"))()}Math||((()=>"../../../sheep/ui/su-tabs/su-tabs.js")+(()=>"../../../sheep/ui/su-sticky/su-sticky.js")+(()=>"../../../sheep/components/s-empty/s-empty.js")+(()=>"../../../uni_modules/uni-load-more/components/uni-load-more/uni-load-more.js")+(()=>"../../../sheep/components/s-layout/s-layout.js"))();const s={__name:"order",setup(s){e.useCssVars((t=>({51355834:e.unref(i)})));const r=2*t.sheep.$platform.device.statusBarHeight,i=t.sheep.$url.css("/static/img/shop/user/withdraw_bg.png");e.onPageScroll((e=>{l.scrollTop=e.scrollTop<=100}));const l=e.reactive({totals:0,scrollTop:!1,currentTab:0,loadStatus:"",pagination:{list:[],total:0,pageNo:1,pageSize:1}}),p=[{name:"全部",value:"all"},{name:"待结算",value:"0"},{name:"已结算",value:"1"}];function u(e){o.resetPagination(l.pagination),l.currentTab=e.index,c()}function c(){return t=this,o=null,n=function*(){l.loadStatus="loading";const{code:t,data:o}=yield a.BrokerageApi.getBrokerageRecordPage({pageSize:l.pagination.pageSize,pageNo:l.pagination.pageSize,bizType:1,status:l.currentTab>0?l.currentTab:void 0});0===t&&(l.pagination.list=e.lodash.concat(l.pagination.list,o.list),l.pagination.total=o.total,l.loadStatus=l.pagination.list.length<l.pagination.total?"more":"noMore",0===l.currentTab&&(l.totals=o.total))},new Promise(((e,a)=>{var s=e=>{try{i(n.next(e))}catch(t){a(t)}},r=e=>{try{i(n.throw(e))}catch(t){a(t)}},i=t=>t.done?e(t.value):Promise.resolve(t.value).then(s,r);i((n=n.apply(t,o)).next())}));var t,o,n}function d(){"noMore"!==l.loadStatus&&(l.pagination.pageNo++,c())}return e.onLoad((()=>{c()})),e.onReachBottom((()=>{d()})),(o,a)=>e.e({a:e.t(l.totals),b:e.s({marginTop:"-"+Number(r+88)+"rpx",paddingTop:Number(r+108)+"rpx"}),c:e.o(u),d:e.p({list:p,scrollable:!1,current:l.currentTab}),e:e.p({bgColor:"#fff"}),f:e.f(l.pagination.list,((o,a,s)=>({a:e.t(o.bizId),b:e.t(0===o.status?"待结算":1===o.status?"已结算":"已取消"),c:e.t(e.unref(n.fen2yuan)(o.price)),d:e.t(o.title),e:e.t(e.unref(t.sheep).$helper.timeFormat(o.createTime,"yyyy-mm-dd hh:MM:ss")),f:o}))),g:0===l.pagination.total},0===l.pagination.total?{h:e.p({icon:"/static/order-empty.png",text:"暂无订单"})}:{},{i:l.pagination.total>0},l.pagination.total>0?{j:e.o(d),k:e.p({status:l.loadStatus,"content-text":{contentdown:"上拉加载更多"}})}:{},{l:e.n(l.scrollTop?"order-warp":""),m:e.p({title:"分销订单",navbar:"inner"}),n:e.s(o.__cssVars())})}},r=e._export_sfc(s,[["__scopeId","data-v-78fc14da"]]);s.__runtimeHooks=1,wx.createPage(r);
|