You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
102 lines
2.1 KiB
102 lines
2.1 KiB
import request from '@/sheep/request';
|
|
|
|
const PayWalletApi = {
|
|
// 获取钱包
|
|
getPayWallet() {
|
|
return request({
|
|
url: '/pay/wallet/get',
|
|
method: 'GET',
|
|
data: {
|
|
bindType: 1
|
|
},
|
|
custom: {
|
|
showLoading: false,
|
|
auth: true,
|
|
},
|
|
});
|
|
},
|
|
// 获取车队个人钱包
|
|
getPayWalletPersonelCar() {
|
|
let config_url = ''
|
|
if (uni.getStorageSync("captainOrNot")) {
|
|
config_url = '/pay/wallet/getTeam'
|
|
} else {
|
|
config_url = '/pay/wallet/get'
|
|
}
|
|
return request({
|
|
url: config_url,
|
|
method: 'GET',
|
|
data: {
|
|
bindType: 2
|
|
},
|
|
custom: {
|
|
showLoading: false,
|
|
auth: true,
|
|
},
|
|
});
|
|
},
|
|
// 获取车队账户钱包
|
|
getPayWalletPersonelTeam() {
|
|
return request({
|
|
url: '/pay/wallet/getTeam',
|
|
method: 'GET',
|
|
custom: {
|
|
showLoading: false,
|
|
auth: true,
|
|
},
|
|
});
|
|
},
|
|
// 获得钱包流水分页
|
|
getWalletTransactionPage: (params) => {
|
|
const queryString = Object.keys(params)
|
|
.map((key) => encodeURIComponent(key) + '=' + params[key])
|
|
.join('&');
|
|
return request({
|
|
url: `/pay/wallet-transaction/page?${queryString}`,
|
|
method: 'GET',
|
|
});
|
|
},
|
|
// 获得钱包流水统计
|
|
getWalletTransactionSummary: (params) => {
|
|
const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`;
|
|
return request({
|
|
url: `/pay/wallet-transaction/get-summary?${queryString}`,
|
|
// url: `/pay/wallet-transaction/get-summary`,
|
|
method: 'GET',
|
|
// params: params
|
|
});
|
|
},
|
|
// 获得钱包充值套餐列表
|
|
getWalletRechargePackageList: () => {
|
|
return request({
|
|
url: '/pay/wallet-recharge-package/list',
|
|
method: 'GET',
|
|
custom: {
|
|
showError: false,
|
|
showLoading: false,
|
|
},
|
|
});
|
|
},
|
|
// 创建钱包充值记录(发起充值)
|
|
createWalletRecharge: (data) => {
|
|
return request({
|
|
url: '/pay/wallet-recharge/create',
|
|
method: 'POST',
|
|
data,
|
|
});
|
|
},
|
|
// 获得钱包充值记录分页
|
|
getWalletRechargePage: (params) => {
|
|
return request({
|
|
url: '/pay/wallet-recharge/page',
|
|
method: 'GET',
|
|
params,
|
|
custom: {
|
|
showError: false,
|
|
showLoading: false,
|
|
},
|
|
});
|
|
},
|
|
};
|
|
|
|
export default PayWalletApi; |