This commit is contained in:
sexygoat
2026-03-31 18:41:52 +08:00
commit 3c62cc1cd1
527 changed files with 96725 additions and 0 deletions

89
src/api/withdrawal.ts Normal file
View File

@@ -0,0 +1,89 @@
/**
* 提现模块 API (代理端)
*/
import { get, post } from '@/utils/request'
/**
* 提现申请参数
*/
export interface WithdrawalCreateParams {
account_name: string // 收款人姓名
account_number: string // 收款账号(支付宝)
amount: number // 提现金额(分)
withdrawal_method: string // 提现方式固定alipay
}
/**
* 提现申请响应
*/
export interface WithdrawalCreateResponse {
id: number // 提现申请ID
withdrawal_no: string // 提现单号
amount: number // 申请金额(分)
actual_amount: number // 实际到账金额(分)
fee: number // 手续费(分)
fee_rate: number // 手续费率(基点)
status: number // 状态
status_name: string // 状态名称
created_at: string // 申请时间
}
/**
* 提现记录
*/
export interface WithdrawalRecord {
id: number // 提现ID
withdrawal_no: string // 提现单号
applicant_name: string // 申请人
amount: number // 提现金额(分)
actual_amount: number // 实际到账(分)
fee: number // 手续费
fee_rate: number // 手续费率
status: number // 状态1待审 2通过 3拒绝 4到账
status_name: string // 状态名称
withdrawal_method: string // 提现方式(支付宝/微信/银行卡)
account_name: string // 收款人
account_number: string // 收款账号
bank_name?: string // 银行
created_at: string // 申请时间
processed_at?: string // 处理时间
reject_reason?: string // 拒绝原因
remark?: string // 备注
}
/**
* 提现列表参数
*/
export interface WithdrawalListParams {
page?: number
page_size?: number
status?: number // 状态1=待审批2=已通过3=已拒绝)
start_time?: string
end_time?: string
}
/**
* 列表响应
*/
export interface ListResponse<T> {
items: T[]
page: number
size: number
total: number
}
/**
* 发起提现申请
* POST /api/admin/my/withdrawal-requests
*/
export function createWithdrawal(data: WithdrawalCreateParams) {
return post<WithdrawalCreateResponse>('/api/admin/my/withdrawal-requests', { data })
}
/**
* 获取我的提现记录
* GET /api/admin/my/withdrawal-requests
*/
export function getWithdrawalRecords(params?: WithdrawalListParams) {
return get<ListResponse<WithdrawalRecord>>('/api/admin/my/withdrawal-requests', { params })
}