mirror of
http://junepve.top:3000/chicrobot/mainPage.git
synced 2026-10-29 23:41:29 +08:00
添加聊天跳转,采用本地font-aweesome
This commit is contained in:
1 parent
d31d35f81a
commit
5f5f730c98
2 files changed
+10
-5
No files matched your search
@@ -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';
|
||||
}
|
||||
});
|
||||
|
||||
// 粒子背景效果
|
||||
|
||||
Reference in new issue
Block a user