react_hsbc_teller 2.0.52 → 2.0.53

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "2.0.52",
3
+ "version": "2.0.53",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -63,7 +63,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
63
63
  import axios from 'axios';
64
64
  import CryptoJS from "crypto-js";
65
65
 
66
- const SDK_VERISON = '2.0.52'
66
+ const SDK_VERISON = '2.0.53'
67
67
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
68
68
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
69
69
  const { Option } = Select;
@@ -4836,6 +4836,8 @@ class Video extends Component {
4836
4836
  // })
4837
4837
  } else {
4838
4838
  console.log('身份证ocr')
4839
+ const idCardName = this.state.idCardName
4840
+ const documentType = this.state.documentType
4839
4841
  // 身份证,进行人脸识别后再入库
4840
4842
  this.state.userIdCardResults[this.state.faceCustomerUid] = {
4841
4843
  idCardName: this.state.idCardName,
@@ -4873,6 +4875,14 @@ class Video extends Component {
4873
4875
  setTimeout(() => {
4874
4876
  this.publishVideoTwo()
4875
4877
  }, 0);
4878
+
4879
+ // 保存图片到本地
4880
+ setTimeout(() => {
4881
+ combineBase64Images(this.state.facialImgFront, this.state.facialImgBack, (base64Image)=>{
4882
+ saveBase64Image(base64Image, `${idCardName}-${documentType}`)
4883
+ })
4884
+ }, 100);
4885
+
4876
4886
  }
4877
4887
  }
4878
4888
  // ocr结果入库
@@ -4927,10 +4937,10 @@ class Video extends Component {
4927
4937
  if (this.state.documentType == 'HK_MO_RESIDENCE_CARD' || this.state.documentType == 'TW_RESIDENCE_CARD') {
4928
4938
  // 居住证正反面需要拼接成一张图
4929
4939
  combineBase64Images(this.state.facialImgFront, this.state.facialImgBack, (base64Image)=>{
4930
- saveBase64Image(base64Image, `${data.idCardName}-${this.state.documentType}`)
4940
+ saveBase64Image(base64Image, `${data.reviseIdCardName||data.idCardName}-${this.state.documentType}`)
4931
4941
  })
4932
4942
  } else {
4933
- saveBase64Image(this.state.facialImgFront, `${data.idCardName}-${this.state.documentType}`)
4943
+ saveBase64Image(this.state.facialImgFront, `${data.reviseIdCardName||data.idCardName}-${this.state.documentType}`)
4934
4944
  }
4935
4945
  } else {
4936
4946
  console.log('1')
@@ -5223,11 +5233,6 @@ class Video extends Component {
5223
5233
  if (this.state.isPictureInPicture) {
5224
5234
  this.pictureInPicture('Refresh')
5225
5235
  }
5226
- // console.log(this.state.facialImgFront)
5227
- // console.log(`${data.idCardName}-${this.state.documentType}`)
5228
- combineBase64Images(this.state.facialImgFront, this.state.facialImgBack, (base64Image)=>{
5229
- saveBase64Image(base64Image, `${data.idCardName}-${this.state.documentType}`)
5230
- })
5231
5236
  } else {
5232
5237
  console.log('1')
5233
5238
  this.messageClick('保持信息失败', 'error')
@@ -179,7 +179,7 @@ function saveBase64Image(base64Data, fileName) {
179
179
  // 创建一个a标签用于下载
180
180
  let link = document.createElement('a');
181
181
  link.href = url;
182
- link.download = fileName;
182
+ link.download = fileName + '.jpg';
183
183
  document.body.appendChild(link);
184
184
 
185
185
  // 触发下载