接口调试完毕

This commit is contained in:
kron
2025-08-05 11:51:09 +08:00
parent 05f0c14920
commit 414bedf69f
7 changed files with 116 additions and 50 deletions

View File

@@ -1,29 +1,49 @@
<script setup>
import { ref, onMounted } from "vue";
const props = defineProps({
signin: {
type: Function,
data: {
type: Object,
default: () => {},
},
});
const bowOptions = ref({});
const targetOptions = ref({});
onMounted(() => {
const result = uni.getStorageSync("point-book-config");
(result.bowOption || []).forEach((item) => {
bowOptions.value[item.id] = item;
});
(result.targetOption || []).forEach((item) => {
targetOptions.value[item.id] = item;
});
});
</script>
<template>
<view class="container">
<view>
<view class="labels">
<text>反曲弓</text>
<text>5 </text>
<text>40 全环靶</text>
<text>{{
bowOptions[data.bowType] ? bowOptions[data.bowType].name : ""
}}</text>
<text>{{ data.distance }} </text>
<text>{{
targetOptions[data.targetType]
? targetOptions[data.targetType].name
: ""
}}</text>
</view>
<view>
<text>2025-07-10 14:00:00</text>
<text>{{ data.createAt }}</text>
</view>
</view>
<view>
<image src="../static/bow-target.png" mode="widthFix" />
<view class="aroow-amount">
<text></text>
<text>36</text>
<text>{{ data.arrows * data.groups }}</text>
<text></text>
</view>
</view>