This commit is contained in:
shijingjing
2022-05-18 14:12:14 +08:00
parent ec6c9e5cb9
commit a6d6376a81

View File

@@ -12,7 +12,7 @@
<div class="left"> <div class="left">
<span>*</span><span>申请人身份证号</span> <span>*</span><span>申请人身份证号</span>
</div> </div>
<input type="text" class="right__text" v-model="form.idNumber" placeholder="请输入" maxlength="20"/> <input type="number" class="right__text" v-model="form.idNumber" placeholder="请输入" maxlength="20"/>
</div> </div>
<div class="item"> <div class="item">
<div class="left"> <div class="left">
@@ -111,12 +111,11 @@ export default {
} }
}) })
}) })
// this.form.areaId = this.user.areaId
this.form.areaId = this.user.areaId
},
computed: {
...mapState(['user'])
}, },
// computed: {
// ...mapState(['user'])
// },
methods: { methods: {
helpCheck(e) { helpCheck(e) {
e.checked = !e.checked e.checked = !e.checked
@@ -133,6 +132,11 @@ export default {
if(!this.form.idNumber) { if(!this.form.idNumber) {
return this.$u.toast('请输入身份证号') return this.$u.toast('请输入身份证号')
} }
if(this.form.idNumber) {
if (!/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(this.form.idNumber)) {
return this.$u.toast('请输入正确的身份证号')
}
}
if(!this.form.phone) { if(!this.form.phone) {
return this.$u.toast('请输入手机号') return this.$u.toast('请输入手机号')
} }
@@ -158,7 +162,6 @@ export default {
} }
this.flag = true this.flag = true
this.$instance.post('/app/apphelpdeclarationinfo/addByApplet',{...this.form}).then((res) => { this.$instance.post('/app/apphelpdeclarationinfo/addByApplet',{...this.form}).then((res) => {
if(res.code ==0) { if(res.code ==0) {
uni.navigateTo({url: './result'}) uni.navigateTo({url: './result'})
@@ -265,6 +268,7 @@ export default {
background: #FFF; background: #FFF;
padding: 16px 32px; padding: 16px 32px;
box-sizing: border-box; box-sizing: border-box;
z-index: 999;
div { div {
width: 100%; width: 100%;
height: 88px; height: 88px;