update:代码备份

This commit is contained in:
2026-05-26 10:23:31 +08:00
parent 2a53f6739e
commit 2780d1a6df
5 changed files with 534 additions and 21 deletions

View File

@@ -36,6 +36,7 @@ const practiseId = ref("");
const showGuide = ref(false);
const tips = ref("");
const targetType = ref(1);
const trainingDifficultyRefreshEvent = "training-difficulty-refresh";
onLoad((options) => {
if (options.target) {
@@ -63,20 +64,9 @@ async function onReceiveMessage(msg) {
}
}
async function onComplete() {
const validArrows = (practiseResult.value.details || []).filter(
(a) => a.x !== -30 && a.y !== -30
);
if (validArrows.length === total) {
uni.navigateBack();
} else {
practiseId.value = "";
practiseResult.value = {};
start.value = false;
scores.value = [];
const result = await createPractiseAPI(total, 120);
if (result) practiseId.value = result.id;
}
function onComplete() {
uni.$emit(trainingDifficultyRefreshEvent);
uni.navigateBack();
}
async function onRetry() {