feat: add vue3(element-plus)

This commit is contained in:
xingyu
2022-07-18 19:06:37 +08:00
parent c6b58dca52
commit 80a3ae8d74
423 changed files with 41039 additions and 0 deletions

View File

@ -0,0 +1,46 @@
import { defHttp } from '@/config/axios'
import type { AppVO } from './types'
// 查询列表支付应用
export const getAppPageApi = ({ params }) => {
return defHttp.get<PageResult<AppVO>>({ url: '/pay/app/page', params })
}
// 查询详情支付应用
export const getAppApi = (id: number) => {
return defHttp.get<AppVO>({ url: '/pay/app/get?id=' + id })
}
// 新增支付应用
export const createAppApi = (params: AppVO) => {
return defHttp.post({ url: '/pay/app/create', params })
}
// 修改支付应用
export const updateAppApi = (params: AppVO) => {
return defHttp.put({ url: '/pay/app/update', params })
}
// 支付应用信息状态修改
export const changeAppStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
return defHttp.put({ url: '/pay/app/update-status', data: data })
}
// 删除支付应用
export const deleteAppApi = (id: number) => {
return defHttp.delete({ url: '/pay/app/delete?id=' + id })
}
// 导出支付应用
export const exportAppApi = (params) => {
return defHttp.get({ url: '/pay/app/export-excel', params, responseType: 'blob' })
}
// 根据商ID称搜索应用列表
export const getAppListByMerchantIdApi = (merchantId: number) => {
return defHttp.get({ url: '/pay/app/list-merchant-id', params: { merchantId: merchantId } })
}

View File

@ -0,0 +1,11 @@
export type AppVO = {
id: number
name: string
status: number
remark: string
payNotifyUrl: string
refundNotifyUrl: string
merchantName: string
merchantId: number
createTime: string
}

View File

@ -0,0 +1,37 @@
import { defHttp } from '@/config/axios'
import type { ChannelVO } from './types'
// 查询列表支付渠道
export const getChannelPageApi = ({ params }) => {
return defHttp.get<PageResult<ChannelVO>>({ url: '/pay/channel/page', params })
}
// 查询详情支付渠道
export const getChannelApi = (merchantId: number, appId: string, code: string) => {
const params = {
merchantId: merchantId,
appId: appId,
code: code
}
return defHttp.get<ChannelVO>({ url: '/pay/channel/get-channel', params: params })
}
// 新增支付渠道
export const createChannelApi = (params: ChannelVO) => {
return defHttp.post({ url: '/pay/channel/create', params })
}
// 修改支付渠道
export const updateChannelApi = (params: ChannelVO) => {
return defHttp.put({ url: '/pay/channel/update', params })
}
// 删除支付渠道
export const deleteChannelApi = (id: number) => {
return defHttp.delete({ url: '/pay/channel/delete?id=' + id })
}
// 导出支付渠道
export const exportChannelApi = (params) => {
return defHttp.get({ url: '/pay/channel/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,11 @@
export type ChannelVO = {
id: number
code: string
config: string
status: number
remark: string
feeRate: number
merchantId: number
appId: number
createTime: string
}

View File

@ -0,0 +1,50 @@
import { defHttp } from '@/config/axios'
import type { MerchantVO } from './types'
// 查询列表支付商户
export const getMerchantPageApi = ({ params }) => {
return defHttp.get<PageResult<MerchantVO>>({ url: '/pay/merchant/page', params })
}
// 查询详情支付商户
export const getMerchantApi = (id: number) => {
return defHttp.get<MerchantVO>({ url: '/pay/merchant/get?id=' + id })
}
// 根据商户名称搜索商户列表
export const getMerchantListByNameApi = (name: string) => {
return defHttp.get<MerchantVO>({
url: '/pay/merchant/list-by-name?id=',
params: {
name: name
}
})
}
// 新增支付商户
export const createMerchantApi = (params: MerchantVO) => {
return defHttp.post({ url: '/pay/merchant/create', params })
}
// 修改支付商户
export const updateMerchantApi = (params: MerchantVO) => {
return defHttp.put({ url: '/pay/merchant/update', params })
}
// 删除支付商户
export const deleteMerchantApi = (id: number) => {
return defHttp.delete({ url: '/pay/merchant/delete?id=' + id })
}
// 导出支付商户
export const exportMerchantApi = (params) => {
return defHttp.get({ url: '/pay/merchant/export-excel', params, responseType: 'blob' })
}
// 支付商户状态修改
export const changeMerchantStatusApi = (id: number, status: number) => {
const data = {
id,
status
}
return defHttp.put({ url: '/pay/merchant/update-status', data: data })
}

View File

@ -0,0 +1,9 @@
export type MerchantVO = {
id: number
no: string
name: string
shortName: string
status: number
remark: string
createTime: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { OrderVO } from './types'
// 查询列表支付订单
export const getOrderPageApi = ({ params }) => {
return defHttp.get<PageResult<OrderVO>>({ url: '/pay/order/page', params })
}
// 查询详情支付订单
export const getOrderApi = (id: number) => {
return defHttp.get<OrderVO>({ url: '/pay/order/get?id=' + id })
}
// 新增支付订单
export const createOrderApi = (params: OrderVO) => {
return defHttp.post({ url: '/pay/order/create', params })
}
// 修改支付订单
export const updateOrderApi = (params: OrderVO) => {
return defHttp.put({ url: '/pay/order/update', params })
}
// 删除支付订单
export const deleteOrderApi = (id: number) => {
return defHttp.delete({ url: '/pay/order/delete?id=' + id })
}
// 导出支付订单
export const exportOrderApi = (params) => {
return defHttp.get({ url: '/pay/order/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,26 @@
export type OrderVO = {
id: number
merchantId: number
appId: number
channelId: number
channelCode: string
merchantOrderId: string
subject: string
body: string
notifyUrl: string
notifyStatus: number
amount: number
channelFeeRate: number
channelFeeAmount: number
status: number
userIp: string
expireTime: string
successTime: string
notifyTime: string
successExtensionId: number
refundStatus: number
refundTimes: number
refundAmount: number
channelUserId: string
channelOrderNo: string
}

View File

@ -0,0 +1,32 @@
import { defHttp } from '@/config/axios'
import type { RefundVO } from './types'
// 查询列表退款订单
export const getRefundPageApi = ({ params }) => {
return defHttp.get<PageResult<RefundVO>>({ url: '/pay/refund/page', params })
}
// 查询详情退款订单
export const getRefundApi = (id: number) => {
return defHttp.get<RefundVO>({ url: '/pay/refund/get?id=' + id })
}
// 新增退款订单
export const createRefundApi = (params: RefundVO) => {
return defHttp.post({ url: '/pay/refund/create', params })
}
// 修改退款订单
export const updateRefundApi = (params: RefundVO) => {
return defHttp.put({ url: '/pay/refund/update', params })
}
// 删除退款订单
export const deleteRefundApi = (id: number) => {
return defHttp.delete({ url: '/pay/refund/delete?id=' + id })
}
// 导出退款订单
export const exportRefundApi = (params) => {
return defHttp.get({ url: '/pay/refund/export-excel', params, responseType: 'blob' })
}

View File

@ -0,0 +1,26 @@
export type RefundVO = {
id: number
merchantId: number
appId: number
channelId: number
channelCode: string
merchantOrderId: string
subject: string
body: string
notifyUrl: string
notifyStatus: number
amount: number
channelFeeRate: number
channelFeeAmount: number
status: number
userIp: string
expireTime: string
successTime: string
notifyTime: string
successExtensionId: number
refundStatus: number
refundTimes: number
refundAmount: number
channelUserId: string
channelOrderNo: string
}