2024-01-17 11:45:39 +00:00
|
|
|
import request from "@/sheep/request";
|
2023-12-13 03:35:02 +00:00
|
|
|
|
|
|
|
const SeckillApi = {
|
|
|
|
// 获得秒杀时间段列表
|
|
|
|
getSeckillConfigList: () => {
|
2024-01-17 11:45:39 +00:00
|
|
|
return request({ url: 'promotion/seckill-config/list', method: 'GET' });
|
2023-12-13 03:35:02 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
// 获得当前秒杀活动
|
|
|
|
getNowSeckillActivity: () => {
|
2024-01-17 11:45:39 +00:00
|
|
|
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) => {
|
2024-01-17 11:45:39 +00:00
|
|
|
return request({ url: 'promotion/seckill-activity/page', method: 'GET', params });
|
2023-12-13 03:35:02 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 获得秒杀活动明细
|
|
|
|
* @param {number} id 秒杀活动编号
|
|
|
|
* @return {*}
|
|
|
|
*/
|
|
|
|
getSeckillActivity: (id) => {
|
2024-01-17 11:45:39 +00:00
|
|
|
return request({
|
2023-12-13 03:35:02 +00:00
|
|
|
url: 'promotion/seckill-activity/get-detail',
|
|
|
|
method: 'GET',
|
|
|
|
params: { id }
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default SeckillApi;
|