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 00000000..157be9df Binary files /dev/null and b/static/images/search.png differ diff --git a/static/images/sort1.png b/static/images/sort1.png new file mode 100644 index 00000000..2a88241a Binary files /dev/null and b/static/images/sort1.png differ diff --git a/static/images/sort2.png b/static/images/sort2.png new file mode 100644 index 00000000..74faf73b Binary files /dev/null and b/static/images/sort2.png differ diff --git a/static/images/sort3.png b/static/images/sort3.png new file mode 100644 index 00000000..c3ce7d42 Binary files /dev/null and b/static/images/sort3.png differ