We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cd6b4a commit c246b47Copy full SHA for c246b47
src/utils/NotifyUtils.tsx
@@ -13,6 +13,8 @@ const logoutHandler = () => {
13
cleanCache();
14
const { pathname } = history.location;
15
history.replace(`${login_uri}?redirect=${pathname}`);
16
+ Token.clean();
17
+ User.clean();
18
logoutModal = undefined;
19
Modal.destroyAll();
20
};
@@ -53,8 +55,12 @@ const Notify = {
53
55
return;
54
56
}
57
- Token.clean();
- User.clean();
58
+ // 如果没有缓存过token - 未登录过.
59
+ if (!Token.get()) {
60
+ // 直接跳转到登录页
61
+ logoutHandler();
62
+ return;
63
+ }
64
65
if (!logoutModal) {
66
0 commit comments