From 49ccbec0daa496d3ad498598a6de746be2adc217 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=AC=E4=B8=81?= Date: Sat, 4 Jul 2026 20:12:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=E5=85=A5=E9=87=91?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E5=81=9A=E6=88=90=E7=BB=84=E4=BB=B6=E8=B0=83?= =?UTF-8?q?=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/WalletDepositHistoryPanel.vue | 298 +++++++++++++++++++ src/components/WalletDepositModule.vue | 49 +++ src/utils/walletFundingHistory.ts | 26 ++ src/views/Wallet.vue | 165 ++-------- 4 files changed, 394 insertions(+), 144 deletions(-) create mode 100644 src/components/WalletDepositHistoryPanel.vue create mode 100644 src/components/WalletDepositModule.vue create mode 100644 src/utils/walletFundingHistory.ts diff --git a/src/components/WalletDepositHistoryPanel.vue b/src/components/WalletDepositHistoryPanel.vue new file mode 100644 index 0000000..480b1f3 --- /dev/null +++ b/src/components/WalletDepositHistoryPanel.vue @@ -0,0 +1,298 @@ + + + + + diff --git a/src/components/WalletDepositModule.vue b/src/components/WalletDepositModule.vue new file mode 100644 index 0000000..6e04830 --- /dev/null +++ b/src/components/WalletDepositModule.vue @@ -0,0 +1,49 @@ + + + + + diff --git a/src/utils/walletFundingHistory.ts b/src/utils/walletFundingHistory.ts new file mode 100644 index 0000000..a5af080 --- /dev/null +++ b/src/utils/walletFundingHistory.ts @@ -0,0 +1,26 @@ +import type { HistoryDisplayItem } from '@/api/historyRecord' + +export function isWithdrawalHistory(h: HistoryDisplayItem): boolean { + const text = `${h.activity} ${h.activityDetail ?? ''} ${h.market}`.toLowerCase() + return text.includes('withdraw') || text.includes('提现') +} + +export function isFundingHistory(h: HistoryDisplayItem): boolean { + const text = `${h.activity} ${h.activityDetail ?? ''} ${h.market}`.toLowerCase() + return ( + text.includes('deposit') || + text.includes('充值') || + text.includes('withdraw') || + text.includes('提现') + ) +} + +export function getFundingTitle( + h: HistoryDisplayItem, + t: (key: string) => string, +): string { + if (h.market?.trim()) return h.market + return isWithdrawalHistory(h) + ? t('wallet.btcWithdrawHistoryLabel') + : t('wallet.usdtDepositHistoryLabel') +} diff --git a/src/views/Wallet.vue b/src/views/Wallet.vue index e29b7ee..f7e7858 100644 --- a/src/views/Wallet.vue +++ b/src/views/Wallet.vue @@ -12,14 +12,7 @@
- - {{ t('wallet.deposit') }} - +
@@ -324,53 +317,13 @@