import request from '@/utils/request'

// 查询分类列表
export function listDept(query) {
  return request({
    url: '/article/classify/list',
    method: 'get',
    params: query
  })
}

// 查询分类列表（排除节点）
export function listDeptExcludeChild(classifyId) {
  return request({
    url: '/article/classify/list/exclude/' + classifyId,
    method: 'get'
  })
}

// 查询分类列表（排除节点）
export function listDeptExcludeChilds(classifyIds) {
  return request({
    url: '/article/classify/list/excludes/' + classifyIds,
    method: 'get'
  })
}

// 查询分类详细
export function getDept(classifyId) {
  return request({
    url: '/article/classify/' + classifyId,
    method: 'get'
  })
}

// 新增分类
export function addDept(data) {
  return request({
    url: '/article/classify',
    method: 'post',
    data: data
  })
}

// 修改分类
export function updateDept(data) {
  return request({
    url: '/article/classify',
    method: 'put',
    data: data
  })
}

// 删除分类
export function delDept(classifyId) {
  return request({
    url: '/article/classify/' + classifyId,
    method: 'delete'
  })
}
