This commit is contained in:
kron
2025-08-06 18:36:30 +08:00
parent 66dea2b199
commit e12252beed
6 changed files with 76 additions and 11 deletions

View File

@@ -432,3 +432,7 @@ export const getPointBookListAPI = async (
export const getPointBookDetailAPI = async (id) => {
return request("GET", `/user/score/sheet/detail?id=${id}`);
};
export const getPractiseDataAPI = async () => {
return request("GET", "/user/score/sheet/statistics");
};

View File

@@ -304,7 +304,7 @@ onMounted(async () => {
.bowtarget-items > view,
.amount-items > view {
width: 20vw;
height: 14vw;
height: 12vw;
border-radius: 10px;
border: 2px solid #eeeeee;
margin-bottom: 2vw;

View File

@@ -3,6 +3,7 @@ import { ref, onMounted, onUnmounted } from "vue";
import Container from "@/components/Container.vue";
import EditOption from "@/components/EditOption.vue";
import SButton from "@/components/SButton.vue";
import { getPractiseDataAPI } from "@/apis";
const clickable = ref(false);
const expandIndex = ref(-1);
@@ -10,6 +11,9 @@ const bowType = ref({});
const distance = ref(0);
const bowtargetType = ref("");
const amountGroup = ref("");
const days = ref(0);
const arrows = ref(0);
const onExpandChange = (index, expand) => {
if (expandIndex.value !== -1) {
expandIndex.value = -1;
@@ -59,6 +63,11 @@ onMounted(async () => {
distance.value = pointBook.distance;
bowtargetType.value = pointBook.bowtargetType;
}
const result = await getPractiseDataAPI();
if (result) {
days.value = result.total_day || 0;
arrows.value = result.total_arrow || 0;
}
});
</script>
@@ -70,10 +79,26 @@ onMounted(async () => {
title="计分本"
>
<view class="container">
<image
src="https://api.shelingxingqiu.com/attachment/2025-07-30/dbp9r4762kiaqykbpn.png"
mode="widthFix"
/>
<view class="header">
<image
src="https://static.shelingxingqiu.com/attachment/2025-08-06/dbv8w5ak76hozbfpy2.png"
mode="widthFix"
/>
<view>
<view>
<text>{{ days }}</text>
<text></text>
</view>
<text>训练天数</text>
</view>
<view>
<view>
<text>{{ arrows }}</text>
<text></text>
</view>
<text>训练箭数</text>
</view>
</view>
<view>
<EditOption
:itemIndex="0"
@@ -130,13 +155,36 @@ onMounted(async () => {
flex-direction: column;
align-items: center;
}
.container > image {
.container > view:nth-child(2) {
margin: 0 10px;
}
.header {
width: 100%;
height: 27vw;
position: relative;
display: flex;
align-items: center;
color: #ffffffc7;
font-size: 14px;
}
.header > image {
position: absolute;
width: 100%;
border: 2px solid #fff;
box-sizing: border-box;
border-radius: 10px;
}
.container > view:nth-child(2) {
margin: 0 10px;
.header > view {
position: relative;
}
.header > view:nth-child(2) {
margin-left: 7vw;
margin-right: 7vw;
}
.header > view > view > text:first-child {
font-size: 27px;
font-weight: 500;
margin-right: 5px;
color: #fff;
}
</style>

View File

@@ -62,20 +62,21 @@ onLoad(async (options) => {
v-for="(_, index) in groups"
:key="index"
@click="onSelect(index)"
:style="{ borderColor: selectedIndex === index ? '#FED847' : '#fff' }"
>
<text
:style="{
color: selectedIndex === index ? '#FF8709' : '#333',
color: selectedIndex === index ? '#000' : '#333',
fontSize: selectedIndex === index ? '15px' : '13px',
letterSpacing: index !== 0 ? '2px' : '0',
}"
>{{ index === 0 ? "全部" : `${index}` }}</text
>
<image
<!-- <image
src="../static/s-triangle.png"
mode="widthFix"
:style="{ bottom: selectedIndex !== index ? '0' : '-5px' }"
/>
/> -->
</view>
</view>
<view class="detail-data">
@@ -159,6 +160,8 @@ onLoad(async (options) => {
color: transparent;
}
.tab-bar > view {
box-sizing: border-box;
border: 2px solid #fff;
border-radius: 10px;
background-color: #fff;
width: 24vw;

View File

@@ -89,6 +89,7 @@ const toDetailPage = (id) => {
>
<PointRecord :data="item" />
</view>
<view class="no-data" v-if="list.length === 0">暂无数据</view>
</ScrollList>
</view>
<SModal
@@ -183,4 +184,13 @@ const toDetailPage = (id) => {
margin-bottom: 0;
height: calc(100% - 70px);
}
.no-data {
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
color: #999999;
font-size: 14px;
}
</style>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB