diff --git a/src/utils/index.ts b/src/utils/index.ts index 031a9140..2c2fbbd0 100644 --- a/src/utils/index.ts +++ b/src/utils/index.ts @@ -1,4 +1,4 @@ -import {toNumber} from 'lodash-es' +import { toNumber } from 'lodash-es' /** * diff --git a/src/views/mall/promotion/kefu/components/member/MemberInfo.vue b/src/views/mall/promotion/kefu/components/member/MemberInfo.vue index 29c3cb27..522518ca 100644 --- a/src/views/mall/promotion/kefu/components/member/MemberInfo.vue +++ b/src/views/mall/promotion/kefu/components/member/MemberInfo.vue @@ -134,28 +134,25 @@ const handleScroll = debounce(() => { } }, 200) -/* 用户钱包相关信息 */ +/** 查询用户钱包信息 */ const WALLET_INIT_DATA = { balance: 0, totalExpense: 0, totalRecharge: 0 } as WalletApi.WalletVO // 钱包初始化数据 const wallet = ref(WALLET_INIT_DATA) // 钱包信息 - -/** 查询用户钱包信息 */ const getUserWallet = async () => { if (!conversation.value.userId) { wallet.value = WALLET_INIT_DATA return } - const params = { userId: conversation.value.userId } - wallet.value = (await WalletApi.getWallet(params)) || WALLET_INIT_DATA + wallet.value = + (await WalletApi.getWallet({ userId: conversation.value.userId })) || WALLET_INIT_DATA } +/** 获得用户 */ const loading = ref(true) // 加载中 const user = ref({} as UserApi.UserVO) - -/** 获得用户 */ const getUserData = async () => { loading.value = true try {