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