手续
This commit is contained in:
@ -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,
|
||||
|
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user