新增: 微信配置-代理充值
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m58s

This commit is contained in:
sexygoat
2026-03-17 14:06:38 +08:00
parent f4ccf9ed24
commit e975e6af4b
19 changed files with 2940 additions and 81 deletions

View File

@@ -0,0 +1,61 @@
/**
* 代理充值相关 API
*/
import { BaseService } from '../BaseService'
import type {
AgentRecharge,
AgentRechargeQueryParams,
AgentRechargeListResponse,
CreateAgentRechargeRequest,
ConfirmOfflinePaymentRequest,
BaseResponse
} from '@/types/api'
export class AgentRechargeService extends BaseService {
/**
* 获取代理充值订单列表
* @param params 查询参数
*/
static getAgentRecharges(
params?: AgentRechargeQueryParams
): Promise<BaseResponse<AgentRechargeListResponse>> {
return this.get<BaseResponse<AgentRechargeListResponse>>(
'/api/admin/agent-recharges',
params
)
}
/**
* 获取代理充值订单详情
* @param id 充值订单ID
*/
static getAgentRechargeById(id: number): Promise<BaseResponse<AgentRecharge>> {
return this.getOne<AgentRecharge>(`/api/admin/agent-recharges/${id}`)
}
/**
* 创建代理充值订单
* @param data 创建充值订单请求参数
*/
static createAgentRecharge(
data: CreateAgentRechargeRequest
): Promise<BaseResponse<AgentRecharge>> {
return this.post<BaseResponse<AgentRecharge>>('/api/admin/agent-recharges', data)
}
/**
* 确认线下充值
* @param id 充值订单ID
* @param data 确认线下充值请求参数
*/
static confirmOfflinePayment(
id: number,
data: ConfirmOfflinePaymentRequest
): Promise<BaseResponse<AgentRecharge>> {
return this.post<BaseResponse<AgentRecharge>>(
`/api/admin/agent-recharges/${id}/offline-pay`,
data
)
}
}