From d00618449610cb9f3af73ae0149b3e56479f096f Mon Sep 17 00:00:00 2001 From: WindowBird <13870814+windows-bird@user.noreply.gitee.com> Date: Tue, 19 Aug 2025 11:58:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=AD=E5=BF=83=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=EF=BC=8C=E6=94=B6=E6=94=AF=E6=95=B0=E6=8D=AE=E6=B8=B2?= =?UTF-8?q?=E6=9F=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/user/README.md | 12 +++++------- api/user/mockData.js | 10 ++++------ api/user/user.js | 2 +- pages/profile/profile.vue | 24 ++++++++++++------------ 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/api/user/README.md b/api/user/README.md index 968a69f..f0b4b44 100644 --- a/api/user/README.md +++ b/api/user/README.md @@ -26,7 +26,7 @@ import { getUserFinancialData } from '@/api/user/user.js' const response = await getUserFinancialData() if (response.code === 200) { const financialData = response.data - // financialData包含:withdrawable, pending, withdrawing, withdrawn等 + // financialData包含:balance, waitBalance, withdrawBalance, withdrawedBalance等 } ``` @@ -74,12 +74,10 @@ const response = await updateUserInfo(userData) ### 财务数据 (FinancialData) ```javascript { - withdrawable: '18079.29', // 可提现金额 - pending: '399.59', // 待入账金额 - withdrawing: '9.59', // 提现中金额 - withdrawn: '999.59', // 已提现金额 - totalIncome: '20000.00', // 总收入 - totalExpense: '1521.72' // 总支出 + balance: 10000.00, // 可提现金额 + waitBalance: 0, // 待入账金额 + withdrawBalance: 0, // 提现中金额 + withdrawedBalance: 0 // 已提现金额 } ``` diff --git a/api/user/mockData.js b/api/user/mockData.js index 8e6ddce..c85ebea 100644 --- a/api/user/mockData.js +++ b/api/user/mockData.js @@ -12,12 +12,10 @@ export const mockUserInfo = { } export const mockFinancialData = { - withdrawable: '18079.29', - pending: '399.59', - withdrawing: '9.59', - withdrawn: '999.59', - totalIncome: '20000.00', - totalExpense: '1521.72', + balance: 10000.00, + waitBalance: 0, + withdrawBalance: 0, + withdrawedBalance: 0, } export const mockUserStats = { diff --git a/api/user/user.js b/api/user/user.js index 2fdaa72..0f51135 100644 --- a/api/user/user.js +++ b/api/user/user.js @@ -23,7 +23,7 @@ export function getUserInfo() { */ export function getUserFinancialData() { return request({ - url: '/app/user/financial', + url: '/app/user/getBill', method: 'GET', showLoading: false, }).catch(error => { diff --git a/pages/profile/profile.vue b/pages/profile/profile.vue index e461b2f..1802a33 100644 --- a/pages/profile/profile.vue +++ b/pages/profile/profile.vue @@ -40,7 +40,7 @@ - {{ financialData.withdrawable || '0.00' }} + {{ financialData.balance || '0.00' }} 可提现(元) @@ -53,15 +53,15 @@ - {{ financialData.pending || '0.00' }} + {{ financialData.waitBalance || '0.00' }} 待入账(元) - {{ financialData.withdrawing || '0.00' }} + {{ financialData.withdrawBalance || '0.00' }} 提现中(元) - {{ financialData.withdrawn || '0.00' }} + {{ financialData.withdrawedBalance || '0.00' }} 已提现(元) @@ -140,10 +140,10 @@ export default { userId: '', }, financialData: { - withdrawable: '0.00', - pending: '0.00', - withdrawing: '0.00', - withdrawn: '0.00', + balance: 0.00, + waitBalance: 0, + withdrawBalance: 0, + withdrawedBalance: 0, }, userStats: { users: 0, @@ -241,10 +241,10 @@ export default { return { code: 200, data: { - withdrawable: '18079.29', - pending: '399.59', - withdrawing: '9.59', - withdrawn: '999.59' + balance: 10000.00, + waitBalance: 0, + withdrawBalance: 0, + withdrawedBalance: 0 } } }