mirror of
				https://gitee.com/hhyykk/ipms-sjy-ui.git
				synced 2025-10-31 18:28:44 +08:00 
			
		
		
		
	feat:添加秒杀活动管理
This commit is contained in:
		
							
								
								
									
										50
									
								
								src/api/mall/promotion/seckill/seckillActivity.ts
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								src/api/mall/promotion/seckill/seckillActivity.ts
									
									
									
									
									
										Normal file
									
								
							| @@ -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 }) | ||||
| } | ||||
| @@ -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 }) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 puhui999
					puhui999