2023-12-17 15:47:16 +00:00
|
|
|
import request from '@/sheep/request';
|
|
|
|
|
|
|
|
const PayWalletApi = {
|
2023-12-28 14:00:07 +00:00
|
|
|
// 获取钱包
|
|
|
|
getPayWallet() {
|
|
|
|
return request({
|
2024-01-20 05:13:28 +00:00
|
|
|
url: '/pay/wallet/get',
|
2023-12-28 14:00:07 +00:00
|
|
|
method: 'GET',
|
|
|
|
custom: {
|
|
|
|
showLoading: false,
|
|
|
|
auth: true,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
2023-12-17 15:47:16 +00:00
|
|
|
// 获得钱包流水分页
|
|
|
|
getWalletTransactionPage: (params) => {
|
|
|
|
const queryString = Object.keys(params)
|
|
|
|
.map((key) => encodeURIComponent(key) + '=' + params[key])
|
|
|
|
.join('&');
|
|
|
|
return request({
|
2024-01-20 05:13:28 +00:00
|
|
|
url: `/pay/wallet-transaction/page?${queryString}`,
|
2023-12-18 13:56:17 +00:00
|
|
|
method: 'GET',
|
2023-12-17 15:47:16 +00:00
|
|
|
});
|
|
|
|
},
|
|
|
|
// 获得钱包流水统计
|
|
|
|
getWalletTransactionSummary: (params) => {
|
2023-12-18 13:56:17 +00:00
|
|
|
const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
|
2023-12-17 15:47:16 +00:00
|
|
|
return request({
|
2024-01-20 05:13:28 +00:00
|
|
|
url: `/pay/wallet-transaction/get-summary?${queryString}`,
|
|
|
|
// url: `/pay/wallet-transaction/get-summary`,
|
2023-12-17 15:47:16 +00:00
|
|
|
method: 'GET',
|
|
|
|
// params: params
|
|
|
|
});
|
|
|
|
},
|
2023-12-18 13:56:17 +00:00
|
|
|
// 获得钱包充值套餐列表
|
|
|
|
getWalletRechargePackageList: () => {
|
|
|
|
return request({
|
2024-01-20 05:13:28 +00:00
|
|
|
url: '/pay/wallet-recharge-package/list',
|
2023-12-18 13:56:17 +00:00
|
|
|
method: 'GET',
|
|
|
|
custom: {
|
|
|
|
showError: false,
|
|
|
|
showLoading: false,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
|
|
|
// 创建钱包充值记录(发起充值)
|
|
|
|
createWalletRecharge: (data) => {
|
|
|
|
return request({
|
2024-01-20 05:13:28 +00:00
|
|
|
url: '/pay/wallet-recharge/create',
|
2023-12-18 13:56:17 +00:00
|
|
|
method: 'POST',
|
|
|
|
data,
|
|
|
|
});
|
2023-12-18 15:04:24 +00:00
|
|
|
},
|
|
|
|
// 获得钱包充值记录分页
|
|
|
|
getWalletRechargePage: (params) => {
|
|
|
|
return request({
|
2024-01-20 05:13:28 +00:00
|
|
|
url: '/pay/wallet-recharge/page',
|
2023-12-18 15:04:24 +00:00
|
|
|
method: 'GET',
|
|
|
|
params,
|
|
|
|
custom: {
|
|
|
|
showError: false,
|
|
|
|
showLoading: false,
|
|
|
|
},
|
|
|
|
});
|
|
|
|
},
|
2023-12-17 15:47:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default PayWalletApi;
|