userCoupon.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import request from '@/utils/request'
  2. // 查询会员优惠券列表
  3. export function listUserCoupon(query) {
  4. return request({
  5. url: '/his/userCoupon/list',
  6. method: 'get',
  7. params: query
  8. })
  9. }
  10. export function getListUserCoupon(query) {
  11. return request({
  12. url: '/his/userCoupon/getList',
  13. method: 'get',
  14. params: query
  15. })
  16. }
  17. // 查询会员优惠券详细
  18. export function getUserCoupon(id) {
  19. return request({
  20. url: '/his/userCoupon/' + id,
  21. method: 'get'
  22. })
  23. }
  24. // 新增会员优惠券
  25. export function addUserCoupon(data) {
  26. return request({
  27. url: '/his/userCoupon',
  28. method: 'post',
  29. data: data
  30. })
  31. }
  32. export function sendCoupon(data) {
  33. return request({
  34. url: '/his/userCoupon/sendCoupon',
  35. method: 'post',
  36. data: data
  37. })
  38. }
  39. // 修改会员优惠券
  40. export function updateUserCoupon(data) {
  41. return request({
  42. url: '/his/userCoupon',
  43. method: 'put',
  44. data: data
  45. })
  46. }
  47. // 删除会员优惠券
  48. export function delUserCoupon(id) {
  49. return request({
  50. url: '/his/userCoupon/' + id,
  51. method: 'delete'
  52. })
  53. }
  54. // 导出会员优惠券
  55. export function exportUserCoupon(query) {
  56. return request({
  57. url: '/his/userCoupon/export',
  58. method: 'get',
  59. params: query
  60. })
  61. }