@@ -26,6 +26,14 @@ export const initSSE = (url: any) => {
|
||||
|
||||
watch(data, () => {
|
||||
if (!data.value) return;
|
||||
|
||||
// 打印接收到的 SSE 消息
|
||||
console.log('=== SSE 接收到消息 ===');
|
||||
console.log('消息内容:', data.value);
|
||||
console.log('消息类型:', typeof data.value);
|
||||
console.log('接收时间:', new Date().toLocaleString());
|
||||
console.log('=====================');
|
||||
|
||||
useNoticeStore().addNotice({
|
||||
message: data.value,
|
||||
read: false,
|
||||
|
||||
Reference in New Issue
Block a user