import { defHttp } from '@/utils/http/axios';

enum Api {
  getLeftTree = '/api/SysDataItemDetail/Load',
  addLeftItem = '/api/SysDataItemDetail/Add',
  delLeftItem = '/api/SysDataItemDetail/Delete',
  editLeftItem = '/api/SysDataItemDetail/Update',
}

// 分类
export function getLeftTree(params) {
  return defHttp.get({ url: Api.getLeftTree, params });
}

export function addLeftItem(params) {
  return defHttp.post({ url: Api.addLeftItem + '?code=' + params.itemCode, params });
}

export function delLeftItem(params) {
  return defHttp.post({ url: Api.delLeftItem + '?id=' + params.id });
}
