From 757dcfb5429928251c7633f123b497a19d8ae221 Mon Sep 17 00:00:00 2001
From: zhizhijie <zhizhijie@users.noreply.gitee.com>
Date: 星期五, 09 十月 2026 09:13:47 +0800
Subject: [PATCH] docs(汇总大表): 口径全量核验(F8/F10 等)、09-29 扩列规格转正入库、M0 规格改为按月按需扩列
---
traffic-audit-web/src/router/index.js | 12 +++++++++---
1 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/traffic-audit-web/src/router/index.js b/traffic-audit-web/src/router/index.js
index 0971ecf..93d08e7 100644
--- a/traffic-audit-web/src/router/index.js
+++ b/traffic-audit-web/src/router/index.js
@@ -14,16 +14,22 @@
{ path: '/audit', name: 'AuditResult', component: () => import('@/views/AuditResult.vue') },
{ path: '/report', name: 'ReportExport', component: () => import('@/views/ReportExport.vue') },
{ path: '/rules', name: 'RuleManage', component: () => import('@/views/RuleManage.vue') },
- { path: '/users', name: 'UserManage', component: () => import('@/views/UserManage.vue') }
+ { path: '/users', name: 'UserManage', component: () => import('@/views/UserManage.vue') },
+ { path: '/holiday-stat', name: 'HolidayStat', component: () => import('@/views/HolidayStat.vue') },
+ { path: '/system-config', name: 'SystemConfig', component: () => import('@/views/SystemConfig.vue'), meta: { requireAdmin: true } }
]
})
router.beforeEach((to, from, next) => {
- const token = localStorage.getItem('token')
+ const token = sessionStorage.getItem('token')
if (to.path === '/login') {
next(token ? '/dashboard' : undefined)
+ } else if (!token) {
+ next('/login')
+ } else if (to.meta && to.meta.requireAdmin && sessionStorage.getItem('username') !== 'admin') {
+ next('/dashboard')
} else {
- next(token ? undefined : '/login')
+ next()
}
})
--
Gitblit v1.9.1