Commit 9aaef0f0 by 赵庆

gsb

parent 8c234ef2
......@@ -722,25 +722,26 @@ class EcontractApi {
}
if (!param.idNo) {
return this.returnjson(-1, "请提供该用户身份证号")
}else {
if (!await this.idcardClient.checkIDCard(param.idNo)) {
return this.returnjson(-1, "身份证格式不正确");
}
let card = await this.idcardClient.cardInfo(param.idNo);
let age = card.age || 0;
if(!age) {
return this.returnjson(-1, "您的身份证号格式错误, 只支持18位身份证号码");
}
if(card.sex == 'male') {
if (age < 18 || age > 60) {
return this.returnjson(-1, "签约失败,男限制18-60岁之间")
}
} else {
if (age < 18 || age > 55) {
return this.returnjson(-1, "签约失败,女限制18-55岁之间")
}
}
}
// else {
// if (!await this.idcardClient.checkIDCard(param.idNo)) {
// return this.returnjson(-1, "身份证格式不正确");
// }
// let card = await this.idcardClient.cardInfo(param.idNo);
// let age = card.age || 0;
// if(!age) {
// return this.returnjson(-1, "身份证号格式错误, 只支持18位身份证号码");
// }
// if(card.sex == 'male') {
// if (age < 18 || age > 60) {
// return this.returnjson(-1, "签约失败,男限制18-60岁之间")
// }
// } else {
// if (age < 18 || age > 55) {
// return this.returnjson(-1, "签约失败,女限制18-55岁之间")
// }
// }
// }
if (!param.bankno) {
return this.returnjson(-1, "请提供该用户银行卡号")
}
......
......@@ -48,15 +48,15 @@ class EntcontractApi {
let card = await this.idcardClient.cardInfo(param.idNo);
let age = card.age || 0;
if (!age) {
return this.returnjson(-1, "请提供该用户身份证号");
return this.returnjson(-1, "身份证号格式错误, 只支持18位身份证号码");
}
if (card.sex == 'male') {
if (age < 18 || age > 60) {
return this.returnjson(-1, "身份证年龄过大")
return this.returnjson(-1, "签约失败,男限制18-60岁之间")
}
} else {
if (age < 18 || age > 55) {
return this.returnjson(-1, "身份证年龄过大")
return this.returnjson(-1, "签约失败,女限制18-55岁之间")
}
}
}
......@@ -133,7 +133,7 @@ class EntcontractApi {
let card = await this.idcardClient.cardInfo(param.idNo);
let age = card.age || 0;
if (!age) {
return this.returnjson(-1, "您的身份证号格式错误, 只支持18位身份证号码");
return this.returnjson(-1, "身份证号格式错误, 只支持18位身份证号码");
}
if (card.sex == 'male') {
if (age < 18 || age > 60) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment