index.js 704 B

1234567891011121314151617181920212223242526272829303132
  1. import request from '@/sheep/request';
  2. const PrizeApi = {
  3. // 根据活动id获取奖品
  4. getPrizeByLotteryId: (lotteryId) => {
  5. return request({
  6. url: '/promotion/luck-prize/get',
  7. method: 'GET',
  8. params: { lotteryId },
  9. });
  10. },
  11. // 根据商品id获取抽奖活动
  12. getPrizeByGoodsId: (spuId) => {
  13. return request({
  14. url: '/promotion/luck-lottery/get/by-spu-id',
  15. method: 'GET',
  16. params: { spuId },
  17. });
  18. },
  19. // 据活动id获取用户抽奖次数
  20. getNumByLotteryId: (lotteryId) => {
  21. return request({
  22. url: '/promotion/luck-lottery/get/user-num',
  23. method: 'GET',
  24. params: { lotteryId },
  25. });
  26. },
  27. };
  28. export default PrizeApi;