1 |
- "use strict";const e=require("../../common/vendor.js"),r=require("../../sheep/index.js"),s=require("../../sheep/api/trade/brokerage.js"),t=require("../../sheep/hooks/useGoods.js");if(require("../../sheep/url/index.js"),require("../../sheep/store/index.js"),require("../../sheep/store/app.js"),require("../../sheep/api/promotion/diy.js"),require("../../sheep/request/index.js"),require("../../sheep/config/index.js"),require("../../sheep/platform/index.js"),require("../../sheep/platform/provider/wechat/index.js"),require("../../sheep/platform/provider/wechat/miniProgram.js"),require("../../sheep/api/member/auth.js"),require("../../sheep/api/member/social.js"),require("../../sheep/api/member/user.js"),require("../../sheep/platform/provider/apple/index.js"),require("../../sheep/platform/share.js"),require("../../sheep/router/index.js"),require("../../sheep/hooks/useModal.js"),require("../../sheep/helper/index.js"),require("../../sheep/helper/test.js"),require("../../sheep/helper/digit.js"),require("../../sheep/api/member/signin.js"),require("../../sheep/helper/throttle.js"),require("../../sheep/platform/pay.js"),require("../../sheep/api/pay/order.js"),require("../../sheep/store/user.js"),require("../../sheep/store/cart.js"),require("../../sheep/api/trade/cart.js"),require("../../sheep/api/pay/wallet.js"),require("../../sheep/api/trade/order.js"),require("../../sheep/api/promotion/coupon.js"),require("../../sheep/store/sys.js"),require("../../sheep/store/modal.js"),require("../../sheep/config/zIndex.js"),require("../../sheep/util/index.js"),!Array){(e.resolveComponent("emptyPage")+e.resolveComponent("s-layout"))()}Math;const i={__name:"commission-ranking",setup(i){const a=["周排行","月排行"],n=e.reactive({currentTab:0,position:0,rankList:[]});async function o(){const{code:e,data:r}=await s.BrokerageApi.getBrokerageUserChildSummaryPageByPrice({pageNo:1,pageSize:10,"times[0]":n.times[0],"times[1]":n.times[1]});0===e&&(n.rankList=r.list)}async function p(){const{code:e,data:r}=await s.BrokerageApi.getRankByPrice({times:n.times});0===e&&(n.position=r)}function u(e){return r.sheep.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}function h(){let e;e=0===n.currentTab?function(){const e=new Date,r=e.getDay();return[new Date(e.getFullYear(),e.getMonth(),e.getDate()-r,0,0,0),new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-r),23,59,59)]}():function(){const e=new Date,r=e.getFullYear(),s=e.getMonth(),t=new Date(r,s,1,0,0,0),i=new Date(r,s+1,1),a=new Date(i.getTime()-1);return[t,a]}(),n.times=[u(e[0]),u(e[1])]}return e.onLoad((function(){h(),o(),p()})),(r,s)=>e.e({a:n.position},n.position?{b:e.t(n.position)}:{},{c:e.f(a,((r,s,t)=>({a:e.t(r),b:e.n(n.currentTab===s?"font-color":""),c:s,d:e.o((e=>async function(e){n.currentTab=e,n.rankList=[],h(),o(),p()}(s)),s)}))),d:e.f(n.rankList,((r,s,i)=>e.e({a:s<=2},s<=2?{b:"/static/images/medal0"+(s+1)+".png"}:{c:e.t(s+1)},{d:r.avatar,e:e.t(r.nickname),f:e.t(e.unref(t.fen2yuan)(r.brokeragePrice)),g:s}))),e:0===n.rankList.length&&(1!==n.page||0===n.active)},0!==n.rankList.length||1===n.page&&0!==n.active?{}:{f:e.p({title:"暂无排行~"})},{g:e.p({title:"佣金排行榜"})})}},a=e._export_sfc(i,[["__scopeId","data-v-3976bf4a"]]);wx.createPage(a);
|