BUG修复

This commit is contained in:
kron
2025-08-20 18:30:02 +08:00
parent f19b9b1f9d
commit 70b3a25369
3 changed files with 38 additions and 48 deletions

View File

@@ -77,6 +77,7 @@ async function onReceiveMessage(messages = []) {
audioManager.play("比赛结束");
} else if (msg.constructor === MESSAGETYPES.FinalShoot) {
audioManager.play("决金箭轮");
tips.value = '即将开始...'
} else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
ended.value = true;
} else if (msg.constructor === MESSAGETYPES.MatchOver) {

View File

@@ -1,5 +1,5 @@
<script setup>
import { ref, watch, onMounted, onUnmounted } from "vue";
import { ref, onMounted, onUnmounted } from "vue";
const props = defineProps({
isFinal: {
type: Boolean,
@@ -26,7 +26,7 @@ const props = defineProps({
default: () => {},
},
});
const count = ref(3);
const count = ref(props.isFinal ? 10 : 3);
const tiemr = ref(null);
function startCount() {
if (tiemr.value) clearInterval(tiemr.value);
@@ -37,13 +37,6 @@ function startCount() {
} else count.value -= 1;
}, 1000);
}
watch(
() => [props.isFinal, props.roundData],
([n_isFinal, n_roundData]) => {
count.value = n_isFinal ? 10 : 3;
startCount();
}
);
onMounted(() => {
startCount();
});
@@ -54,7 +47,7 @@ onUnmounted(() => {
<template>
<view class="round-end-tip">
<text>{{ round }}轮射结束</text>
<text>{{ round }}轮射结束</text>
<block v-if="!isFinal">
<view class="point-view1" v-if="bluePoint !== 0 || redPoint !== 0">
<text>本轮蓝队</text>