UI完善
This commit is contained in:
@@ -249,12 +249,12 @@ onMounted(async () => {
|
||||
}
|
||||
|
||||
.delete-btn {
|
||||
right: -24px;
|
||||
bottom: -24px;
|
||||
}
|
||||
|
||||
.drag-btn {
|
||||
left: 50%;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.drag-btn {
|
||||
right: -24px;
|
||||
bottom: -24px;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -86,7 +86,7 @@ const goBack = () => {
|
||||
<view
|
||||
class="content"
|
||||
:style="{
|
||||
height: isHome ? '100vh' : `calc(100vh - ${isIos ? 180 : 150}rpx)`,
|
||||
height: isHome ? '100vh' : `calc(100vh - ${isIos ? 190 : 160}rpx)`,
|
||||
overflow,
|
||||
}"
|
||||
>
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<script setup>
|
||||
import { ref, watch, onMounted, onUnmounted } from "vue";
|
||||
import { getPointBookConfigAPI } from "@/apis";
|
||||
const props = defineProps({
|
||||
itemIndex: {
|
||||
type: Number,
|
||||
@@ -88,7 +89,7 @@ watch(
|
||||
}
|
||||
}
|
||||
);
|
||||
onMounted(() => {
|
||||
const loadConfig = () => {
|
||||
const config = uni.getStorageSync("point-book-config");
|
||||
if (config) {
|
||||
if (props.itemIndex === 0) {
|
||||
@@ -97,6 +98,16 @@ onMounted(() => {
|
||||
data.value = config.targetOption;
|
||||
}
|
||||
}
|
||||
};
|
||||
onMounted(async () => {
|
||||
const config = uni.getStorageSync("point-book-config");
|
||||
if (config) {
|
||||
loadConfig();
|
||||
} else {
|
||||
const config = await getPointBookConfigAPI();
|
||||
uni.setStorageSync("point-book-config", config);
|
||||
loadConfig();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -247,6 +258,9 @@ onMounted(() => {
|
||||
width: 85px;
|
||||
color: #999999;
|
||||
}
|
||||
.container > view:first-child > text:nth-child(2) {
|
||||
font-weight: 500;
|
||||
}
|
||||
.container > view:first-child > button {
|
||||
width: 85px;
|
||||
display: flex;
|
||||
|
||||
@@ -52,7 +52,7 @@ onUnmounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<view class="container" :style="{ paddingTop: isIos ? '80rpx' : '50rpx' }">
|
||||
<view class="container" :style="{ paddingTop: isIos ? '90rpx' : '60rpx' }">
|
||||
<view class="back-btn" @click="onClick">
|
||||
<image v-if="whiteBackArrow" src="../static/back.png" mode="widthFix" />
|
||||
<image
|
||||
|
||||
@@ -71,6 +71,9 @@ onMounted(() => {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.container > view:first-child > view:last-child {
|
||||
font-weight: 500;
|
||||
}
|
||||
.labels {
|
||||
align-items: flex-end !important;
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -4,6 +4,7 @@ import { onLoad } from "@dcloudio/uni-app";
|
||||
import Container from "@/components/Container.vue";
|
||||
import BowTargetEdit from "@/components/BowTargetEdit.vue";
|
||||
import ScreenHint2 from "@/components/ScreenHint2.vue";
|
||||
import SButton from "@/components/SButton.vue";
|
||||
|
||||
import { getPointBookDetailAPI } from "@/apis";
|
||||
|
||||
@@ -31,6 +32,10 @@ const onSelect = (index) => {
|
||||
arrows.value = groups.value[index].list.filter((item) => item.x && item.y);
|
||||
};
|
||||
|
||||
const goBack = () => {
|
||||
uni.navigateBack();
|
||||
};
|
||||
|
||||
onLoad(async (options) => {
|
||||
if (options.id) {
|
||||
const result = await getPointBookDetailAPI(options.id);
|
||||
@@ -117,6 +122,9 @@ onLoad(async (options) => {
|
||||
</button>
|
||||
</view>
|
||||
<BowTargetEdit :src="targetSrc" :arrows="arrows" />
|
||||
<view :style="{ marginTop: '20px' }">
|
||||
<SButton :onClick="goBack" :rounded="50">关闭</SButton>
|
||||
</view>
|
||||
<ScreenHint2 :show="showTip || showTip2" :onClose="closeTip">
|
||||
<view class="tip-content">
|
||||
<block v-if="showTip">
|
||||
@@ -190,6 +198,9 @@ onLoad(async (options) => {
|
||||
color: #999;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.detail-data > view > text {
|
||||
font-weight: 500;
|
||||
}
|
||||
.question-mark {
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
|
||||
@@ -167,6 +167,7 @@ onMounted(() => {
|
||||
</view>
|
||||
<view :style="{ marginBottom: '20px' }">
|
||||
<SButton
|
||||
:rounded="50"
|
||||
:disabled="!clickable"
|
||||
:onClick="onSubmit"
|
||||
disabledColor="#DDDDDD"
|
||||
|
||||
Reference in New Issue
Block a user