恢复之前通知跳转

This commit is contained in:
zhouyanli
2026-08-31 09:07:47 +08:00
parent b89fd6dffb
commit 825220cd86
2 changed files with 11 additions and 9 deletions

View File

@@ -351,13 +351,15 @@ const getInspectionData = () => {
const getNoticeData = () => {
getNewNoticeData()
.then(res => {
const notice =
res.code === 200 && res.data
? [res.data.notice, res.data.item].filter(Boolean).join(' : ') || '暂无公告'
: '暂无公告'
// 仅在内容真正变化时才更新
if (noticeText.value !== notice) {
noticeText.value = notice
if (res.code === 200 && res.data) {
const data = res.data
const notice = [data.notice, data.item].filter(Boolean).join(' : ') || '暂无公告'
// 仅在内容真正变化时才更新
if (noticeText.value !== notice) {
noticeText.value = notice
}
} else {
noticeText.value = '暂无公告'
}
})
.catch(() => {})