import request from '@/utils/request'

// 查询秒杀活动列表
export function seckillActivityPage_api(query) {
    return request({
        url: '/seckill/seckillActivity/page',
        method: 'get',
        params: query
    })
}
// 删除秒杀活动
export function seckillActivityDel_api(ids) {
    return request({
        url: `/seckill/seckillActivity/del/${ids}`,
        method: 'post',
    })
}

// 提交废弃秒杀活动
export function seckillActivityDiscard_api(id) {
    return request({
        url: `/seckill/seckillActivity/discard/${id}`,
        method: 'post',
    })
}

// 新增秒杀活动
export function seckillActivityAdd_api (data) {
  return request({
    url: '/seckill/seckillActivity/add',  
    method: 'post',
    data
  })
}
// 修改秒杀活动
export function seckillActivityEdit_api (data) {
  return request({
    url: '/seckill/seckillActivity/edit',
    method: 'post',
    data
  })
}

// 获取秒杀活动详细信息
export function seckillActivityInfo_api (id) {
  return request({
    url: `/seckill/seckillActivity/info/${id}`,
    method: 'get',
  })
}


// 查询秒杀活动商品列表
export function seckillActivityProductPage_api(query) {
    return request({
        url: '/seckill/seckillActivityProduct/page',
        method: 'get',
        params: query
    })
}
// 删除秒杀活动商品
export function seckillActivityProductDel_api(ids) {
    return request({
        url: `/seckill/seckillActivityProduct/del/${ids}`,
        method: 'post',
    })
}

// 新增秒杀活动商品
export function seckillActivityProductAdd_api (data) {
  return request({
    url: '/seckill/seckillActivityProduct/add',  
    method: 'post',
    data
  })
}

// 获取秒杀活动商品详细信息
export function seckillActivityProductInfo_api (id) {
  return request({
    url: `/seckill/seckillActivityProduct/info/${id}`,
    method: 'get',
  })
}
