import request from "@/api";

// 获取列表
export function dictTree(type: number) {
  return request({
    url: "/admin/sys/dict/tree/" + type,
    method: "GET"
  });
}

// 点击查询
export function getObj(id: string) {
  return request({
    url: "/admin/sys/dict/" + id,
    method: "GET"
  });
}

// 删除
export function delObj(id: number) {
  return request({
    url: "/admin/sys/dict/" + id,
    method: "delete"
  });
}

// 更新
export function putDict(obj: any) {
  return request({
    url: "/admin/sys/dict",
    method: "put",
    data: obj
  });
}
// 新增
export function addDict(obj: any) {
  return request({
    url: "/admin/sys/dict",
    method: "POST",
    data: obj
  });
}
