|
@@ -7,7 +7,7 @@
|
|
|
<view class="user_item">
|
|
|
<text class="item_name">姓名</text>
|
|
|
<view class="item_right">
|
|
|
- <input placeholder-class="item_right_name_placeholder" class="item_right_name" type="text" :value="name" placeholder="请输入姓名" @blur='inputName' @confirm='inputName'/>
|
|
|
+ <input placeholder-class="item_right_name_placeholder" class="item_right_name" type="text" v-model="name" @input="onKeyYHKNameInput" placeholder="请输入姓名" @blur='inputName' @confirm='inputName'/>
|
|
|
<image class="icon_right" src="../../static/icons/icon_right_yezhu.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -71,7 +71,7 @@
|
|
|
<view class="user_item">
|
|
|
<text class="item_name">证件号</text>
|
|
|
<view class="item_right">
|
|
|
- <input placeholder-class="item_right_name_placeholder" class="item_right_name" type="idcard" :value="certificateNo" placeholder="请输入" @blur='inputId' @confirm='inputId'/>
|
|
|
+ <input placeholder-class="item_right_name_placeholder" class="item_right_name" type="text" v-model ="certificateNo" placeholder="请输入" @input="idInput" @blur='inputId' @confirm='inputId'/>
|
|
|
<image class="icon_right" src="../../static/icons/icon_right_yezhu.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -158,6 +158,31 @@
|
|
|
this.queryProjectBox();
|
|
|
},
|
|
|
methods:{
|
|
|
+ onKeyYHKNameInput(event){
|
|
|
+ let value = event.target.value;
|
|
|
+ let patt = /.*[0-9]{1,}.*/i;
|
|
|
+ var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?%]");
|
|
|
+ let _str=""
|
|
|
+ for(let i=0,len=value.length;i<len;i++){
|
|
|
+ _str+=value[i].replace(pattern,'').replace(patt,'')
|
|
|
+ }
|
|
|
+ this.$nextTick(function(){
|
|
|
+ this.name = _str;
|
|
|
+ })
|
|
|
+ },
|
|
|
+ idInput(event){
|
|
|
+ let value = event.target.value;
|
|
|
+ let patt = /^[\u4e00-\u9fa5]+$/;
|
|
|
+ var pattern = new RegExp("[`~!@#$^&*()=|{}':;',\\[\\].<>/?~!@#¥……&*()——|{}【】‘;:”“'。,、?% ]");
|
|
|
+ let _str=""
|
|
|
+ for(let i=0,len=value.length;i<len;i++){
|
|
|
+ _str+=value[i].replace(pattern,'').replace(patt,'')
|
|
|
+ }
|
|
|
+ this.$nextTick(function(){
|
|
|
+ this.certificateNo = _str;
|
|
|
+ })
|
|
|
+
|
|
|
+ },
|
|
|
agreeXieyi(){
|
|
|
this.agree = true
|
|
|
},
|
|
@@ -348,7 +373,18 @@
|
|
|
title:"请输入证件号"
|
|
|
})
|
|
|
return
|
|
|
+ }else{
|
|
|
+ if(this.certificateType==1){
|
|
|
+ if(this.certificateNo.length!=18){
|
|
|
+ uni.showToast({
|
|
|
+ icon:"none",
|
|
|
+ title:"请输入正确的身份证号"
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
if(!this.roomNo){
|
|
|
uni.showToast({
|
|
|
icon:"none",
|