refactor: 移除会话过期跳转登录页面的错误提示

Former-commit-id: 311760183b8e30664ee253e862bd76fad55252fd
This commit is contained in:
haoxr
2022-11-23 01:15:59 +08:00
parent f48271fc27
commit 53dd4731a7

View File

@@ -1,5 +1,4 @@
import router from '@/router';
import { ElMessage } from 'element-plus';
import useStore from '@/store';
import NProgress from 'nprogress';
import 'nprogress/nprogress.css';
@@ -37,7 +36,6 @@ router.beforeEach(async (to, from, next) => {
} catch (error) {
// 移除 token 并跳转登录页
await user.resetToken();
ElMessage.error((error as any) || 'Has Error');
next(`/login?redirect=${to.path}`);
NProgress.done();
}