【功能完善】商城: 完善相关注释

pull/589/head
YunaiV 2024-11-10 18:49:04 +08:00
parent 18c7693ed6
commit 3b49f7dec9
2 changed files with 5 additions and 8 deletions

View File

@ -1,4 +1,4 @@
import {toNumber} from 'lodash-es' import { toNumber } from 'lodash-es'
/** /**
* *

View File

@ -134,28 +134,25 @@ const handleScroll = debounce(() => {
} }
}, 200) }, 200)
/* 用户钱包相关信息 */ /** 查询用户钱包信息 */
const WALLET_INIT_DATA = { const WALLET_INIT_DATA = {
balance: 0, balance: 0,
totalExpense: 0, totalExpense: 0,
totalRecharge: 0 totalRecharge: 0
} as WalletApi.WalletVO // } as WalletApi.WalletVO //
const wallet = ref<WalletApi.WalletVO>(WALLET_INIT_DATA) // const wallet = ref<WalletApi.WalletVO>(WALLET_INIT_DATA) //
/** 查询用户钱包信息 */
const getUserWallet = async () => { const getUserWallet = async () => {
if (!conversation.value.userId) { if (!conversation.value.userId) {
wallet.value = WALLET_INIT_DATA wallet.value = WALLET_INIT_DATA
return return
} }
const params = { userId: conversation.value.userId } wallet.value =
wallet.value = (await WalletApi.getWallet(params)) || WALLET_INIT_DATA (await WalletApi.getWallet({ userId: conversation.value.userId })) || WALLET_INIT_DATA
} }
/** 获得用户 */
const loading = ref(true) // const loading = ref(true) //
const user = ref<UserApi.UserVO>({} as UserApi.UserVO) const user = ref<UserApi.UserVO>({} as UserApi.UserVO)
/** 获得用户 */
const getUserData = async () => { const getUserData = async () => {
loading.value = true loading.value = true
try { try {