- 新增 SecurityPage.vue: 统计卡片、威胁事件表格、封禁管理、风险查询 - 新增 api/security.js: 安全相关API封装 - 路由添加 /security 页面 - 侧边栏添加"安全防护"菜单项 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
42 lines
1.6 KiB
JavaScript
42 lines
1.6 KiB
JavaScript
import { createRouter, createWebHashHistory } from 'vue-router'
|
|
|
|
import AdminLayout from '../layouts/AdminLayout.vue'
|
|
|
|
const ReportPage = () => import('../pages/ReportPage.vue')
|
|
const UsersPage = () => import('../pages/UsersPage.vue')
|
|
const FeedbacksPage = () => import('../pages/FeedbacksPage.vue')
|
|
const LogsPage = () => import('../pages/LogsPage.vue')
|
|
const AnnouncementsPage = () => import('../pages/AnnouncementsPage.vue')
|
|
const EmailPage = () => import('../pages/EmailPage.vue')
|
|
const SecurityPage = () => import('../pages/SecurityPage.vue')
|
|
const SystemPage = () => import('../pages/SystemPage.vue')
|
|
const SettingsPage = () => import('../pages/SettingsPage.vue')
|
|
|
|
const routes = [
|
|
{
|
|
path: '/',
|
|
component: AdminLayout,
|
|
children: [
|
|
{ path: '', redirect: '/reports' },
|
|
{ path: '/pending', redirect: '/reports' },
|
|
{ path: '/stats', redirect: '/reports' },
|
|
{ path: '/reports', name: 'reports', component: ReportPage },
|
|
{ path: '/users', name: 'users', component: UsersPage },
|
|
{ path: '/feedbacks', name: 'feedbacks', component: FeedbacksPage },
|
|
{ path: '/logs', name: 'logs', component: LogsPage },
|
|
{ path: '/announcements', name: 'announcements', component: AnnouncementsPage },
|
|
{ path: '/email', name: 'email', component: EmailPage },
|
|
{ path: '/security', name: 'security', component: SecurityPage },
|
|
{ path: '/system', name: 'system', component: SystemPage },
|
|
{ path: '/settings', name: 'settings', component: SettingsPage },
|
|
],
|
|
},
|
|
]
|
|
|
|
const router = createRouter({
|
|
history: createWebHashHistory(),
|
|
routes,
|
|
})
|
|
|
|
export default router
|