update:优化精准射箭语音

This commit is contained in:
2026-08-20 17:57:22 +08:00
parent 6363dda204
commit 962596e510
6 changed files with 132 additions and 20 deletions
+18 -7
View File
@@ -37,6 +37,7 @@ const store = useStore();
const { user, device } = storeToRefs(store);
const start = ref(false);
const practiceStarting = ref(false);
const scores = ref([]);
const isSvip = ref(false);
const total = 12;
@@ -156,12 +157,18 @@ const beginPractise = async () => {
};
const onReady = async () => {
const result = await beginPractise();
if (!result) return;
scores.value = [];
isSvip.value = false;
start.value = true;
audioManager.play("练习开始");
if (practiceStarting.value || start.value) return;
practiceStarting.value = true;
try {
const result = await beginPractise();
if (!result) return;
scores.value = [];
isSvip.value = false;
start.value = true;
audioManager.play("练习开始");
} finally {
practiceStarting.value = false;
}
};
const onOver = async (message) => {
@@ -438,7 +445,11 @@ onBeforeUnmount(() => {
:onBack="exitPractise"
>
<view>
<TestDistance v-if="!start && !practiseResult.id" />
<TestDistance
v-if="!start && !practiseResult.id"
:autoStart="true"
@passed="onReady"
/>
<block v-else>
<ShootProgress
:tips="`${