update:优化精准射箭语音
This commit is contained in:
@@ -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="`${
|
||||
|
||||
Reference in New Issue
Block a user