feat(settings): 轻应用登录参数与界面模式管理员默认

- 登录时从路由参数 yUserId/access_token 获取并存入 userInfo
- 轻应用管理页路由参数新增 userName/gateDepartName/typeName 选项
- 添加系统默认界面模式设置(管理员可指定全量/简洁)
- useLayoutMode hook 支持优先级:用户自选 > 管理员默认 > 会话级

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
董宏凯andClaude Haiku 4.5 committed 2026-06-15 11:39:02 +08:00
1 parent ab22b50faf
commit 01012ff300
11 files changed
+150 -23

No files matched your search

@@ -19,11 +19,17 @@ export function mountLabel(value: string | null | undefined): string {
return MOUNT_OPTIONS.find((o) => o.value === value)?.label ?? value;
}
/** 登录参数可选来源;值均可在 userInfo 中取到,"other" 表示自填。 */
/**
* 登录参数可选来源;值均可在 userInfo 中取到,"other" 表示自填。
* accessToken / yUserId 取登录路由透传值(写入 userInfo 的同名键);
* userName / gateDepartName / typeName 取 consumer 接口 userDetailByYuserId 的返回值。
*/
export const LOGIN_SOURCE_OPTIONS: { label: string; value: string }[] = [
{ label: "accessToken", value: "accessToken" },
{ label: "yUserId", value: "yUserId" },
{ label: "userName", value: "userName" },
{ label: "gateDepartName", value: "gateDepartName" },
{ label: "typeName", value: "typeName" },
{ label: "其他(自定义值)", value: "other" },
];