import { get, post } from "@/api/http";

const fix = "/menu";

const url = {
  insert: `${fix}/insert`, // 分页查询
  tree: `${fix}/tree`, // 查询菜单
  update: `${fix}/update`, // 修改菜单
  delete: `${fix}/delete`, // 删除菜单
};

export const insertMenu = (params: Object) => {
  return post(url.insert, params);
};

export const getMenuTree = () => {
  return get(url.tree);
};

export const updateMenu = (params: Object) => {
  return post(url.update, params);
};
export const deleteMenu = (params: Object) => {
  return post(url.delete, params);
};
