|
|
@@ -1,6 +1,5 @@
|
|
|
-import Router from '@/router';
|
|
|
import APP from '@/services';
|
|
|
-import { getLoginData } from '@/services/bus/login';
|
|
|
+import { getLoginData, logout } from '@/services/bus/login';
|
|
|
import { tokenCheck } from '@/services/socket/login/index';
|
|
|
import timerUtil from '@/utils/timer/timerUtil';
|
|
|
|
|
|
@@ -24,7 +23,7 @@ export function getToken(): string {
|
|
|
*/
|
|
|
export function handleTokenCheck() {
|
|
|
return tokenCheck().catch((err) => {
|
|
|
- Router.push({ path: '/login' }); // 回到登录页面
|
|
|
+ logout();
|
|
|
console.error(`token校验失败:${err}`);
|
|
|
return Promise.reject(`token校验失败:${err}`);
|
|
|
});
|