- 左下角身份标签改为直接展示平台下发的 roleName(与 GetUserInfo / 门户同源),
平台叫什么就显示什么,不再用归一化的「教师/学生/管理员」桶
- 取值优先级:GetUserInfo.currentRole.roleName → /api/agent/tools identity.roleName → catalog.roles 兜底
- 实测 byLoginName(lijing) 返回 currentRole={roleId:1, roleName:"老师"},改后左下角显示「老师」
- UserInfoVo 补充 currentRole 字段类型
This commit is contained in:
@@ -7,6 +7,15 @@ export interface UserInfoVo {
|
||||
account?: string;
|
||||
profilePicture?: string;
|
||||
deptName?: string;
|
||||
/** 当前身份(平台下发,与 GetUserInfo 一致):roleName 即门户里当前激活的身份名 */
|
||||
currentRole?: {
|
||||
roleId?: number;
|
||||
/** 平台当前身份名称,如「老师」「校领导」「学生」 */
|
||||
roleName?: string;
|
||||
schId?: number;
|
||||
schName?: string;
|
||||
[key: string]: any;
|
||||
};
|
||||
[key: string]: any;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user