Merge pull request #200 from InfinityPacer/dev

This commit is contained in:
jxxghp
2024-10-18 06:56:06 +08:00
committed by GitHub
@@ -16,6 +16,8 @@ const appsMenu = ref(false)
// SSE持续接收消息
function startSSEMessager() {
// 延迟 3 秒启动 SSE,避免相关认证信息尚未写入 Cookie 导致 403
setTimeout(() => {
eventSource = new EventSource(`${import.meta.env.VITE_API_BASE_URL}system/message`)
eventSource.addEventListener('message', event => {
if (event.data) {
@@ -25,6 +27,7 @@ function startSSEMessager() {
// TODO 在顶部显示消息汽泡
}
})
}, 3000)
}
// 页面加载时,加载当前用户数据