seckill.js 814 B

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