mirror of
https://gitee.com/hhyykk/ipms-sjy-ui.git
synced 2025-07-15 03:15:07 +08:00
【修复】商城:秒杀时段点击编辑报错
This commit is contained in:
@ -1,49 +1,48 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 秒杀时段 VO
|
||||
export interface SeckillConfigVO {
|
||||
id: number
|
||||
name: string
|
||||
startTime: string
|
||||
endTime: string
|
||||
sliderPicUrls: string[]
|
||||
status: number
|
||||
id: number // 编号
|
||||
name: string // 秒杀时段名称
|
||||
startTime: string // 开始时间点
|
||||
endTime: string // 结束时间点
|
||||
sliderPicUrls: string[] // 秒杀轮播图
|
||||
status: number // 活动状态
|
||||
}
|
||||
|
||||
// 查询秒杀时段配置列表
|
||||
export const getSeckillConfigPage = async (params) => {
|
||||
return await request.get({ url: '/promotion/seckill-config/page', params })
|
||||
}
|
||||
// 秒杀时段 API
|
||||
export const SeckillConfigApi = {
|
||||
// 查询秒杀时段分页
|
||||
getSeckillConfigPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/seckill-config/page`, params })
|
||||
},
|
||||
|
||||
// 查询秒杀时段配置详情
|
||||
export const getSeckillConfig = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/seckill-config/get?id=' + id })
|
||||
}
|
||||
// 查询秒杀时段详情
|
||||
getSeckillConfig: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/seckill-config/get?id=` + id })
|
||||
},
|
||||
|
||||
// 获得所有开启状态的秒杀时段精简列表
|
||||
export const getSimpleSeckillConfigList = async () => {
|
||||
return await request.get({ url: '/promotion/seckill-config/list-all-simple' })
|
||||
}
|
||||
// 新增秒杀时段
|
||||
createSeckillConfig: async (data: SeckillConfigVO) => {
|
||||
return await request.post({ url: `/promotion/seckill-config/create`, data })
|
||||
},
|
||||
|
||||
// 新增秒杀时段配置
|
||||
export const createSeckillConfig = async (data: SeckillConfigVO) => {
|
||||
return await request.post({ url: '/promotion/seckill-config/create', data })
|
||||
}
|
||||
// 修改秒杀时段
|
||||
updateSeckillConfig: async (data: SeckillConfigVO) => {
|
||||
return await request.put({ url: `/promotion/seckill-config/update`, data })
|
||||
},
|
||||
|
||||
// 修改秒杀时段配置
|
||||
export const updateSeckillConfig = async (data: SeckillConfigVO) => {
|
||||
return await request.put({ url: '/promotion/seckill-config/update', data })
|
||||
}
|
||||
// 删除秒杀时段
|
||||
deleteSeckillConfig: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/seckill-config/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 修改时段配置状态
|
||||
export const updateSeckillConfigStatus = (id: number, status: number) => {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
// 修改时段配置状态
|
||||
updateSeckillConfigStatus: async (id: number, status: number) => {
|
||||
const data = {
|
||||
id,
|
||||
status
|
||||
}
|
||||
return request.put({ url: '/promotion/seckill-config/update-status', data: data })
|
||||
}
|
||||
return request.put({ url: '/promotion/seckill-config/update-status', data: data })
|
||||
}
|
||||
|
||||
// 删除秒杀时段配置
|
||||
export const deleteSeckillConfig = async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/seckill-config/delete?id=' + id })
|
||||
}
|
||||
|
Reference in New Issue
Block a user