summary.ts 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. import { server } from "@/utils/client";
  2. /**
  3. * entity.UserAgentToDayInfo
  4. */
  5. export interface UserAgentToDayInfo {
  6. /**
  7. * 佣金
  8. */
  9. commissar?: number;
  10. /**
  11. * 有效金额
  12. */
  13. effective_amount?: number;
  14. /**
  15. * 充值人数
  16. */
  17. recharge_user_count?: number;
  18. /**
  19. * 注册数量
  20. */
  21. reg_count?: number;
  22. }
  23. export const getRegisterCountApi = () => {
  24. return server.post<UserAgentToDayInfo>({
  25. url: "/v1/api/user/user_today_register_count",
  26. data: {},
  27. });
  28. };
  29. export const getTotalCountApi = () => {
  30. return server.post<UserAgentToDayInfo>({
  31. url: "/v1/api/user/user_agent_statistics",
  32. data: {},
  33. });
  34. };
  35. export interface UserCommissionStatistics {
  36. /**
  37. * 佣金
  38. */
  39. commissar?: number;
  40. /**
  41. * 等级
  42. */
  43. level?: number;
  44. /**
  45. * 提现佣金
  46. */
  47. withdrawal_commissions?: number;
  48. /**
  49. * 是否能领取
  50. */
  51. enable_receive: boolean;
  52. max_value: number;
  53. min_value: number;
  54. }
  55. export const getCommissionApi = () => {
  56. return server.post<UserCommissionStatistics>({
  57. url: "/v1/api/user/user_commission_statistics",
  58. data: {},
  59. });
  60. };
  61. export interface InfoDayRequest {
  62. /**
  63. * 分页模式--当前页数
  64. */
  65. current_page: number;
  66. /**
  67. * day
  68. */
  69. day: number;
  70. /**
  71. * 升序-降序
  72. */
  73. is_asc?: boolean;
  74. /**
  75. * 是否已经没有数据
  76. */
  77. is_end?: boolean;
  78. /**
  79. * 下一页的起始位,默认0
  80. */
  81. next_cursor?: string;
  82. /**
  83. * 每页大小
  84. */
  85. page_size: number;
  86. /**
  87. * 如果是升序-那就是最大ID,如果是降序那就是最小ID
  88. */
  89. start_cursor?: string;
  90. /**
  91. * 总数
  92. */
  93. total_count?: number;
  94. /**
  95. * 是否使用分页----默认为下标模式
  96. */
  97. use_page?: boolean;
  98. }
  99. export interface UserLevelToDayResp {
  100. /**
  101. * 佣金
  102. */
  103. commissar?: number;
  104. /**
  105. * 等级
  106. */
  107. level?: number;
  108. /**
  109. * 电话号码
  110. */
  111. phone?: string;
  112. /**
  113. * 自己的有效投注
  114. */
  115. score?: number;
  116. /**
  117. * 有效总投注人数
  118. */
  119. score_num?: number;
  120. count_score?: number;
  121. count_commissar?: number;
  122. effective_amount?: number;
  123. }
  124. export const getInfoDayApi = (data: InfoDayRequest) => {
  125. return server.post<UserLevelToDayResp[]>({
  126. url: "/v1/api/user/user_self_info_day",
  127. data,
  128. });
  129. };
  130. export interface InfoDayListRequest {
  131. /**
  132. * 当前页数
  133. */
  134. current_page?: number;
  135. /**
  136. * 每页大小
  137. */
  138. page_size?: number;
  139. }
  140. export interface UserTodayInfoList {
  141. /**
  142. * 佣金
  143. */
  144. commissar?: number;
  145. /**
  146. * 日期
  147. */
  148. day?: string;
  149. /**
  150. * 有效金额
  151. */
  152. effective_amount?: number;
  153. /**
  154. * 等级
  155. */
  156. level?: number;
  157. /**
  158. * 总充值
  159. */
  160. recharge?: number;
  161. /**
  162. * 进注册数量
  163. */
  164. reg_count?: number;
  165. /**
  166. * 有效投注人数
  167. */
  168. register_new?: number;
  169. }
  170. export const getInfoDayList = (data: InfoDayListRequest) => {
  171. return server.post<UserTodayInfoList[]>({
  172. url: "/v1/api/user/user_self_info_list",
  173. data,
  174. });
  175. };
  176. export interface UserWithdrawalList {
  177. /**
  178. * 提现金额
  179. */
  180. withdrawal_amount?: number;
  181. /**
  182. * 提现详情
  183. */
  184. withdrawal_detail?: string;
  185. /**
  186. * 提现状态
  187. */
  188. withdrawal_status?: number;
  189. /**
  190. * 提现时间
  191. */
  192. withdrawal_time?: number;
  193. }
  194. export const getWithdrawalListApi = (data: InfoDayListRequest) => {
  195. return server.post<UserWithdrawalList[]>({
  196. url: "/v1/api/user/user_commission_withdrawal_list",
  197. data,
  198. });
  199. };
  200. /**
  201. * @description 前台用户佣金提现
  202. */
  203. export const getWithdrawalApi = (data: { amount: number }) => {
  204. return server.post({
  205. url: "/v1/api/user/user_commission_withdrawal",
  206. data,
  207. });
  208. };