import request from '@/utils/request'

// 根据商品ID查询活动设置(含活动状态、是否进行中)
export function getActivityByProductId(productId) {
  return request({
    url: '/store/store/productActivity/getByProductId/' + productId,
    method: 'get'
  })
}

// 保存活动设置(批量保存)
export function saveActivity(data) {
  return request({
    url: '/store/store/productActivity/save',
    method: 'post',
    data: data
  })
}

// 删除活动设置
export function removeActivity(productId) {
  return request({
    url: '/store/store/productActivity/remove/' + productId,
    method: 'delete'
  })
}
