完善支付宝提现收款码

This commit is contained in:
yml2213
2026-08-21 00:00:05 +08:00
parent 81a412323b
commit 361b84931f
14 changed files with 362 additions and 35 deletions
@@ -235,9 +235,7 @@ export default function FinancePanel() {
minWidth: 140,
render: (_, row) => (
<ImagePreviewList
files={
row.requestType === 'recharge' ? getRechargeProofs(row) : getWechatWithdrawQrCode(row)
}
files={row.requestType === 'recharge' ? getRechargeProofs(row) : getWithdrawQrCode(row)}
size={48}
/>
),
@@ -516,13 +514,21 @@ export default function FinancePanel() {
</Descriptions.Item>
{reviewState.request.requestType === 'withdraw' &&
reviewState.request.accountChannel === 'alipay' ? (
<Descriptions.Item label="支付宝账号">
{reviewState.request.accountNo ? (
<Typography.Text copyable>{reviewState.request.accountNo}</Typography.Text>
) : (
'-'
)}
</Descriptions.Item>
<>
<Descriptions.Item label="支付宝账号">
{reviewState.request.accountNo ? (
<Typography.Text copyable>{reviewState.request.accountNo}</Typography.Text>
) : (
'-'
)}
</Descriptions.Item>
<Descriptions.Item label="支付宝收款二维码">
<ImagePreviewList
files={getAlipayWithdrawQrCode(reviewState.request)}
size={88}
/>
</Descriptions.Item>
</>
) : null}
{reviewState.request.requestType === 'recharge' ? (
<>
@@ -697,6 +703,30 @@ function getWechatWithdrawQrCode(request: WorkerFinanceRequest): UploadedFile[]
]
}
function getWithdrawQrCode(request: WorkerFinanceRequest): UploadedFile[] {
if (request.accountChannel === 'alipay') return getAlipayWithdrawQrCode(request)
return getWechatWithdrawQrCode(request)
}
function getAlipayWithdrawQrCode(request: WorkerFinanceRequest): UploadedFile[] {
if (request.requestType !== 'withdraw' || request.accountChannel !== 'alipay') return []
const payload = asRecord(request.payload)
const file = asRecord(payload.alipayQrCodeImage)
const url = String(file.url || '').trim()
if (!url) return []
return [
{
url,
mediumUrl: String(file.mediumUrl || '').trim(),
thumbnailUrl: String(file.thumbnailUrl || '').trim(),
objectKey: String(file.objectKey || '').trim(),
filename: String(file.filename || '').trim(),
contentType: String(file.contentType || '').trim(),
size: Number(file.size || 0),
},
]
}
function getRechargePaidAt(request: WorkerFinanceRequest): string {
const payload = asRecord(request.payload)
return String(payload.paidAt || '').trim()