// // 弹出框显示函数
// function showPopup() {
// $('#popupContainer').fadeIn();
// notificationAudio.play();
// autoCloseTimer = setTimeout(closePopup, 3000); // 3秒后自动关闭
// }
//
// // 弹出框关闭函数
// function closePopup() {
// $('#popupContainer').fadeOut();
// notificationAudio.pause(); // 暂停音乐播放
// notificationAudio.currentTime = 0; // 重置音乐播放时间
// clearTimeout(autoCloseTimer); // 清除自动关闭定时器
// }
//
//
// // 鼠标悬停事件
// $('#popupContainer').hover(function() {
// clearTimeout(autoCloseTimer); // 鼠标悬停时清除自动关闭定时器
// }, function() {
// autoCloseTimer = setTimeout(closePopup, 3000); // 鼠标离开时重新设置自动关闭定时器
// });
//
// // 5秒后自动弹出框(模拟收到新消息)
// function checkNewMessage() {
// console.log(22)
// // 发送请求到后台接口检查是否有新消息
// // 这里假设后台返回一个布尔值来表示是否有新消息
// var hasNewMessage = false; // 这里假设没有新消息
// if (hasNewMessage) {
// showPopup("你收到新的消息 点击查看");
// }
// }
//
// // 每隔一分钟检查一次是否有新消息
// setInterval(checkNewMessage, 3000);
//
// // 点击“点击查看”链接时的事件处理
// $('#viewMessage').click(function(event) {
// event.preventDefault(); // 阻止默认链接行为
// // 这里可以添加点击链接后的处理逻辑
// closePopup(); // 关闭弹窗
// });
//
// // 点击“关闭”链接时的事件处理
// $('#closePopup').click(function(event) {
// event.preventDefault(); // 阻止默认链接行为
// closePopup(); // 关闭弹窗
// });