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/README.md +272 -1
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/pages/video/video.jsx +13 -8
- package/packages/utils/utils.js +1 -1
package/package.json
CHANGED
|
@@ -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.
|
|
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')
|
package/packages/utils/utils.js
CHANGED
|
@@ -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
|
// 触发下载
|