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