mall-uniapp/sheep/api/promotion/seckill.js

45 lines
1.0 KiB
JavaScript
Raw Normal View History

2024-09-08 03:39:28 +00:00
import request from '@/sheep/request';
2023-12-13 03:35:02 +00:00
const SeckillApi = {
// 获得秒杀时间段列表
getSeckillConfigList: () => {
return request({ url: 'promotion/seckill-config/list', method: 'GET' });
2023-12-13 03:35:02 +00:00
},
// 获得当前秒杀活动
getNowSeckillActivity: () => {
return request({ url: 'promotion/seckill-activity/get-now', method: 'GET' });
2023-12-13 03:35:02 +00:00
},
// 获得秒杀活动分页
2023-12-19 13:39:52 +00:00
getSeckillActivityPage: (params) => {
return request({ url: 'promotion/seckill-activity/page', method: 'GET', params });
2023-12-13 03:35:02 +00:00
},
2024-09-08 03:39:28 +00:00
// 获得秒杀活动列表,基于活动编号数组
getSeckillActivityListByIds: (ids) => {
return request({
url: '/promotion/seckill-activity/list-by-ids',
method: 'GET',
params: {
ids,
},
});
},
2023-12-13 03:35:02 +00:00
/**
* 获得秒杀活动明细
* @param {number} id 秒杀活动编号
* @return {*}
*/
getSeckillActivity: (id) => {
return request({
2023-12-13 03:35:02 +00:00
url: 'promotion/seckill-activity/get-detail',
method: 'GET',
2024-09-08 03:39:28 +00:00
params: { id },
2023-12-13 03:35:02 +00:00
});
2024-09-08 03:39:28 +00:00
},
};
2023-12-13 03:35:02 +00:00
export default SeckillApi;