添加练习超时,重新挑战
This commit is contained in:
@@ -105,10 +105,20 @@ const nextStep = async () => {
|
||||
};
|
||||
|
||||
const onClose = () => {
|
||||
setTimeout(() => {
|
||||
if (
|
||||
practiseResult.value.arrows &&
|
||||
practiseResult.value.arrows.length === total
|
||||
) {
|
||||
setTimeout(() => {
|
||||
practiseResult.value = {};
|
||||
step.value = 5;
|
||||
}, 500);
|
||||
} else {
|
||||
practiseResult.value = {};
|
||||
step.value = 5;
|
||||
}, 500);
|
||||
start.value = false;
|
||||
scores.value = [];
|
||||
step.value = 3;
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -225,6 +235,7 @@ const onClose = () => {
|
||||
<ScoreResult
|
||||
v-if="practiseResult.arrows"
|
||||
:rowCount="6"
|
||||
:total="total"
|
||||
:onClose="onClose"
|
||||
:result="practiseResult"
|
||||
:tipSrc="`../static/${
|
||||
|
||||
@@ -56,9 +56,17 @@ async function onReceiveMessage(messages = []) {
|
||||
}
|
||||
|
||||
async function onComplete() {
|
||||
// const result = await getHomeData();
|
||||
// if (result.user) updateUser(result.user);
|
||||
uni.navigateBack();
|
||||
if (
|
||||
practiseResult.value.arrows &&
|
||||
practiseResult.value.arrows.length === total
|
||||
) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
practiseResult.value = {};
|
||||
start.value = false;
|
||||
scores.value = [];
|
||||
currentRound.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
@@ -104,6 +112,7 @@ onUnmounted(() => {
|
||||
<ScoreResult
|
||||
v-if="practiseResult.arrows"
|
||||
:rowCount="6"
|
||||
:total="total"
|
||||
:onClose="onComplete"
|
||||
:result="practiseResult"
|
||||
:tipSrc="`../static/${
|
||||
|
||||
@@ -60,9 +60,17 @@ async function onReceiveMessage(messages = []) {
|
||||
}
|
||||
|
||||
async function onComplete() {
|
||||
// const result = await getHomeData();
|
||||
// if (result.user) updateUser(result.user);
|
||||
uni.navigateBack();
|
||||
if (
|
||||
practiseResult.value.arrows &&
|
||||
practiseResult.value.arrows.length === total
|
||||
) {
|
||||
uni.navigateBack();
|
||||
} else {
|
||||
practiseResult.value = {};
|
||||
start.value = false;
|
||||
scores.value = [];
|
||||
currentRound.value = 0;
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user