react_hsbc_teller 2.0.56 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "2.0.56",
3
+ "version": "2.0.58",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -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://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
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: '无客户',
@@ -6,16 +6,15 @@ const { Step } = Steps;
6
6
  export default class step extends Component {
7
7
  render() {
8
8
  let current = this.props.current;
9
- let isOcr = this.props.ocr;
10
9
  return (
11
10
  <div style={{...this.props.style}}>
12
- <div style={{marginBottom: '10px'}}>{isOcr ? '客户证件识别' : '客户身份验证'}</div>
11
+ <div style={{marginBottom: '10px'}}>客户证件识别</div>
13
12
  <Steps current={current} direction={this.props.direction} size="small" style={{width:'150px', height: '200px'}}>
14
13
  {/* step1 */}
15
14
  <Step status={current==0? '':'wait'} title="请选择客户" />
16
15
 
17
16
  {/* step2 */}
18
- <Step status={current==1? '':'wait'} title={isOcr ? '确认客户证件类型' : '确认客户证件类型&客户授权'} />
17
+ <Step status={current==1? '':'wait'} title="确认客户证件类型" />
19
18
 
20
19
  {/* step3 */}
21
20
  <Step status={current==2? '':'wait'} title="证件信息核查" />
@@ -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.56'
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
- // if (type == 'noFace') {
4832
- await this.handleConfirmCallback()
4833
- // this.setState({
4834
- // idCardNameFace: this.state.idCardName,
4835
- // idCardNumberFace: this.state.idCardNumber,
4836
- // certificateValidityFace: this.state.certificateValidity
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
- isModalVisibleFacial: false,
4840
- cardResuly: '',
4841
- idCardNumber: '',
4842
- idCardName: '',
4843
- certificateValidity: '',
4844
- resultIdCardName: '',
4845
- resultIdCardNumber: '',
4846
- resultCertificateDate: '',
4847
- authorizeStaffId: ''
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
- let data = {
5207
- idCardName: userInfo.resultIdCardName,
5208
- staffId: this.props.tellerAccount,
5209
- activityId: this.props.businessNumber,
5210
- appAccount: this.state.faceCustomerUid,
5211
- idCardNumber: userInfo.resultIdCardNumber,
5212
- sessionId: this.state.sessionId,
5213
- certificateType: 'ID_CARD',
5214
- customerName: userInfo.customerName,
5215
- startDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[0] : '',
5216
- endDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[1] : '',
5217
- }
5218
- // 添加修改后的证件参数
5219
- if (userInfo.authorizeStaffId) {
5220
- data.authorizeStaffId = userInfo.authorizeStaffId
5221
- }
5222
- if (userInfo.idCardName != userInfo.resultIdCardName) {
5223
- data.reviseIdCardName = userInfo.idCardName
5224
- }
5225
- if (userInfo.idCardNumber != userInfo.resultIdCardNumber) {
5226
- data.reviseIdCardNumber = userInfo.idCardNumber
5227
- }
5228
- let reviseCertificateStartDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[0] : '';
5229
- let reviseCertificateEndDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[1] : '';
5230
- if (reviseCertificateStartDate != data.startDate) {
5231
- data.reviseCertificateStartDate = reviseCertificateStartDate
5232
- }
5233
- if (reviseCertificateEndDate != data.endDate) {
5234
- data.reviseCertificateEndDate = reviseCertificateEndDate
5235
- }
5236
- let result = await API.confirmCallback(data);
5237
- console.log('confirmCallback', result)
5238
- if (result.code == 200) {
5239
- // console.log(data)
5240
- let item = this.state.videoList.find(el => el.userId == this.state.faceCustomerUid )
5241
- item.hasOcr = 2; // 身份证ocr
5242
- // this.setState({
5243
- // videoList: this.state.videoList
5244
- // })
5245
- this.videoListSort();
5246
- if (this.state.isPictureInPicture) {
5247
- this.pictureInPicture('Refresh')
5248
- }
5249
- } else {
5250
- console.log('1')
5251
- this.messageClick('保持信息失败', 'error')
5252
- }
5253
- } catch (err) {
5254
- console.log('2',err)
5255
- this.messageClick('保持信息失败', 'error')
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
- certificateValidityType: true
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 = () => {