From d775c703cb4b17c055bcb3cf7b7ce68ca75045a0 Mon Sep 17 00:00:00 2001 From: kron Date: Tue, 15 Jul 2025 18:24:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=B8=E6=88=8F=E7=BB=93=E6=9D=9F=E5=B0=84?= =?UTF-8?q?=E7=AE=AD=E4=B8=8D=E5=86=8D=E6=92=AD=E6=94=BE=E5=A3=B0=E9=9F=B3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ShootProgress.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/ShootProgress.vue b/src/components/ShootProgress.vue index 80ddecd..f2464f3 100644 --- a/src/components/ShootProgress.vue +++ b/src/components/ShootProgress.vue @@ -45,6 +45,7 @@ const currentSound = ref(""); const currentRound = ref(props.currentRound); const currentRoundEnded = ref(!props.battleId); const halfTimeTip = ref(false); +const ended = ref(false); watch( () => props.tips, @@ -128,7 +129,7 @@ const updateSound = () => { }; async function onReceiveMessage(messages = []) { - if (!sound.value) return; + if (!sound.value || ended.value) return; messages.forEach((msg) => { if ( (props.battleId && msg.constructor === MESSAGETYPES.ShootResult) || @@ -154,6 +155,10 @@ async function onReceiveMessage(messages = []) { audioManager.play("比赛结束"); } else if (msg.constructor === MESSAGETYPES.FinalShoot) { audioManager.play("决金箭轮"); + } else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) { + ended.value = true; + } else if (msg.constructor === MESSAGETYPES.MatchOver) { + ended.value = true; } }); }