From 2a7ab3e733e2ad7bf9e2f68799b2d297cfc0c8eb Mon Sep 17 00:00:00 2001 From: hzj <1304805162@qq.com> Date: Tue, 9 Sep 2025 18:53:20 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=AE=A1=E7=90=86=E5=91=98):=20=E5=AF=B9?= =?UTF-8?q?=E6=8E=A5=E8=8E=B7=E5=8F=96=E5=88=97=E8=A1=A8=E7=9A=84=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/userInfo.js | 66 ++++++---- src/views/AdminCenter.vue | 257 +++++++++++++++++++++----------------- 2 files changed, 179 insertions(+), 144 deletions(-) diff --git a/src/api/userInfo.js b/src/api/userInfo.js index 47a59e8..3c62b09 100644 --- a/src/api/userInfo.js +++ b/src/api/userInfo.js @@ -1,50 +1,64 @@ -import { get, post } from '../utils/http.js'; +import { get, post } from '../utils/http.js' export const searchUser = async (userId) => { try { - const response = await get(`/user/user-profile/open-search?account=${userId}`); - return response; + const response = await get(`/user/user-profile/open-search?account=${userId}`) + return response } catch (error) { - console.error('Failed to fetch search user:', error); - console.error('error:' + error.response.errorMsg); - throw error; + console.error('Failed to fetch search user:', error) + console.error('error:' + error.response.errorMsg) + throw error } -}; +} // 用户支付充值用户搜索 export const searchPayRechargeUser = async (params) => { try { const response = await get( `/order/web/pay/user-profile?sysOrigin=${params.sysOrigin}&account=${params.account}&type=GOLD` - ); - return response; + ) + return response } catch (error) { - console.error('Failed to fetch search pay recharge user:', error); - console.error('error:' + error.response.errorMsg); - throw error; + console.error('Failed to fetch search pay recharge user:', error) + console.error('error:' + error.response.errorMsg) + throw error } -}; +} // 获取BD列表 -export const getBDList = async (userId) => { +export const getBDList = async (data) => { try { - const response = await get(`/team/bd/page?sysOrigin=LIKEI&userId=${userId}`); - return response; + const response = await get( + `/team/bd/page2?sysOrigin=LIKEI&userId=${data.userId}&cursor=${data.cursor}&limit=${data.limit}` + ) + return response } catch (error) { - console.error('Failed to fetch get BD list:', error); - console.error('error:' + error.response.errorMsg); - throw error; + console.error('Failed to fetch get BD list:', error) + console.error('error:' + error.response.errorMsg) + throw error } -}; +} // 获取金币代理列表 export const getAgencyList = async (data) => { try { - const response = await post(`/wallet/freight-gold/client/pageFreight`, data); - return response; + const response = await get(`/app/h5/recharge-page?cursor=${data.cursor}&limit=${data.limit}`) + return response } catch (error) { - console.error('Failed to fetch get agency list:', error); - console.error('error:' + error.response.errorMsg); - throw error; + console.error('Failed to fetch get agency list:', error) + console.error('error:' + error.response.errorMsg) + throw error } -}; +} + +// 获取货运代理充值月度汇总(当月,上月) +export const getAgencyTotalRecharge = async (data) => { + try { + const response = await get(`/app/h5/recharge-summary`) + return response + } catch (error) { + console.error('Failed to fetch get agency total recharge:', error) + console.error('error:' + error.response.errorMsg) + throw error + } +} diff --git a/src/views/AdminCenter.vue b/src/views/AdminCenter.vue index 3694954..09aaff5 100644 --- a/src/views/AdminCenter.vue +++ b/src/views/AdminCenter.vue @@ -59,10 +59,16 @@
- + ../assets/icon/coin.png
-
{{ info.name }}
-
ID:{{ info.id }}
+
{{ info.userProfile.userNickname }}
+
+ ID:{{ info.userProfile.userNickname }} +
@@ -79,17 +85,21 @@
Host
-
{{ info.host }}
+
+ {{ info.allAnchorCount || 0 }} +
Agency
-
{{ info.agency }}
+
+ {{ info.agentCount || 0 }} +
-
+
@@ -104,10 +114,12 @@ " >
Total recharge for the month:
-
${{ rechargeDetail.total }}
+
+ ${{ totalRechargeDetail[0]?.totalAmount || 0 }} +
Total recharge last month:
- ${{ rechargeDetail.lastMonth }} + ${{ totalRechargeDetail[1]?.totalAmount || 0 }}
- +
{{ agency.name }}
-
ID:{{ agency.id }}
+
ID:{{ agency.account }}
@@ -146,31 +158,35 @@
This month:
-
${{ agency.thisMonth }}
+
+ ${{ formatPrice(agency.thisMonth) || 0 }} +
Last month:
-
${{ agency.lastMonth }}
+
+ ${{ formatPrice(agency.lastMonth) || 0 }} +
+ +