pages-commission-promoter.9e4e8e2b.js 3.5 KB

1
  1. import{z as e,o as a,f as t,g as s,w as r,bL as n,s as l,m as o,k as c,l as u,r as i,F as f,ab as d,ac as m,u as _,v as p,i as w,j as k,y as g,n as h,E as b}from"./index-ba48620e.js";import{_ as y}from"./s-layout.04b95866.js";import{_ as D}from"./_plugin-vue_export-helper.1b428a4d.js";import"./phone-international-input.dd3ca29e.js";import"./useGoods.edb8879f.js";const L=D({__name:"promoter",setup(D){const L=["周排行","月排行"],v=e({currentTab:0,rankList:[],times:[],one:{},two:{},three:{}});async function C(){v.one={},v.two={},v.three={},v.rankList=[];const{code:e,data:a}=await n.getBrokerageUserRankPageByUserCount({pageNo:1,pageSize:10,"times[0]":v.times[0],"times[1]":v.times[1]});0===e&&(v.rankList=a.list,v.one=v.rankList.shift()||{},v.two=v.rankList.shift()||{},v.trhee=v.rankList.shift()||{})}function j(){let e;e=0===v.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]}(),v.times=[T(e[0]),T(e[1])]}function T(e){return l.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}return a((function(){j(),C()})),(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(f,null,i(L,((e,a)=>c(n,{class:b(["item",v.currentTab===a?"font-color":""]),key:a,onClick:e=>function(e){v.currentTab!==e&&(v.currentTab=e,j(),C())}(a)},{default:r((()=>[_(p(e),1)])),_:2},1032,["class","onClick"]))),64))])),_:1}),c(n,{class:"rank acea-row row-bottom row-around"},{default:r((()=>[d(c(n,{class:"item"},{default:r((()=>[c(n,{class:"pictrue"},{default:r((()=>[c(l,{src:v.two.avatar},null,8,["src"])])),_:1}),c(n,{class:"name line1"},{default:r((()=>[_(p(v.two.nickname),1)])),_:1}),c(n,{class:"num"},{default:r((()=>[_(p(v.two.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[m,v.two.id]]),d(c(n,{class:"item"},{default:r((()=>[c(n,{class:"pictrue"},{default:r((()=>[c(l,{src:v.one.avatar},null,8,["src"])])),_:1}),c(n,{class:"name line1"},{default:r((()=>[_(p(v.one.nickname),1)])),_:1}),c(n,{class:"num"},{default:r((()=>[_(p(v.one.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[m,v.one.id]]),d(c(n,{class:"item"},{default:r((()=>[c(n,{class:"pictrue"},{default:r((()=>[c(l,{src:v.three.avatar},null,8,["src"])])),_:1}),c(n,{class:"name line1"},{default:r((()=>[_(p(v.three.nickname),1)])),_:1}),c(n,{class:"num"},{default:r((()=>[_(p(v.three.brokerageUserCount)+"人",1)])),_:1})])),_:1},512),[[m,v.three.id]])])),_:1})])),_:1})])),_:1}),v.rankList.length?(t(),s(n,{key:0,class:"list"},{default:r((()=>[(t(!0),u(f,null,i(v.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{L as default};