| | |
| | | </view>
|
| | | </view>
|
| | | <view class="cell">
|
| | | <view class="title"><b>*</b>证件号码</view>
|
| | | <view class="title">证件号码</view>
|
| | | <view class="content">
|
| | | <input class="input" maxlength="18" @focus="showKeyboard = true" @blur="showKeyboard = false"
|
| | | placeholder-style="color: #999999;" v-model="visitorData.idcardNo" placeholder="请输入您的证件号码" />
|
| | |
| | | title: '证件类型不能为空',
|
| | | icon: 'none'
|
| | | })
|
| | | if (!this.visitorData.idcardNo) return uni.showToast({
|
| | | title: '证件号码不能为空',
|
| | | icon: 'none'
|
| | | })
|
| | | if (this.visitorData.idcardType === 0) {
|
| | | // if (!this.visitorData.idcardNo) return uni.showToast({
|
| | | // title: '证件号码不能为空',
|
| | | // icon: 'none'
|
| | | // })
|
| | | if (this.visitorData.idcardType === 0 && this.visitorData.idcardNo) {
|
| | | const regex = /^[1-9]\d{5}(19|20)\d{2}(0[1-9]|1[0-2])(0[1-9]|[1-2]\d|3[0-1])\d{3}[\dxX]$/;
|
| | | if (!regex.test(this.visitorData.idcardNo)) return uni.showToast({
|
| | | title: '证件号码格式错误',
|