This commit is contained in:
kron
2025-07-30 17:38:48 +08:00
parent f414b34f44
commit 0ebe34cc1e
30 changed files with 211 additions and 81 deletions

View File

@@ -24,6 +24,7 @@ const onSelect = (itemIndex, value) => {
else if (itemIndex === 1) distance.value = value;
else if (itemIndex === 2) bowtargetType.value = value;
else if (itemIndex === 3) amountGroup.value = value;
if (itemIndex < 3) expandIndex.value += 1;
if (
bowType.value &&
distance.value &&
@@ -44,6 +45,14 @@ const toEditPage = () => {
url: "/pages/point-book-edit",
});
};
onMounted(() => {
const pointBook = uni.getStorageSync("point-book");
if (pointBook) {
bowType.value = pointBook.bowType;
distance.value = pointBook.distance;
bowtargetType.value = pointBook.bowtargetType;
}
});
</script>
<template>
@@ -54,25 +63,31 @@ const toEditPage = () => {
title="计分本"
>
<view class="container">
<image src="../static/point-book-banner.png" mode="widthFix" />
<image
src="https://api.shelingxingqiu.com/attachment/2025-07-30/dbp9r4762kiaqykbpn.png"
mode="widthFix"
/>
<view>
<EditOption
:itemIndex="0"
:expand="expandIndex === 0"
:onExpand="onExpandChange"
:onSelect="onSelect"
:value="bowType"
/>
<EditOption
:itemIndex="1"
:expand="expandIndex === 1"
:onExpand="onExpandChange"
:onSelect="onSelect"
:value="distance + ''"
/>
<EditOption
:itemIndex="2"
:expand="expandIndex === 2"
:onExpand="onExpandChange"
:onSelect="onSelect"
:value="bowtargetType"
/>
<EditOption
:itemIndex="3"