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

@@ -108,3 +108,29 @@ export function getReadNoticeIds() {
method: 'get'
})
}
// 获取顶部公告/通知列表最新N条
export function listNoticeTop(query) {
return request({
url: '/system/notice/public/top',
method: 'get',
params: query
})
}
// 标记单条公告/通知为已读
export function markNoticeRead(noticeId) {
return request({
url: '/system/notice/public/read/' + noticeId,
method: 'post'
})
}
// 批量标记公告/通知为已读逗号分隔的ID字符串
export function markNoticeReadAll(noticeIds) {
return request({
url: '/system/notice/public/read/all',
method: 'post',
data: noticeIds
})
}