diff --git a/src/views/profile/index.vue b/src/views/profile/index.vue index 93329db..0cbc60a 100644 --- a/src/views/profile/index.vue +++ b/src/views/profile/index.vue @@ -13,6 +13,14 @@ const { userProfile } = storeToRefs(userStore); const balanceWallet = await walletStore.getWalletByType("balance"); const profitWallet = await walletStore.getWalletByType("profit"); +function formatAmount(amount: number | string) { + const num = Number(amount); + return num.toLocaleString("zh-CN", { + minimumFractionDigits: 0, + maximumFractionDigits: 2, + }); +} + function handleRecharge() { router.push("/recharge"); } @@ -92,19 +100,19 @@ async function handleLogout() {