import request from '@/utils/request'

// 查询栏目导航列表（排除节点）
export function listColumnExcludeChild(columnId) {
  return request({
    url: '/system/column/list/exclude/' + columnId,
    method: 'get'
  })
}

// 查询栏目导航列表
export function listColumn(query) {
  return request({
    url: '/system/column/list',
    method: 'get',
    params: query
  })
}
// 查询栏目导航详细
export function getColumn(columnId) {
  return request({
    url: '/system/column/' + columnId,
    method: 'get'
  })
}

// 查询栏目导航下拉树结构
export function treeselect() {
  return request({
    url: '/system/column/treeselect',
    method: 'get'
  })
}
// 新增栏目导航
export function addColumn(data) {
  return request({
    url: '/system/column',
    method: 'post',
    data: data
  })
}

// 修改栏目导航
export function updateColumn(data) {
  return request({
    url: '/system/column',
    method: 'put',
    data: data
  })
}

// 删除栏目导航
export function delColumn(columnId) {
  return request({
    url: '/system/column/' + columnId,
    method: 'delete'
  })
}
