import request from '@/utils/request'

// 查询关注列表
export function listCase(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.marketCase',
      _mt: 'list',
      ...query
    }
  })
}

// 查询关注详细
export function getCase(id) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.marketCase',
      _mt: 'get',
      id: id
    }
  })
}

// 新增关注
export function addCase(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.marketCase',
      _mt: 'add',
      marketCase: data
    }
  })
}

// 修改关注
export function updateCase(data) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.marketCase',
      _mt: 'update',
      marketCase: data
    }
  })
}

// 删除关注
export function delCase(id) {
  return request({
    method: 'post',
    params: {
      _gp: 'admin.unimall.marketCase',
      _mt: 'delete',
      id: id
    }
  })
}

// 导出关注
export function exportCase(query) {
  return request({
    method: 'get',
    params: {
      _gp: 'admin.unimall.marketCase',
      _mt: 'export',
      ...query
    }
  })
}
