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