From 70b92c6e98d2bc43a25a7b6e8c1701c5eb1cba58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=90=BD=E6=97=A5=E6=99=9A=E9=A3=8E?= <1811466536@qq.com> Date: Wed, 3 Jan 2024 14:40:49 +0800 Subject: [PATCH] /pages/commission/team --- App.vue | 2 +- pages/commission/team.vue | 60 +++++++++++++++++++++++++------------- sheep/request/index.js | 11 +++---- static/images/search.png | Bin 0 -> 5071 bytes static/images/sort1.png | Bin 0 -> 1137 bytes static/images/sort2.png | Bin 0 -> 1117 bytes static/images/sort3.png | Bin 0 -> 1139 bytes 7 files changed, 46 insertions(+), 27 deletions(-) create mode 100644 static/images/search.png create mode 100644 static/images/sort1.png create mode 100644 static/images/sort2.png create mode 100644 static/images/sort3.png diff --git a/App.vue b/App.vue index 9f8b1f5c..485b5cbb 100644 --- a/App.vue +++ b/App.vue @@ -19,7 +19,7 @@ // 获取urlSchemes参数 const args = plus.runtime.arguments; if (args) { - } + } // 获取剪贴板 uni.getClipboardData({ diff --git a/pages/commission/team.vue b/pages/commission/team.vue index 1af9a52b..92a02f0e 100644 --- a/pages/commission/team.vue +++ b/pages/commission/team.vue @@ -15,21 +15,20 @@ - + 一级({{state.getSummary.firstBrokerageUserCount || 0 }}) - + 二级({{state.getSummary.secondBrokerageUserCount || 0 }}) - - - - - - + + + + @@ -67,29 +66,28 @@ - + + 暂无推广人数 + @@ -199,6 +197,7 @@ state.scrollTop = true; } }); + let sort=ref(); const state = reactive({ getSummary: {}, pagination: { @@ -210,7 +209,9 @@ loadStatus: '', // ↓新ui逻辑 level: 1, - nickname: ref('') + nickname: ref(''), + sortKey:'', + isAsc:'' }); @@ -221,6 +222,10 @@ return `下级团队${num}人`; } + function submitForm() { + state.pagination.data = [] + getTeamList(); + } async function getTeamList(page = 1, list_rows = 8) { state.loadStatus = 'loading'; // nickname: this.nickname, @@ -229,10 +234,10 @@ let res = await sheep.$api.commission.team({ pageSize: list_rows, pageNo: page, - level: '1', + level: state.level, 'sortingField.order': 'desc', 'sortingField.field': 'userCount', - nickname: '' + nickname: state.nickname }); console.log(res, '分销团队列表'); if (res.code === 0) { @@ -249,6 +254,19 @@ } } + function setType(e) { + state.pagination.data = [] + state.level = e + ''; + getTeamList( ) + } + + function setSort(sortKey, isAsc) { + state.pagination.data = [] + sort = sortKey + isAsc.toUpperCase(); + state.isAsc=isAsc; + state.sortKey=sortKey; + getTeamList(); + } onLoad(async () => { getTeamList(); let res = await sheep.$api.commission.getSummary(); diff --git a/sheep/request/index.js b/sheep/request/index.js index fce7546d..ec964987 100644 --- a/sheep/request/index.js +++ b/sheep/request/index.js @@ -94,7 +94,8 @@ http.interceptors.request.use( if (config.url.indexOf('/app-api/') !== -1) { config.header['Accept'] = '*/*' config.header['tenant-id'] = '1'; - config.header['terminal'] = '20'; + config.header['terminal'] = '20'; + config.header['Authorization'] = 'Bearer test247'; } return config; }, @@ -108,10 +109,10 @@ http.interceptors.request.use( */ http.interceptors.response.use( (response) => { - // 约定:如果是 /auth/ 下的 URL 地址,并且返回了 accessToken 说明是登录相关的接口,则自动设置登陆令牌 - if (response.config.url.indexOf('/member/auth/') >= 0 && response.data?.data?.accessToken) { - $store('user').setToken(response.data.data.accessToken); - } + // 约定:如果是 /auth/ 下的 URL 地址,并且返回了 accessToken 说明是登录相关的接口,则自动设置登陆令牌 + if (response.config.url.indexOf('/member/auth/') >= 0 && response.data?.data?.accessToken) { + $store('user').setToken(response.data.data.accessToken); + } response.config.custom.showLoading && closeLoading(); if (response.data.error !== 0 && response.data.code !== 0) { diff --git a/static/images/search.png b/static/images/search.png new file mode 100644 index 0000000000000000000000000000000000000000..157be9dfafed90abdb72490976cf3e7530a54866 GIT binary patch literal 5071 zcmds5`8yQe_eVoxZOkCM!C11BooH;$V3Z+SvKM0=Td0V!jCg(er_x-QVa{26JL=;=q;So z8-cJm9uJ?O+j@XP=oa=@2OHfFol?@3w?$W)`$xCs0E{vS@uWYuTa9~IC%Lq`Ye00@ zME<#gSuVQre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vg|YRoNQU?YGrkUva1r7@&n$?Kaa5PkzX*tyESF9@)Z7zA@rJGUVr*xf|2R2AI@ zgTBP_t&}WZKYPicZzSg&1o2A|VB8hWsiA{?YYH1vtIWZDKa#k4SOnu{&#@v(AqEWz ze*2}6vdm-YH^>qW!TB+Y%a%nU41&;upLTz5_}qf0pmP3hFtvQ$>J&z!@5bI#TXh`N z?F*C3InWtWqZL6%UyAEp+tdwq8eir#5*cvhJ3hcQ{2JKC4Kvd^cM5L#wdS?{a{U5h z<=2IO{cf42d7|Cxdb%IJ48mYDdFN|=YiyM%ehT)X znnlWr2+xxzG@6pBtfaDW&L3q1Br2;~`>TA^Ckf;#U}$=o<#2Tsu?i6IG90ZAvxWuZ zyte$}qoY*mjH5O4wtXj%qz!M}Z-UFK+@&*?MMIRVp)Z|T?lttvt2+H>Th}Mr)+&eff zNQ2D|egf=r`7+17N01&0TY=;k`+ujT!)Ax*<_rvHTv-;a`r7--oVo>F(Eamooz4eG z%dQ%mosbnTe*!ePG0*fWFj;|`%7X_Kpez563_C%mTElC40oI)KA36r4sg+5+ksI!R D;IL2# literal 0 HcmV?d00001 diff --git a/static/images/sort1.png b/static/images/sort1.png new file mode 100644 index 0000000000000000000000000000000000000000..2a88241a1408a201652207ca0d7d37fca6b8d119 GIT binary patch literal 1137 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`Gjk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*9U+nAI{vB1$5BeXNr6bM+EIYV;~{3xK*A7;Nk-3KEmEQ%e+* zQqwc@Y?a>c-mj#PnPRIHZt82`Ti~3Uk?B!Ylp0*+7m{3+ootz+WN)WnQ(*-(AUCxn zQK2F?C$HG5!d3}vt`(3C64qBz04piUwpD^SD#ABF!8yMuRl!uxOgGuk#8koDQqR!L z*u>ION5ROz&_dt9Lf_C>*U-$$#K6kPNC66zfVLH-q*(>IxIyg#@@$ndN=gc>^!3Zj z%k|2Q_413-^$jg8E%g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ort3.png b/static/images/sort3.png new file mode 100644 index 0000000000000000000000000000000000000000..c3ce7d42b6fbd494c07b53a0eebaaf75926122a3 GIT binary patch literal 1139 zcmaJ>TWAzl7@n}LCfNo=qiCu2Fw&5qvvb+aW@pGG+1<%@*JeW4EV!m3&d!|8PLi23 znK|iB^0dT&iUf?M@1cEZA9_KsEm$Z*P*fBV@xd3R(uabW;){Z!o=LKa53U0<=lqBN z`~KT^=IqGumu;<|wo(+;mdh%6vhEGu=56Hrs4Bl8%RW3<#G|N;tC|a`q=8Bh09tO4JevOUR{=`~)7?1N*L25T;OQl{6F zDykzOja&%2BXLIOW8I)fjPUVjOcW0Tf#VY_mtgrQ!^foQvdq?{3xZbsc|J8h?874{CpVdwYWF+TQv6 z+Cs}NY57Upz-OVAm)U1cdnnfW@f*WT^e|rP|W{TYG9$h+6$mzVh?k>}2p8$PErFzobsizXd?!aE$-} literal 0 HcmV?d00001