This commit is contained in:
Teo
2025-08-15 03:09:20 +08:00
parent 70d829af6c
commit 26386882f0
8 changed files with 96 additions and 93 deletions

View File

@ -25,6 +25,8 @@ export const initSSE = (url: any) => {
});
watch(data, () => {
console.log('SSE connection data:', data);
if (!data.value) return;
useNoticeStore().addNotice({
message: data.value,

View File

@ -32,6 +32,8 @@ export const initWebSocket = (url: any) => {
console.log('websocket已经断开');
},
onMessage: (_, e) => {
console.log('websocket收到消息', e);
if (e.data.indexOf('ping') > 0) {
return;
}