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.
@@ -84633,9 +84633,10 @@ class JieYueService {
84633
84633
  if (readData.result !== 1) {
84634
84634
  throw Error("读取二代身份证失败,返回值:" + readData.ret + ",错误信息:" + readData.errMsg);
84635
84635
  }
84636
- // Agency 发证机关,外国人永居证时,该值为中文名
84636
+ console.log(readData);
84637
84637
  let {
84638
84638
  Name: name,
84639
+ EnglishName: englishName,
84639
84640
  Sex: sex,
84640
84641
  BirthDate: birthday,
84641
84642
  Address: address,
@@ -84647,18 +84648,22 @@ class JieYueService {
84647
84648
  } = readData;
84648
84649
  let [validStart, validEnd] = Valid.split('-');
84649
84650
  let chineseName = '',
84650
- englishName = '';
84651
+ cardType = '1',
84652
+ nationality = '中国';
84651
84653
  // 外国人永居证
84652
84654
  let foreignersIDCard = IdCardCommonUtils.isForeignersIdCard(idNumber);
84653
84655
  if (foreignersIDCard) {
84654
- idNumber = idNumber.startsWith('9') ? idNumber : idNumber.substring(0, idNumber.length - 3);
84655
- englishName = name;
84656
- chineseName = police || '无中文姓名';
84657
- name = police || name; // 捷宇高拍仪读卡 外国人永居证时 发证机关(Agency),该值为中文名
84658
- police = '中华人民共和国国家移民管理局';
84656
+ cardType = '9'; // 永居证
84657
+ chineseName = name;
84658
+ name = name === '无中文姓名' ? englishName : name; // 姓名,先读中文名,没有时读英文名
84659
+ police = '中华人民共和国国家移民管理局'; // 发证机关,读不到,默认
84660
+ nationality = nation; // 永居证国籍放在名族里面的
84661
+ nation = '';
84659
84662
  }
84660
84663
  const IDCardData = {
84661
84664
  info: {
84665
+ cardType,
84666
+ nationality,
84662
84667
  name,
84663
84668
  chineseName,
84664
84669
  englishName,