个人12支练习流程修改
This commit is contained in:
@@ -26,6 +26,7 @@ const practiseResult = ref({});
|
||||
const practiseId = ref("");
|
||||
const showGuide = ref(false);
|
||||
const tips = ref("");
|
||||
const wait = ref(0);
|
||||
|
||||
const onReady = async () => {
|
||||
const result = await createPractiseAPI(total);
|
||||
@@ -54,8 +55,7 @@ async function onReceiveMessage(messages = []) {
|
||||
}, 3000);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
|
||||
} else if (msg.constructor === MESSAGETYPES.ShootSyncMePracticeID) {
|
||||
if (practiseId.value && practiseId.value === msg.practice.id) {
|
||||
setTimeout(() => {
|
||||
start.value = false;
|
||||
@@ -66,6 +66,10 @@ async function onReceiveMessage(messages = []) {
|
||||
};
|
||||
}, 1500);
|
||||
}
|
||||
} else if (msg.constructor === MESSAGETYPES.HalfTimeOver) {
|
||||
wait.value = msg.wait;
|
||||
if (msg.wait === 20) uni.$emit("update-ramain", 0);
|
||||
if (msg.wait === 0) uni.$emit("update-ramain", 60);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -122,6 +126,7 @@ onBeforeUnmount(() => {
|
||||
}轮`
|
||||
}`"
|
||||
:start="start"
|
||||
:total="60"
|
||||
/>
|
||||
<view class="user-row">
|
||||
<Avatar :src="user.avatar" :size="35" />
|
||||
@@ -135,6 +140,7 @@ onBeforeUnmount(() => {
|
||||
:totalRound="start ? total / 4 : 0"
|
||||
:currentRound="currentRound"
|
||||
:scores="scores"
|
||||
:stop="wait > 0"
|
||||
/>
|
||||
<ScorePanel2 :scores="scores.map((s) => s.ring)" />
|
||||
<ScoreResult
|
||||
|
||||
@@ -105,11 +105,7 @@ onBeforeUnmount(() => {
|
||||
<view>
|
||||
<TestDistance v-if="!practiseId" />
|
||||
<block v-if="practiseId">
|
||||
<ShootProgress
|
||||
:start="start"
|
||||
:tips="`请连续射${total}支箭`"
|
||||
:total="120"
|
||||
/>
|
||||
<ShootProgress :start="start" :tips="`请连续射${total}支箭`" />
|
||||
<view class="user-row">
|
||||
<Avatar :src="user.avatar" :size="35" />
|
||||
<BubbleTip v-if="showGuide" type="normal2">
|
||||
|
||||
Reference in New Issue
Block a user