修复bug

This commit is contained in:
zhouyanli
2026-08-17 18:02:46 +08:00
parent a4c7318ff6
commit 1710cba509
6 changed files with 69 additions and 69 deletions

View File

@@ -31,7 +31,9 @@
<view class="form-section">
<view class="form-item">
<view class="label">访客姓名</view>
<view class="label">
<text class="required">*</text>访客姓名
</view>
<input class="input" placeholder="请输入访客姓名" v-model="form.name" maxlength="20" @input="onNameInput" />
</view>
<view class="form-item">
@@ -65,9 +67,7 @@
</view>
<view class="form-item">
<view class="label">
<text class="required">*</text>随行人数
</view>
<view class="label">随行人数</view>
<input class="input" placeholder="请输入随行人数" v-model="form.peopleNum" type="number" maxlength="2" @input="onPeopleNumInput" />
</view>
</view>
@@ -196,7 +196,7 @@ const pageFixed = ref(false);
try {
const res = await getHouseList({ pageNum: 1, pageSize: 10 })
if (res.code === 200) {
addressList.value = (res.rows || []).map(item => ({
addressList.value = (res.data || []).map(item => ({
...item,
label: `${item.buildingName || ''}${item.unitNo}-${item.floorNo || ''}-${item.houseNo || ''}`.trim()
}))
@@ -391,13 +391,13 @@ const pageFixed = ref(false);
});
return;
}
if (form.peopleNum === '' || form.peopleNum === null || form.peopleNum === undefined) {
uni.showToast({
title: '请输入随行人数',
icon: 'none'
});
return;
}
// if (form.peopleNum === '' || form.peopleNum === null || form.peopleNum === undefined) {
// uni.showToast({
// title: '请输入随行人数',
// icon: 'none'
// });
// return;
// }
if (!form.visitTime) {
uni.showToast({
title: '请选择来访时间',
@@ -472,8 +472,12 @@ const pageFixed = ref(false);
<style scoped>
.visitor-invite {
display: flex;
flex-direction: column;
height: 100%;
overflow: hidden;
box-sizing: border-box;
background-color: #f5f5f5;
min-height: 100vh;
}
.no-scroll {
@@ -482,7 +486,6 @@ const pageFixed = ref(false);
left: 0;
right: 0;
bottom: 0;
overflow: hidden;
}
/* 导航栏 */
@@ -502,6 +505,7 @@ const pageFixed = ref(false);
/* 标签切换 */
.tab-wrap {
display: flex;
flex-shrink: 0;
background-color: #fff;
border-bottom: 1rpx solid #eee;
}
@@ -522,7 +526,10 @@ const pageFixed = ref(false);
/* 表单区域 */
.form-wrap {
padding: 10rpx;
flex: 1;
min-height: 0;
overflow-y: auto;
padding: 10rpx 10rpx 180rpx;
}
.form-section {
@@ -608,7 +615,14 @@ const pageFixed = ref(false);
/* 底部按钮 */
.btn-wrap {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 10;
padding: 20rpx 40rpx 50rpx;
padding-bottom: calc(50rpx + env(safe-area-inset-bottom));
background-color: #f5f5f5;
}
.submit-btn {
@@ -646,6 +660,8 @@ const pageFixed = ref(false);
.gender-list {
display: flex;
flex-direction: column;
max-height: 60vh;
overflow-y: auto;
}
.address-item,
@@ -668,4 +684,12 @@ const pageFixed = ref(false);
background-color: #007aff;
color: #fff;
}
</style>
<style>
/* 页面容器撑满并禁止整体滚动,让表单区域单独滚动 */
page {
height: 100%;
overflow: hidden;
}
</style>