From 50f171cf1cf0f3e4447b8e72b11a70c156466463 Mon Sep 17 00:00:00 2001
From: wujingjing <gersonwu@qq.com>
Date: 星期一, 13 一月 2025 17:43:36 +0800
Subject: [PATCH] queryString

---
 src/utils/sse/index.ts |   16 +++++-----------
 1 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/src/utils/sse/index.ts b/src/utils/sse/index.ts
index b908e12..2880b7d 100644
--- a/src/utils/sse/index.ts
+++ b/src/utils/sse/index.ts
@@ -1,16 +1,12 @@
 import { onMounted, onUnmounted } from 'vue';
 import { SSEClient } from './SSEClient';
+import { MAIN_URL } from '/@/constants';
 
 // 鍒涘缓瀹炰緥
 const sseClient = new SSEClient(
-	'/events',
-	{
-		retries: 3,
-		retryDelay: 1000,
-		timeout: 30000,
-		autoReconnect: true,
+	`${MAIN_URL}events`,
 
-	},
+	{},
 	{
 		onMessage: (data) => {
 			console.log('Received message:', data);
@@ -33,10 +29,8 @@
 // 鍦� Vue 缁勪欢涓娇鐢�
 export function useSSE() {
 	// 寤虹珛杩炴帴
-	sseClient.connect({
-		userId: 'xxx',
-		sessionId: 'xxx',
-	});
+	sseClient.connect({});
+	
 
 	// onMounted(() => {
 	// 	// 寤虹珛杩炴帴

--
Gitblit v1.9.3