style: 格式化 user 文件
parent
1cf9667705
commit
cafa592ef5
|
@ -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<UserInfo>;
|
||||
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】登录之后直接刷新页面导致没有进入创建组织页面------------
|
||||
// 当前页面打开
|
||||
window.open(redirect, '_self')
|
||||
window.open(redirect, '_self');
|
||||
return data;
|
||||
}
|
||||
// update-end-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
|
||||
|
@ -285,20 +285,20 @@ export const useUserStore = defineStore({
|
|||
//update-begin---author:wangshuai ---date:20230224 for:[QQYUN-3440]新建企业微信和钉钉配置表,通过租户模式隔离------------
|
||||
//退出登录的时候需要用的应用id
|
||||
if (isOAuth2AppEnv()) {
|
||||
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
|
||||
const tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
|
||||
removeAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
|
||||
goLogin && await router.push({ name:"Login",query:{ tenantId:tenantId }})
|
||||
goLogin && (await router.push({ name: 'Login', query: { tenantId: tenantId } }));
|
||||
} else {
|
||||
// update-begin-author:sunjianlei date:20230306 for: 修复登录成功后,没有正确重定向的问题
|
||||
goLogin && (await router.push({
|
||||
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]新建企业微信和钉钉配置表,通过租户模式隔离------------
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue