diff --git a/src/api/mall/promotion/seckill/seckillActivity.ts b/src/api/mall/promotion/seckill/seckillActivity.ts new file mode 100644 index 00000000..2c59319c --- /dev/null +++ b/src/api/mall/promotion/seckill/seckillActivity.ts @@ -0,0 +1,50 @@ +import request from '@/config/axios' + +export interface SeckillActivityVO { + id: number + spuId: number + name: string + status: number + remark: string + startTime: Date + endTime: Date + sort: number + configIds: string + orderCount: number + userCount: number + totalPrice: number + totalLimitCount: number + singleLimitCount: number + stock: number + totalStock: number +} + +// 查询秒杀活动列表 +export const getSeckillActivityPage = async (params) => { + return await request.get({ url: '/promotion/seckill-activity/page', params }) +} + +// 查询秒杀活动详情 +export const getSeckillActivity = async (id: number) => { + return await request.get({ url: '/promotion/seckill-activity/get?id=' + id }) +} + +// 新增秒杀活动 +export const createSeckillActivity = async (data: SeckillActivityVO) => { + return await request.post({ url: '/promotion/seckill-activity/create', data }) +} + +// 修改秒杀活动 +export const updateSeckillActivity = async (data: SeckillActivityVO) => { + return await request.put({ url: '/promotion/seckill-activity/update', data }) +} + +// 删除秒杀活动 +export const deleteSeckillActivity = async (id: number) => { + return await request.delete({ url: '/promotion/seckill-activity/delete?id=' + id }) +} + +// 导出秒杀活动 Excel +export const exportSeckillActivityApi = async (params) => { + return await request.download({ url: '/promotion/seckill-activity/export-excel', params }) +} diff --git a/src/api/mall/promotion/seckill/seckillConfig.ts b/src/api/mall/promotion/seckill/seckillConfig.ts index fb72936b..aff72821 100644 --- a/src/api/mall/promotion/seckill/seckillConfig.ts +++ b/src/api/mall/promotion/seckill/seckillConfig.ts @@ -19,6 +19,11 @@ export const getSeckillConfig = async (id: number) => { return await request.get({ url: '/promotion/seckill-config/get?id=' + id }) } +// 获得所有开启状态的秒杀时段精简列表 +export const getListAllSimple = async () => { + return await request.get({ url: '/promotion/seckill-config/list-all-simple' }) +} + // 新增秒杀时段配置 export const createSeckillConfig = async (data: SeckillConfigVO) => { return await request.post({ url: '/promotion/seckill-config/create', data }) diff --git a/src/views/mall/product/spu/components/SkuList.vue b/src/views/mall/product/spu/components/SkuList.vue index 4114bd09..6aa26a2b 100644 --- a/src/views/mall/product/spu/components/SkuList.vue +++ b/src/views/mall/product/spu/components/SkuList.vue @@ -118,7 +118,9 @@ max-height="500" size="small" style="width: 99%" + @selection-change="handleSelectionChange" > +