import{B as e,o as a,f as t,g as s,w as r,bS as n,s as l,q as o,n as c,p as u,r as i,F as d,ad as f,ae as m,m as _,t as p,i as w,l as k,A as g,u as h,H as b}from"./index-007bf156.js";import{_ as y}from"./s-layout.19bedb43.js";import{_ as D}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.3617e4e0.js";import"./useGoods.ac3bf93e.js";const C=D({__name:"promoter",setup(D){const C=["周排行","月排行"],L=e({currentTab:0,rankList:[],times:[],one:{},two:{},three:{}});async function v(){L.one={},L.two={},L.three={},L.rankList=[];const{code:e,data:a}=await n.getBrokerageUserRankPageByUserCount({pageNo:1,pageSize:10,"times[0]":L.times[0],"times[1]":L.times[1]});0===e&&(L.rankList=a.list,L.one=L.rankList.shift()||{},L.two=L.rankList.shift()||{},L.trhee=L.rankList.shift()||{})}function T(){let e;e=0===L.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),r=new Date(a,t+1,1),n=new Date(r.getTime()-1);return[s,n]}(),L.times=[j(e[0]),j(e[1])]}function j(e){return l.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}return a((function(){T(),v()})),(e,a)=>{const n=k,l=g,D=o(h("s-layout"),y);return t(),s(D,{title:"推广人排行榜"},{default:r((()=>[c(n,{class:"PromoterRank",style:{backgroundColor:"red"}},{default:r((()=>[c(n,{class:"redBg bg-color"},{default:r((()=>[c(n,{class:"header"},{default:r((()=>[c(n,{class:"nav acea-row row-center-wrapper",style:{display:"flex"}},{default:r((()=>[(t(),u(d,null,i(C,((e,a)=>c(n,{class:b(["item",L.currentTab===a?"font-color":""]),key:a,onClick:e=>function(e){L.currentTab!==e&&(L.currentTab=e,T(),v())}(a)},{default:r((()=>[_(p(e),1)])),_:2},1032,["class","onClick"]))),64))])),_:1}),c(n,{class:"rank acea-row row-bottom row-around"},{default:r((()=>[f(c(n,{class:"item"},{default:r((()=>[c(n,{class:"pictrue"},{default:r((()=>[c(l,{src:L.two.avatar},null,8,["src"])])),_:1}),c(n,{class:"name line1"},{default:r((()=>[_(p(L.two.nickname),1)])),_:1}),c(n,{class:"num"},{default:r((()=>[_(p(L.two.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[m,L.two.id]]),f(c(n,{class:"item"},{default:r((()=>[c(n,{class:"pictrue"},{default:r((()=>[c(l,{src:L.one.avatar},null,8,["src"])])),_:1}),c(n,{class:"name line1"},{default:r((()=>[_(p(L.one.nickname),1)])),_:1}),c(n,{class:"num"},{default:r((()=>[_(p(L.one.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[m,L.one.id]]),f(c(n,{class:"item"},{default:r((()=>[c(n,{class:"pictrue"},{default:r((()=>[c(l,{src:L.three.avatar},null,8,["src"])])),_:1}),c(n,{class:"name line1"},{default:r((()=>[_(p(L.three.nickname),1)])),_:1}),c(n,{class:"num"},{default:r((()=>[_(p(L.three.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[m,L.three.id]])])),_:1})])),_:1})])),_:1}),L.rankList.length?(t(),s(n,{key:0,class:"list"},{default:r((()=>[(t(!0),u(d,null,i(L.rankList,((e,a)=>(t(),s(n,{class:"item acea-row row-between-wrapper",key:a},{default:r((()=>[c(n,{class:"num"},{default:r((()=>[_(p(a+4),1)])),_:2},1024),c(n,{class:"picTxt acea-row row-between-wrapper"},{default:r((()=>[c(n,{class:"pictrue"},{default:r((()=>[c(l,{src:e.avatar},null,8,["src"])])),_:2},1024),c(n,{class:"text line1"},{default:r((()=>[_(p(e.nickname),1)])),_:2},1024)])),_:2},1024),c(n,{class:"people font-color"},{default:r((()=>[_(p(e.brokerageUserCount)+"人",1)])),_:2},1024)])),_:2},1024)))),128))])),_:1})):w("",!0)])),_:1})])),_:1})}}},[["__scopeId","data-v-7bbf8c97"]]);export{C as default};
