You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
yanzong/public/assets/pages-dealer-team.39d6a7ab.js

1 lines
3.9 KiB

import{_ as e}from"./u-tabs.f280784d.js";import{$ as t,p as a,q as s,o as l,c as i,w as r,e as n,i as o,a as u,f as d,t as c,b as m,d as f,F as _,x as h,r as p,k as b}from"./index-ae8bbb19.js";import{r as g}from"./uni-app.es.ee1d5b08.js";import{M as v,_ as x}from"./mescroll-mixins.7cda1bf3.js";import{A as T}from"./index.0c0be40a.js";import{u as w}from"./index.035f5770.js";import{S as L}from"./Setting.5e5ad8a5.js";import{_ as y}from"./_plugin-vue_export-helper.1b428a4d.js";const k="dealer.team/list";const j=y({components:{AvatarImage:T},mixins:[v],data:()=>({tabList:[],curTab:0,list:a(),upOption:{auto:!0,page:{size:15},noMoreSize:12,empty:{tip:"亲,暂无相关数据"}},isLoading:!0,words:void 0,teamTotal:void 0}),onLoad(e){const t=this;t.isLoading=!0,Promise.all([t.getSetting(),t.getDealerUser()]).then((e=>{const a=e[0],s=e[1];t.setTabList(a,s)})).finally((()=>t.isLoading=!1))},methods:{getSetting(){const e=this;return new Promise(((t,a)=>{L.data().then((a=>{e.words=a.words.team.words,e.setPageTitle(a),t(a)})).catch(a)}))},getDealerUser:()=>new Promise(((e,t)=>{w().then((t=>e(t.data.dealer))).catch(t)})),setPageTitle(e){uni.setNavigationBarTitle({title:e.words.team.title.value})},setTabList(e,t){const a=this,s=e.words.team.words;a.tabList=[{value:1,name:s.first.value,count:t.first_num}],a.teamTotal=t.first_num,e.basic.level>=2&&(a.tabList.push({value:2,name:s.second.value,count:t.second_num}),a.teamTotal+=t.second_num),e.basic.level>=3&&(a.tabList.push({value:3,name:s.third.value,count:t.third_num}),a.teamTotal+=t.third_num)},upCallback(e){const t=this;t.getList(e.num).then((e=>{const a=e.data.length,s=e.data.total;t.mescroll.endBySize(a,s)})).catch((()=>t.mescroll.endErr()))},getList(e=1){const a=this;return new Promise(((l,i)=>{var r;(r={level:a.getTabValue(),page:e},t.get(k,r)).then((t=>{const i=t.data.list;a.list.data=s(i,a.list,e),l(i)}))}))},getTabValue(){const e=this;return e.tabList.length?e.tabList[e.curTab].value:1},onChangeTab(e){this.curTab=e,this.onRefreshList()},onRefreshList(){this.list=a(),setTimeout((()=>{this.mescroll.resetUpScroll()}),120)}}},[["render",function(t,a,s,v,T,w){const L=g(h("u-tabs"),e),y=o,k=p("avatar-image"),j=b,C=g(h("mescroll-body"),x);return T.isLoading?n("",!0):(l(),i(y,{key:0,class:"container"},{default:r((()=>[u(C,{ref:"mescrollRef",sticky:!0,onInit:t.mescrollInit,down:{use:!1},up:T.upOption,onUp:w.upCallback},{default:r((()=>[u(L,{list:T.tabList,"is-scroll":!1,current:T.curTab,"active-color":"#786cff",duration:.2,onChange:w.onChangeTab},null,8,["list","current","duration","onChange"]),u(y,{class:"widget-people f-28 col-9"},{default:r((()=>[d(c(T.words.total_team.value)+":"+c(T.teamTotal)+"人",1)])),_:1}),u(y,{class:"widget-list b-f"},{default:r((()=>[(l(!0),m(_,null,f(T.list.data,((e,t)=>(l(),i(y,{class:"widget__detail dis-flex flex-x-between",key:t},{default:r((()=>[u(y,{class:"detail__left dis-flex flex-y-center"},{default:r((()=>[u(y,{class:"user-avatar"},{default:r((()=>[u(k,{url:e.user.avatar_url,width:100,borderWidth:4,borderColor:"#fff"},null,8,["url"])])),_:2},1024),u(y,{class:"user-info dis-flex flex-dir-column flex-x-center"},{default:r((()=>[u(y,{class:"user-nickName f-28"},{default:r((()=>[d(c(e.user.nick_name),1)])),_:2},1024),u(y,{class:"user-time col-9 f-24"},{default:r((()=>[d(c(e.create_time),1)])),_:2},1024)])),_:2},1024)])),_:2},1024),u(y,{class:"detail__right dis-flex flex-dir-column flex-x-center flex-y-center"},{default:r((()=>[u(y,{class:"detail__money"},{default:r((()=>[u(j,{class:"f-24"},{default:r((()=>[d("¥")])),_:1}),u(j,{class:"f-34"},{default:r((()=>[d(c(e.user.expend_money),1)])),_:2},1024)])),_:2},1024),e.subDealer?(l(),i(y,{key:0,class:"detail__member f-22"},{default:r((()=>[d(c(e.subDealer.first_num+e.subDealer.second_num+e.subDealer.third_num)+"个成员 ",1)])),_:2},1024)):n("",!0)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1},8,["onInit","up","onUp"])])),_:1}))}],["__scopeId","data-v-e3c5c8ed"]]);export{j as default};