diff --git a/property-uniapp-project/manifest.json b/property-uniapp-project/manifest.json index 2d6fd46..fae995d 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.5", - "versionCode" : 118, + "versionName" : "1.0.6", + "versionCode" : 119, "transformPx" : false, "uniCloud" : { "provider" : "aliyun", diff --git a/property-uniapp-project/pageSubPack/api/api.js b/property-uniapp-project/pageSubPack/api/api.js index ad96c4d..9b15f21 100644 --- a/property-uniapp-project/pageSubPack/api/api.js +++ b/property-uniapp-project/pageSubPack/api/api.js @@ -27,8 +27,8 @@ export const getBannarList = (data) =>{ return get('/resident/banner',data) } // 首页最新公告 -export const getNoticeLatest = () =>{ - return get('/api/resident/notice/latest') +export const getNoticeLatest = (data) =>{ + return get('/api/resident/notice/latest', data) } // 查询已认证的小区 diff --git a/property-uniapp-project/pageSubPack/my/addHouse.vue b/property-uniapp-project/pageSubPack/my/addHouse.vue index 9edaa44..93669d8 100644 --- a/property-uniapp-project/pageSubPack/my/addHouse.vue +++ b/property-uniapp-project/pageSubPack/my/addHouse.vue @@ -90,7 +90,7 @@ 住户名称 - + @@ -117,7 +117,7 @@ 证件号码 - + @@ -507,6 +507,24 @@ } + // 住户名称输入过滤:只允许中文和字母 + const onNameInput = (e) => { + const val = e.detail.value || '' + const filtered = val.replace(/[^一-龥a-zA-Z]/g, '') + if (filtered !== val) { + form.name = filtered + } + } + + // 证件号码输入过滤:只允许字母和数字 + const onCardNoInput = (e) => { + const val = e.detail.value || '' + const filtered = val.replace(/[^a-zA-Z0-9]/g, '') + if (filtered !== val) { + form.cardNo = filtered + } + } + const openCardType = () => { showCardType.value = true } diff --git a/property-uniapp-project/pageSubPack/my/houseDetail.vue b/property-uniapp-project/pageSubPack/my/houseDetail.vue index 7253e0e..9169347 100644 --- a/property-uniapp-project/pageSubPack/my/houseDetail.vue +++ b/property-uniapp-project/pageSubPack/my/houseDetail.vue @@ -70,7 +70,7 @@ 证件类型 {{form.idCardType=='0'?'居民身份证':form.idCardType=='1'?'护照':form.idCardType=='2'?'其他':''}} + class="info-value">{{form.idCardType=='0'?'居民身份证':form.idCardType=='1'?'护照':form.idCardType=='2'?'港澳通行证':''}} 证件号码 @@ -79,7 +79,7 @@ 与业主关系 {{form.ownerRelationship=='0'?'本人':form.ownerRelationship=='1'?'配偶':form.ownerRelationship=='2'?'父母':form.ownerRelationship=='3'?'子女':form.ownerRelationship=='4'?'亲属':form.ownerRelationship=='5'?'租户':form.ownerRelationship=='6'?'其他':''}} + class="info-value">{{form.ownerRelationship=='0'?'业主本人':form.ownerRelationship=='1'?'亲属':form.ownerRelationship=='2'?'租户':form.ownerRelationship=='3'?'朋友':''}} 手机号码 diff --git a/property-uniapp-project/pages/index/index.vue b/property-uniapp-project/pages/index/index.vue index 40699a9..32c6ff8 100644 --- a/property-uniapp-project/pages/index/index.vue +++ b/property-uniapp-project/pages/index/index.vue @@ -235,15 +235,19 @@ const getbannarData = async () => { try { const res = await getBannarList({ villageId: uni.getStorageSync('currentVillageId') }) - if (res.code === 200) { - bannerRawData.value = res.data || [] - const newList = (res.data || []).map(item => item.url) + if (res.code === 200 && Array.isArray(res.data)) { + bannerRawData.value = res.data + const newList = res.data.map(item => item.url).filter(url => typeof url === 'string' && url) if (JSON.stringify(newList) !== JSON.stringify(bannerList.value)) { bannerList.value = newList await nextTick() bannerSwiperKey.value++ saveHomeCache() } + } else if (res.code === 200) { + bannerRawData.value = [] + bannerList.value = [] + bannerSwiperKey.value++ } } catch (err) { // 静默失败 @@ -260,18 +264,19 @@ const slelctHomeData = (data) => { if (data.name) currentCommunity.value = data.name - if (data.villageId) currentVillageId.value = data.villageId - getCurrentCommunityData() - getNoticeData() - noticeKey.value++ - getNewActivityList() + if (data.villageId) { + currentVillageId.value = data.villageId + uni.setStorageSync('currentVillageId', data.villageId) + } + // 标记需要刷新,回到首页后 onShow 会触发 refreshAllData + dataLoaded.value = false } const getCurrentCommunityData = () => { getCurrentVillage().then(res => { if (res.code === 200 && res.data && res.data.villageId) { currentCommunity.value = res.data.villageName || '未命名小区' - saveHomeCache() + saveHomeCache() currentVillageId.value = res.data.villageId uni.setStorageSync('currentVillageId', res.data.villageId) } else { @@ -289,11 +294,11 @@ const getNoticeData = async () => { try { - const res = await getNoticeLatest() + const res = await getNoticeLatest({ villageId: uni.getStorageSync('currentVillageId') }) if (res.code === 200) { if (res.data) { noticeText.value = res.data.noticeTitle || '' - noticeId.value = res.data.noticeId || ''; saveHomeCache() + noticeId.value = res.data.noticeId || '' } else { noticeText.value = '暂无公告' noticeId.value = '' @@ -303,6 +308,9 @@ noticeText.value = '暂无公告' noticeId.value = '' } + saveHomeCache() + await nextTick() + noticeKey.value++ } const refreshAllData = async () => { @@ -323,7 +331,6 @@ } getCurrentCommunityData() getNoticeData() - noticeKey.value++ getNewActivityList() getbannarData() pageReady.value = true