修改bug
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
// 查询已认证的小区
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
<scroll-view scroll-y class="form-box">
|
||||
<view class="form-item">
|
||||
<text class="label">住户名称</text>
|
||||
<input class="input" v-model="form.name" placeholder="请输入真实姓名" placeholder-class="ph" maxlength="20"/>
|
||||
<input class="input" v-model="form.name" @input="onNameInput" placeholder="请输入真实姓名" placeholder-class="ph" maxlength="20"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item">
|
||||
@@ -117,7 +117,7 @@
|
||||
|
||||
<view class="form-item">
|
||||
<text class="label">证件号码</text>
|
||||
<input class="input" v-model="form.cardNo" placeholder="请输入证件号码" placeholder-class="ph" maxlength="18"/>
|
||||
<input class="input" v-model="form.cardNo" @input="onCardNoInput" placeholder="请输入证件号码" placeholder-class="ph" maxlength="18"/>
|
||||
</view>
|
||||
|
||||
<view class="form-item arrow-item" @click="openRelation">
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
<view class="info-row">
|
||||
<text class="info-label">证件类型</text>
|
||||
<text
|
||||
class="info-value">{{form.idCardType=='0'?'居民身份证':form.idCardType=='1'?'护照':form.idCardType=='2'?'其他':''}}</text>
|
||||
class="info-value">{{form.idCardType=='0'?'居民身份证':form.idCardType=='1'?'护照':form.idCardType=='2'?'港澳通行证':''}}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">证件号码</text>
|
||||
@@ -79,7 +79,7 @@
|
||||
<view class="info-row">
|
||||
<text class="info-label">与业主关系</text>
|
||||
<text
|
||||
class="info-value">{{form.ownerRelationship=='0'?'本人':form.ownerRelationship=='1'?'配偶':form.ownerRelationship=='2'?'父母':form.ownerRelationship=='3'?'子女':form.ownerRelationship=='4'?'亲属':form.ownerRelationship=='5'?'租户':form.ownerRelationship=='6'?'其他':''}}</text>
|
||||
class="info-value">{{form.ownerRelationship=='0'?'业主本人':form.ownerRelationship=='1'?'亲属':form.ownerRelationship=='2'?'租户':form.ownerRelationship=='3'?'朋友':''}}</text>
|
||||
</view>
|
||||
<view class="info-row">
|
||||
<text class="info-label">手机号码</text>
|
||||
|
||||
@@ -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,11 +264,12 @@
|
||||
|
||||
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 = () => {
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user