From 6c4ebc26d19429256571af8485999d7100e79333 Mon Sep 17 00:00:00 2001 From: zhangyahui Date: Mon, 1 Jun 2026 09:35:11 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20ws=E8=BF=9E=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/websocket.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/utils/websocket.ts b/src/utils/websocket.ts index ff8c10a..9c3d194 100644 --- a/src/utils/websocket.ts +++ b/src/utils/websocket.ts @@ -37,10 +37,12 @@ class WebSocketManager { } // 根据当前页面协议自动选择 ws 或 wss - const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' + // const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:' + const protocol = 'wss:' // 从环境变量获取 WebSocket 主机地址 - const wsHost = import.meta.env.VITE_WS_HOST || '18.167.251.121:10094' + // const wsHost = import.meta.env.VITE_WS_HOST || '18.167.251.121:10094' + const wsHost = 'www.develop-ms.api.aida.com.hk' this.url = `${protocol}//${wsHost}/ws?token=${token}` this.isManualClose = false