diff --git a/src/views/member/user/detail/UserAccountInfo.vue b/src/views/member/user/detail/UserAccountInfo.vue index 56a6ab63..7b7d6622 100644 --- a/src/views/member/user/detail/UserAccountInfo.vue +++ b/src/views/member/user/detail/UserAccountInfo.vue @@ -50,31 +50,7 @@ import * as UserApi from '@/api/member/user' import * as WalletApi from '@/api/pay/wallet/balance' import { UserTypeEnum } from '@/utils/constants' import { fenToYuan } from '@/utils' - -const props = defineProps<{ user: UserApi.UserVO }>() // 用户信息 -const WALLET_INIT_DATA = { - balance: 0, - totalExpense: 0, - totalRecharge: 0 -} as WalletApi.WalletVO // 钱包初始化数据 -const wallet = ref(WALLET_INIT_DATA) // 钱包信息 - -/** 查询用户钱包信息 */ -const getUserWallet = async () => { - if (!props.user.id) { - wallet.value = WALLET_INIT_DATA - return - } - const params = { userId: props.user.id } - wallet.value = (await WalletApi.getWallet(params)) || WALLET_INIT_DATA -} - -/** 监听用户编号变化 */ -watch( - () => props.user.id, - () => getUserWallet(), - { immediate: true } -) +const props = defineProps<{ user: UserApi.UserVO; wallet: WalletApi.WalletVO }>() // 用户信息 diff --git a/src/views/member/user/detail/index.vue b/src/views/member/user/detail/index.vue index 52862c3c..c87c1253 100644 --- a/src/views/member/user/detail/index.vue +++ b/src/views/member/user/detail/index.vue @@ -20,7 +20,7 @@ - + @@ -40,7 +40,9 @@ - 余额(WIP) + + + @@ -68,6 +70,7 @@