unify-external-plugin-platform 0.0.2-76 → 0.0.2-78

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.
@@ -85032,18 +85032,16 @@ var WEIRONGMethodCode;
85032
85032
  })(WEIRONGMethodCode || (WEIRONGMethodCode = {}));
85033
85033
  const WEIRONGMethodDesc = {
85034
85034
  [WEIRONGMethodCode.ReadCard_Base64]: '读卡',
85035
- [WEIRONGMethodCode.StartSignName]: '开始签名',
85036
- [WEIRONGMethodCode.GetSignNameStatus]: '获取签名状态',
85037
85035
  [WEIRONGMethodCode.GetSignName_Base64]: '获取签名',
85038
- [WEIRONGMethodCode.FaceValidateWithIdCard_Base64]: '人证比对',
85039
- [WEIRONGMethodCode.TurnOnTheCamera]: '打开高拍仪',
85040
- [WEIRONGMethodCode.ScannerCamera]: '拍照'
85036
+ [WEIRONGMethodCode.FaceValidateWithIdCard_Base64]: '人证比对'
85041
85037
  };
85042
85038
  class WeiRongPluginService {
85043
85039
  static startConnect(method) {
85040
+ console.log('startConnect', method, this.ws?.readyState, WebSocket.CONNECTING);
85044
85041
  if (this.ws && this.ws.readyState === WebSocket.OPEN) {
85045
85042
  return this;
85046
85043
  }
85044
+ console.log('重新链接');
85047
85045
  const ws = new WebSocket(this.webSocketUrl);
85048
85046
  let resolved;
85049
85047
  const onConnect = new Promise(resolve => {
@@ -85100,7 +85098,7 @@ class WeiRongPluginService {
85100
85098
  }
85101
85099
  static async read(method) {
85102
85100
  await this.startConnect(method);
85103
- const methodDesc = WEIRONGMethodDesc[method];
85101
+ // const methodDesc = WEIRONGMethodDesc[method];
85104
85102
  if (this.ws.readyState === 1) {
85105
85103
  let jsonString;
85106
85104
  switch (method) {
@@ -85168,7 +85166,7 @@ class WeiRongPluginService {
85168
85166
  });
85169
85167
  });
85170
85168
  } else {
85171
- throw Error(methodDesc + '未准备完成');
85169
+ throw Error('设备未准备完成');
85172
85170
  }
85173
85171
  }
85174
85172
  /** 读取身份证和永居证*/
@@ -85883,8 +85881,8 @@ id_card_reader_eloam.install = Vue => {
85883
85881
  Vue.component(id_card_reader_eloam.name, id_card_reader_eloam);
85884
85882
  };
85885
85883
  /* harmony default export */ var id_card_reader_id_card_reader_eloam = (id_card_reader_eloam);
85886
- ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=template&id=19ae37ba&scoped=true&
85887
- var id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_render = function render() {
85884
+ ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[4]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=template&id=88636c88&scoped=true&
85885
+ var id_card_reader_buttonvue_type_template_id_88636c88_scoped_true_render = function render() {
85888
85886
  var _vm = this,
85889
85887
  _c = _vm._self._c;
85890
85888
  return _vm.tip ? _c('el-tooltip', {
@@ -85961,7 +85959,7 @@ var id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_render = func
85961
85959
  }
85962
85960
  })], 2);
85963
85961
  };
85964
- var id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_staticRenderFns = [];
85962
+ var id_card_reader_buttonvue_type_template_id_88636c88_scoped_true_staticRenderFns = [];
85965
85963
 
85966
85964
  ;// CONCATENATED MODULE: ./packages/service/external-plugins/default-plugin-socket.service.ts
85967
85965
 
@@ -86233,338 +86231,6 @@ _defineProperty(SignReadService, "signWebSocketUrl", 'ws://127.0.0.1:8152/chrome
86233
86231
  _defineProperty(SignReadService, "hwSignWebSocketUrl", 'ws://127.0.0.1:8152/HWSIGNManage');
86234
86232
  _defineProperty(SignReadService, "ws", void 0);
86235
86233
  _defineProperty(SignReadService, "requestStore", []);
86236
- ;// CONCATENATED MODULE: ./packages/service/external-plugins/ewp-plugin-socket.service.ts
86237
-
86238
-
86239
- /**
86240
- * 沃斯德人证交互终端
86241
- * E窗通WEBSOCKET服务
86242
- *
86243
- * */
86244
-
86245
- var EWindowPassMethodCode;
86246
- (function (EWindowPassMethodCode) {
86247
- /** 读取社保卡 */
86248
- EWindowPassMethodCode["iReadCardBas"] = "iReadCardBas";
86249
- /** 获取签名*/
86250
- EWindowPassMethodCode["GetSignName_Base64"] = "GetSignName_Base64";
86251
- /** 读取二代身份证 */
86252
- EWindowPassMethodCode["ReadIDCard_Base64"] = "ReadIDCard_Base64";
86253
- /** 人证比对 */
86254
- EWindowPassMethodCode["FaceValidateWithIdCard_Base64"] = "FaceValidateWithIdCard_Base64";
86255
- /** 获取指纹 */
86256
- EWindowPassMethodCode["FingerPrint_Base64"] = "FingerPrint_Base64";
86257
- })(EWindowPassMethodCode || (EWindowPassMethodCode = {}));
86258
- const EWindowPassMethodDesc = {
86259
- [EWindowPassMethodCode.iReadCardBas]: '读取社保卡',
86260
- [EWindowPassMethodCode.GetSignName_Base64]: '获取签名',
86261
- [EWindowPassMethodCode.ReadIDCard_Base64]: '读取二代身份证',
86262
- [EWindowPassMethodCode.FaceValidateWithIdCard_Base64]: '人证比对',
86263
- [EWindowPassMethodCode.FingerPrint_Base64]: '获取指纹'
86264
- };
86265
- class EWindowPassService {
86266
- static startConnect(method) {
86267
- if (this.ws && this.ws.readyState === WebSocket.CONNECTING) {
86268
- return this;
86269
- }
86270
- let webSocketUrl = '';
86271
- switch (method) {
86272
- case EWindowPassMethodCode.FingerPrint_Base64:
86273
- webSocketUrl = this.fingerPrintBasWebSocketUrl;
86274
- break;
86275
- default:
86276
- webSocketUrl = this.iReadCardBasWebSocketUrl;
86277
- break;
86278
- }
86279
- const ws = new WebSocket(webSocketUrl);
86280
- let resolved;
86281
- const onConnect = new Promise(resolve => {
86282
- resolved = resolve;
86283
- });
86284
- ws.onopen = () => {
86285
- resolved(true);
86286
- };
86287
- ws.onmessage = event => {
86288
- if (method === EWindowPassMethodCode.FingerPrint_Base64) {
86289
- // 指纹后端返回的是string
86290
- event = {
86291
- ...event,
86292
- data: JSON.stringify({
86293
- fingerPrintInfo: event.data
86294
- })
86295
- };
86296
- }
86297
- this.handleMessage(event);
86298
- };
86299
- ws.onclose = () => this.handleClose();
86300
- ws.onerror = () => this.handleError();
86301
- this.ws = ws;
86302
- return onConnect;
86303
- }
86304
- static handleError() {
86305
- for (const type in this.requestStore) {
86306
- this.requestStore.forEach(({
86307
- reject
86308
- }) => {
86309
- reject('handleError');
86310
- });
86311
- }
86312
- throw Error('E窗通设备功能加载失败');
86313
- }
86314
- static handleClose() {
86315
- for (const type in this.requestStore) {
86316
- this.requestStore.forEach(({
86317
- reject
86318
- }) => {
86319
- reject('close');
86320
- });
86321
- }
86322
- }
86323
- static handleMessage(msg) {
86324
- let data = '';
86325
- try {
86326
- data = JSON.parse(msg.data);
86327
- } catch (e) {
86328
- data = '';
86329
- }
86330
- this.requestStore.forEach(({
86331
- resolve
86332
- }) => {
86333
- resolve(data);
86334
- });
86335
- this.requestStore = [];
86336
- this.ws.close();
86337
- }
86338
- static async read(method) {
86339
- await this.startConnect(method);
86340
- const methodDesc = EWindowPassMethodDesc[method];
86341
- if (this.ws.readyState === 1) {
86342
- if (method !== EWindowPassMethodCode.FingerPrint_Base64) console.log(methodDesc + '连接成功');
86343
- let jsonString;
86344
- // outTimes:超时时间(秒)
86345
- switch (method) {
86346
- case EWindowPassMethodCode.ReadIDCard_Base64:
86347
- // cardReader:0 读卡器-USB;1 读卡器-COM
86348
- jsonString = JSON.stringify({
86349
- method,
86350
- args: {
86351
- outTimes: 30,
86352
- cardReader: 1
86353
- }
86354
- });
86355
- break;
86356
- case EWindowPassMethodCode.FaceValidateWithIdCard_Base64:
86357
- // cardReader:0 读卡器-USB;1 读卡器-COM
86358
- jsonString = JSON.stringify({
86359
- method,
86360
- args: {
86361
- outTimes: 30,
86362
- cardReader: 1,
86363
- cameraType: 0
86364
- }
86365
- });
86366
- break;
86367
- case EWindowPassMethodCode.iReadCardBas:
86368
- // icType:1接触卡;2非接触卡;3自动(接触优先);4自动(非接优先)
86369
- jsonString = JSON.stringify({
86370
- method,
86371
- args: {
86372
- icType: '1'
86373
- }
86374
- });
86375
- break;
86376
- case EWindowPassMethodCode.FingerPrint_Base64:
86377
- // 获取指纹:getimgae,颜色(0黑色 1红色), 质量(默认0), 图像大小(288,360),类型(0民用,1公安)
86378
- jsonString = 'getimgae,1,0,288,0';
86379
- break;
86380
- default:
86381
- jsonString = JSON.stringify({
86382
- method,
86383
- args: {
86384
- outTimes: 30
86385
- }
86386
- });
86387
- break;
86388
- }
86389
- this.ws.send(jsonString);
86390
- return new Promise((resolve, reject) => {
86391
- if (!this.requestStore) {
86392
- this.requestStore = [];
86393
- }
86394
- this.requestStore.push({
86395
- resolve,
86396
- reject
86397
- });
86398
- });
86399
- } else {
86400
- throw Error(methodDesc + '未准备完成');
86401
- }
86402
- }
86403
- /**
86404
- * 读取二代身份证
86405
- * */
86406
- static async idCardRead(method = EWindowPassMethodCode.ReadIDCard_Base64) {
86407
- const readData = await EWindowPassService.read(EWindowPassMethodCode.ReadIDCard_Base64);
86408
- console.log('读取二代身份证==>', readData);
86409
- if (!readData) {
86410
- throw Error('未匹配可用的E窗通读取设备');
86411
- }
86412
- if (readData.retVal !== 0) {
86413
- throw Error("读取二代身份证失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
86414
- }
86415
- const idInfo = readData.idInfo.data;
86416
- const {
86417
- name,
86418
- sex,
86419
- birthday,
86420
- address,
86421
- id_num,
86422
- nations
86423
- } = idInfo;
86424
- const IDCardData = {
86425
- info: {
86426
- name,
86427
- sex,
86428
- birthday: birthday.replace('-', '').replace('-', ''),
86429
- address,
86430
- cardId: id_num,
86431
- nation: nations
86432
- },
86433
- headImage: readData.idPhotoPicBase64
86434
- };
86435
- console.log('读取二代身份证结果==>', IDCardData);
86436
- return IDCardData;
86437
- }
86438
- /**
86439
- * 人证比对
86440
- */
86441
- static async faceValidateWithIdCardRead() {
86442
- const readData = await EWindowPassService.read(EWindowPassMethodCode.FaceValidateWithIdCard_Base64);
86443
- console.log('人证比对==>', readData);
86444
- if (!readData) {
86445
- throw Error('未匹配可用的E窗通读取设备');
86446
- }
86447
- if (readData.retVal !== 0) {
86448
- throw Error("人证比对失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
86449
- }
86450
- const idInfo = readData.idInfo.data;
86451
- const {
86452
- name,
86453
- sex,
86454
- birth,
86455
- address,
86456
- idNo,
86457
- nation
86458
- } = idInfo;
86459
- const IDCardData = {
86460
- idCard: {
86461
- info: {
86462
- name,
86463
- sex,
86464
- birthday: birth.replace('-', '').replace('-', ''),
86465
- address,
86466
- cardId: idNo,
86467
- nation
86468
- },
86469
- headImage: readData.idPhotoBase64
86470
- },
86471
- faceimg: readData.scenceBase64
86472
- };
86473
- console.log('人证比对结果==>', IDCardData);
86474
- return IDCardData;
86475
- }
86476
- /** 读取社保卡 */
86477
- static async socialSecurityCardRead() {
86478
- const readData = await EWindowPassService.read(EWindowPassMethodCode.iReadCardBas);
86479
- if (!readData) {
86480
- throw Error('未匹配可用的E窗通读取设备');
86481
- }
86482
- if (readData.retVal !== 0) {
86483
- throw Error("读取社保卡基本信息失败,返回值:" + readData.retVal + ",错误信息:" + readData.outInfo);
86484
- }
86485
- // 返回数据:330100|350781196403072943|W57681892|331100D10600000300657BCF88899F8E|张三|3B6D000000815444368660330100286BCF|1.00|2020-08-12|2030-08-12|1|SN00000000|(邮编|身份证号|卡号|社会保障号码|姓名|...不知道是什么信息了)
86486
- const outInfo = readData.outInfo;
86487
- const outInfoArray = outInfo.split('|');
86488
- const cardId = outInfoArray[1];
86489
- const birthday = IdCardCommonUtils.getBirthdayByIdNumber(cardId).replace('-', '').replace('-', '');
86490
- const sex = IdCardCommonUtils.getGenderByIdNumber(cardId);
86491
- const IDCardData = {
86492
- info: {
86493
- name: outInfoArray[4],
86494
- sex,
86495
- birthday,
86496
- address: '',
86497
- cardId
86498
- },
86499
- headImage: ''
86500
- };
86501
- console.log('读取社保卡==>', readData);
86502
- return IDCardData;
86503
- }
86504
- /** 获取签名-base64 */
86505
- static async signNameRead() {
86506
- const readData = await EWindowPassService.read(EWindowPassMethodCode.GetSignName_Base64);
86507
- if (!readData) {
86508
- throw Error('未匹配可用的E窗通读取设备');
86509
- }
86510
- if (readData.retVal !== 0) {
86511
- throw Error("读取签名失败,返回值:" + readData.retVal + ",错误信息:" + readData.errMsg);
86512
- }
86513
- console.log('获取签名==>', readData);
86514
- return readData.signPicBase64;
86515
- }
86516
- /** 获取指纹*/
86517
- static async fingerPrintRead() {
86518
- let timeOver = 30;
86519
- async function readFingerPrint() {
86520
- const readData = await EWindowPassService.read(EWindowPassMethodCode.FingerPrint_Base64);
86521
- if (!readData) {
86522
- throw Error('未匹配可用的E窗通读取设备');
86523
- }
86524
- let list = readData.fingerPrintInfo.split("|");
86525
- console.log(list);
86526
- let ret = Number(list[1]);
86527
- if (ret > 1) {
86528
- if (timeOver > 0) {
86529
- timeOver--;
86530
- return await readFingerPrint();
86531
- } else {
86532
- return {
86533
- status: 'error',
86534
- data: '已超时,请重新操作,按压指纹'
86535
- };
86536
- }
86537
- } else {
86538
- return {
86539
- status: 'success',
86540
- data: readData.fingerPrintInfo
86541
- };
86542
- }
86543
- }
86544
- let {
86545
- status,
86546
- data
86547
- } = await readFingerPrint();
86548
- if (status === 'error') {
86549
- throw Error(data);
86550
- } else {
86551
- let [method, result, quality, image, featureCode] = data.split('|');
86552
- // getimgae|1|68|......|......
86553
- // method:方法,result:返回的状态,quality:指纹图片质量,image:图片base64,featureCode:指纹特征码
86554
- return {
86555
- method,
86556
- result,
86557
- quality,
86558
- image,
86559
- featureCode
86560
- };
86561
- }
86562
- }
86563
- }
86564
- _defineProperty(EWindowPassService, "iReadCardBasWebSocketUrl", 'ws://127.0.0.1:5847');
86565
- _defineProperty(EWindowPassService, "fingerPrintBasWebSocketUrl", 'ws://127.0.0.1:9000');
86566
- _defineProperty(EWindowPassService, "ws", void 0);
86567
- _defineProperty(EWindowPassService, "requestStore", []);
86568
86234
  ;// CONCATENATED MODULE: ./packages/service/external-plugins/huada-plugin-socket.service.ts
86569
86235
 
86570
86236
 
@@ -87809,7 +87475,7 @@ var wei_rong_face_auth_dialog_component = normalizeComponent(
87809
87475
  ;// CONCATENATED MODULE: ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-85.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./packages/id-card-reader/id-card-reader-button/src/id-card-reader-button.vue?vue&type=script&lang=js&
87810
87476
 
87811
87477
 
87812
-
87478
+ // import { EWindowPassService } from '../../../service/external-plugins/ewp-plugin-socket.service'
87813
87479
 
87814
87480
 
87815
87481
 
@@ -87957,8 +87623,8 @@ var wei_rong_face_auth_dialog_component = normalizeComponent(
87957
87623
  case 1:
87958
87624
  return this.readLSIDCard();
87959
87625
  case 2:
87960
- idcardInfo = await EWindowPassService.idCardRead();
87961
- this.$emit('click', idcardInfo);
87626
+ // idcardInfo = await EWindowPassService.idCardRead()
87627
+ // this.$emit('click', idcardInfo)
87962
87628
  break;
87963
87629
  case 3:
87964
87630
  const data = await MRAdbReadService.idCardRead();
@@ -88008,8 +87674,8 @@ var wei_rong_face_auth_dialog_component = normalizeComponent(
88008
87674
  break;
88009
87675
  case 2:
88010
87676
  {
88011
- const data = await EWindowPassService.faceValidateWithIdCardRead();
88012
- this.$emit('click', data);
87677
+ // const data = await EWindowPassService.faceValidateWithIdCardRead()
87678
+ // this.$emit('click', data)
88013
87679
  break;
88014
87680
  }
88015
87681
  case 3:
@@ -88040,7 +87706,7 @@ var wei_rong_face_auth_dialog_component = normalizeComponent(
88040
87706
  let idcardInfo;
88041
87707
  switch (this.readMachineType) {
88042
87708
  case 2:
88043
- idcardInfo = await EWindowPassService.socialSecurityCardRead();
87709
+ // idcardInfo = await EWindowPassService.socialSecurityCardRead()
88044
87710
  break;
88045
87711
  case 4:
88046
87712
  idcardInfo = await HuzReadService.socialSecurityCardRead();
@@ -88067,7 +87733,7 @@ var wei_rong_face_auth_dialog_component = normalizeComponent(
88067
87733
  userSignature = await SignReadService.read(PluginApiType.hwSign);
88068
87734
  break;
88069
87735
  case 2:
88070
- userSignature = await EWindowPassService.signNameRead();
87736
+ // userSignature = await EWindowPassService.signNameRead()
88071
87737
  break;
88072
87738
  case 3:
88073
87739
  // 捷宇
@@ -88216,11 +87882,11 @@ var wei_rong_face_auth_dialog_component = normalizeComponent(
88216
87882
  ;
88217
87883
  var id_card_reader_button_component = normalizeComponent(
88218
87884
  src_id_card_reader_buttonvue_type_script_lang_js_,
88219
- id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_render,
88220
- id_card_reader_buttonvue_type_template_id_19ae37ba_scoped_true_staticRenderFns,
87885
+ id_card_reader_buttonvue_type_template_id_88636c88_scoped_true_render,
87886
+ id_card_reader_buttonvue_type_template_id_88636c88_scoped_true_staticRenderFns,
88221
87887
  false,
88222
87888
  null,
88223
- "19ae37ba",
87889
+ "88636c88",
88224
87890
  null
88225
87891
 
88226
87892
  )