"use strict";const e=require("../../common/vendor.js"),r=require("../../sheep/index.js"),t=require("../../sheep/api/trade/brokerage.js");if(require("../../sheep/url/index.js"),require("../../sheep/store/index.js"),require("../../sheep/store/app.js"),require("../../sheep/api/promotion/diy.js"),require("../../sheep/request/index.js"),require("../../sheep/config/index.js"),require("../../sheep/platform/index.js"),require("../../sheep/platform/provider/wechat/index.js"),require("../../sheep/platform/provider/wechat/miniProgram.js"),require("../../sheep/api/member/auth.js"),require("../../sheep/api/member/social.js"),require("../../sheep/api/member/user.js"),require("../../sheep/platform/provider/apple/index.js"),require("../../sheep/platform/share.js"),require("../../sheep/router/index.js"),require("../../sheep/hooks/useModal.js"),require("../../sheep/helper/index.js"),require("../../sheep/helper/test.js"),require("../../sheep/helper/digit.js"),require("../../sheep/api/member/signin.js"),require("../../sheep/helper/throttle.js"),require("../../sheep/platform/pay.js"),require("../../sheep/api/pay/order.js"),require("../../sheep/store/user.js"),require("../../sheep/store/cart.js"),require("../../sheep/api/trade/cart.js"),require("../../sheep/api/pay/wallet.js"),require("../../sheep/api/trade/order.js"),require("../../sheep/api/promotion/coupon.js"),require("../../sheep/store/sys.js"),require("../../sheep/store/modal.js"),require("../../sheep/config/zIndex.js"),!Array){e.resolveComponent("s-layout")()}Math;const s={__name:"promoter",setup(s){const i=["周排行","月排行"],a=e.reactive({currentTab:0,rankList:[],times:[],one:{},two:{},three:{}});async function n(){a.one={},a.two={},a.three={},a.rankList=[];const{code:e,data:r}=await t.BrokerageApi.getBrokerageUserRankPageByUserCount({pageNo:1,pageSize:10,"times[0]":a.times[0],"times[1]":a.times[1]});0===e&&(a.rankList=r.list,a.one=a.rankList.shift()||{},a.two=a.rankList.shift()||{},a.trhee=a.rankList.shift()||{})}function o(){let e;e=0===a.currentTab?function(){const e=new Date,r=e.getDay();return[new Date(e.getFullYear(),e.getMonth(),e.getDate()-r,0,0,0),new Date(e.getFullYear(),e.getMonth(),e.getDate()+(6-r),23,59,59)]}():function(){const e=new Date,r=e.getFullYear(),t=e.getMonth(),s=new Date(r,t,1,0,0,0),i=new Date(r,t+1,1),a=new Date(i.getTime()-1);return[s,a]}(),a.times=[p(e[0]),p(e[1])]}function p(e){return r.sheep.$helper.timeFormat(e,"yyyy-mm-dd hh:MM:ss")}return e.onLoad((function(){o(),n()})),(r,t)=>e.e({a:e.f(i,((r,t,s)=>({a:e.t(r),b:e.n(a.currentTab===t?"font-color":""),c:t,d:e.o((e=>function(e){a.currentTab!==e&&(a.currentTab=e,o(),n())}(t)),t)}))),b:a.two.avatar,c:e.t(a.two.nickname),d:e.t(a.two.brokerageUserCount),e:a.two.id,f:a.one.avatar,g:e.t(a.one.nickname),h:e.t(a.one.brokerageUserCount),i:a.one.id,j:a.three.avatar,k:e.t(a.three.nickname),l:e.t(a.three.brokerageUserCount),m:a.three.id,n:a.rankList.length},a.rankList.length?{o:e.f(a.rankList,((r,t,s)=>({a:e.t(t+4),b:r.avatar,c:e.t(r.nickname),d:e.t(r.brokerageUserCount),e:t})))}:{},{p:e.p({title:"推广人排行榜"})})}},i=e._export_sfc(s,[["__scopeId","data-v-7bbf8c97"]]);wx.createPage(i);
