withdraw.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. import { server } from "@/utils/client";
  2. export interface WithDrawType {
  3. id: number;
  4. name: string;
  5. start_time: string;
  6. end_time: string;
  7. icon: string;
  8. channels?: ChannelType[];
  9. /**
  10. * 最大充值金额
  11. */
  12. max_amount: number;
  13. /**
  14. * 最小充值金额
  15. */
  16. min_amount: number;
  17. /// 手续费百分比
  18. fee_rate: number;
  19. }
  20. export interface ChannelType {
  21. /**
  22. * 编号
  23. */
  24. id: number;
  25. /**
  26. * 渠道名称
  27. */
  28. name: string;
  29. products: Product[];
  30. /**
  31. * 跳转类型:1 iframe 2外链
  32. */
  33. redirect_type?: number;
  34. /**
  35. * 租户编号
  36. */
  37. renter_id: number;
  38. /**
  39. * 提示信息
  40. */
  41. tips: string;
  42. type: 1 | 2 | 3 | 4;
  43. }
  44. export interface Product {
  45. /**
  46. * 金额
  47. */
  48. amount: number;
  49. /**
  50. * 角标:0无,1为Hot
  51. */
  52. badge: number;
  53. }
  54. // 前台用户提现申请
  55. // POST /v1/api/user/user_withdraw
  56. // 接口ID:199611379
  57. // 接口地址:https://app.apifox.com/link/project/4790544/apis/api-199611379
  58. export interface WithDrawParams {
  59. /**
  60. * 提现账户
  61. */
  62. account_no: string;
  63. amount: number;
  64. /**
  65. * 渠道编号
  66. */
  67. channel_id: number;
  68. /**
  69. * 用户身份信息
  70. */
  71. passport: string;
  72. /**
  73. * 用户名称
  74. */
  75. user_name: string;
  76. }
  77. export const getWithDrawApi = (data: WithDrawParams) => {
  78. return server.post({
  79. url: "/v1/api/user/user_withdraw",
  80. data,
  81. });
  82. };