feat(主播、代理的提现明细页): 针对提现增加状态

This commit is contained in:
hzj 2026-04-16 15:35:00 +08:00
parent 0f89fb7180
commit e17a1af577

View File

@ -125,30 +125,37 @@ const fetchData = async () => {
transactions.value = response.body.map((item) => {
// event
let amount = item.amount
let isPositive = false
let withdrawStatus = '' //
//
switch (item.event) {
case 'RECEIVE_TRANSFER':
// - 绿
amount = Math.abs(item.amount)
isPositive = true
break
case 'TRANSFER':
// -
amount = -Math.abs(item.amount)
isPositive = false
break
default:
case 'WITHDRAW':
// type
// type: 0 1
if (item.type === 0) {
amount = Math.abs(item.amount)
isPositive = true
} else {
amount = -Math.abs(item.amount)
isPositive = false
}
if (item.details.latestApprovalStatus == 'SUBMIT') {
withdrawStatus = 'Under review'
} else if (item.details.latestApprovalStatus == 'PASS') {
withdrawStatus = 'Approved'
} else if (item.details.latestApprovalStatus == 'NOT_PASS') {
withdrawStatus = 'Rejection'
}
break
default:
break
}
return {
@ -158,7 +165,7 @@ const fetchData = async () => {
amount: amount,
balance: item.balance,
event: item.event,
isPositive: isPositive,
withdrawStatus: withdrawStatus, //
//
userAvatar: item.details?.userAvatar || null,
userNickname: item.details?.userNickname || null,
@ -170,7 +177,6 @@ const fetchData = async () => {
}
} catch (err) {
console.error('Failed to fetch wallet details:', err)
error.value = err.message || t('failed_to_load_data')
} finally {
loading.value = false
}