From 3851aebe6681a10822170b38a68624f6b0d8b6df Mon Sep 17 00:00:00 2001 From: zhouyanli <593579392@qq.com> Date: Fri, 7 Aug 2026 09:24:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BD=A6=E4=BD=8D=E8=BD=A6?= =?UTF-8?q?=E7=89=8C=E5=8F=B7=E8=BE=93=E5=85=A5=E9=99=90=E5=88=B6bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- property-uniapp-project/manifest.json | 4 +- .../pageSubPack/my/addCar.vue | 47 ++++++++------ .../pageSubPack/my/carDetail.vue | 4 +- .../pageSubPack/my/parkingSpaceDetail.vue | 4 +- .../pageSubPack/my/selectParingLot.vue | 62 +++++++++---------- .../pageSubPack/my/settingIndex.vue | 12 ++-- 6 files changed, 68 insertions(+), 65 deletions(-) diff --git a/property-uniapp-project/manifest.json b/property-uniapp-project/manifest.json index fae995d..03b0e21 100644 --- a/property-uniapp-project/manifest.json +++ b/property-uniapp-project/manifest.json @@ -2,8 +2,8 @@ "name" : "花开物业", "appid" : "__UNI__29C3D60", "description" : "智慧社区居民端面向小区业主使用,支持注册、验证码、账号密码多种登录方式,提供密码找回功能,账号使用安全便捷。支持多小区切换,首页设有轮播 banner、社区公告,集成远程开门、生活缴费、在线报修、访客邀请、社区活动常用服务。全服务板块统一涵盖门禁开门、线上缴费、报修申报、访客预约、投诉反馈、问卷调研、活动报名、社区公示、一键联系物业功能。个人中心可管理房屋、住户、车位、车辆信息,支持更换手机号、修改密码、消息通知设置、版本更新及账号退出,一站式满足业主居家生活、社区服务、房产车辆管理需求,实现社区生活数字化、便捷化。", - "versionName" : "1.0.6", - "versionCode" : 119, + "versionName" : "1.0.7", + "versionCode" : 120, "transformPx" : false, "uniCloud" : { "provider" : "aliyun", diff --git a/property-uniapp-project/pageSubPack/my/addCar.vue b/property-uniapp-project/pageSubPack/my/addCar.vue index 1e4e15d..a882445 100644 --- a/property-uniapp-project/pageSubPack/my/addCar.vue +++ b/property-uniapp-project/pageSubPack/my/addCar.vue @@ -10,7 +10,7 @@ 车牌号 + placeholder-class="input-placeholder" maxlength="8" @input="onCarNumInput" /> @@ -155,6 +155,33 @@ uploadUrl: '/api/resident/file/uploadImage' }) + // 车牌号输入限制:省份简称(中文)+ 城市代码(字母)+ 序号(字母数字) + const onCarNumInput = (e) => { + let value = e.detail.value || '' + // 过滤非法字符,只保留中文、大写字母、数字 + value = value.replace(/[^一-龥A-Z0-9]/g, '') + // 首字符必须是中文省份简称 + if (value.length > 0 && !/^[一-龥]/.test(value)) { + value = value.replace(/[^一-龥]/g, '') + } + // 第二位必须是字母 + if (value.length > 1) { + const first = value.charAt(0) + const second = value.charAt(1) + if (!/^[A-Z]$/.test(second)) { + value = first + second.replace(/[^A-Za-z]/g, '').toUpperCase() + } + // 剩余位只允许字母和数字 + if (value.length > 2) { + const rest = value.substring(2) + value = value.substring(0, 2) + rest.replace(/[^A-Za-z0-9]/g, '').toUpperCase() + } + } + // 统一转大写 + value = value.toUpperCase() + formData.value.carNum = value + } + const inputChange = (typeStr) => { if (typeStr == '车牌号') { uni.setStorageSync('carNum', formData.value.carNum) @@ -182,24 +209,6 @@ icon: "none" }) } -/* if (!formData.value.carBrand) { - return uni.showToast({ - title: "请输入车辆品牌", - icon: "none" - }) - } - if (!formData.value.carModel) { - return uni.showToast({ - title: "请输入车辆型号", - icon: "none" - }) - } - if (!formData.value.carColor) { - return uni.showToast({ - title: "请输入车辆颜色", - icon: "none" - }) - } */ uni.showLoading({ title: '提交中...', diff --git a/property-uniapp-project/pageSubPack/my/carDetail.vue b/property-uniapp-project/pageSubPack/my/carDetail.vue index 7c398a5..98ba203 100644 --- a/property-uniapp-project/pageSubPack/my/carDetail.vue +++ b/property-uniapp-project/pageSubPack/my/carDetail.vue @@ -94,10 +94,10 @@ console.log(form.value); } catch (err) { uni.showToast({ - title: `${err}`, + title: err.msg, icon: 'none' }) - console.error('列表接口报错:', err) + // console.error('列表接口报错:', err) } finally { } diff --git a/property-uniapp-project/pageSubPack/my/parkingSpaceDetail.vue b/property-uniapp-project/pageSubPack/my/parkingSpaceDetail.vue index e4b4de8..897ee86 100644 --- a/property-uniapp-project/pageSubPack/my/parkingSpaceDetail.vue +++ b/property-uniapp-project/pageSubPack/my/parkingSpaceDetail.vue @@ -169,10 +169,10 @@ console.log(form.value); } catch (err) { uni.showToast({ - title: `${err}`, + title: err.msg, icon: 'none' }) - console.error('列表接口报错:', err) + // console.error('列表接口报错:', err) } finally { } diff --git a/property-uniapp-project/pageSubPack/my/selectParingLot.vue b/property-uniapp-project/pageSubPack/my/selectParingLot.vue index 99b1c70..7a301b8 100644 --- a/property-uniapp-project/pageSubPack/my/selectParingLot.vue +++ b/property-uniapp-project/pageSubPack/my/selectParingLot.vue @@ -36,6 +36,7 @@ const dataList = ref([]) const selectedParkingLot = ref(uni.getStorageSync('parkingLotId')) const selectedParkingSpace = ref(uni.getStorageSync('parkingSpaceId')) + const isSubmitting = ref(false) onMounted(() => { checkType.value = uni.getStorageSync('checkType') @@ -93,6 +94,8 @@ } const selectedParking = (item) => { + if (isSubmitting.value) return + isSubmitting.value = true console.log(item); if (checkType.value == '停车场') { selectedParkingLot.value = item.id @@ -100,48 +103,39 @@ selectedParkingSpace.value = item.id } - uni.showModal({ - title: "确认选择", - content: '确认选择此' + checkType.value + '吗?', - success: (res) => { - if (res.confirm) { - - setTimeout(() => { - uni.showToast({ - title: '选择成功', - icon: 'success' - }) - console.log(checkType.value); - - if (checkType.value == '停车场') { - uni.setStorageSync('parkingLotId', item.id) - uni.setStorageSync('parkingLotName', item.name) - uni.removeStorageSync('parkingSpaceId') - uni.removeStorageSync('parkingSpaceName') - uni.setStorageSync('checkType', '车位编号') - } else if (checkType.value == '车位编号') { - console.log(item.id); - uni.setStorageSync('parkingSpaceId', item.id) - uni.setStorageSync('parkingSpaceName', item.name) - } - }, 1000) - setTimeout(() => { - goFreash() - }, 2500) - } + setTimeout(() => { + uni.showToast({ + title: '选择成功', + icon: 'success' + }) + console.log(checkType.value); + + if (checkType.value == '停车场') { + uni.setStorageSync('parkingLotId', item.id) + uni.setStorageSync('parkingLotName', item.name) + uni.removeStorageSync('parkingSpaceId') + uni.removeStorageSync('parkingSpaceName') + uni.setStorageSync('checkType', '车位编号') + } else if (checkType.value == '车位编号') { + console.log(item.id); + uni.setStorageSync('parkingSpaceId', item.id) + uni.setStorageSync('parkingSpaceName', item.name) } - }) + }, 1000) + setTimeout(() => { + goFreash() + }, 2500) } const goFreash = () => { if (checkType.value != '车位编号') { - uni.navigateTo({ + // 选完停车场后替换当前页进入选车位编号,避免压栈 + uni.redirectTo({ url: '/pageSubPack/my/selectParingLot' }) } else { - uni.navigateTo({ - url: '/pageSubPack/my/addParkingSpace' - }) + // 选完车位编号后返回原来的 addParkingSpace + uni.navigateBack() } } diff --git a/property-uniapp-project/pageSubPack/my/settingIndex.vue b/property-uniapp-project/pageSubPack/my/settingIndex.vue index 84e7940..51a8b36 100644 --- a/property-uniapp-project/pageSubPack/my/settingIndex.vue +++ b/property-uniapp-project/pageSubPack/my/settingIndex.vue @@ -58,12 +58,12 @@ title: '注销账号', type: 'arrow' }, - { - title: '升级版本', - type: 'text', - value: '当前版本 1.0.0', - valueClass: 'item-version' - } + // { + // title: '升级版本', + // type: 'text', + // value: '当前版本 1.0.0', + // valueClass: 'item-version' + // } ]) // 格式化字节大小