BUG修复
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user