feat: 新增提现申请与提现管理页面
Build and Release / Build (push) Has been cancelled

This commit is contained in:
2026-05-24 20:25:12 -07:00
parent 55c78276fb
commit d8b65c6d82
12 changed files with 790 additions and 21 deletions
+32
View File
@@ -106,6 +106,10 @@ declare namespace API {
port: number;
};
type ApproveWithdrawalRequest = {
withdrawal_id: number;
};
type AuthConfig = {
mobile: MobileAuthenticateConfig;
email: EmailAuthticateConfig;
@@ -1154,6 +1158,18 @@ declare namespace API {
list: User[];
};
type GetWithdrawalListParams = {
page: number;
size: number;
user_id?: number;
status?: number;
};
type GetWithdrawalListResponse = {
total: number;
list: WithdrawalLog[];
};
type GetUserLoginLogsParams = {
page: number;
size: number;
@@ -1756,6 +1772,11 @@ declare namespace API {
total: number;
};
type RejectWithdrawalRequest = {
withdrawal_id: number;
reason: string;
};
type QuotaTask = {
id: number;
subscribers: number[];
@@ -3064,4 +3085,15 @@ declare namespace API {
}>;
}>;
};
type WithdrawalLog = {
id: number;
user_id: number;
amount: number;
content: string;
status: number;
reason?: string;
created_at: number;
updated_at: number;
};
}
@@ -0,0 +1,55 @@
/* eslint-disable */
import request from "@workspace/ui/lib/request";
/** Get withdrawal list GET /v1/admin/user/withdrawal/list */
export async function getWithdrawalList(
params: API.GetWithdrawalListParams,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: API.GetWithdrawalListResponse }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/withdrawal/list`,
{
method: "GET",
params: {
...params,
},
...(options || {}),
}
);
}
/** Approve withdrawal POST /v1/admin/user/withdrawal/approve */
export async function approveWithdrawal(
body: API.ApproveWithdrawalRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/withdrawal/approve`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}
/** Reject withdrawal POST /v1/admin/user/withdrawal/reject */
export async function rejectWithdrawal(
body: API.RejectWithdrawalRequest,
options?: { [key: string]: any }
) {
return request<API.Response & { data?: any }>(
`${import.meta.env.VITE_API_PREFIX || ""}/v1/admin/user/withdrawal/reject`,
{
method: "POST",
headers: {
"Content-Type": "application/json",
},
data: body,
...(options || {}),
}
);
}