import request from '@/utils/request'

// 列表
export function list(data) {
  return request({
    url: `/admin/activity/list`,
    method: 'post',
    data
  })
}

// 详情
export function detail(id) {
  return request({
    url: `/admin/activity/queryById/${id}`,
    method: 'get'
  })
}

// 提交
export function submit(data) {
  return request({
    url: `/admin/activity/addOrUpdate`,
    method: 'post',
    data
  })
}

// 上下架
export function change(id, status) {
  return request({
    url: `/admin/activity/hitOrSold/${id}/${status}`,
    method: 'get'
  })
}