import { $http } from '@/libs/http'
// 获得所有栏目信息
export const getCategories = (data) => {
  return $http.get('/admin/categories', data)
}
// 获得栏目类关系信息
export const getTreeCategories = (keyId) => {
  return $http.get(`/admin/tree/category/${keyId}`)
}
// 获得栏目类关系信息
export const getTreeCategorie2 = (keyId) => {
  return $http.get(`/admin/tree2/category/${keyId}`)
}
// 增加栏目
export const addCategories = (data) => {
  return $http.postObj('/admin/categories', data)
}
// 删除栏目
export const delCategories = (data) => {
  return $http.delete('/admin/categories', data)
}
// 修改栏目
export const editCategories = (data) => {
  return $http.patch('/admin/categories', data)
}
