acdr-ui/dist/build/mp-weixin/modules/mall/commission/components/commission-log.js

2 lines
1.5 KiB
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";const t=require("../../../../common/vendor.js"),a=require("../../../../sheep/index.js"),e=require("../../../../sheep/api/trade/brokerage.js"),o=require("../../../../sheep/hooks/useGoods.js");if(!Array){t.resolveComponent("uni-load-more")()}Math;const i={__name:"commission-log",setup(i){const n=t.reactive({loadStatus:"",pagination:{list:[],total:0,pageNo:1,pageSize:1}});function s(){return a=this,o=null,i=function*(){n.loadStatus="loading";const{code:a,data:o}=yield e.BrokerageApi.getBrokerageRecordPage({pageNo:n.pagination.pageNo,pageSize:n.pagination.pageSize});0===a&&(n.pagination.list=t.lodash.concat(n.pagination.list,o.list),n.pagination.total=o.total,n.loadStatus=n.pagination.list.length<n.pagination.total?"more":"noMore")},new Promise(((t,e)=>{var n=t=>{try{r(i.next(t))}catch(a){e(a)}},s=t=>{try{r(i.throw(t))}catch(a){e(a)}},r=a=>a.done?t(a.value):Promise.resolve(a.value).then(n,s);r((i=i.apply(a,o)).next())}));var a,o,i}function r(){"noMore"!==n.loadStatus&&(n.pagination.pageNo++,s())}return s(),(e,i)=>t.e({a:t.unref(a.sheep).$url.static("/static/img/shop/commission/title2.png"),b:n.pagination.list},n.pagination.list?{c:t.f(n.pagination.list,((a,e,i)=>({a:t.t(a.title),b:t.t(t.unref(o.fen2yuan)(a.price)),c:t.t(t.unref(t.dayjs)(a.createTime).fromNow()),d:a.id}))),d:t.unref(a.sheep).$url.static("/static/img/shop/avatar/notice.png")}:{},{e:n.pagination.total>0},n.pagination.total>0?{f:t.o(r),g:t.p({status:n.loadStatus,color:"#333333"})}:{},{h:t.o(r)})}},n=t._export_sfc(i,[["__scopeId","data-v-9a97446e"]]);wx.createComponent(n);