pages-commission-commission-ranking.Bgn210uT.js 3.3 KB

1
  1. import{v as e,o as a,aR as t,a as s,b as n,d as o,w as l,bV as r,e as i,f as c,g as u,j as p,x as m,y as d,F as _,z as f,s as y,l as g,i as k,J as w,u as h,k as b}from"./index-DUAp9XEj.js";import{_ as j}from"./s-layout.a1_kfpIW.js";import{f as v}from"./useGoods.Cwnq-veC.js";import{_ as D}from"./_plugin-vue_export-helper.BCo6x5W8.js";import"./s-menu-tools.Bn3wdRty.js";import"./s-layout.vue_vue_type_style_index_0_scoped_d5f7c468_lang.CKkHKX6k.js";import"./phone-international-input.vue_vue_type_style_index_0_scoped_a793e264_lang.Bv2EixP5.js";import"./s-tabbar.fodLOlFD.js";import"./phone-international-input.D4fi9eUK.js";const x=D({__name:"commission-ranking",setup(D){const x=["周排行","月排行"],C=e({currentTab:0,position:0,rankList:[]});async function T(){const{code:e,data:a}=await r.getBrokerageUserChildSummaryPageByPrice({pageNo:1,pageSize:10,"times[0]":C.times[0],"times[1]":C.times[1]});0===e&&(C.rankList=a.list)}async function F(){const{code:e,data:a}=await r.getRankByPrice({times:C.times});0===e&&(C.position=a)}function L(e){return y.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}function M(){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),n=new Date(a,t+1,1),o=new Date(n.getTime()-1);return[s,o]}(),C.times=[L(e[0]),L(e[1])]}return a((function(){M(),T(),F()})),(e,a)=>{const r=g,y=k,D=b,L=t("emptyPage"),P=s(n("s-layout"),j);return i(),o(P,{title:"佣金排行榜"},{default:l((()=>[c(y,{class:"CommissionRank"},{default:l((()=>[c(y,{class:"header"},{default:l((()=>[C.position?(i(),o(y,{key:0,class:"rank"},{default:l((()=>[u(" 您目前的排名 "),c(r,{class:"num"},{default:l((()=>[u(p(C.position),1)])),_:1}),u(" 名 ")])),_:1})):(i(),o(y,{key:1,class:"rank"},{default:l((()=>[u("您目前暂无排名")])),_:1}))])),_:1}),c(y,{class:"wrapper"},{default:l((()=>[c(y,{class:"nav acea-row row-around",style:{"justify-content":"space-around",display:"flex"}},{default:l((()=>[(i(),m(_,null,d(x,((e,a)=>c(y,{class:w(["item",C.currentTab===a?"font-color":""]),key:a,onClick:e=>async function(e){C.currentTab=e,C.rankList=[],M(),T(),F()}(a)},{default:l((()=>[u(p(e),1)])),_:2},1032,["class","onClick"]))),64))])),_:1}),c(y,{class:"list"},{default:l((()=>[(i(!0),m(_,null,d(C.rankList,((e,a)=>(i(),o(y,{class:"item acea-row row-between-wrapper",key:a},{default:l((()=>[a<=2?(i(),o(y,{key:0,class:"num"},{default:l((()=>[c(D,{src:"/static/images/medal0"+(a+1)+".png"},null,8,["src"])])),_:2},1024)):(i(),o(y,{key:1,class:"num"},{default:l((()=>[u(p(a+1),1)])),_:2},1024)),c(y,{class:"picTxt acea-row row-between-wrapper"},{default:l((()=>[c(y,{class:"pictrue"},{default:l((()=>[c(D,{src:e.avatar},null,8,["src"])])),_:2},1024),c(y,{class:"text line1"},{default:l((()=>[u(p(e.nickname),1)])),_:2},1024)])),_:2},1024),c(y,{class:"people font-color"},{default:l((()=>[u("¥"+p(h(v)(e.brokeragePrice)),1)])),_:2},1024)])),_:2},1024)))),128))])),_:1}),0!==C.rankList.length||1===C.page&&0!==C.active?f("",!0):(i(),o(y,{key:0,class:"noCommodity"},{default:l((()=>[c(L,{title:"暂无排行~"})])),_:1}))])),_:1})])),_:1})])),_:1})}}},[["__scopeId","data-v-398a9c40"]]);export{x as default};