|
@@ -4,22 +4,28 @@ const routes = [
|
|
|
{
|
|
|
path: '/',
|
|
|
component: () => import('@/views/auto/index.vue'),
|
|
|
+ meta: {
|
|
|
+ isLogin: true
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
path: '/pc',
|
|
|
component: () => import('@/views/pc/index.vue'),
|
|
|
+ meta: {
|
|
|
+ isLogin: true
|
|
|
+ }
|
|
|
},
|
|
|
{
|
|
|
path: '/screen',
|
|
|
component: () => import('@/views/screen/index.vue'),
|
|
|
- },
|
|
|
- {
|
|
|
- path: '/video-resource',
|
|
|
- component: () => import('@/views/screen/video-resource/index.vue'),
|
|
|
meta: {
|
|
|
- noLogin: true
|
|
|
+ isLogin: true
|
|
|
}
|
|
|
},
|
|
|
+ {
|
|
|
+ path: '/video-resource/new-control-result',
|
|
|
+ component: () => import('@/views/screen/video-resource/new-control-result.vue')
|
|
|
+ },
|
|
|
]
|
|
|
|
|
|
const router = createRouter({
|
|
@@ -28,7 +34,7 @@ const router = createRouter({
|
|
|
});
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
- if (to.meta.noLogin) {
|
|
|
+ if (!to.meta.isLogin) {
|
|
|
next()
|
|
|
} else {
|
|
|
if (localStorage.getItem('sc_token')) {
|