feat: 网络层优化

This commit is contained in:
ZhuRui
2026-07-31 18:15:24 +08:00
parent 3b107e8d52
commit 3e94ce60ec
41 changed files with 900 additions and 87 deletions
+6 -6
View File
@@ -12,7 +12,7 @@ export type { WithdrawVO, WithdrawInfoVO, WithdrawQueryParams, PageData, ApiResu
const delay = (ms: number) => new Promise<void>((r) => setTimeout(r, ms));
/** GET /admin/finance/withdraw/page — 提现列表分页 */
/** GET /finance/withdraw/page — 提现列表分页 */
export async function getWithdrawList(
params: WithdrawQueryParams,
): Promise<ApiResult<PageData<WithdrawVO>>> {
@@ -26,16 +26,16 @@ export async function getWithdrawList(
data: buildMockWithdrawPage(page, limit, params),
};
}
return get('/admin/finance/withdraw/page', params as Record<string, any>);
return get('/finance/withdraw/page', params as Record<string, any>);
}
/** GET /admin/finance/withdraw/info?id=xxx — 提现详情 */
/** GET /finance/withdraw/info?id=xxx — 提现详情 */
export async function getWithdrawInfo(id: number): Promise<ApiResult<WithdrawInfoVO>> {
if (USE_MOCK) {
await delay(MOCK_DELAY);
return { code: 200, msg: 'success', data: buildMockWithdrawInfo(id) };
}
return get('/admin/finance/withdraw/info', { id: String(id) });
return get('/finance/withdraw/info', { id: String(id) });
}
/** 提现审核请求参数 */
@@ -50,7 +50,7 @@ export interface WithdrawAuditParams {
checkImg: string;
}
/** POST /admin/finance/withdraw/audit — 审核提现 */
/** POST /finance/withdraw/audit — 审核提现 */
export async function postWithdrawAudit(params: WithdrawAuditParams): Promise<ApiResult<null>> {
return post('/admin/finance/withdraw/audit', params);
return post('/finance/withdraw/audit', params);
}