unify-external-plugin-platform 0.0.2-52 → 0.0.2-56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -84623,9 +84623,10 @@ class JieYueService {
84623
84623
  if (readData.result !== 1) {
84624
84624
  throw Error("读取二代身份证失败,返回值:" + readData.ret + ",错误信息:" + readData.errMsg);
84625
84625
  }
84626
- // Agency 发证机关,外国人永居证时,该值为中文名
84626
+ console.log(readData);
84627
84627
  let {
84628
84628
  Name: name,
84629
+ EnglishName: englishName,
84629
84630
  Sex: sex,
84630
84631
  BirthDate: birthday,
84631
84632
  Address: address,
@@ -84637,18 +84638,22 @@ class JieYueService {
84637
84638
  } = readData;
84638
84639
  let [validStart, validEnd] = Valid.split('-');
84639
84640
  let chineseName = '',
84640
- englishName = '';
84641
+ cardType = '1',
84642
+ nationality = '中国';
84641
84643
  // 外国人永居证
84642
84644
  let foreignersIDCard = IdCardCommonUtils.isForeignersIdCard(idNumber);
84643
84645
  if (foreignersIDCard) {
84644
- idNumber = idNumber.startsWith('9') ? idNumber : idNumber.substring(0, idNumber.length - 3);
84645
- englishName = name;
84646
- chineseName = police || '无中文姓名';
84647
- name = police || name; // 捷宇高拍仪读卡 外国人永居证时 发证机关(Agency),该值为中文名
84648
- police = '中华人民共和国国家移民管理局';
84646
+ cardType = '9'; // 永居证
84647
+ chineseName = name;
84648
+ name = name === '无中文姓名' ? englishName : name; // 姓名,先读中文名,没有时读英文名
84649
+ police = '中华人民共和国国家移民管理局'; // 发证机关,读不到,默认
84650
+ nationality = nation; // 永居证国籍放在名族里面的
84651
+ nation = '';
84649
84652
  }
84650
84653
  const IDCardData = {
84651
84654
  info: {
84655
+ cardType,
84656
+ nationality,
84652
84657
  name,
84653
84658
  chineseName,
84654
84659
  englishName,