import{y 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,a5 as f,a6 as d,t as m,u as _,g as w,i as p,x as k,m as g,B as h}from"./index-9aa72eed.js";import{_ as b}from"./s-layout.bffb18b8.js";import{B as y}from"./brokerage.3a814b62.js";import{_ as D}from"./_plugin-vue_export-helper.1b428a4d.js";import"./form.c66b5271.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 y.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 x(){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=[T(e[0]),T(e[1])]}function T(e){return n.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}return a((function(){x(),v()})),(e,a)=>{const n=p,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(C,((e,a)=>o(n,{class:h(["item",L.currentTab===a?"font-color":""]),key:a,onClick:e=>function(e){L.currentTab!==e&&(L.currentTab=e,x(),v())}(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:L.two.avatar},null,8,["src"])])),_:1}),o(n,{class:"name line1"},{default:r((()=>[m(_(L.two.nickname),1)])),_:1}),o(n,{class:"num"},{default:r((()=>[m(_(L.two.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[d,L.two.id]]),f(o(n,{class:"item"},{default:r((()=>[o(n,{class:"pictrue"},{default:r((()=>[o(y,{src:L.one.avatar},null,8,["src"])])),_:1}),o(n,{class:"name line1"},{default:r((()=>[m(_(L.one.nickname),1)])),_:1}),o(n,{class:"num"},{default:r((()=>[m(_(L.one.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[d,L.one.id]]),f(o(n,{class:"item"},{default:r((()=>[o(n,{class:"pictrue"},{default:r((()=>[o(y,{src:L.three.avatar},null,8,["src"])])),_:1}),o(n,{class:"name line1"},{default:r((()=>[m(_(L.three.nickname),1)])),_:1}),o(n,{class:"num"},{default:r((()=>[m(_(L.three.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[d,L.three.id]])])),_:1})])),_:1})])),_:1}),L.rankList.length?(t(),s(n,{key:0,class:"list"},{default:r((()=>[(t(!0),c(i,null,u(L.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})):w("",!0)])),_:1})])),_:1})}}},[["__scopeId","data-v-7bbf8c97"]]);export{C as default};
