czh-20260612-新增单点登录功能

This commit is contained in:
zhihao
2026-06-12 10:48:32 +08:00
parent b8d57da4e4
commit 871e296f06
9 changed files with 605 additions and 6 deletions
+3 -3
View File
@@ -28,7 +28,7 @@ const ROOT_PATH = RootRoute.path;
//update-begin---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------
//update-begin---author:wangshuai ---date:20221111 for: [VUEN-2472]分享免登录------------
const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH,SYS_FILES_PATH, TOKEN_LOGIN ];
const whitePathList: PageEnum[] = [LOGIN_PATH, OAUTH2_LOGIN_PAGE_PATH,SYS_FILES_PATH, TOKEN_LOGIN, PageEnum.AUTOLOGIN_PATH, PageEnum.LOGOUT_RESULT_PATH ];
//update-end---author:wangshuai ---date:20221111 for: [VUEN-2472]分享免登录------------
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------
@@ -57,7 +57,7 @@ export function createPermissionGuard(router: Router) {
// Whitelist can be directly entered
if (whitePathList.includes(to.path as PageEnum)) {
if (to.path === LOGIN_PATH && token) {
if ((to.path === LOGIN_PATH || to.path === PageEnum.AUTOLOGIN_PATH) && token) {
const isSessionTimeout = userStore.getSessionTimeout;
//update-begin---author:scott ---date:2023-04-24 for:【QQYUN-4713】登录代码调整逻辑有问题,改造待观察--
@@ -122,7 +122,7 @@ export function createPermissionGuard(router: Router) {
//---------【首次登陆并且是企业微信或者钉钉的情况下才会调用】------------------------------------------------
//update-end---author:wangshuai ---date:20230302 for:只有首次登陆并且是企业微信或者钉钉的情况下才会调用------------
// 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面,否则跳转到登录页面
path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : LOGIN_PATH;
path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : PageEnum.AUTOLOGIN_PATH;
}
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3 Auth2未实现------------
// redirect login page