From 20bf9e1637c2ceacdd6117c9ab8da3ca5d7d3664 Mon Sep 17 00:00:00 2001 From: chenlimao Date: Thu, 14 May 2026 11:00:27 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E4=BC=98=E5=8C=96=E7=BB=93?= =?UTF-8?q?=E7=AE=97=E9=A1=B5=E9=9D=A2=E5=B1=95=E7=A4=BA=E6=95=88=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/friend-battle-result.vue | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/pages/friend-battle-result.vue b/src/pages/friend-battle-result.vue index 3af8748..63bcd88 100644 --- a/src/pages/friend-battle-result.vue +++ b/src/pages/friend-battle-result.vue @@ -208,13 +208,14 @@ onLoad(async (options) => { audioManager.play(ifWin.value ? "胜利" : "失败"); } - // 数据加载完成后显示覆盖动效层 - showOverlay.value = true; - - // 2.5 秒后自动关闭覆盖层 - overlayTimer.value = setTimeout(() => { - closeOverlay(); - }, 2500); + // 数据加载完成后延迟 1 秒再显示激励弹窗,避免进场时画面太杂 + setTimeout(() => { + showOverlay.value = true; + // 弹窗显示后 2.5 秒自动关闭 + overlayTimer.value = setTimeout(() => { + closeOverlay(); + }, 2500); + }, 1000); }); onBeforeUnmount(() => { @@ -267,7 +268,7 @@ async function exit() { } } catch { // 接口异常(如房间已解散)同样视为已不在房间 - uni.showToast({ title: '您已经不在当前房间', icon: 'none' }); + uni.showToast({ title: '您已经离开了房间', icon: 'none' }); setTimeout(() => { uni.reLaunch({ url: '/pages/index' }); }, 1500); @@ -880,8 +881,8 @@ function goBack() { position: fixed; inset: 0; z-index: 200; - /* rgba 写法等价于 background:#000 + opacity:0.7,且不影响子元素不透明度 */ - background: rgba(0, 0, 0, 0.7); + /* rgba 写法等价于 background:#000 + opacity:0.5,且不影响子元素不透明度 */ + background: rgba(0, 0, 0, 0.5); display: flex; flex-direction: column; align-items: center;