wallet.js 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. "use strict";
  2. const sheep_request_index = require("../../request/index.js");
  3. const PayWalletApi = {
  4. // 获取钱包
  5. getPayWallet() {
  6. return sheep_request_index.request({
  7. url: "/pay/wallet/get",
  8. method: "GET",
  9. custom: {
  10. showLoading: false,
  11. auth: true
  12. }
  13. });
  14. },
  15. // 获得积分等基本信息
  16. getDuserInfo: () => {
  17. return sheep_request_index.request({
  18. url: "/distri/duser/getDuserInfo",
  19. method: "GET",
  20. custom: {
  21. showLoading: false,
  22. auth: true
  23. }
  24. });
  25. },
  26. // 获得钱包流水分页
  27. getWalletTransactionPage: (params) => {
  28. const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
  29. return sheep_request_index.request({
  30. url: `/pay/wallet-transaction/page?${queryString}`,
  31. method: "GET"
  32. });
  33. },
  34. // 获得钱包流水统计
  35. getWalletTransactionSummary: (params) => {
  36. const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
  37. return sheep_request_index.request({
  38. url: `/pay/wallet-transaction/get-summary?${queryString}`,
  39. // url: `/pay/wallet-transaction/get-summary`,
  40. method: "GET"
  41. // params: params
  42. });
  43. },
  44. // 获得钱包充值套餐列表
  45. getWalletRechargePackageList: () => {
  46. return sheep_request_index.request({
  47. url: "/pay/wallet-recharge-package/list",
  48. method: "GET",
  49. custom: {
  50. showError: false,
  51. showLoading: false
  52. }
  53. });
  54. },
  55. // 创建钱包充值记录(发起充值)
  56. createWalletRecharge: (data) => {
  57. return sheep_request_index.request({
  58. url: "/pay/wallet-recharge/create",
  59. method: "POST",
  60. data
  61. });
  62. },
  63. // 获得钱包充值记录分页
  64. getWalletRechargePage: (params) => {
  65. return sheep_request_index.request({
  66. url: "/pay/wallet-recharge/page",
  67. method: "GET",
  68. params,
  69. custom: {
  70. showError: false,
  71. showLoading: false
  72. }
  73. });
  74. }
  75. };
  76. const __vite_glob_0_16 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  77. __proto__: null,
  78. default: PayWalletApi
  79. }, Symbol.toStringTag, { value: "Module" }));
  80. exports.PayWalletApi = PayWalletApi;
  81. exports.__vite_glob_0_16 = __vite_glob_0_16;