/** * Wallet / Recharge API module * 钱包充值配置等相关接口 */ import { http } from '~/utils/request' import type { NextVOWalletRecordVo, ResultVOString, WalletRechargeConfigVO, WalletRechargeOrderStateVo, WalletRecordDTO, WalletWithdrawApplyDTO, WalletWithdrawCalculateVo, WalletWithdrawInfoVo, WalletWithdrawRealNameAuthDTO, WalletWithdrawRealInfoAuthApplyVo, WalletWithdrawRealInfoAuthStatusVo } from '~/types/api' export const walletApi = { /** * 获取浏览器端钱包充值配置 * 对应后端接口:POST /wallet/recharge/browser/goldCoin/config */ getRechargeConfig() { return http.post('/wallet/recharge/browser/goldCoin/config') }, /** * 提交浏览器端钱包充值 * 对应后端接口:POST /wallet/recharge/browser/submit * @param id 充值档位 ID(后端返回的 items.id) */ submitRecharge(id: string, uri: string) { return http.post('/wallet/recharge/browser/submit', { id, uri }) }, /** * 查询充值订单状态 * 对应后端接口:POST /wallet/recharge/checkOrderState * @param orderNo 订单号(后端接口字段为 id) */ checkRechargeOrderState(orderNo: string) { return http.post('/wallet/recharge/checkOrderState', { id: orderNo }) }, /** * 钱包流水-金币 * 对应后端接口:POST /wallet/record/goldCoin */ recordGoldCoin(data: WalletRecordDTO) { return http.post('/wallet/record/goldCoin', data) }, /** * 钱包流水-钻石 * 对应后端接口:POST /wallet/record/diamond */ recordDiamond(data: WalletRecordDTO) { return http.post('/wallet/record/diamond', data) }, /** * 钱包流水-金豆 * 对应后端接口:POST /wallet/record/bean */ recordBean(data: WalletRecordDTO) { return http.post('/wallet/record/bean', data) }, /** * 提现实名认证 * 对应后端接口:POST /wallet/withdraw/realNameAuth * @param data 身份证和银行卡信息 */ submitWithdrawRealNameAuth(data: WalletWithdrawRealNameAuthDTO) { return http.post('/wallet/withdraw/realNameAuth', data) }, /** * 获得提现实名认证状态 * 对应后端接口:POST /wallet/withdraw/getRealNameAuthStatus */ getWithdrawRealNameAuthStatus() { return http.post('/wallet/withdraw/getRealNameAuthStatus') }, /** * 获取金豆提现信息 * 对应后端接口:POST /wallet/withdraw/info * 按后端要求使用 application/x-www-form-urlencoded */ getWithdrawInfo() { return http.post('/wallet/withdraw/info') }, /** * 金豆提现计算 * 对应后端接口:POST /wallet/withdraw/calculate */ withdrawCalculate(amount: number) { return http.post('/wallet/withdraw/calculate', { amount }) }, /** * 金豆提现申请提交 * 对应后端接口:POST /wallet/withdraw/submit */ withdrawSubmit(data: WalletWithdrawApplyDTO) { return http.post>('/wallet/withdraw/submit', data) }, }