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