This commit is contained in:
kron
2026-01-15 15:51:16 +08:00
parent a2674aae5b
commit 75c7df0e9c
2 changed files with 8 additions and 4 deletions

View File

@@ -48,7 +48,7 @@ const onOver = async () => {
async function onReceiveMessage(messages = []) { async function onReceiveMessage(messages = []) {
messages.forEach((msg) => { messages.forEach((msg) => {
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) { if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID && start.value) {
if (scores.value.length < total) { if (scores.value.length < total) {
scores.value.push(msg.target); scores.value.push(msg.target);
currentRound.value += 1; currentRound.value += 1;
@@ -109,7 +109,11 @@ onBeforeUnmount(() => {
</script> </script>
<template> <template>
<Container :bgType="1" title="个人单组练习" :showBottom="!start && !scores.length"> <Container
:bgType="1"
title="个人单组练习"
:showBottom="!start && !scores.length"
>
<view> <view>
<TestDistance v-if="!practiseId" /> <TestDistance v-if="!practiseId" />
<block v-if="practiseId"> <block v-if="practiseId">

View File

@@ -46,7 +46,7 @@ const onOver = async () => {
async function onReceiveMessage(messages = []) { async function onReceiveMessage(messages = []) {
messages.forEach((msg) => { messages.forEach((msg) => {
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) { if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID && start.value) {
if (scores.value.length < total) { if (scores.value.length < total) {
scores.value.push(msg.target); scores.value.push(msg.target);
if (practiseId && scores.value.length === total / 2) { if (practiseId && scores.value.length === total / 2) {
@@ -109,7 +109,7 @@ onBeforeUnmount(() => {
<ShootProgress <ShootProgress
:tips="`请连续射${total}支箭`" :tips="`请连续射${total}支箭`"
:start="start" :start="start"
:total="360" :total="0"
:onStop="onOver" :onStop="onOver"
/> />
<view class="user-row"> <view class="user-row">