修复bug

This commit is contained in:
zhouyanli
2026-08-22 08:08:01 +08:00
parent a078513221
commit 453f563a6e
8 changed files with 49 additions and 13 deletions

View File

@@ -2,8 +2,8 @@
"name" : "花开物业", "name" : "花开物业",
"appid" : "__UNI__29C3D60", "appid" : "__UNI__29C3D60",
"description" : "智慧社区居民端面向小区业主使用,支持注册、验证码、账号密码多种登录方式,提供密码找回功能,账号使用安全便捷。支持多小区切换,首页设有轮播 banner、社区公告集成远程开门、生活缴费、在线报修、访客邀请、社区活动常用服务。全服务板块统一涵盖门禁开门、线上缴费、报修申报、访客预约、投诉反馈、问卷调研、活动报名、社区公示、一键联系物业功能。个人中心可管理房屋、住户、车位、车辆信息支持更换手机号、修改密码、消息通知设置、版本更新及账号退出一站式满足业主居家生活、社区服务、房产车辆管理需求实现社区生活数字化、便捷化。", "description" : "智慧社区居民端面向小区业主使用,支持注册、验证码、账号密码多种登录方式,提供密码找回功能,账号使用安全便捷。支持多小区切换,首页设有轮播 banner、社区公告集成远程开门、生活缴费、在线报修、访客邀请、社区活动常用服务。全服务板块统一涵盖门禁开门、线上缴费、报修申报、访客预约、投诉反馈、问卷调研、活动报名、社区公示、一键联系物业功能。个人中心可管理房屋、住户、车位、车辆信息支持更换手机号、修改密码、消息通知设置、版本更新及账号退出一站式满足业主居家生活、社区服务、房产车辆管理需求实现社区生活数字化、便捷化。",
"versionName" : "1.1.8", "versionName" : "1.1.9",
"versionCode" : 131, "versionCode" : 132,
"transformPx" : false, "transformPx" : false,
"uniCloud" : { "uniCloud" : {
"provider" : "aliyun", "provider" : "aliyun",

View File

@@ -1,6 +1,6 @@
// 服务器地址(与 request.js 保持一致) // 服务器地址(与 request.js 保持一致)
const baseUrl = 'https://wuyeapi.ckdzkj.com'; const baseUrl = 'https://wuyeapi.ckdzkj.com';
// const baseUrl = "http://192.168.1.222:8080" // const baseUrl = "http://192.168.1.6:8080"
/** /**
* 图片上传 Hook * 图片上传 Hook

View File

@@ -543,6 +543,39 @@
} }
} }
// 18位居民身份证号码校验含出生日期与校验码
const isValidIdCard = (id) => {
const reg = /^[1-9]\d{5}(18|19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])\d{3}[\dXx]$/
if (!reg.test(id)) return false
const weights = [7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2]
const checkCodes = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2']
let sum = 0
for (let i = 0; i < 17; i++) {
sum += parseInt(id[i], 10) * weights[i]
}
return checkCodes[sum % 11] === id[17].toUpperCase()
}
// 按证件类型校验证件号码格式
const validateCardNo = () => {
const cardNo = (form.cardNo || '').toUpperCase()
const cardTypeId = String(form.cardType.id ?? '')
// 居民身份证18位含校验码
if (cardTypeId === '0') {
return isValidIdCard(cardNo)
}
// 护照:字母开头 + 7~8位数字
if (cardTypeId === '1') {
return /^[A-Z]\d{7,8}$/.test(cardNo)
}
// 港澳通行证H/M/C 开头 + 8位数字
if (cardTypeId === '2') {
return /^[HMC]\d{8}$/.test(cardNo)
}
// 其他类型:字母数字 5~18 位
return /^[A-Z0-9]{5,18}$/.test(cardNo)
}
const openCardType = () => { const openCardType = () => {
showCardType.value = true showCardType.value = true
} }
@@ -663,6 +696,10 @@
title: '请输入证件号', title: '请输入证件号',
icon: 'none' icon: 'none'
}) })
if (!validateCardNo()) return uni.showToast({
title: '证件号码格式错误',
icon: 'none'
})
if (!form.relation && form.relation != 0) return uni.showToast({ if (!form.relation && form.relation != 0) return uni.showToast({
title: '请选择关系', title: '请选择关系',
icon: 'none' icon: 'none'

View File

@@ -41,11 +41,10 @@
</view> </view>
<view class="info-row"> <view class="info-row">
<text class="info-label">房间状态</text> <text class="info-label">房间状态</text>
<text class="info-value" :style="{color: form.status === '0' ? '#00aaff' : form.status === '1' ? <text class="info-value" :style="{color: form.houseStatus === '0' ? '#00aaff' : form.houseStatus === '1' ?
'#FF700A' : form.status === '2' ? '#00aa00' : form.status === '3' ? '#00557f' : '#999' }">{{ '#FF700A' : form.houseStatus === '2' ? '#00aa00' : form.houseStatus === '3' ? '#00557f' : '#999' }">
form.status === '0' ? '自住' : form.status === '1' ? {{form.houseStatus === '0' ? '自住' : form.houseStatus === '1' ?
'闲置' : form.status === '2' ? '租赁' : form.status === '3' ? '其他' : '' '闲置' : form.houseStatus === '2' ? '租赁' : form.houseStatus === '3' ? '其他' : ''}}</text>
}}</text>
</view> </view>
</view> </view>

View File

@@ -184,7 +184,7 @@
weixin.launchMiniProgram({ weixin.launchMiniProgram({
id: 'gh_a765aef0172c', id: 'gh_a765aef0172c',
type: 1, // 0 正式版 / 1测试版 / 2预览 type: 1, // 0 正式版 / 1开发版 / 2体验
path: 'pages/arrearsPayment/arrearsPayment?' + queryString, path: 'pages/arrearsPayment/arrearsPayment?' + queryString,
}, (res) => { }, (res) => {
console.log('回调---回调结果App', JSON.stringify(res)) console.log('回调---回调结果App', JSON.stringify(res))

View File

@@ -428,7 +428,7 @@
if (!requireLogin()) return if (!requireLogin()) return
const cachedVillageId = uni.getStorageSync('currentVillageId') const cachedVillageId = uni.getStorageSync('currentVillageId')
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) { if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 }) uni.showToast({ title: '未绑定房屋,没有权限', icon: 'none', duration: 2000 })
return return
} }
uni.setStorageSync('sourcePage', 'index') uni.setStorageSync('sourcePage', 'index')
@@ -461,7 +461,7 @@
if (!requireLogin()) return if (!requireLogin()) return
const cachedVillageId = uni.getStorageSync('currentVillageId') const cachedVillageId = uni.getStorageSync('currentVillageId')
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) { if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 }) uni.showToast({ title: '未绑定房屋,没有权限', icon: 'none', duration: 2000 })
return return
} }
uni.setStorageSync('sourcePage', "index") uni.setStorageSync('sourcePage', "index")

View File

@@ -104,7 +104,7 @@
// 设置和我的房屋不需要绑定小区(我的房屋用于首次绑定) // 设置和我的房屋不需要绑定小区(我的房屋用于首次绑定)
if (item.title !== '设置' && item.title !== '我的房屋' && item.title !== '我的积分') { if (item.title !== '设置' && item.title !== '我的房屋' && item.title !== '我的积分') {
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) { if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 }) uni.showToast({ title: '未绑定房屋,没有权限', icon: 'none', duration: 2000 })
return return
} }
} }

View File

@@ -142,7 +142,7 @@
if (!requireLogin()) return if (!requireLogin()) return
const cachedVillageId = uni.getStorageSync('currentVillageId') const cachedVillageId = uni.getStorageSync('currentVillageId')
if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) { if (!cachedVillageId || cachedVillageId === '0' || cachedVillageId === 0) {
uni.showToast({ title: '未绑定小区,没有权限', icon: 'none', duration: 2000 }) uni.showToast({ title: '未绑定房屋,没有权限', icon: 'none', duration: 2000 })
return return
} }
uni.setStorageSync('sourcePage', 'serviceIndex') uni.setStorageSync('sourcePage', 'serviceIndex')