修改bug

This commit is contained in:
zhouyanli
2026-08-04 11:56:12 +08:00
parent 5c8671a91e
commit 57756f016e
5 changed files with 45 additions and 20 deletions

View File

@@ -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)
}
// 查询已认证的小区

View File

@@ -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
}

View File

@@ -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>