feat(notice): 重构通知公告功能实现消息中心

- 新增顶部公告/通知列表获取接口 listNoticeTop
- 新增标记单条公告为已读接口 markNoticeRead
- 新增批量标记公告为已读接口 markNoticeReadAll
- 重构 HeaderNotice 组件实现完整的消息中心功能
- 添加标签页分类显示全部、通知、公告三种类型
- 实现消息实时未读数统计和标记已读功能
- 优化消息展示界面增加图标区分通知和公告类型
- 更新 Navbar 组件集成新的消息中心功能
- 调整布局样式适配消息中心组件
- 修复设置面板导航类型配置问题
- 添加 Chrome 风格标签页样式支持
This commit is contained in:
2026-06-04 12:57:04 +08:00
parent 14a81564bf
commit 58669ce9b6
11 changed files with 826 additions and 312 deletions

View File

@@ -454,19 +454,9 @@ export const dynamicRoutes = [
}
];
// 合并常量路由和动态路由,确保所有路由都能被访问
const allRoutes = [...constantRoutes, ...dynamicRoutes];
// 添加404路由到所有路由的最后
allRoutes.push({
path: "/:pathMatch(.*)*",
component: () => import('@/views/error/404'),
hidden: true
});
const router = createRouter({
history: createWebHistory(),
routes: allRoutes,
routes: constantRoutes,
scrollBehavior(to, from, savedPosition) {
if (savedPosition) {
return savedPosition
@@ -476,4 +466,17 @@ const router = createRouter({
},
});
// 动态路由加载完成后再添加 404 catch-allVue Router 4 要求)
export function addNotFoundRoute() {
if (!router.hasRoute('not-found')) {
router.addRoute({
path: '/:pathMatch(.*)*',
name: 'not-found',
component: () => import('@/views/error/404'),
hidden: true
})
}
}
export default router;