🔨 修改聚合配置.

This commit is contained in:
lijiahangmax
2024-12-16 20:37:17 +08:00
parent 985091f42b
commit 6d74b4379e
24 changed files with 403 additions and 349 deletions

View File

@@ -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');
}

View File

@@ -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');
}

View 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');
}