diff --git a/src/pages/Game/LastPage.vue b/src/pages/Game/LastPage.vue index 19269c1..bb7bdef 100644 --- a/src/pages/Game/LastPage.vue +++ b/src/pages/Game/LastPage.vue @@ -37,7 +37,7 @@ function startAutoScroll() { if (autoScrollTimer.value) { clearTimeout(autoScrollTimer.value); } - + autoScrollTimer.value = setTimeout(() => { if (!isUserInteracting.value) { // 自动切换到下一个海报 @@ -55,7 +55,7 @@ function resetAutoScroll() { if (autoScrollTimer.value) { clearTimeout(autoScrollTimer.value); } - + // 1秒后重新开始自动轮播 setTimeout(() => { isUserInteracting.value = false; @@ -109,7 +109,12 @@ onMounted(() => { } // 开始自动轮播 - startAutoScroll(); + setTimeout(() => { + scrollToPoster(1); + startAutoScroll(); + + }, 2000); + // 添加海报容器的触摸和滚动事件监听 const posterContainer = document.querySelector('.poster-container'); @@ -136,7 +141,7 @@ function scrollToPoster(index: number) { left: posterContainer.scrollWidth * 0.5 * index, behavior: 'smooth' }); - + // 如果滚动到p2且还没播放动画,则播放动画 if (index === 1 && !hasP2AnimationPlayed.value) { hasP2AnimationPlayed.value = true; @@ -152,37 +157,46 @@ function scrollToPoster(index: number) { style="z-index: 0;position: absolute; inset: 0;height: 100%; width: 100%; pointer-events: none;"> + style="position: absolute;top: 13%;width: 80%;left: 11%; pointer-events:none;" + ref="main-logo" />
-
-
-
-
+
+
+
- - + + - @@ -206,7 +220,8 @@ function scrollToPoster(index: number) { style="width: 100%;bottom:7%;position: absolute;animation: line-in 0.5s ease-out 1s forwards;transform: translateX(-230%);">
-