|
|
@@ -5,7 +5,7 @@
|
|
|
<a
|
|
|
v-for="(link, linkIndex) in sortedLinks(currentGroup.links)"
|
|
|
:key="link.name"
|
|
|
- :href="link.autoLogin ? getAutoLoginUrl(link.autoLoginEndpoint) : (link.url.startsWith('http') ? link.url : `http://${link.url}`)"
|
|
|
+ :href="link.autoLogin ? '#' : (link.url.startsWith('http') ? link.url : `http://${link.url}`)"
|
|
|
target="_blank"
|
|
|
rel="noopener noreferrer"
|
|
|
class="app-tile"
|
|
|
@@ -13,7 +13,7 @@
|
|
|
:class="{ 'focused': focusedIndex === linkIndex }"
|
|
|
@mouseenter="focusedIndex = linkIndex"
|
|
|
@mouseleave="focusedIndex = -1"
|
|
|
- @click="handleLinkClick($event, link)"
|
|
|
+ @click.prevent="handleLinkClick($event, link)"
|
|
|
>
|
|
|
<div class="tile-background" :style="getBackgroundStyle(link, linkIndex)"></div>
|
|
|
<div class="tile-content">
|
|
|
@@ -80,10 +80,26 @@ const switchTab = (index) => {
|
|
|
}
|
|
|
|
|
|
const handleLinkClick = (event, link) => {
|
|
|
- // 如果需要自动登录,已经通过 href 跳转到后端端点
|
|
|
- // 这里可以添加额外的处理逻辑
|
|
|
if (link.autoLogin) {
|
|
|
- console.log('自动登录链接:', link.name);
|
|
|
+ console.log('========================================');
|
|
|
+ console.log('[前端] 检测到自动登录链接');
|
|
|
+ console.log('[前端] 链接名称:', link.name);
|
|
|
+ console.log('[前端] 自动登录端点:', link.autoLoginEndpoint);
|
|
|
+
|
|
|
+ const autoLoginUrl = getAutoLoginUrl(link.autoLoginEndpoint);
|
|
|
+ console.log('[前端] 完整自动登录URL:', autoLoginUrl);
|
|
|
+ console.log('[前端] 准备跳转到后端端点...');
|
|
|
+ console.log('========================================');
|
|
|
+
|
|
|
+ // 阻止默认行为并跳转到后端端点
|
|
|
+ event.preventDefault();
|
|
|
+ event.stopPropagation();
|
|
|
+
|
|
|
+ // 直接跳转,让后端处理
|
|
|
+ window.location.href = autoLoginUrl;
|
|
|
+ } else {
|
|
|
+ // 普通链接,允许默认行为
|
|
|
+ console.log('[前端] 普通链接:', link.name, link.url);
|
|
|
}
|
|
|
}
|
|
|
|