|
@@ -122,7 +122,11 @@ router.beforeEach(async (to, from, next) => {
|
|
|
if (window.location.href.startsWith('http://localhost')) {
|
|
|
next({ path: '/user/login' })
|
|
|
} else {
|
|
|
- window.location.href = `https://dev.autocde.com/login?redirect=${to.fullPath}`
|
|
|
+ if(to.fullPath !== '/'){
|
|
|
+ window.location.href = `https://dev.autocde.com/login?redirect=${to.fullPath}`
|
|
|
+ }else{
|
|
|
+ window.location.href = `https://dev.autocde.com/login`
|
|
|
+ }
|
|
|
}
|
|
|
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
|
|
|
}
|