From 3b49f7dec9b408a607feb32197f9ee15ee4ed181 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Sun, 10 Nov 2024 18:49:04 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8A=9F=E8=83=BD=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E3=80=91=E5=95=86=E5=9F=8E:=20=E5=AE=8C=E5=96=84=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/index.ts | 2 +- .../promotion/kefu/components/member/MemberInfo.vue | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) 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 {