This commit is contained in:
kron
2025-08-05 15:58:43 +08:00
parent 4b9fe45ad2
commit c678a3160a
8 changed files with 38 additions and 14 deletions

View File

@@ -3,7 +3,6 @@ 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 { getPointBookConfigAPI } from "@/apis";
const clickable = ref(false);
const expandIndex = ref(-1);
@@ -32,7 +31,6 @@ 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 &&
@@ -55,10 +53,6 @@ const toEditPage = () => {
});
};
onMounted(async () => {
const config = await getPointBookConfigAPI();
if (config) {
uni.setStorageSync("point-book-config", config);
}
const pointBook = uni.getStorageSync("point-book");
if (pointBook) {
bowType.value = pointBook.bowType;
@@ -112,6 +106,7 @@ onMounted(async () => {
</view>
<view :style="{ marginBottom: '20px' }">
<SButton
:rounded="50"
:disabled="!clickable"
:onClick="toEditPage"
disabledColor="#DDDDDD"