feat: 提现优化 — 收款方式选择、收款码上传、取消按钮 (HIF-43)

- 用户端申请提现表单:新增收款方式选择器(支付宝/微信/银行卡/其他)
  收款账号输入框及收款码图片上传,调用 POST /v1/public/file/upload
- 用户端提现记录:展示收款方式、账号、收款码(可放大),新增已取消
  状态(灰色),待审核记录显示取消申请按钮调用 withdrawal_cancel
- 管理端提现列表:新增收款方式、账号、收款码列,支持按收款方式过滤,
  状态过滤增加已取消选项
- 类型更新:WithdrawalLog / AdminWithdrawalLog / CommissionWithdrawRequest
  增加 method / account / qr_code_url 字段;新增 WithdrawalCancelRequest
This commit is contained in:
2026-05-25 20:39:04 -07:00
parent cad75b92bc
commit 21e351a727
5 changed files with 467 additions and 68 deletions
+5 -1
View File
@@ -32,7 +32,10 @@ declare namespace API {
id: number;
user_id: number;
amount: number;
content: string;
method: number;
account?: string;
qr_code_url?: string;
content?: string;
status: number;
reason?: string;
created_at: number;
@@ -91,6 +94,7 @@ declare namespace API {
size: number;
user_id?: number;
status?: number;
method?: number;
};
type GetWithdrawalListResponse = {
+12 -2
View File
@@ -172,7 +172,14 @@ declare namespace API {
type CommissionWithdrawRequest = {
amount: number;
content: string;
method: number;
account?: string;
qr_code_url?: string;
content?: string;
};
type WithdrawalCancelRequest = {
withdrawal_id: number;
};
type Coupon = {
@@ -1296,7 +1303,10 @@ declare namespace API {
id: number;
user_id: number;
amount: number;
content: string;
method: number;
account?: string;
qr_code_url?: string;
content?: string;
status: number;
reason?: string;
created_at: number;
+33
View File
@@ -470,3 +470,36 @@ export async function queryWithdrawalLog(
}
);
}
/** Cancel Withdrawal POST /v1/public/user/withdrawal_cancel */
export async function withdrawalCancel(
body: API.WithdrawalCancelRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/user/withdrawal_cancel`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Upload File POST /v1/public/file/upload */
export async function uploadFile(
formData: FormData,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: { url: string; key: string } }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/public/file/upload`,
{
method: "POST",
data: formData,
...(options || {}),
}
);
}