import request from "@/utils/request";


export function addDataCate(data) {
  return request.post("/data/cate", data);
}

export function getCateTree(data) {
  return request.get('/data/cate/treeselect', data);
}

export function getCateDe(id) {
  return request.get(`data/cate//${id}`);
}

export function editCate(query) {
  return request({
    url: "/data/cate",
    method: "put",
    data: query,
  });
}
export function delCate(id) {
  return request({
    url: '/data/cate/' + id,
    method: 'delete'
  })
}

export function addDataItem(data) {
  return request.post("/data/item", data);
}

export function getItem(query) {
  return request({
    url: "/data/item/list",
    method: "get",
    params: query,
  });
}

export function getItemDe(id) {
  return request.get(`data/item//${id}`);
}

export function editItem(query) {
  return request({
    url: "/data/item",
    method: "put",
    data: query,
  });
}
export function delItem(id) {
  return request({
    url: '/data/item/' + id,
    method: 'delete'
  })
}


