UI更新
This commit is contained in:
@@ -432,3 +432,7 @@ export const getPointBookListAPI = async (
|
|||||||
export const getPointBookDetailAPI = async (id) => {
|
export const getPointBookDetailAPI = async (id) => {
|
||||||
return request("GET", `/user/score/sheet/detail?id=${id}`);
|
return request("GET", `/user/score/sheet/detail?id=${id}`);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export const getPractiseDataAPI = async () => {
|
||||||
|
return request("GET", "/user/score/sheet/statistics");
|
||||||
|
};
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ onMounted(async () => {
|
|||||||
.bowtarget-items > view,
|
.bowtarget-items > view,
|
||||||
.amount-items > view {
|
.amount-items > view {
|
||||||
width: 20vw;
|
width: 20vw;
|
||||||
height: 14vw;
|
height: 12vw;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
border: 2px solid #eeeeee;
|
border: 2px solid #eeeeee;
|
||||||
margin-bottom: 2vw;
|
margin-bottom: 2vw;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { ref, onMounted, onUnmounted } from "vue";
|
|||||||
import Container from "@/components/Container.vue";
|
import Container from "@/components/Container.vue";
|
||||||
import EditOption from "@/components/EditOption.vue";
|
import EditOption from "@/components/EditOption.vue";
|
||||||
import SButton from "@/components/SButton.vue";
|
import SButton from "@/components/SButton.vue";
|
||||||
|
import { getPractiseDataAPI } from "@/apis";
|
||||||
|
|
||||||
const clickable = ref(false);
|
const clickable = ref(false);
|
||||||
const expandIndex = ref(-1);
|
const expandIndex = ref(-1);
|
||||||
@@ -10,6 +11,9 @@ const bowType = ref({});
|
|||||||
const distance = ref(0);
|
const distance = ref(0);
|
||||||
const bowtargetType = ref("");
|
const bowtargetType = ref("");
|
||||||
const amountGroup = ref("");
|
const amountGroup = ref("");
|
||||||
|
const days = ref(0);
|
||||||
|
const arrows = ref(0);
|
||||||
|
|
||||||
const onExpandChange = (index, expand) => {
|
const onExpandChange = (index, expand) => {
|
||||||
if (expandIndex.value !== -1) {
|
if (expandIndex.value !== -1) {
|
||||||
expandIndex.value = -1;
|
expandIndex.value = -1;
|
||||||
@@ -59,6 +63,11 @@ onMounted(async () => {
|
|||||||
distance.value = pointBook.distance;
|
distance.value = pointBook.distance;
|
||||||
bowtargetType.value = pointBook.bowtargetType;
|
bowtargetType.value = pointBook.bowtargetType;
|
||||||
}
|
}
|
||||||
|
const result = await getPractiseDataAPI();
|
||||||
|
if (result) {
|
||||||
|
days.value = result.total_day || 0;
|
||||||
|
arrows.value = result.total_arrow || 0;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -70,10 +79,26 @@ onMounted(async () => {
|
|||||||
title="计分本"
|
title="计分本"
|
||||||
>
|
>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<image
|
<view class="header">
|
||||||
src="https://api.shelingxingqiu.com/attachment/2025-07-30/dbp9r4762kiaqykbpn.png"
|
<image
|
||||||
mode="widthFix"
|
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>
|
<view>
|
||||||
<EditOption
|
<EditOption
|
||||||
:itemIndex="0"
|
:itemIndex="0"
|
||||||
@@ -130,13 +155,36 @@ onMounted(async () => {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: center;
|
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%;
|
width: 100%;
|
||||||
border: 2px solid #fff;
|
border: 2px solid #fff;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
.container > view:nth-child(2) {
|
.header > view {
|
||||||
margin: 0 10px;
|
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>
|
</style>
|
||||||
|
|||||||
@@ -62,20 +62,21 @@ onLoad(async (options) => {
|
|||||||
v-for="(_, index) in groups"
|
v-for="(_, index) in groups"
|
||||||
:key="index"
|
:key="index"
|
||||||
@click="onSelect(index)"
|
@click="onSelect(index)"
|
||||||
|
:style="{ borderColor: selectedIndex === index ? '#FED847' : '#fff' }"
|
||||||
>
|
>
|
||||||
<text
|
<text
|
||||||
:style="{
|
:style="{
|
||||||
color: selectedIndex === index ? '#FF8709' : '#333',
|
color: selectedIndex === index ? '#000' : '#333',
|
||||||
fontSize: selectedIndex === index ? '15px' : '13px',
|
fontSize: selectedIndex === index ? '15px' : '13px',
|
||||||
letterSpacing: index !== 0 ? '2px' : '0',
|
letterSpacing: index !== 0 ? '2px' : '0',
|
||||||
}"
|
}"
|
||||||
>{{ index === 0 ? "全部" : `第${index}组` }}</text
|
>{{ index === 0 ? "全部" : `第${index}组` }}</text
|
||||||
>
|
>
|
||||||
<image
|
<!-- <image
|
||||||
src="../static/s-triangle.png"
|
src="../static/s-triangle.png"
|
||||||
mode="widthFix"
|
mode="widthFix"
|
||||||
:style="{ bottom: selectedIndex !== index ? '0' : '-5px' }"
|
:style="{ bottom: selectedIndex !== index ? '0' : '-5px' }"
|
||||||
/>
|
/> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="detail-data">
|
<view class="detail-data">
|
||||||
@@ -159,6 +160,8 @@ onLoad(async (options) => {
|
|||||||
color: transparent;
|
color: transparent;
|
||||||
}
|
}
|
||||||
.tab-bar > view {
|
.tab-bar > view {
|
||||||
|
box-sizing: border-box;
|
||||||
|
border: 2px solid #fff;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
width: 24vw;
|
width: 24vw;
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ const toDetailPage = (id) => {
|
|||||||
>
|
>
|
||||||
<PointRecord :data="item" />
|
<PointRecord :data="item" />
|
||||||
</view>
|
</view>
|
||||||
|
<view class="no-data" v-if="list.length === 0">暂无数据</view>
|
||||||
</ScrollList>
|
</ScrollList>
|
||||||
</view>
|
</view>
|
||||||
<SModal
|
<SModal
|
||||||
@@ -183,4 +184,13 @@ const toDetailPage = (id) => {
|
|||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
height: calc(100% - 70px);
|
height: calc(100% - 70px);
|
||||||
}
|
}
|
||||||
|
.no-data {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 3.2 KiB |
Reference in New Issue
Block a user