feat: add frontend analytics tracking

This commit is contained in:
2026-05-17 10:18:56 +08:00
parent 3decff526a
commit 1016111d19
11 changed files with 583 additions and 10 deletions
+7 -1
View File
@@ -18,6 +18,12 @@ const routes: RouteRecordRaw[] = [
name: 'Dashboard',
component: () => import('@/views/Dashboard.vue'),
meta: { title: '仪表盘', icon: 'DataLine' }
},
{
path: 'analytics',
name: 'AnalyticsDashboard',
component: () => import('@/views/analytics/AnalyticsDashboard.vue'),
meta: { title: '行为分析', icon: 'TrendCharts' }
}
]
},
@@ -120,7 +126,7 @@ const router = createRouter({
// 路由守卫
router.beforeEach((to, _from, next) => {
const token = localStorage.getItem('adminToken')
if (to.path === '/login') {
if (token) {
next('/')