|
@@ -7,7 +7,7 @@ router.beforeEach((to, from, next) => {
|
|
|
let userToken = window.localStorage.getItem('userToken')
|
|
let userToken = window.localStorage.getItem('userToken')
|
|
|
if (userToken) {
|
|
if (userToken) {
|
|
|
let active = routeList.findIndex((item) => item === to.path)
|
|
let active = routeList.findIndex((item) => item === to.path)
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if (active > -1) {
|
|
if (active > -1) {
|
|
|
active++
|
|
active++
|
|
|
}
|
|
}
|
|
@@ -15,7 +15,7 @@ router.beforeEach((to, from, next) => {
|
|
|
next()
|
|
next()
|
|
|
} else {
|
|
} else {
|
|
|
store.commit('user/setNavActive', 1)
|
|
store.commit('user/setNavActive', 1)
|
|
|
- if (to.path == '/Home'||to.path == '/login'||to.path == '/register'||to.path == '/forget-password') {
|
|
|
|
|
|
|
+ if (to.path == '/Home'||to.path == '/Tourism'||to.path == '/Team'||to.path == '/login'||to.path == '/register'||to.path == '/forget-password') {
|
|
|
next()
|
|
next()
|
|
|
} else {
|
|
} else {
|
|
|
next('/login')
|
|
next('/login')
|