index.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import request from '@/config/axios'
  2. export interface AppVO {
  3. id: number
  4. name: string
  5. status: number
  6. remark: string
  7. payNotifyUrl: string
  8. refundNotifyUrl: string
  9. merchantId: number
  10. merchantName: string
  11. createTime: Date
  12. }
  13. export interface AppPageReqVO extends PageParam {
  14. name?: string
  15. status?: number
  16. remark?: string
  17. payNotifyUrl?: string
  18. refundNotifyUrl?: string
  19. merchantName?: string
  20. createTime?: Date[]
  21. }
  22. export interface AppUpdateStatusReqVO {
  23. id: number
  24. status: number
  25. }
  26. // 查询列表支付应用
  27. export const getAppPage = (params: AppPageReqVO) => {
  28. return request.get({ url: '/pay/app/page', params })
  29. }
  30. // 查询详情支付应用
  31. export const getApp = (id: number) => {
  32. return request.get({ url: '/pay/app/get?id=' + id })
  33. }
  34. // 新增支付应用
  35. export const createApp = (data: AppVO) => {
  36. return request.post({ url: '/pay/app/create', data })
  37. }
  38. // 修改支付应用
  39. export const updateApp = (data: AppVO) => {
  40. return request.put({ url: '/pay/app/update', data })
  41. }
  42. // 支付应用信息状态修改
  43. export const changeAppStatus = (data: AppUpdateStatusReqVO) => {
  44. return request.put({ url: '/pay/app/update-status', data: data })
  45. }
  46. // 删除支付应用
  47. export const deleteApp = (id: number) => {
  48. return request.delete({ url: '/pay/app/delete?id=' + id })
  49. }
  50. // 获得支付应用列表
  51. export const getAppList = () => {
  52. return request.get({
  53. url: '/pay/app/list'
  54. })
  55. }