feat: 完成ruoyi、pure菜单兼容

This commit is contained in:
橙子
2024-09-07 02:17:07 +08:00
parent 9fc5b521e5
commit 978a7fab4c
16 changed files with 1052 additions and 437 deletions

View File

@@ -1,10 +1,10 @@
import { http } from "@/utils/http";
type Result = {
success: boolean;
data: Array<any>;
};
import type { Result } from "@/api/result";
export const getAsyncRoutes = () => {
return http.request<Result>("get", "/get-async-routes");
};
export const getRoutes = () => {
return http.request<Result>("get", "/account/Vue3Router/pure");
};

View File

@@ -1,52 +0,0 @@
import { http } from "@/utils/http";
import type { Result, ResultList, ResultPage } from "./result.ts";
/** 新增角色 */
export const addRole = (data: any) => {
return http.request<Result>("post", `/role`, { data });
};
/** 获取系统管理-角色管理列表 */
export const getRoleList = (data?: object) => {
return http.request<ResultPage>("post", "/role", { data });
};
/** 获取系统管理-菜单管理列表 */
export const getMenuList = (data?: object) => {
return http.request<Result>("post", "/menu", { data });
};
/** 获取系统监控-在线用户列表 */
export const getOnlineLogsList = (data?: object) => {
return http.request<ResultPage>("post", "/online-logs", { data });
};
/** 获取系统监控-登录日志列表 */
export const getLoginLogsList = (data?: object) => {
return http.request<ResultPage>("post", "/login-logs", { data });
};
/** 获取系统监控-操作日志列表 */
export const getOperationLogsList = (data?: object) => {
return http.request<ResultPage>("post", "/operation-logs", { data });
};
/** 获取系统监控-系统日志列表 */
export const getSystemLogsList = (data?: object) => {
return http.request<ResultPage>("post", "/system-logs", { data });
};
/** 获取系统监控-系统日志-根据 id 查日志详情 */
export const getSystemLogsDetail = (data?: object) => {
return http.request<ResultList>("post", "/system-logs-detail", { data });
};
/** 获取角色管理-权限-菜单权限 */
export const getRoleMenu = (data?: object) => {
return http.request<ResultList>("post", "/role-menu", { data });
};
/** 获取角色管理-权限-菜单权限-根据角色 id 查对应菜单 */
export const getRoleMenuIds = (data?: object) => {
return http.request<ResultList>("post", "/role-menu-ids", { data });
};