coupon.js 776 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. import request from '@/sheep/request';
  2. import request2 from '@/sheep/request2';
  3. export default {
  4. // 我的拼团
  5. list: (params) =>
  6. request({
  7. url: 'coupon',
  8. method: 'GET',
  9. params,
  10. custom: {
  11. showLoading: false,
  12. },
  13. }),
  14. userCoupon: (params) =>
  15. request2({
  16. url: 'promotion/coupon/page',
  17. method: 'GET',
  18. params,
  19. }),
  20. // userCoupon: (params) =>
  21. // request({
  22. // url: 'user/coupon',
  23. // method: 'GET',
  24. // params,
  25. // }),
  26. detail: (id, user_coupon_id) =>
  27. request({
  28. url: 'coupon/' + id,
  29. method: 'GET',
  30. params: {
  31. user_coupon_id,
  32. },
  33. }),
  34. get: (id) =>
  35. request({
  36. url: 'coupon/get/' + id,
  37. method: 'POST',
  38. }),
  39. listByGoods: (id) =>
  40. request({
  41. url: 'coupon/listByGoods/' + id,
  42. method: 'GET',
  43. }),
  44. };