Browse Source

update:在utils/getServerInfo中添加了一些说明

feature/history-20250108
gzt 8 months ago
parent
commit
5ab750a87f
  1. 2
      src/utils/getServerInfo.ts

2
src/utils/getServerInfo.ts

@ -4,7 +4,7 @@ export function getServerInfo() {
// 获取主机名(IP 或域名)和端口号
const host = url.hostname // 例如: "192.168.1.100" 或 "localhost"
const port = '8082' // 使用固定的后端端口
const port = '8082' // 使用固定的后端端口;由于本地开发时,8080被占用导致ws连接失败,所以使用8082
// 构建 WebSocket URL
const wsProtocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:'

Loading…
Cancel
Save