From 4347dea41eb6ab1814337bfc2a3d828f0d43c38b Mon Sep 17 00:00:00 2001 From: kron Date: Thu, 21 Aug 2025 16:15:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=97=A0=E6=95=88=E5=B0=84?= =?UTF-8?q?=E5=87=BB=E9=80=9A=E7=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/HeaderProgress.vue | 7 ++++++- src/components/ShootProgress.vue | 5 +++++ src/constants.js | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/HeaderProgress.vue b/src/components/HeaderProgress.vue index 7f0a346..3b03cbc 100644 --- a/src/components/HeaderProgress.vue +++ b/src/components/HeaderProgress.vue @@ -58,6 +58,11 @@ async function onReceiveMessage(messages = []) { : "未上靶"; audioManager.play(currentSound.value); } + } else if (msg.constructor === MESSAGETYPES.InvalidShot) { + uni.showToast({ + title: "无效射击", + icon: "none", + }); } else if (msg.constructor === MESSAGETYPES.AllReady) { currentRoundEnded.value = true; audioManager.play("比赛开始"); @@ -77,7 +82,7 @@ async function onReceiveMessage(messages = []) { audioManager.play("比赛结束"); } else if (msg.constructor === MESSAGETYPES.FinalShoot) { audioManager.play("决金箭轮"); - tips.value = '即将开始...' + tips.value = "即将开始..."; } else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) { ended.value = true; } else if (msg.constructor === MESSAGETYPES.MatchOver) { diff --git a/src/components/ShootProgress.vue b/src/components/ShootProgress.vue index d8ae719..c771f89 100644 --- a/src/components/ShootProgress.vue +++ b/src/components/ShootProgress.vue @@ -135,6 +135,11 @@ async function onReceiveMessage(messages = []) { : "未上靶"; audioManager.play(currentSound.value); } + } else if (msg.constructor === MESSAGETYPES.InvalidShot) { + uni.showToast({ + title: "无效射击", + icon: "none", + }); } else if (msg.constructor === MESSAGETYPES.AllReady) { audioManager.play("比赛开始"); } else if (msg.constructor === MESSAGETYPES.MeleeAllReady) { diff --git a/src/constants.js b/src/constants.js index 16fc062..2770a42 100644 --- a/src/constants.js +++ b/src/constants.js @@ -23,6 +23,7 @@ export const MESSAGETYPES = { RankUpdate: 1121669910, LvlUpdate: 3958625354, TeamUpdate: 4168086616, + InvalidShot: 4468086617, }; export const topThreeColors = ["#FFD947", "#D2D2D2", "#FFA515"];