import request from '@/utils/request'

// 查询专题列表
export function listTopic(query) {
  return request({
    url: '/system/base/topic/list',
    method: 'get',
    params: query
  })
}

// 查询专题详细
export function getTopic(id) {
  return request({
    url: '/system/base/topic/' + id,
    method: 'get'
  })
}

// 新增专题
export function addTopic(data) {
  return request({
    url: '/system/base/topic',
    method: 'post',
    data: data
  })
}

// 修改专题
export function updateTopic(data) {
  return request({
    url: '/system/base/topic',
    method: 'put',
    data: data
  })
}

// 删除专题
export function delTopic(id) {
  return request({
    url: '/system/base/topic/' + id,
    method: 'delete'
  })
}
