channel.js 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. import request from '@/utils/request'
  2. // 创建支付渠道
  3. export function createChannel(data) {
  4. return request({
  5. url: '/pay/channel/create',
  6. method: 'post',
  7. data: data
  8. })
  9. }
  10. // 更新支付渠道
  11. export function updateChannel(data) {
  12. return request({
  13. url: '/pay/channel/update',
  14. method: 'put',
  15. data: data
  16. })
  17. }
  18. // 删除支付渠道
  19. export function deleteChannel(id) {
  20. return request({
  21. url: '/pay/channel/delete?id=' + id,
  22. method: 'delete'
  23. })
  24. }
  25. // 获得支付渠道
  26. // export function getChannel(id) {
  27. // return request({
  28. // url: '/pay/channel/get?id=' + id,
  29. // method: 'get'
  30. // })
  31. // }
  32. // 获得支付渠道分页
  33. export function getChannelPage(query) {
  34. return request({
  35. url: '/pay/channel/page',
  36. method: 'get',
  37. params: query
  38. })
  39. }
  40. // 导出支付渠道Excel
  41. export function exportChannelExcel(query) {
  42. return request({
  43. url: '/pay/channel/export-excel',
  44. method: 'get',
  45. params: query,
  46. responseType: 'blob'
  47. })
  48. }
  49. // 获得支付渠道
  50. export function getChannel(merchantId,appId,code) {
  51. return request({
  52. url: '/pay/channel/get-channel',
  53. params:{
  54. merchantId:merchantId,
  55. appId:appId,
  56. code:code
  57. },
  58. method: 'get'
  59. })
  60. }