From cafa592ef5104be2c3d9331b8329a55a95a44b1a Mon Sep 17 00:00:00 2001 From: ykcory Date: Thu, 28 Dec 2023 05:58:45 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E6=A0=BC=E5=BC=8F=E5=8C=96=20user=20?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/store/modules/user.ts | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts index e75a7a0..62f2e4d 100644 --- a/src/store/modules/user.ts +++ b/src/store/modules/user.ts @@ -18,7 +18,7 @@ import { isArray } from '/@/utils/is'; import { useGlobSetting } from '/@/hooks/setting'; import { JDragConfigEnum } from '/@/enums/jeecgEnum'; import { useSso } from '/@/hooks/web/useSso'; -import { isOAuth2AppEnv } from "/@/views/sys/login/useLogin"; +import { isOAuth2AppEnv } from '/@/views/sys/login/useLogin'; interface UserState { userInfo: Nullable; token?: string; @@ -183,13 +183,13 @@ export const useUserStore = defineStore({ //update-end-author:liusq date:2022-5-5 for: 登录成功后缓存拖拽模块的接口前缀 // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 - let redirect = router.currentRoute.value?.query?.redirect as string; + const redirect = router.currentRoute.value?.query?.redirect as string; // 判断是否有 redirect 重定向地址 //update-begin---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ if (redirect && goHome) { - //update-end---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ + //update-end---author:wangshuai ---date:20230424 for:【QQYUN-5195】登录之后直接刷新页面导致没有进入创建组织页面------------ // 当前页面打开 - window.open(redirect, '_self') + window.open(redirect, '_self'); return data; } // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 @@ -284,21 +284,21 @@ export const useUserStore = defineStore({ } //update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ //退出登录的时候需要用的应用id - if(isOAuth2AppEnv()){ - let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); + if (isOAuth2AppEnv()) { + const tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); removeAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID); - goLogin && await router.push({ name:"Login",query:{ tenantId:tenantId }}) - }else{ + goLogin && (await router.push({ name: 'Login', query: { tenantId: tenantId } })); + } else { // update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 - goLogin && (await router.push({ - path: PageEnum.BASE_LOGIN, - query: { - // 传入当前的路由,登录成功后跳转到当前路由 - redirect: router.currentRoute.value.fullPath, - } - })); + goLogin && + (await router.push({ + path: PageEnum.BASE_LOGIN, + query: { + // 传入当前的路由,登录成功后跳转到当前路由 + redirect: router.currentRoute.value.fullPath, + }, + })); // update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题 - } //update-end---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------ },