seckill.js 831 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. import request from "@/sheep/request";
  2. const SeckillApi = {
  3. // 获得秒杀时间段列表
  4. getSeckillConfigList: () => {
  5. return request({
  6. url: '/app-api/promotion/seckill-config/list',
  7. method: 'GET'
  8. });
  9. },
  10. // 获得当前秒杀活动
  11. getNowSeckillActivity: () => {
  12. return request({
  13. url: '/app-api/promotion/seckill-activity/get-now',
  14. method: 'GET'
  15. });
  16. },
  17. // 获得秒杀活动分页
  18. getSeckillActivityPage: () => {
  19. return request({
  20. url: '/app-api/promotion/seckill-activity/page',
  21. method: 'GET'
  22. });
  23. },
  24. /**
  25. * 获得秒杀活动明细
  26. * @param {number} id 秒杀活动编号
  27. * @return {*}
  28. */
  29. getSeckillActivity: (id) => {
  30. return request({
  31. url: '/app-api/promotion/seckill-activity/get-detail',
  32. method: 'GET',
  33. params: {
  34. id
  35. }
  36. });
  37. }
  38. }
  39. export default SeckillApi;