去掉token过期提示
This commit is contained in:
parent
84892d810f
commit
a1eefcbd15
@ -90,7 +90,12 @@ router.beforeEach(async(to, from, next) => {
|
||||
const menuList= permissionStore.menuList;
|
||||
next({ path: menuList[0].children[0].path });
|
||||
} else {
|
||||
if(to.path=="/" || to.path=="/admin"){
|
||||
const menuList= permissionStore.menuList;
|
||||
next({ path: menuList[0].children[0].path });
|
||||
}else{
|
||||
next();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -42,11 +42,11 @@ service.interceptors.response.use(
|
||||
const { code, message } = response.data;
|
||||
console.log(code);
|
||||
if (code == 401 || code==403 || code==405 || code==406) {
|
||||
Message.clear();
|
||||
Message.error({
|
||||
content: message,
|
||||
duration: 3000
|
||||
});
|
||||
//Message.clear();
|
||||
// Message.error({
|
||||
// content: message,
|
||||
// duration: 3000
|
||||
// });
|
||||
// 重定向路由到登陆页面
|
||||
store.clearInfo();
|
||||
window.location.href="/login";
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user