修复会话失效后设置面板残留并补录降级验收
This commit is contained in:
1 parent
ab9baf4bd2
commit
50d648cee6
2 files changed
+16
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import axios from 'axios'
|
||||
import {useGlobalStatusStore} from '@/stores/useGlobalStatusStore';
|
||||
import lang from '../i18n/i18n';
|
||||
import {router} from "@/router";
|
||||
import {createLoginRedirectHandler} from "@/utils/navigation.mjs";
|
||||
@@ -21,6 +22,11 @@ const http = axios.create({
|
||||
let redirectToLogin = null;
|
||||
|
||||
function handleLoginRedirect() {
|
||||
const currentRoute = router.currentRoute.value;
|
||||
if (currentRoute?.name === 'login' || currentRoute?.name === 'login-verification') {
|
||||
return Promise.resolve(false);
|
||||
}
|
||||
useGlobalStatusStore().clear();
|
||||
if (!redirectToLogin) {
|
||||
redirectToLogin = createLoginRedirectHandler(router);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user