chore: 完成全量功能迭代与部署准备
- 移除冗余依赖包 - 新增账号禁用校验与用户管理能力 - 新增文档下载与管理页面文件展示 - 新增API文档页面与用户管理前端页面 - 重构时区处理与docker-compose部署配置 - 完善测试用例与项目文档
This commit is contained in:
@@ -49,6 +49,18 @@ const routes = [
|
||||
name: 'settings',
|
||||
component: () => import('@/views/Settings.vue'),
|
||||
meta: { title: '设置', requiresAuth: true }
|
||||
},
|
||||
{
|
||||
path: 'api-docs',
|
||||
name: 'api-docs',
|
||||
component: () => import('@/views/ApiDocs.vue'),
|
||||
meta: { title: 'API 说明', requiresAuth: true }
|
||||
},
|
||||
{
|
||||
path: 'users',
|
||||
name: 'users',
|
||||
component: () => import('@/views/Users.vue'),
|
||||
meta: { title: '用户管理', requiresAuth: true, requiresAdmin: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -81,6 +93,10 @@ router.beforeEach((to) => {
|
||||
return { name: 'login', query: { redirect: to.fullPath } }
|
||||
}
|
||||
|
||||
if (to.meta?.requiresAdmin && !authStore.isAdmin) {
|
||||
return { name: 'overview' }
|
||||
}
|
||||
|
||||
if (to.name === 'login' && authStore.isAuthenticated) {
|
||||
return { name: 'overview' }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user