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