sdsd
This commit is contained in:
parent
344e852481
commit
d0ae0020f9
@ -101,7 +101,7 @@ router.beforeEach(async (to, from, next) => {
|
|||||||
const token = GET_TOKEN()
|
const token = GET_TOKEN()
|
||||||
if (token) {
|
if (token) {
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
next('/index')
|
next('/user')
|
||||||
} else {
|
} else {
|
||||||
next()
|
next()
|
||||||
}
|
}
|
||||||
|
|||||||
@ -47,8 +47,8 @@ request.interceptors.response.use(
|
|||||||
message: error.response.data.message,
|
message: error.response.data.message,
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
onClose: () => {
|
onClose: () => {
|
||||||
if(location.pathname != '/index'){
|
if(location.pathname != '/system/login'){
|
||||||
location.href = '/index'
|
location.href = '/system/login'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user