react_hsbc_teller 2.0.57 → 2.0.58
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 +2 -0
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/demo/demo.js +2 -1
- package/packages/pages/video/video.jsx +107 -133
package/package.json
CHANGED
package/packages/demo/demo.js
CHANGED
|
@@ -24,7 +24,8 @@ class Demo extends Component {
|
|
|
24
24
|
// baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
|
|
25
25
|
// resourcePath: 'https://counter-web.leimondata.cn:7199',
|
|
26
26
|
// resourcePath:'http://121.196.19.70:8027/',
|
|
27
|
-
roomServerUrl: 'wss://
|
|
27
|
+
roomServerUrl: 'wss://uat.mpaas.investments.hsbc.com.hk:31000/mpaas/mrtc/ws',
|
|
28
|
+
// roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
|
|
28
29
|
baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
|
|
29
30
|
resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
|
|
30
31
|
prohibitPrompt: '无客户',
|
|
@@ -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.58'
|
|
67
67
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
68
68
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
69
69
|
const { Option } = Select;
|
|
@@ -4827,76 +4827,52 @@ class Video extends Component {
|
|
|
4827
4827
|
})
|
|
4828
4828
|
}
|
|
4829
4829
|
handleFinishOcr = async (type) => {
|
|
4830
|
-
|
|
4831
|
-
|
|
4832
|
-
|
|
4833
|
-
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4830
|
+
await this.handleConfirmCallback();
|
|
4831
|
+
if (type === 'noFace') {
|
|
4832
|
+
this.setState({
|
|
4833
|
+
isModalVisibleFacial: false,
|
|
4834
|
+
cardResuly: '',
|
|
4835
|
+
idCardNumber: '',
|
|
4836
|
+
idCardName: '',
|
|
4837
|
+
certificateValidity: '',
|
|
4838
|
+
resultIdCardName: '',
|
|
4839
|
+
resultIdCardNumber: '',
|
|
4840
|
+
resultCertificateDate: '',
|
|
4841
|
+
authorizeStaffId: ''
|
|
4842
|
+
})
|
|
4843
|
+
} else {
|
|
4844
|
+
console.log('身份证ocr');
|
|
4845
|
+
// 保存身份证,进行人脸识别
|
|
4846
|
+
this.state.userIdCardResults[this.state.faceCustomerUid] = {
|
|
4847
|
+
idCardName: this.state.idCardName,
|
|
4848
|
+
idCardNumber: this.state.idCardNumber,
|
|
4849
|
+
customerName: this.state.customerName,
|
|
4850
|
+
certificateValidity: this.state.certificateValidity,
|
|
4851
|
+
resultIdCardName: this.state.resultIdCardName,
|
|
4852
|
+
resultIdCardNumber: this.state.resultIdCardNumber,
|
|
4853
|
+
resultCertificateDate: this.state.resultCertificateDate,
|
|
4854
|
+
authorizeStaffId: this.state.authorizeStaffId,
|
|
4855
|
+
}
|
|
4856
|
+
console.log(this.state.userIdCardResults)
|
|
4838
4857
|
this.setState({
|
|
4839
|
-
|
|
4840
|
-
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4858
|
+
idCardNameFace: this.state.idCardName,
|
|
4859
|
+
idCardNumberFace: this.state.idCardNumber,
|
|
4860
|
+
certificateValidityFace: this.state.certificateValidity,
|
|
4861
|
+
userIdCardResults: this.state.userIdCardResults
|
|
4862
|
+
},()=>{
|
|
4863
|
+
this.setState({
|
|
4864
|
+
isModalVisibleFacial: false,
|
|
4865
|
+
cardResuly: '',
|
|
4866
|
+
certificateValidity: '',
|
|
4867
|
+
idCardNumber: '',
|
|
4868
|
+
idCardName: '',
|
|
4869
|
+
resultIdCardName: '',
|
|
4870
|
+
resultIdCardNumber: '',
|
|
4871
|
+
resultCertificateDate: '',
|
|
4872
|
+
authorizeStaffId: '',
|
|
4873
|
+
})
|
|
4848
4874
|
})
|
|
4849
|
-
|
|
4850
|
-
// } else {
|
|
4851
|
-
// console.log('身份证ocr')
|
|
4852
|
-
// const idCardName = this.state.idCardName
|
|
4853
|
-
// const documentType = this.state.documentType
|
|
4854
|
-
// // 身份证,进行人脸识别后再入库
|
|
4855
|
-
// this.state.userIdCardResults[this.state.faceCustomerUid] = {
|
|
4856
|
-
// idCardName: this.state.idCardName,
|
|
4857
|
-
// idCardNumber: this.state.idCardNumber,
|
|
4858
|
-
// customerName: this.state.customerName,
|
|
4859
|
-
// certificateValidity: this.state.certificateValidity,
|
|
4860
|
-
// resultIdCardName: this.state.resultIdCardName,
|
|
4861
|
-
// resultIdCardNumber: this.state.resultIdCardNumber,
|
|
4862
|
-
// resultCertificateDate: this.state.resultCertificateDate,
|
|
4863
|
-
// authorizeStaffId: this.state.authorizeStaffId,
|
|
4864
|
-
// }
|
|
4865
|
-
// console.log(this.state.userIdCardResults)
|
|
4866
|
-
// this.setState({
|
|
4867
|
-
// idCardNameFace: this.state.idCardName,
|
|
4868
|
-
// idCardNumberFace: this.state.idCardNumber,
|
|
4869
|
-
// certificateValidityFace: this.state.certificateValidity,
|
|
4870
|
-
// userIdCardResults: this.state.userIdCardResults
|
|
4871
|
-
// },()=>{
|
|
4872
|
-
// this.state.faceCustomerType = 1
|
|
4873
|
-
// this.setState({
|
|
4874
|
-
// cardResuly: '',
|
|
4875
|
-
// certificateValidity: '',
|
|
4876
|
-
// idCardNumber: '',
|
|
4877
|
-
// idCardName: '',
|
|
4878
|
-
// resultIdCardName: '',
|
|
4879
|
-
// resultIdCardNumber: '',
|
|
4880
|
-
// resultCertificateDate: '',
|
|
4881
|
-
// authorizeStaffId: '',
|
|
4882
|
-
// titleModal: '身份验证',
|
|
4883
|
-
// // clickedFacial: true,
|
|
4884
|
-
// facialImg: faceImage,
|
|
4885
|
-
// isFaceImage: false
|
|
4886
|
-
// })
|
|
4887
|
-
// })
|
|
4888
|
-
// setTimeout(() => {
|
|
4889
|
-
// this.publishVideoTwo()
|
|
4890
|
-
// }, 0);
|
|
4891
|
-
//
|
|
4892
|
-
// // 保存图片到本地
|
|
4893
|
-
// setTimeout(() => {
|
|
4894
|
-
// combineBase64Images(this.state.facialImgFront, this.state.facialImgBack, (base64Image)=>{
|
|
4895
|
-
// saveBase64Image(base64Image, `${idCardName}-${documentType}`)
|
|
4896
|
-
// })
|
|
4897
|
-
// }, 100);
|
|
4898
|
-
//
|
|
4899
|
-
// }
|
|
4875
|
+
}
|
|
4900
4876
|
}
|
|
4901
4877
|
// ocr结果入库
|
|
4902
4878
|
handleConfirmCallback = async () => {
|
|
@@ -5201,59 +5177,59 @@ class Video extends Component {
|
|
|
5201
5177
|
return
|
|
5202
5178
|
}
|
|
5203
5179
|
this.handleCancelFacial();
|
|
5204
|
-
try {
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5226
|
-
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5244
|
-
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
} catch (err) {
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
}
|
|
5180
|
+
// try {
|
|
5181
|
+
// // 原始证件参数
|
|
5182
|
+
// let data = {
|
|
5183
|
+
// idCardName: userInfo.resultIdCardName,
|
|
5184
|
+
// staffId: this.props.tellerAccount,
|
|
5185
|
+
// activityId: this.props.businessNumber,
|
|
5186
|
+
// appAccount: this.state.faceCustomerUid,
|
|
5187
|
+
// idCardNumber: userInfo.resultIdCardNumber,
|
|
5188
|
+
// sessionId: this.state.sessionId,
|
|
5189
|
+
// certificateType: 'ID_CARD',
|
|
5190
|
+
// customerName: userInfo.customerName,
|
|
5191
|
+
// startDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[0] : '',
|
|
5192
|
+
// endDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[1] : '',
|
|
5193
|
+
// }
|
|
5194
|
+
// // 添加修改后的证件参数
|
|
5195
|
+
// if (userInfo.authorizeStaffId) {
|
|
5196
|
+
// data.authorizeStaffId = userInfo.authorizeStaffId
|
|
5197
|
+
// }
|
|
5198
|
+
// if (userInfo.idCardName != userInfo.resultIdCardName) {
|
|
5199
|
+
// data.reviseIdCardName = userInfo.idCardName
|
|
5200
|
+
// }
|
|
5201
|
+
// if (userInfo.idCardNumber != userInfo.resultIdCardNumber) {
|
|
5202
|
+
// data.reviseIdCardNumber = userInfo.idCardNumber
|
|
5203
|
+
// }
|
|
5204
|
+
// let reviseCertificateStartDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[0] : '';
|
|
5205
|
+
// let reviseCertificateEndDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[1] : '';
|
|
5206
|
+
// if (reviseCertificateStartDate != data.startDate) {
|
|
5207
|
+
// data.reviseCertificateStartDate = reviseCertificateStartDate
|
|
5208
|
+
// }
|
|
5209
|
+
// if (reviseCertificateEndDate != data.endDate) {
|
|
5210
|
+
// data.reviseCertificateEndDate = reviseCertificateEndDate
|
|
5211
|
+
// }
|
|
5212
|
+
// let result = await API.confirmCallback(data);
|
|
5213
|
+
// console.log('confirmCallback', result)
|
|
5214
|
+
// if (result.code == 200) {
|
|
5215
|
+
// // console.log(data)
|
|
5216
|
+
// let item = this.state.videoList.find(el => el.userId == this.state.faceCustomerUid )
|
|
5217
|
+
// item.hasOcr = 2; // 身份证ocr
|
|
5218
|
+
// // this.setState({
|
|
5219
|
+
// // videoList: this.state.videoList
|
|
5220
|
+
// // })
|
|
5221
|
+
// this.videoListSort();
|
|
5222
|
+
// if (this.state.isPictureInPicture) {
|
|
5223
|
+
// this.pictureInPicture('Refresh')
|
|
5224
|
+
// }
|
|
5225
|
+
// } else {
|
|
5226
|
+
// console.log('1')
|
|
5227
|
+
// this.messageClick('保持信息失败', 'error')
|
|
5228
|
+
// }
|
|
5229
|
+
// } catch (err) {
|
|
5230
|
+
// console.log('2',err)
|
|
5231
|
+
// this.messageClick('保持信息失败', 'error')
|
|
5232
|
+
// }
|
|
5257
5233
|
};
|
|
5258
5234
|
handleCancelFacial = () => {
|
|
5259
5235
|
this.sendMessage({
|
|
@@ -5267,6 +5243,7 @@ class Video extends Component {
|
|
|
5267
5243
|
})
|
|
5268
5244
|
};
|
|
5269
5245
|
publishVideoTwo=()=>{
|
|
5246
|
+
console.log('publishVideoTwo', document.getElementById('publish_video_2'))
|
|
5270
5247
|
const videoMedia = document.getElementById('publish_video_2');
|
|
5271
5248
|
videoMedia.srcObject = document.getElementById(videoName).srcObject
|
|
5272
5249
|
clearTime = setTimeout(() => {
|
|
@@ -5447,7 +5424,7 @@ class Video extends Component {
|
|
|
5447
5424
|
sid = document.getElementById('video12').name;
|
|
5448
5425
|
videoName = 'video12'
|
|
5449
5426
|
}
|
|
5450
|
-
console.log(sid)
|
|
5427
|
+
console.log('sid-videoName', sid, videoName)
|
|
5451
5428
|
this.state.customOcrSid = sid
|
|
5452
5429
|
this.state.faceCustomerUid = item.customId,
|
|
5453
5430
|
this.state.customerName = item.name
|
|
@@ -5465,16 +5442,13 @@ class Video extends Component {
|
|
|
5465
5442
|
idCardName: '',
|
|
5466
5443
|
cardFailReason: '',
|
|
5467
5444
|
cardResuly: '',
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
this.setState({
|
|
5473
|
-
isModalVisibleFacial: true,
|
|
5474
|
-
}, () => {
|
|
5475
|
-
this.publishVideoTwo()
|
|
5476
|
-
})
|
|
5445
|
+
videoType: '',
|
|
5446
|
+
certificateValidityType: true,
|
|
5447
|
+
isModalVisibleFacial: true,
|
|
5477
5448
|
})
|
|
5449
|
+
setTimeout(()=> {
|
|
5450
|
+
this.publishVideoTwo()
|
|
5451
|
+
},0)
|
|
5478
5452
|
}
|
|
5479
5453
|
}
|
|
5480
5454
|
sgsinImage = () => {
|
|
@@ -7457,7 +7431,7 @@ class Video extends Component {
|
|
|
7457
7431
|
</div>
|
|
7458
7432
|
]}>
|
|
7459
7433
|
<div style={{display: 'flex', padding: '10px 20px'}}>
|
|
7460
|
-
<Step current={this.state.isCustomerSelect?0:1} />
|
|
7434
|
+
<Step current={this.state.isCustomerSelect?0:1} ocr={true} />
|
|
7461
7435
|
<div>
|
|
7462
7436
|
{
|
|
7463
7437
|
this.state.isCustomerSelect && <div>
|