邓洁 : 修复bug
This commit is contained in:
@@ -60,7 +60,7 @@ const routes = [
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/tunnel/:siteId(\\d+)/:type/:userId(\\d+)',
|
||||
path: '/tunnel/:siteId/:type/:userId',
|
||||
name: 'tunnel',
|
||||
component: () => import('@/views/tunnel-manage/index.vue'),
|
||||
meta: {
|
||||
@@ -85,6 +85,7 @@ const router = createRouter({
|
||||
});
|
||||
router.beforeEach((to, form, next) => {
|
||||
NProgress.start()
|
||||
console.log('token-----',getToken())
|
||||
if (!getToken()) {
|
||||
if (to.path === '/login') {
|
||||
next()
|
||||
@@ -94,12 +95,12 @@ router.beforeEach((to, form, next) => {
|
||||
}
|
||||
} else {
|
||||
console.log('有token')
|
||||
if (to.path === '/login') {
|
||||
next('/')
|
||||
NProgress.done()
|
||||
} else {
|
||||
// if (to.path === '/login') {
|
||||
// next('/')
|
||||
// NProgress.done()
|
||||
// } else {
|
||||
next()
|
||||
}
|
||||
// }
|
||||
}
|
||||
})
|
||||
router.afterEach(() => {
|
||||
|
||||
Reference in New Issue
Block a user