feat:选择20cm、40cm全环靶

This commit is contained in:
2026-04-20 16:00:10 +08:00
parent 56650793e8
commit c1ff0cedad
5 changed files with 233 additions and 6 deletions

View File

@@ -24,6 +24,7 @@ import { MESSAGETYPESV2 } from "@/constants";
import useStore from "@/store";
import { storeToRefs } from "pinia";
import {onLoad} from "@dcloudio/uni-app";
const store = useStore();
const { user } = storeToRefs(store);
@@ -33,6 +34,13 @@ const total = 36;
const practiseResult = ref({});
const practiseId = ref("");
const showGuide = ref(false);
const targetType = ref(1);
onLoad((options) => {
if (options.target) {
targetType.value = Number(options.target);
}
});
const onReady = async () => {
await startPractiseAPI();
@@ -97,7 +105,7 @@ onMounted(async () => {
});
uni.$on("socket-inbox", onReceiveMessage);
uni.$on("share-image", onClickShare);
const result = await createPractiseAPI(total, 360);
const result = await createPractiseAPI(total, 360, targetType.value);
if (result) practiseId.value = result.id;
});