"use strict";const e=require("../../common/vendor.js"),r=require("../../sheep/index.js"),s=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 o={__name:"team",setup(o){e.useCssVars((r=>({"6cb6f254":e.unref(i)}))),r.sheep.$platform.device.statusBarHeight,e.computed((()=>r.sheep.$store("user").userInfo));const i=r.sheep.$url.css("/static/img/shop/user/withdraw_bg.png");e.onPageScroll((e=>{a.scrollTop=e.scrollTop<=100}));let t=e.ref();const a=e.reactive({summary:{},pagination:{pageNo:1,pageSize:8,list:[],total:0},loadStatus:"",level:1,nickname:e.ref(""),sortKey:"",isAsc:""});function n(){a.pagination.list=[],p()}async function p(){a.loadStatus="loading";let{code:r,data:o}=await s.BrokerageApi.getBrokerageUserChildSummaryPage({pageNo:a.pagination.pageNo,pageSize:a.pagination.pageSize,level:a.level,"sortingField.order":a.isAsc,"sortingField.field":a.sortKey,nickname:a.nickname});0===r&&(a.pagination.list=e._.concat(a.pagination.list,o.list),a.pagination.total=o.total,a.loadStatus=a.pagination.list.length<a.pagination.total?"more":"noMore")}function u(e){a.pagination.list=[],a.level=e+"",p()}function l(e,r){a.pagination.list=[],t=e+r.toUpperCase(),a.isAsc=r,a.sortKey=e,p()}return e.onLoad((async()=>{await p();let{data:e}=await s.BrokerageApi.getBrokerageUserSummary();a.summary=e})),e.onReachBottom((()=>{"noMore"!==a.loadStatus&&(a.pagination.pageNo++,p())})),(s,o)=>e.e({a:e.t(a.summary.firstBrokerageUserCount+a.summary.secondBrokerageUserCount||0),b:e.t(a.summary.firstBrokerageUserCount||0),c:e.n(1==a.level?"item on":"item"),d:e.o((e=>u(1))),e:e.t(a.summary.secondBrokerageUserCount||0),f:e.n(2==a.level?"item on":"item"),g:e.o((e=>u(2))),h:e.o(n),i:a.nickname,j:e.o((e=>a.nickname=e.detail.value)),k:e.o(n),l:"userCountDESC"===e.unref(t)},"userCountDESC"===e.unref(t)?{m:e.o((e=>l("userCount","asc")))}:"userCountASC"===e.unref(t)?{o:e.o((e=>l("userCount","desc")))}:{p:e.o((e=>l("userCount","desc")))},{n:"userCountASC"===e.unref(t),q:"priceDESC"===e.unref(t)},"priceDESC"===e.unref(t)?{r:e.o((e=>l("price","asc")))}:"priceASC"===e.unref(t)?{t:e.o((e=>l("price","desc")))}:{v:e.o((e=>l("price","desc")))},{s:"priceASC"===e.unref(t),w:"orderCountDESC"===e.unref(t)},"orderCountDESC"===e.unref(t)?{x:e.o((e=>l("orderCount","asc")))}:"orderCountASC"===e.unref(t)?{z:e.o((e=>l("orderCount","desc")))}:{A:e.o((e=>l("orderCount","desc")))},{y:"orderCountASC"===e.unref(t),B:e.f(a.pagination.list,((s,o,i)=>({a:s.avatar,b:e.t(s.nickname),c:e.t(e.unref(r.sheep).$helper.timeFormat(s.brokerageTime,"yyyy-mm-dd hh:MM:ss")),d:e.t(s.brokerageUserCount||0),e:e.t(s.orderCount||0),f:e.t(s.brokeragePrice||0),g:o}))),C:0===a.pagination.list.length},(a.pagination.list.length,{}),{D:e.n(a.scrollTop?"team-wrap":""),E:e.s(s.__cssVars()),F:e.p({title:"我的团队",navbar:"inner"})})}},i=e._export_sfc(o,[["__scopeId","data-v-aa4ccb64"]]);o.__runtimeHooks=1,wx.createPage(i);
