mall-app-t/peach/api/pay/wallet.js

47 lines
1.0 KiB
JavaScript
Raw Normal View History

import request from '@/peach/request'
2024-05-30 01:20:31 +08:00
const PayWalletApi = {
// 提现余额
withdraw: (data) => {
return request({
url: '/pay/wallet/withdraw',
method: 'post',
data,
custom: {
showSuccess: true,
successMsg: '提现成功',
},
})
},
2024-05-30 01:20:31 +08:00
// 提现配置信息
withdrawConfig: () => {
return request({
url: '/shop/particulars-config/get',
method: 'get',
})
},
// 钱包流水记录
flowList: (params) => {
const queryString = Object.keys(params)
.map((key) => encodeURIComponent(key) + '=' + params[key])
.join('&')
return request({
url: `/pay/wallet-transaction/page?${queryString}`,
method: 'get',
})
},
// 钱包统计
statistics: (params) => {
const queryString = `createTime=${params.createTime[0]}&createTime=${params.createTime[1]}`
return request({
url: `/pay/wallet-transaction/get-summary?${queryString}`,
method: 'get',
})
},
}
export default PayWalletApi