mirror of
http://112.124.100.131/GFRS/ebiz-h5.git
synced 2025-12-07 01:56:44 +08:00
外国人永久居住证15性别校验修改
This commit is contained in:
@@ -54,8 +54,8 @@ function getBirthById(idNo) {
|
||||
function getSexById(idNo) {
|
||||
if(idNo.length == 15){
|
||||
// 获取性别
|
||||
if (idNo.charAt(14) >= '0' && idNo.charAt(14) <= '9') {
|
||||
if (parseInt(idNo.charAt(14)) % 2 == 0) {
|
||||
if (idNo.charAt(13) >= '0' && idNo.charAt(13) <= '9') {
|
||||
if (parseInt(idNo.charAt(13)) % 2 == 0) {
|
||||
return '1'
|
||||
} else {
|
||||
return '0'
|
||||
@@ -128,6 +128,8 @@ export function idNoCheck8(userInfo) {
|
||||
}
|
||||
let thisSex = getSexById(userInfo.idNo)
|
||||
if(thisSex != userInfo.sex) {
|
||||
console.log('sexxxxxx',thisSex)
|
||||
console.log('sexxxxxx',userInfo.sex)
|
||||
return {
|
||||
text: '性别必须与证件号码中的一致'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user