From 2eefdb9ae80060c6962c5349ab9e481d4843da98 Mon Sep 17 00:00:00 2001 From: zhangjiming Date: Wed, 22 Jan 2025 09:28:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=81=A2=E5=A4=8DIP=E5=9C=B0=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/getServerInfo.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/getServerInfo.ts b/src/utils/getServerInfo.ts index ff429ba..b413673 100644 --- a/src/utils/getServerInfo.ts +++ b/src/utils/getServerInfo.ts @@ -5,8 +5,8 @@ export function getServerInfo(wsPath: string = '/api/v1/app/ws/state') { // 获取主机名(IP 或域名)和端口号 // const host = url.hostname // 例如: "192.168.1.100" 或 "localhost" - // const host = window.location.hostname; - const host = "192.168.1.119"; + const host = window.location.hostname; + // const host = "192.168.1.119"; // const port = '8082' // 使用固定的后端端口;由于本地开发时,8080被占用导致ws连接失败,所以使用8082 const port = "80" // 构建 WebSocket URL