wallet.ts 772 B

1234567891011121314151617181920212223242526
  1. /**
  2. * Wallet / Recharge API module
  3. * 钱包充值配置等相关接口
  4. */
  5. import { http } from '~/utils/request'
  6. import type { ResultVOString, WalletRechargeConfigVO } from '~/types/api'
  7. export const walletApi = {
  8. /**
  9. * 获取浏览器端钱包充值配置
  10. * 对应后端接口:POST /wallet/recharge/browser/goldCoin/config
  11. */
  12. getRechargeConfig() {
  13. return http.post<WalletRechargeConfigVO>('/wallet/recharge/browser/goldCoin/config')
  14. },
  15. /**
  16. * 提交浏览器端钱包充值
  17. * 对应后端接口:POST /wallet/recharge/browser/submit
  18. * @param id 充值档位 ID(后端返回的 items.id)
  19. */
  20. submitRecharge(id: string, uri: string) {
  21. return http.post<ResultVOString>('/wallet/recharge/browser/submit', { id, uri })
  22. },
  23. }