feat:选择20cm、40cm全环靶
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<script setup>
|
||||
import { ref, onMounted, onBeforeUnmount } from "vue";
|
||||
import { onShow } from "@dcloudio/uni-app";
|
||||
import { onLoad } from "@dcloudio/uni-app";
|
||||
import Container from "@/components/Container.vue";
|
||||
import ShootProgress from "@/components/ShootProgress.vue";
|
||||
import BowTarget from "@/components/BowTarget.vue";
|
||||
@@ -35,6 +35,13 @@ const practiseResult = ref({});
|
||||
const practiseId = ref("");
|
||||
const showGuide = ref(false);
|
||||
const tips = ref("");
|
||||
const targetType = ref(1);
|
||||
|
||||
onLoad((options) => {
|
||||
if (options.target) {
|
||||
targetType.value = Number(options.target);
|
||||
}
|
||||
});
|
||||
|
||||
const onReady = async () => {
|
||||
await startPractiseAPI();
|
||||
@@ -84,7 +91,7 @@ onMounted(async () => {
|
||||
});
|
||||
uni.$on("socket-inbox", onReceiveMessage);
|
||||
uni.$on("share-image", onClickShare);
|
||||
const result = await createPractiseAPI(total, 120);
|
||||
const result = await createPractiseAPI(total, 120, targetType.value);
|
||||
if (result) practiseId.value = result.id;
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user