修复通知公告显示问题

This commit is contained in:
zhouyanli
2026-08-22 14:46:50 +08:00
parent 8153325a68
commit 13ca3f1e08
2 changed files with 4 additions and 3 deletions

View File

@@ -352,7 +352,8 @@ const getInspectionData = () => {
// 获取消息通知
const getNoticeData = () => {
getNewNoticeData().then(res => {
const notice = res.code === 200 && res.data ? `${res.data.notice || ''} : ${res.data.item || ''}` : '暂无公告'
const notice = res.code === 200 && res.data
? [res.data.notice, res.data.item].filter(Boolean).join(' : ') || '暂无公告' : '暂无公告'
// 仅在内容真正变化时才更新
if (noticeText.value !== notice) {
noticeText.value = notice