36 lines
912 B
TypeScript
36 lines
912 B
TypeScript
import http from "@/api";
|
|
import type { Function } from "@/api/user/interface/function";
|
|
|
|
|
|
|
|
// 获取资源
|
|
export const getFunctionList = (params:Function.ResFunction) => {
|
|
const name = params.name || '';
|
|
return http.get<Function.ResFunction>(`/sysFunction/getTree?keyword=${name}`)
|
|
}
|
|
|
|
|
|
// 获取资源不包括按钮
|
|
export const getFunctionListNoButton = () => {
|
|
return http.get<Function.ResFunction>(`/sysFunction/functionTreeNoButton`)
|
|
}
|
|
|
|
|
|
//添加菜单列表
|
|
export const addFunction = (params: Function.ResFunction) => {
|
|
return http.post(`/sysFunction/add`,params);
|
|
};
|
|
|
|
//删除菜单列表
|
|
export const deleteFunction = (params: Function.ResFunction) => {
|
|
return http.post(`/sysFunction/delete?id=${params.id}`);
|
|
};
|
|
|
|
//编辑菜单列表
|
|
export const updateFunction = (params: Function.ResFunction) => {
|
|
return http.post(`/sysFunction/update`, params);
|
|
};
|
|
|
|
|
|
|