acdr-ui/dist/dev/mp-weixin/modules/mall/sheep/api/pay/wallet.js

66 lines
1.9 KiB
JavaScript
Raw Normal View History

2024-09-19 07:20:14 +08:00
"use strict";
2024-10-01 09:15:35 +08:00
const modules_mall_sheep_request_index = require("../../request/index.js");
2024-09-19 07:20:14 +08:00
const PayWalletApi = {
// 获取钱包
getPayWallet() {
2024-10-01 09:15:35 +08:00
return modules_mall_sheep_request_index.request({
2024-09-19 07:20:14 +08:00
url: "/pay/wallet/get",
method: "GET",
custom: {
showLoading: false,
auth: true
}
});
},
// 获得钱包流水分页
getWalletTransactionPage: (params) => {
const queryString = Object.keys(params).map((key) => encodeURIComponent(key) + "=" + params[key]).join("&");
2024-10-01 09:15:35 +08:00
return modules_mall_sheep_request_index.request({
2024-09-19 07:20:14 +08:00
url: `/pay/wallet-transaction/page?${queryString}`,
method: "GET"
});
},
// 获得钱包流水统计
getWalletTransactionSummary: (params) => {
const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
2024-10-01 09:15:35 +08:00
return modules_mall_sheep_request_index.request({
2024-09-19 07:20:14 +08:00
url: `/pay/wallet-transaction/get-summary?${queryString}`,
// url: `/pay/wallet-transaction/get-summary`,
method: "GET"
// params: params
});
},
// 获得钱包充值套餐列表
getWalletRechargePackageList: () => {
2024-10-01 09:15:35 +08:00
return modules_mall_sheep_request_index.request({
2024-09-19 07:20:14 +08:00
url: "/pay/wallet-recharge-package/list",
method: "GET",
custom: {
showError: false,
showLoading: false
}
});
},
// 创建钱包充值记录(发起充值)
createWalletRecharge: (data) => {
2024-10-01 09:15:35 +08:00
return modules_mall_sheep_request_index.request({
2024-09-19 07:20:14 +08:00
url: "/pay/wallet-recharge/create",
method: "POST",
data
});
},
// 获得钱包充值记录分页
getWalletRechargePage: (params) => {
2024-10-01 09:15:35 +08:00
return modules_mall_sheep_request_index.request({
2024-09-19 07:20:14 +08:00
url: "/pay/wallet-recharge/page",
method: "GET",
params,
custom: {
showError: false,
showLoading: false
}
});
}
};
exports.PayWalletApi = PayWalletApi;