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 }} +
+ +