|
@@ -300,6 +300,8 @@ export default {
|
|
|
return
|
|
|
}
|
|
|
if(this.idCard==''){
|
|
|
+
|
|
|
+
|
|
|
uni.showModal({
|
|
|
title: "提示",
|
|
|
content: '身份证ID不能为空',
|
|
@@ -307,6 +309,17 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ let idCardRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
|
|
|
+ let idCardre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
|
|
|
+ if(!idCardRe18.test(this.idCard) && !idCardRe15.test(this.idCard)){
|
|
|
+
|
|
|
+ uni.showModal({
|
|
|
+ title: "提示",
|
|
|
+ content: '身份证ID不正确',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
let data = {realname:this.realname,idCard:this.idCard}
|
|
|
this.submitForm(data)
|
|
|
},
|