fix bug
This commit is contained in:
@@ -48,7 +48,7 @@ const onOver = async () => {
|
||||
|
||||
async function onReceiveMessage(messages = []) {
|
||||
messages.forEach((msg) => {
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID && start.value) {
|
||||
if (scores.value.length < total) {
|
||||
scores.value.push(msg.target);
|
||||
currentRound.value += 1;
|
||||
@@ -109,7 +109,11 @@ onBeforeUnmount(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Container :bgType="1" title="个人单组练习" :showBottom="!start && !scores.length">
|
||||
<Container
|
||||
:bgType="1"
|
||||
title="个人单组练习"
|
||||
:showBottom="!start && !scores.length"
|
||||
>
|
||||
<view>
|
||||
<TestDistance v-if="!practiseId" />
|
||||
<block v-if="practiseId">
|
||||
|
||||
@@ -46,7 +46,7 @@ const onOver = async () => {
|
||||
|
||||
async function onReceiveMessage(messages = []) {
|
||||
messages.forEach((msg) => {
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID) {
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMeArrowID && start.value) {
|
||||
if (scores.value.length < total) {
|
||||
scores.value.push(msg.target);
|
||||
if (practiseId && scores.value.length === total / 2) {
|
||||
@@ -109,7 +109,7 @@ onBeforeUnmount(() => {
|
||||
<ShootProgress
|
||||
:tips="`请连续射${total}支箭`"
|
||||
:start="start"
|
||||
:total="360"
|
||||
:total="0"
|
||||
:onStop="onOver"
|
||||
/>
|
||||
<view class="user-row">
|
||||
|
||||
Reference in New Issue
Block a user