// 公告模块
// 关闭指定公告
function closeAnnouncement(announcementId) {
    const announcement = document.getElementById(announcementId);
    if (announcement) {
        announcement.classList.add('hide');

        // 动画完成后隐藏元素
        setTimeout(() => {
            if (announcement) {
                announcement.style.display = 'none';
            }
        }, 300);
    }
}

// 检查公告是否应该显示
function shouldShowAnnouncement(announcementId) {
    // 始终返回true，让公告每次刷新都显示
    return true;
}

// 初始化公告显示状态
function initializeAnnouncements() {
    const announcements = ['announcement1', 'announcement2'];

    announcements.forEach(announcementId => {
        if (!shouldShowAnnouncement(announcementId)) {
            const announcement = document.getElementById(announcementId);
            if (announcement) {
                announcement.style.display = 'none';
            }
        }
    });

    console.log('公告初始化完成 - 刷新页面后公告将重新显示');
}
