|
@@ -165,7 +165,7 @@ class MatchSignService extends CrudService {
|
|
|
}
|
|
|
// 性别
|
|
|
maleOrFemalByIdCard(idCard) {
|
|
|
- if (_.isArray) idCard = idCard.join('');
|
|
|
+ if (_.isArray(idCard)) idCard = idCard.join('');
|
|
|
idCard = _.trim(idCard.replace(/ /g, '')); // 对身份证号码做处理。包括字符间有空格。
|
|
|
if (idCard.length === 15) {
|
|
|
if (idCard.substring(14, 15) % 2 === 0) {
|
|
@@ -185,7 +185,7 @@ class MatchSignService extends CrudService {
|
|
|
}
|
|
|
// 年龄
|
|
|
getAge(idCard) {
|
|
|
- if (_.isArray) idCard = idCard.join('');
|
|
|
+ if (_.isArray(idCard)) idCard = idCard.join('');
|
|
|
const ageDate = new Date();
|
|
|
const month = ageDate.getMonth() + 1;
|
|
|
const day = ageDate.getDate();
|