pages-commission-commission-ranking.409cf0bc.js 3.0 KB

1
  1. import{v as e,o as a,e as t,f as s,w as n,l as r,j as o,p as l,t as i,k as c,r as u,F as m,g as f,s as d,C as p,i as g,az as _,m as y,z as k,u as w,q as h}from"./index-9880b451.js";import{_ as D}from"./s-layout.dfc5b0b5.js";import{B as b}from"./brokerage.b6c9045b.js";import{f as j}from"./useGoods.bdd1c2ea.js";import{_ as x}from"./_plugin-vue_export-helper.1b428a4d.js";import"./index.df38848e.js";const v=x({__name:"commission-ranking",setup(x){const v=["周排行","月排行"],C=e({currentTab:0,position:0,rankList:[]});async function T(){const{code:e,data:a}=await b.getBrokerageUserChildSummaryPageByPrice({pageNo:1,pageSize:10,"times[0]":C.times[0],"times[1]":C.times[1]});0===e&&(C.rankList=a.list)}async function F(){const{code:e,data:a}=await b.getRankByPrice({times:C.times});0===e&&(C.position=a)}function L(e){return d.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}function M(){let e;e=0===C.currentTab?function(){const e=new Date,a=e.getDay();return[new Date(e.getFullYear(),e.getMonth(),e.getDate()-a,0,0,0),new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-a),23,59,59)]}():function(){const e=new Date,a=e.getFullYear(),t=e.getMonth(),s=new Date(a,t,1,0,0,0),n=new Date(a,t+1,1),r=new Date(n.getTime()-1);return[s,r]}(),C.times=[L(e[0]),L(e[1])]}return a((function(){M(),T(),F()})),(e,a)=>{const d=p,b=g,x=h,L=_("emptyPage"),P=r(y("s-layout"),D);return t(),s(P,{title:"佣金排行榜"},{default:n((()=>[o(b,{class:"CommissionRank"},{default:n((()=>[o(b,{class:"header"},{default:n((()=>[C.position?(t(),s(b,{key:0,class:"rank"},{default:n((()=>[l(" 您目前的排名 "),o(d,{class:"num"},{default:n((()=>[l(i(C.position),1)])),_:1}),l(" 名 ")])),_:1})):(t(),s(b,{key:1,class:"rank"},{default:n((()=>[l("您目前暂无排名")])),_:1}))])),_:1}),o(b,{class:"wrapper"},{default:n((()=>[o(b,{class:"nav acea-row row-around",style:{"justify-content":"space-around",display:"flex"}},{default:n((()=>[(t(),c(m,null,u(v,((e,a)=>o(b,{class:k(["item",C.currentTab===a?"font-color":""]),key:a,onClick:e=>async function(e){C.currentTab=e,C.rankList=[],M(),T(),F()}(a)},{default:n((()=>[l(i(e),1)])),_:2},1032,["class","onClick"]))),64))])),_:1}),o(b,{class:"list"},{default:n((()=>[(t(!0),c(m,null,u(C.rankList,((e,a)=>(t(),s(b,{class:"item acea-row row-between-wrapper",key:a},{default:n((()=>[a<=2?(t(),s(b,{key:0,class:"num"},{default:n((()=>[o(x,{src:"/static/images/medal0"+(a+1)+".png"},null,8,["src"])])),_:2},1024)):(t(),s(b,{key:1,class:"num"},{default:n((()=>[l(i(a+1),1)])),_:2},1024)),o(b,{class:"picTxt acea-row row-between-wrapper"},{default:n((()=>[o(b,{class:"pictrue"},{default:n((()=>[o(x,{src:e.avatar},null,8,["src"])])),_:2},1024),o(b,{class:"text line1"},{default:n((()=>[l(i(e.nickname),1)])),_:2},1024)])),_:2},1024),o(b,{class:"people font-color"},{default:n((()=>[l("¥"+i(w(j)(e.brokeragePrice)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),0!==C.rankList.length||1===C.page&&0!==C.active?f("",!0):(t(),s(b,{key:0,class:"noCommodity"},{default:n((()=>[o(L,{title:"暂无排行~"})])),_:1}))])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-e55cb516"]]);export{v as default};