import request from '@/utils/request'

// 查询网站栏目列表
export function listCategory(query) {
  return request({
    url: '/busi/category/list',
    method: 'get',
    params: query
  })
}

// 查询网站栏目详细
export function getCategory(id) {
  return request({
    url: '/busi/category/' + id,
    method: 'get'
  })
}

// 新增网站栏目
export function addCategory(data) {
  return request({
    url: '/busi/category',
    method: 'post',
    data: data
  })
}

// 修改网站栏目
export function updateCategory(data) {
  return request({
    url: '/busi/category',
    method: 'put',
    data: data
  })
}

// 删除网站栏目
export function delCategory(id) {
  return request({
    url: '/busi/category/' + id,
    method: 'delete'
  })
}
