wallet.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import request from '@/sheep/request';
  2. const PayWalletApi = {
  3. // 获得钱包流水分页
  4. getWalletTransactionPage: (params) => {
  5. const queryString = Object.keys(params)
  6. .map((key) => encodeURIComponent(key) + '=' + params[key])
  7. .join('&');
  8. return request({
  9. url: `/app-api/pay/wallet-transaction/page?${queryString}`,
  10. method: 'GET',
  11. });
  12. },
  13. // 获得钱包流水统计
  14. getWalletTransactionSummary: (params) => {
  15. const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
  16. return request({
  17. url: `/app-api/pay/wallet-transaction/get-summary?${queryString}`,
  18. // url: `/app-api/pay/wallet-transaction/get-summary`,
  19. method: 'GET',
  20. // params: params
  21. });
  22. },
  23. // 获得钱包充值套餐列表
  24. getWalletRechargePackageList: () => {
  25. return request({
  26. url: '/app-api/pay/wallet-recharge-package/list',
  27. method: 'GET',
  28. custom: {
  29. showError: false,
  30. showLoading: false,
  31. },
  32. });
  33. },
  34. // 创建钱包充值记录(发起充值)
  35. createWalletRecharge: (data) => {
  36. return request({
  37. url: '/app-api/pay/wallet-recharge/create',
  38. method: 'POST',
  39. data,
  40. });
  41. }
  42. };
  43. export default PayWalletApi;