finance.ts 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. import { http } from "@/utils/http";
  2. /** 充值记录列表 */
  3. export const getRechargeList = (data?: object) => {
  4. return http.request<any>("get", "/custom/listRecharge", { params: data });
  5. };
  6. /** 退款记录列表 */
  7. export const getRefundList = (data?: object) => {
  8. return http.request<any>("get", "/finance/listRefundLog", { params: data });
  9. };
  10. /** 提现记录列表 */
  11. export const getWithdrawList = (data?: object) => {
  12. return http.request<any>("post", "/finance/withdrawnRecords", { data });
  13. };
  14. /** 分账记录列表 */
  15. export const getSplitRecordList = (data?: object) => {
  16. return http.request<any>("post", "/finance/splitRecords", { data });
  17. };
  18. /** 结算记录列表 */
  19. export const getSettlementList = (data?: object) => {
  20. return http.request<any>("post", "/finance/settlementRecords", { data });
  21. };
  22. /** 手动触发结算 */
  23. export const triggerSettlement = () => {
  24. return http.request<any>("post", "/finance/triggerSettlement");
  25. };
  26. /** 发起退款申请 */
  27. export const applyRefund = (data: { userId: number; reason?: string }) => {
  28. return http.request<any>("post", "/finance/applyRefund", { data });
  29. };
  30. /** 确认结算 */
  31. export const confirmSettlement = (id: number) => {
  32. return http.request<any>("post", "/finance/confirmSettlement", { data: { id } });
  33. };
  34. /** 用户资金流水列表 */
  35. export const getWalletDetailList = (data?: object) => {
  36. return http.request<any>("get", "/finance/walletDetails", { params: data });
  37. };
  38. /** 线下充值 */
  39. export const offlineRecharge = (data: {
  40. userId: number;
  41. amount: number;
  42. grantsAmount?: number;
  43. remark?: string;
  44. }) => {
  45. return http.request<any>("post", "/finance/offlineRecharge", { data });
  46. };
  47. /** 查询用户(按手机号) */
  48. export const searchUserByPhone = (data: { mobilePhone: string; pageNum: number; pageSize: number }) => {
  49. return http.request<any>("get", "/custom/listUser", { params: data });
  50. };