coupon.js 889 B

123456789101112131415161718192021222324252627282930313233
  1. import request from '@/sheep/request';
  2. export default {
  3. // 获得优惠劵模板列表
  4. getCouponTemplateListByIds: (ids) => {
  5. return request({
  6. url: '/app-api/promotion/coupon-template/list-by-ids',
  7. method: 'GET',
  8. params: { ids },
  9. });
  10. },
  11. // 获得优惠劵模版列表
  12. getCouponTemplateList: (spuId, productScope, count) => {
  13. return request({
  14. url: '/app-api/promotion/coupon-template/list',
  15. method: 'GET',
  16. params: { spuId, productScope, count },
  17. });
  18. },
  19. // 获得匹配指定商品的优惠劵列表
  20. getMatchCouponList: (price, spuIds, skuIds, categoryIds) => {
  21. return request({
  22. url: '/app-api/promotion/coupon/match-list',
  23. method: 'GET',
  24. params: {
  25. price,
  26. spuIds: spuIds.join(','),
  27. skuIds: skuIds.join(','),
  28. categoryIds: categoryIds.join(','),
  29. },
  30. });
  31. }
  32. };