From 5f5f730c983ba15f746357b7df4100bd08934bf0 Mon Sep 17 00:00:00 2001 From: chicrobot Date: Sat, 15 Nov 2025 00:49:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=81=8A=E5=A4=A9=E8=B7=B3?= =?UTF-8?q?=E8=BD=AC=EF=BC=8C=E9=87=87=E7=94=A8=E6=9C=AC=E5=9C=B0font-awee?= =?UTF-8?q?some?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 6 +++--- script.js | 9 +++++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 121e6ef..f1d8834 100644 --- a/index.html +++ b/index.html @@ -4,9 +4,9 @@ JUNE PVE 集成工作台 - + - + @@ -278,7 +278,7 @@

实时通信

基于WebSocket的聊天系统实现

- 进入实验室 + 进入实验室 diff --git a/script.js b/script.js index 1324bf6..65e8c4f 100644 --- a/script.js +++ b/script.js @@ -46,17 +46,18 @@ updateActiveNavLink(); window.addEventListener('load', function() { // 获取当前页面的域名或IP const currentHost = window.location.hostname; - // 构建跳转URL (保持相同的协议和域名/IP,只修改端口) + // 构建跳转URL (保持相同的协议和域名/IP) const portainerUrl = `${window.location.protocol}//${currentHost}:9000`; const giteaUrl = `${window.location.protocol}//${currentHost}:3000`; const grafanaUrl = `${window.location.protocol}//${currentHost}:3001`; const jenkinsUrl = `${window.location.protocol}//${currentHost}:9095`; + const chatUrl = `${window.location.protocol}//${currentHost}/baseTalk`; // 设置链接的href属性和target属性,确保在新标签中打开 const portainerLink = document.getElementById('portainerLink'); const giteaLink = document.getElementById('giteaLink'); const grafanaLink = document.getElementById('grafanaLink'); const jenkinsLink = document.getElementById('jenkinsLink'); - + const chatLink = document.getElementById('chatLink'); if (portainerLink) { portainerLink.href = portainerUrl; portainerLink.target = '_blank'; @@ -73,6 +74,10 @@ window.addEventListener('load', function() { jenkinsLink.href = jenkinsUrl; jenkinsLink.target = '_blank'; } + if (chatLink) { + chatLink.href = chatUrl; + chatLink.target = '_blank'; + } }); // 粒子背景效果