🔨 修改聚合配置.
This commit is contained in:
@@ -93,5 +93,5 @@ export function deleteMenu(id: number) {
|
||||
* 刷新缓存
|
||||
*/
|
||||
export function refreshCache() {
|
||||
return axios.put('/infra/user-permission/refresh-cache');
|
||||
return axios.put('/infra/system-menu/refresh-cache');
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
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');
|
||||
}
|
||||
46
orion-visor-ui/src/api/user/user-aggregate.ts
Normal file
46
orion-visor-ui/src/api/user/user-aggregate.ts
Normal file
@@ -0,0 +1,46 @@
|
||||
import type { MenuQueryResponse } from '@/api/system/menu';
|
||||
import axios from 'axios';
|
||||
|
||||
/**
|
||||
* 用户聚合信息
|
||||
*/
|
||||
export interface UserAggregateResponse {
|
||||
user: UserBaseResponse;
|
||||
roles: Array<string>;
|
||||
updatePassword?: UserUpdatePasswordResponse;
|
||||
permissions: Array<string>;
|
||||
systemPreference: Record<string, any>;
|
||||
tippedKeys: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户基础信息
|
||||
*/
|
||||
export interface UserBaseResponse {
|
||||
id: number;
|
||||
username: string;
|
||||
nickname: string;
|
||||
avatar: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 用户更新密码响应
|
||||
*/
|
||||
export interface UserUpdatePasswordResponse {
|
||||
updatePasswordStatus: number;
|
||||
updatePasswordReason: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户聚合信息
|
||||
*/
|
||||
export function getUserAggregateInfo() {
|
||||
return axios.get<UserAggregateResponse>('/infra/user-aggregate/user');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户菜单列表
|
||||
*/
|
||||
export function getUserMenuList() {
|
||||
return axios.get<Array<MenuQueryResponse>>('/infra/user-aggregate/menu');
|
||||
}
|
||||
Reference in New Issue
Block a user