diff --git a/src/components/EditOption.vue b/src/components/EditOption.vue
index 91af9c8..e9471da 100644
--- a/src/components/EditOption.vue
+++ b/src/components/EditOption.vue
@@ -72,13 +72,14 @@ const onMeterChange = (e) => {
props.onSelect(props.itemIndex, e.detail.value);
};
const onSetsChange = (e) => {
- sets.value = e.detail.value;
+ if (!e.detail.value) return;
+ sets.value = Math.min(30, Number(e.detail.value));
if (!sets.value) return;
if (secondSelectIndex.value !== -1) {
props.onSelect(
props.itemIndex,
`${sets.value}/${
- secondSelectIndex === 99
+ secondSelectIndex.value === 99
? arrowAmount.value
: groupArrows[secondSelectIndex.value]
}`
@@ -86,7 +87,8 @@ const onSetsChange = (e) => {
}
};
const onArrowAmountChange = (e) => {
- arrowAmount.value = e.detail.value;
+ if (!e.detail.value) return;
+ arrowAmount.value = Math.min(60, Number(e.detail.value));
if (!arrowAmount.value) return;
if (selectedIndex.value !== -1) {
props.onSelect(
@@ -178,22 +180,21 @@ onMounted(async () => {
}"
>
onExpand(itemIndex, !expand)">
- {{
- itemIndex !== 3 ? itemTexts[itemIndex] : "选择组"
- }}
+
- {{
+ {{
+ itemIndex !== 3 ? itemTexts[itemIndex] : "选择组"
+ }}
+ {{
value || itemTexts[itemIndex]
}}
- {{
+ {{
value && value > 0 ? value + "米" : itemTexts[itemIndex]
}}
- {{
+ {{
value || itemTexts[itemIndex]
}}
- {{
- formatSetAndAmount
- }}
+ {{ formatSetAndAmount }}
@@ -275,17 +278,23 @@ onMounted(async () => {
}"
>
(selectedIndex = 99)"
- @change="onSetsChange"
+ @blur="onSetsChange"
/>
组
选择每组的箭数
@@ -306,11 +315,13 @@ onMounted(async () => {
}"
>
(secondSelectIndex = 99)"
- @change="onArrowAmountChange"
+ @blur="onArrowAmountChange"
/>
箭
@@ -337,9 +348,8 @@ onMounted(async () => {
justify-content: space-between;
height: 50px;
}
-.container > view:first-child > text:first-child {
+.container > view:first-child > view:first-child {
width: 85px;
- color: #999999;
}
.container > view:first-child > text:nth-child(2) {
font-weight: 500;
diff --git a/src/components/Header.vue b/src/components/Header.vue
index 5c9c481..a06e04a 100644
--- a/src/components/Header.vue
+++ b/src/components/Header.vue
@@ -76,6 +76,9 @@ onMounted(() => {
currentPage.route === "pages/point-book-detail"
) {
pointBook.value = uni.getStorageSync("point-book");
+ if (!pointBook.value) {
+ pointBook.value = uni.getStorageSync("last-point-book");
+ }
}
if (
currentPage.route === "pages/team-battle" ||
diff --git a/src/components/PointRecord.vue b/src/components/PointRecord.vue
index 74bde6a..bf63d91 100644
--- a/src/components/PointRecord.vue
+++ b/src/components/PointRecord.vue
@@ -19,6 +19,19 @@ const targetOptions = ref({});
const canSwipe = computed(() => typeof props.onRemove === "function");
const toDetailPage = () => {
+ const config = uni.getStorageSync("point-book-config");
+ const bowType = config.bowOption.find(
+ (item) => item.id === props.data.bowType
+ );
+ const bowtargetType = config.targetOption.find(
+ (item) => item.id === props.data.targetType
+ );
+ uni.setStorageSync("point-book", {
+ bowType,
+ bowtargetType,
+ distance: props.data.distance,
+ amountGroup: props.data.groups,
+ });
uni.navigateTo({
url: `/pages/point-book-detail?id=${props.data.id}`,
});
diff --git a/src/pages/point-book-create.vue b/src/pages/point-book-create.vue
index b63941e..fa6b94d 100644
--- a/src/pages/point-book-create.vue
+++ b/src/pages/point-book-create.vue
@@ -43,7 +43,7 @@ const toEditPage = () => {
bowtargetType.value &&
amountGroup.value
) {
- uni.setStorageSync("point-book", {
+ uni.setStorageSync("last-point-book", {
bowType: bowType.value,
distance: distance.value,
bowtargetType: bowtargetType.value,
@@ -67,7 +67,7 @@ const toEditPage = () => {
// }
// });
onMounted(async () => {
- const pointBook = uni.getStorageSync("point-book");
+ const pointBook = uni.getStorageSync("last-point-book");
if (pointBook) {
bowType.value = pointBook.bowType;
distance.value = pointBook.distance;
diff --git a/src/pages/point-book-detail-share.vue b/src/pages/point-book-detail-share.vue
index aa5dba5..186577e 100644
--- a/src/pages/point-book-detail-share.vue
+++ b/src/pages/point-book-detail-share.vue
@@ -230,7 +230,7 @@ const targetTypeName = computed(() => {
落点稳定性说明
通过计算每支箭与其他箭的平均距离衡一量射箭的稳定性,数字越小则说明射箭越稳定。该数据只能在用户标记落点的情况下生成。通过计算每支箭与其他箭的平均距离衡量射箭的稳定性,数字越小则说明射箭越稳定。该数据只能在用户标记落点的情况下生成。
@@ -347,7 +347,7 @@ const targetTypeName = computed(() => {
}
.tip-content {
width: 100%;
- padding: 25px;
+ padding: 50rpx 44rpx;
display: flex;
flex-direction: column;
color: #000;
@@ -367,7 +367,7 @@ const targetTypeName = computed(() => {
display: flex;
flex-direction: column;
padding: 20rpx;
- padding-top: 30rpx;
+ padding-top: 40rpx;
font-size: 24rpx;
color: #999999;
}
@@ -376,9 +376,10 @@ const targetTypeName = computed(() => {
justify-content: center;
}
.ring-text-groups > view > view:first-child:nth-last-child(2) {
- margin-left: 20rpx;
+ margin: 0 30rpx;
width: 90rpx;
text-align: center;
+ justify-content: flex-end;
font-size: 20rpx;
display: flex;
color: #999;
@@ -391,21 +392,23 @@ const targetTypeName = computed(() => {
> view:first-child:nth-last-child(2)
> text:nth-child(2) {
font-size: 40rpx;
+ /* min-width: 45rpx; */
color: #666;
margin-right: 6rpx;
margin-top: -5rpx;
}
.ring-text-groups > view > view:last-child {
- flex: 1;
- display: grid;
- grid-template-columns: repeat(6, auto);
- grid-gap: 10rpx;
+ width: 80%;
+ display: flex;
+ flex-wrap: wrap;
margin-bottom: 30rpx;
}
.ring-text-groups > view > view:last-child > text {
- width: 1fr;
+ width: 16.6%;
text-align: center;
margin-bottom: 10rpx;
+ font-weight: 500;
+ font-size: 26rpx;
}
.notes-input {
width: calc(100% - 40rpx);
diff --git a/src/pages/point-book-detail.vue b/src/pages/point-book-detail.vue
index 2ce93f8..10e5590 100644
--- a/src/pages/point-book-detail.vue
+++ b/src/pages/point-book-detail.vue
@@ -93,7 +93,7 @@ const shareImage = async () => {
onLoad(async (options) => {
if (options.id) {
- const result = await getPointBookDetailAPI(options.id || 195);
+ const result = await getPointBookDetailAPI(options.id || 209);
record.value = result;
notes.value = result.remark || "";
const config = uni.getStorageSync("point-book-config");
@@ -259,9 +259,6 @@ onShareTimeline(async () => {
(selectedIndex === 0 && index !== 0) ||
(selectedIndex !== 0 && index === selectedIndex)
"
- :style="{
- marginLeft: selectedIndex === 0 && index !== 0 ? '20rpx' : '0',
- }"
>
{
落点稳定性说明
通过计算每支箭与其他箭的平均距离衡一量射箭的稳定性,数字越小则说明射箭越稳定。该数据只能在用户标记落点的情况下生成。通过计算每支箭与其他箭的平均距离衡量射箭的稳定性,数字越小则说明射箭越稳定。该数据只能在用户标记落点的情况下生成。
@@ -440,7 +437,7 @@ onShareTimeline(async () => {
}
.tip-content {
width: 100%;
- padding: 25px;
+ padding: 50rpx 44rpx;
display: flex;
flex-direction: column;
color: #000;
@@ -488,7 +485,7 @@ onShareTimeline(async () => {
display: flex;
flex-direction: column;
padding: 20rpx;
- padding-top: 30rpx;
+ padding-top: 40rpx;
font-size: 24rpx;
color: #999999;
}
@@ -497,9 +494,10 @@ onShareTimeline(async () => {
justify-content: center;
}
.ring-text-groups > view > view:first-child:nth-last-child(2) {
- margin-left: 20rpx;
+ margin: 0 30rpx;
width: 90rpx;
text-align: center;
+ justify-content: flex-end;
font-size: 20rpx;
display: flex;
color: #999;
@@ -512,19 +510,19 @@ onShareTimeline(async () => {
> view:first-child:nth-last-child(2)
> text:nth-child(2) {
font-size: 40rpx;
+ /* min-width: 45rpx; */
color: #666;
margin-right: 6rpx;
margin-top: -5rpx;
}
.ring-text-groups > view > view:last-child {
- flex: 1;
- display: grid;
- grid-template-columns: repeat(6, auto);
- grid-gap: 10rpx;
+ width: 80%;
+ display: flex;
+ flex-wrap: wrap;
margin-bottom: 30rpx;
}
.ring-text-groups > view > view:last-child > text {
- width: 1fr;
+ width: 16.6%;
text-align: center;
margin-bottom: 10rpx;
font-weight: 500;
diff --git a/src/pages/point-book-edit.vue b/src/pages/point-book-edit.vue
index c985ba6..0771c94 100644
--- a/src/pages/point-book-edit.vue
+++ b/src/pages/point-book-edit.vue
@@ -44,7 +44,7 @@ const onSubmit = async () => {
currentGroup.value++;
currentArrow.value = 0;
} else {
- const pointBook = uni.getStorageSync("point-book");
+ const pointBook = uni.getStorageSync("last-point-book");
const res = await savePointBookAPI(
pointBook.bowType.id,
pointBook.distance,
@@ -75,7 +75,7 @@ const onEditDone = (arrow) => {
};
onMounted(() => {
- const pointBook = uni.getStorageSync("point-book");
+ const pointBook = uni.getStorageSync("last-point-book");
if (pointBook.bowtargetType) {
bowtarget.value = pointBook.bowtargetType;
if (bowtarget.value.id > 3) {
diff --git a/src/pages/point-book.vue b/src/pages/point-book.vue
index 0148bd4..fb88f43 100644
--- a/src/pages/point-book.vue
+++ b/src/pages/point-book.vue
@@ -150,6 +150,7 @@ watch(
);
onShow(async () => {
+ uni.removeStorageSync("point-book");
if (user.value.id) loadData();
});