🔨 修改路由配置.

This commit is contained in:
lijiahangmax
2024-12-11 22:47:56 +08:00
parent 32e4859ba7
commit f52a81f9d0
35 changed files with 552 additions and 225 deletions

View File

@@ -0,0 +1,39 @@
import type { MenuQueryResponse } from '@/api/system/menu';
import axios from 'axios';
/**
* 用户权限响应
*/
export interface UserPermissionResponse {
user: UserBaseResponse;
roles: Array<string>;
permissions: Array<string>;
systemPreference: Record<string, any>;
tippedKeys: Array<string>;
}
/**
* 用户基础信息
*/
export interface UserBaseResponse {
id: number;
username: string;
nickname: string;
avatar: string;
passwordUpdateStatus: number;
passwordUpdateReason: string;
}
/**
* 获取用户信息
*/
export function getUserPermission() {
return axios.get<UserPermissionResponse>('/infra/user-permission/user');
}
/**
* 获取菜单列表
*/
export function getUserMenuList() {
return axios.get<Array<MenuQueryResponse>>('/infra/user-permission/menu');
}