1 |
- 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,aa as f,ab as d,p as m,t as _,g as w,i as p,q as k,m as g,z as h}from"./index-9880b451.js";import{_ as b}from"./s-layout.dfc5b0b5.js";import{B as y}from"./brokerage.b6c9045b.js";import{_ as D}from"./_plugin-vue_export-helper.1b428a4d.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 x(){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=[T(e[0]),T(e[1])]}function T(e){return n.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}return a((function(){x(),L()})),(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(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,x(),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})):w("",!0)])),_:1})])),_:1})}}},[["__scopeId","data-v-87ff371a"]]);export{v as default};
|