react_hsbc_teller 1.8.9 → 1.9.0

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": "1.8.9",
3
+ "version": "1.9.0",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -5,10 +5,10 @@ import Pdf from './pdf.js'
5
5
  class Demo extends Component {
6
6
  state = {
7
7
  shareMask: false,
8
- imRoomId: "7gXpNZYEg@conference.ls-im-xmpp.chinawp.dev.ali.cloud.cn.hsbc",
9
- sessionId: "7gXpNZYEg",
10
- mtoken: "edc44751a3bf",
11
- roomId: "662356472529707",
8
+ mtoken: "3c1b4badb7d7",
9
+ roomId: "661841296389119",
10
+ imRoomId: "iax56tSCD@conference.ls-im-xmpp.chinawp.dev.ali.cloud.cn.hsbc",
11
+ sessionId: "iax56tSCD",
12
12
  // roomId: '',
13
13
  // mtoken: '',
14
14
  // imRoomId: '',
@@ -308,6 +308,7 @@ class Video extends Component {
308
308
  idCardName: '',
309
309
  idCardNameFace: '',
310
310
  idCardNumberFace: '',
311
+ certificateValidityFace: '',
311
312
  idCardNumber: '',
312
313
  certificateValidity: '',
313
314
  operateShow: false,
@@ -320,8 +321,9 @@ class Video extends Component {
320
321
  customerSelect: '',
321
322
  documentType: '',
322
323
  isCustomerSelect: true,
324
+ documentError: '',
323
325
  customerTitleName: '客户身份识别',
324
- certificateType: 'identityCard',
326
+ certificateType: 'ID_CARD',
325
327
  customerName: '',
326
328
  IDtypeFrontOrBack: '',
327
329
  disabledIdCard: true,
@@ -336,6 +338,8 @@ class Video extends Component {
336
338
  loadingStaff: false,
337
339
  isVideoList: false,
338
340
  faceFailReason: '',
341
+ cardResuly: '',
342
+ cardFailReason: '',
339
343
  };
340
344
  // eslint-disable-next-line no-undef
341
345
  test_controller = '';
@@ -343,7 +347,7 @@ class Video extends Component {
343
347
  saveLog = (val) => {
344
348
  axios({
345
349
  method: 'get',
346
- baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.8.9&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
350
+ baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.0&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
347
351
 
348
352
  }).then(res => {
349
353
 
@@ -875,7 +879,7 @@ class Video extends Component {
875
879
  list.push({
876
880
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
877
881
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
878
- name: this.state.videoOneName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
882
+ name: this.state.videoOneName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
879
883
  tourist: false
880
884
  })
881
885
  }
@@ -885,7 +889,7 @@ class Video extends Component {
885
889
  list.push({
886
890
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
887
891
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
888
- name: this.state.videoTwoName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
892
+ name: this.state.videoTwoName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
889
893
  tourist: false
890
894
  })
891
895
  }
@@ -895,7 +899,7 @@ class Video extends Component {
895
899
  list.push({
896
900
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
897
901
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
898
- name: this.state.videoThreeName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
902
+ name: this.state.videoThreeName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
899
903
  tourist: false
900
904
  })
901
905
  }
@@ -905,7 +909,7 @@ class Video extends Component {
905
909
  list.push({
906
910
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
907
911
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
908
- name: this.state.videoFourName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
912
+ name: this.state.videoFourName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
909
913
  tourist: false
910
914
  })
911
915
  }
@@ -915,7 +919,7 @@ class Video extends Component {
915
919
  list.push({
916
920
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
917
921
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
918
- name: this.state.videoFiveName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
922
+ name: this.state.videoFiveName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
919
923
  tourist: false
920
924
  })
921
925
  }
@@ -924,7 +928,7 @@ class Video extends Component {
924
928
  list.push({
925
929
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
926
930
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
927
- name: this.state.videoSixName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
931
+ name: this.state.videoSixName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
928
932
  tourist: false
929
933
  })
930
934
  }
@@ -932,7 +936,7 @@ class Video extends Component {
932
936
  list.push({
933
937
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).feedId,
934
938
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid,
935
- name: this.state.videoSevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
939
+ name: this.state.videoSevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
936
940
  tourist: false
937
941
  })
938
942
  }
@@ -940,7 +944,7 @@ class Video extends Component {
940
944
  list.push({
941
945
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).feedId,
942
946
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid,
943
- name: this.state.videoEightName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
947
+ name: this.state.videoEightName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
944
948
  tourist: false
945
949
  })
946
950
  }
@@ -948,7 +952,7 @@ class Video extends Component {
948
952
  list.push({
949
953
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).feedId,
950
954
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid,
951
- name: this.state.videoNineName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
955
+ name: this.state.videoNineName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
952
956
  tourist: false
953
957
  })
954
958
  }
@@ -956,7 +960,7 @@ class Video extends Component {
956
960
  list.push({
957
961
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).feedId,
958
962
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid,
959
- name: this.state.videoTenName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
963
+ name: this.state.videoTenName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
960
964
  tourist: false
961
965
  })
962
966
  }
@@ -964,7 +968,7 @@ class Video extends Component {
964
968
  list.push({
965
969
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).feedId,
966
970
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid,
967
- name: this.state.videoElevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
971
+ name: this.state.videoElevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
968
972
  tourist: false
969
973
  })
970
974
  }
@@ -972,7 +976,7 @@ class Video extends Component {
972
976
  list.push({
973
977
  feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).feedId,
974
978
  customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid,
975
- name: this.state.videoTwelveName + (this.state.faceCustomerType == 1 ? '--人脸识别' : '--OCR'),
979
+ name: this.state.videoTwelveName + (this.state.faceCustomerType == 1 ? '--人脸识别' : ''),
976
980
  tourist: false
977
981
  })
978
982
  }
@@ -2215,9 +2219,16 @@ class Video extends Component {
2215
2219
  };
2216
2220
  this.test_controller.OnSendTextMsgSucc = (msgId) => {
2217
2221
  console.log('发送成功', msgId)
2222
+ this.setState({
2223
+ documentError: '',
2224
+ isModalVisibleCustomer: false,
2225
+ })
2218
2226
  }
2219
2227
  this.test_controller.OnSendTextMsgFailed = (msgId, code, msg) => {
2220
2228
  console.log('发送失败', msgId, code, msg)
2229
+ this.setState({
2230
+ documentError: '推送授权白板失败,请重试'
2231
+ })
2221
2232
  }
2222
2233
  this.test_controller.OnReceiveTextMsg = (uid, msg) => {
2223
2234
  console.log('收到手机端消息', uid, msg, JSON.parse(msg).typeId, JSON.parse(msg).data.sessionId, this.state.sessionId)
@@ -3826,7 +3837,7 @@ class Video extends Component {
3826
3837
  }
3827
3838
  }
3828
3839
  componentWillMount() {
3829
- console.log('hsbc_teller_sdk', '1.8.9')
3840
+ console.log('hsbc_teller_sdk', '1.9.0')
3830
3841
  if (this.props.sessionId) {
3831
3842
  this.getRoomStatus({
3832
3843
  sessionId: this.props.sessionId
@@ -4218,13 +4229,14 @@ class Video extends Component {
4218
4229
  this.setState({
4219
4230
  idCardNameFace: this.state.idCardName,
4220
4231
  idCardNumberFace: this.state.idCardNumber,
4221
-
4232
+ certificateValidityFace: this.state.certificateValidity
4222
4233
  },()=>{
4223
4234
  this.setState({
4224
4235
  isModalVisibleFacial: false,
4236
+ cardResuly: '',
4225
4237
  idCardNumber: '',
4226
4238
  idCardName: '',
4227
- // certificateValidity: '',
4239
+ certificateValidity: '',
4228
4240
  })
4229
4241
  })
4230
4242
  } else {
@@ -4232,10 +4244,12 @@ class Video extends Component {
4232
4244
  this.setState({
4233
4245
  idCardNameFace: this.state.idCardName,
4234
4246
  idCardNumberFace: this.state.idCardNumber,
4235
-
4247
+ certificateValidityFace: this.state.certificateValidity
4236
4248
  },()=>{
4237
4249
  this.state.faceCustomerType = 1
4238
4250
  this.setState({
4251
+ cardResuly: '',
4252
+ certificateValidity: '',
4239
4253
  idCardNumber: '',
4240
4254
  idCardName: '',
4241
4255
  titleModal: '人脸识别',
@@ -4264,8 +4278,9 @@ class Video extends Component {
4264
4278
  staffId: this.props.tellerAccount,
4265
4279
  activityId: this.props.businessNumber,
4266
4280
  appAccount: this.state.faceCustomerUid,
4281
+ certificateType: this.state.certificateType,
4267
4282
  fileBase64: val == 1 ? this.state.facialImgFront.replace(/^data:image\/\w+;base64,/, "") : this.state.facialImgBack.replace(/^data:image\/\w+;base64,/, ""),
4268
- type: val
4283
+ type: val == 1 ? true : false
4269
4284
  });
4270
4285
  if (result.code == 200) {
4271
4286
  console.log('ocrCallback', result.data)
@@ -4280,41 +4295,68 @@ class Video extends Component {
4280
4295
  "userId": this.state.faceCustomerUid
4281
4296
  })
4282
4297
  });
4283
- if (result.data.side == 'front') {
4298
+ if(this.state.documentType == 'ID_CARD') {
4299
+ if (result.data.side == 'front') {
4300
+ this.setState({
4301
+ // isModalVisibleFacial: false
4302
+ idCardNumber: result.data.idCardNumber,
4303
+ idCardName: result.data.idCardName
4304
+ })
4305
+ this.ocrCallback(2)
4306
+ } else if (result.data.side == 'back') {
4307
+ console.log(result.data.startDate, result.data.endDate)
4308
+ this.setState({
4309
+ certificateValidity: result.data.startDate + '-' + result.data.endDate,
4310
+ loadingFace: false,
4311
+ cardFailReason: '',
4312
+ cardResuly: 'success',
4313
+ })
4314
+ }
4315
+ }
4316
+ if(this.state.documentType == 'PASSPORT_CARD') {
4284
4317
  this.setState({
4285
- // isModalVisibleFacial: false
4286
4318
  idCardNumber: result.data.idCardNumber,
4287
- idCardName: result.data.idCardName
4288
- })
4289
- this.ocrCallback(2)
4290
- } else if (result.data.side == 'back') {
4291
- console.log(result.data.startDate, result.data.endDate)
4292
- this.setState({
4319
+ idCardName: result.data.idCardName,
4293
4320
  certificateValidity: result.data.startDate + '-' + result.data.endDate,
4294
- loadingFace: false
4321
+ loadingFace: false,
4322
+ cardFailReason: '',
4323
+ cardResuly: 'success',
4295
4324
  })
4296
4325
  }
4326
+
4297
4327
  } else {
4298
4328
  this.setState({
4299
- loadingFace: false
4329
+ loadingFace: false,
4330
+ cardFailReason: result.message,
4331
+ cardResuly: 'fail',
4300
4332
  })
4301
4333
  this.messageClick('识别失败', 'error')
4302
4334
  }
4303
4335
  } catch (err) {
4304
4336
  this.setState({
4305
- loadingFace: false
4337
+ loadingFace: false,
4338
+ cardFailReason: err.response.message,
4339
+ cardResuly: 'fail',
4306
4340
  })
4307
- this.messageClick('识别失败', 'error')
4341
+ // this.messageClick('识别失败', 'error')
4308
4342
  }
4309
4343
  }
4310
4344
  handleOkFacial = () => {
4311
4345
  if (this.state.faceCustomerType == 2) {
4312
4346
  if (this.state.IDtypeFrontOrBack == '请截取证件正面') {
4313
- this.setState({
4314
- facialImg: ocrImage,
4315
- IDtypeFrontOrBack: '请截取证件反面',
4316
- isFaceImage: false,
4317
- })
4347
+ if(this.state.documentType == 'PASSPORT_CARD') {
4348
+ this.setState({
4349
+ loadingFace: true
4350
+ })
4351
+ this.ocrCallback(1)
4352
+ } else {
4353
+ this.setState({
4354
+ facialImg: ocrImage,
4355
+ IDtypeFrontOrBack: '请截取证件反面',
4356
+ isFaceImage: false,
4357
+ })
4358
+ }
4359
+
4318
4360
  } else if (this.state.IDtypeFrontOrBack == '请截取证件反面') {
4319
4361
  this.setState({
4320
4362
  loadingFace: true
@@ -4349,6 +4391,35 @@ class Video extends Component {
4349
4391
  isModalVisibleFacial: false
4350
4392
  })
4351
4393
  };
4394
+ newFaceClick=()=>{
4395
+ callNimIM('sendCustomCmdMsg', {
4396
+ customId: this.state.imRoomId,
4397
+ content: JSON.stringify({
4398
+ 'typeId': 1020,
4399
+ 'sessionId': this.state.sessionId,
4400
+ 'cameraState': 2, // 1--打开前置 2--打开后置
4401
+ "userId": this.state.faceCustomerUid
4402
+ })
4403
+ });
4404
+ this.setState({
4405
+ clickedFacial: false,
4406
+ clickedOcr: false,
4407
+ isFaceImage: false,
4408
+ facialImg: ocrImage,
4409
+ disabledIdCard: true,
4410
+ IDtypeFrontOrBack: '请截取证件正面',
4411
+ facialImgFront: '',
4412
+ facialImgBack: '',
4413
+ faceResuly: '',
4414
+ idCardNumber: '',
4415
+ idCardName: '',
4416
+ cardFailReason: '',
4417
+ cardResuly: '',
4418
+ }, () => {
4419
+ const videoMedia = document.getElementById('publish_video_2');
4420
+ videoMedia.srcObject = document.getElementById(videoName).srcObject
4421
+ })
4422
+ }
4352
4423
  ReIdentification = () =>{
4353
4424
  this.setState({
4354
4425
  faceResuly: '',
@@ -4506,6 +4577,8 @@ class Video extends Component {
4506
4577
  faceResuly: '',
4507
4578
  idCardNumber: '',
4508
4579
  idCardName: '',
4580
+ cardFailReason: '',
4581
+ cardResuly: '',
4509
4582
  }, () => {
4510
4583
 
4511
4584
 
@@ -4514,6 +4587,9 @@ class Video extends Component {
4514
4587
  }, () => {
4515
4588
  const videoMedia = document.getElementById('publish_video_2');
4516
4589
  videoMedia.srcObject = document.getElementById(videoName).srcObject
4590
+ videoMedia.onloadeddata = function() {
4591
+ console.log('onerror')
4592
+ }
4517
4593
  })
4518
4594
  })
4519
4595
  }
@@ -5323,6 +5399,14 @@ class Video extends Component {
5323
5399
  isModalVisibleCustomer: false
5324
5400
  })
5325
5401
  }
5402
+ goBackSelectCustomer=()=>{
5403
+ this.setState({
5404
+ documentType: '',
5405
+ isCustomerSelect: true,
5406
+ customerSelect: this.state.customerList.length == 1 ? 0 : '',
5407
+ customerTitleName: '客户身份识别'
5408
+ })
5409
+ }
5326
5410
  handleOkCustomer = () => {
5327
5411
  if (this.state.isCustomerSelect) {
5328
5412
  if (this.state.customerList[this.state.customerSelect].tourist) {
@@ -5330,6 +5414,7 @@ class Video extends Component {
5330
5414
  } else {
5331
5415
  this.setState({
5332
5416
  isCustomerSelect: false,
5417
+ documentError: '',
5333
5418
  customerTitleName: this.state.customerList[this.state.customerSelect].name
5334
5419
  })
5335
5420
  }
@@ -5338,8 +5423,11 @@ class Video extends Component {
5338
5423
  this.getAuthorizeResult(this.state.customerList[this.state.customerSelect].customId).then((res) => {
5339
5424
  if (res) {
5340
5425
  this.customerFaceClick(this.state.customerList[this.state.customerSelect])
5426
+ this.setState({
5427
+ isModalVisibleCustomer: false,
5428
+ })
5341
5429
  } else {
5342
- if (this.state.documentType == 0) {
5430
+ if (this.state.documentType == 'ID_CARD') {
5343
5431
  this.test_controller.SendTextMsg(JSON.stringify({
5344
5432
  'typeId': 3300,
5345
5433
  "data": {
@@ -5359,7 +5447,7 @@ class Video extends Component {
5359
5447
  }
5360
5448
 
5361
5449
  }))
5362
- } else if (this.state.documentType == 1) {
5450
+ } else {
5363
5451
  this.test_controller.SendTextMsg(JSON.stringify({
5364
5452
  'typeId': 3300,
5365
5453
  "data": {
@@ -5380,16 +5468,14 @@ class Video extends Component {
5380
5468
 
5381
5469
  }
5382
5470
  })
5383
- this.setState({
5384
- isModalVisibleCustomer: false,
5385
- })
5386
5471
  // this.customerFaceClick(this.state.customerList[this.state.customerSelect])
5387
5472
  }
5388
5473
 
5389
5474
  }
5390
5475
  onChangeDocumentType = (e) => {
5391
5476
  this.setState({
5392
- documentType: e.target.value
5477
+ documentType: e.target.value,
5478
+ certificateType: e.target.value
5393
5479
  })
5394
5480
  }
5395
5481
  getAuthorizeResult = async (appAccount) => {
@@ -6092,8 +6178,8 @@ class Video extends Component {
6092
6178
  ]}>
6093
6179
  <div className='endModal'>是否要结束并退出会议?</div>
6094
6180
  </Modal>
6095
- <Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
6096
- !this.state.idCardName && this.state.faceResuly == '' &&<div key='facial'>
6181
+ <Modal title={this.state.titleModal} width={650} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
6182
+ this.state.cardResuly == '' && this.state.faceResuly == '' &&<div key='facial'>
6097
6183
  <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
6098
6184
  <Button className="modelButtonCancel" onClick={this.sgsinImage}>截图</Button>
6099
6185
  {
@@ -6104,7 +6190,7 @@ class Video extends Component {
6104
6190
  }
6105
6191
 
6106
6192
  </div>,
6107
- !this.state.idCardName && this.state.faceResuly != '' &&<div key='facial'>
6193
+ this.state.cardResuly == '' && this.state.faceResuly != '' &&<div key='facial'>
6108
6194
  {
6109
6195
  this.state.faceResuly == 'fail' && <Button className="modelButtonOk" type="primary" danger onClick={this.ReIdentification}>重新识别</Button>
6110
6196
  }
@@ -6114,12 +6200,16 @@ class Video extends Component {
6114
6200
  <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>完成</Button>
6115
6201
 
6116
6202
  </div>,
6117
- this.state.idCardName && <div key='facial'>
6203
+ this.state.cardResuly == 'success' && <div key='facial'>
6118
6204
  {
6119
6205
  this.state.disabledIdCard && <Button className="modelButtonFaceOk" danger onClick={(e) => this.updateConfirm('noFace')}>修改</Button>
6120
6206
  }
6121
6207
  <Button className="modelButtonFaceOk" danger onClick={(e) => this.confirmCallback('face')}>完成并发起人脸识别</Button>
6122
6208
  <Button className="modelButtonOk" type="primary" danger onClick={(e) => this.confirmCallback('noFace')}>完成</Button>
6209
+ </div>,
6210
+ this.state.cardResuly == 'fail' && <div key='facial'>
6211
+ <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
6212
+ <Button className="modelButtonOk" type="primary" danger onClick={this.newFaceClick}>返回重试</Button>
6123
6213
  </div>
6124
6214
  ]}>
6125
6215
  <Spin spinning={this.state.loadingFace} tip="识别中...">
@@ -6130,7 +6220,7 @@ class Video extends Component {
6130
6220
  <Option value="2">反面</Option>
6131
6221
  </Select>
6132
6222
  } */}
6133
- {!this.state.idCardName && <div className='faceCardImg'>
6223
+ {this.state.cardResuly == '' && <div className='faceCardImg'>
6134
6224
 
6135
6225
  {
6136
6226
  this.state.titleModal == 'OCR识别' && <div className='titleDiv'>{this.state.IDtypeFrontOrBack}</div>
@@ -6149,14 +6239,24 @@ class Video extends Component {
6149
6239
  </div>
6150
6240
  }
6151
6241
  {
6152
- this.state.idCardName && <div className='resuleCard'>
6242
+ this.state.cardResuly != '' && <div className='resuleCard'>
6243
+ {
6244
+ this.state.cardResuly == 'success' && <div className='successClassFace'>
6245
+ <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>
6246
+
6247
+ 识别成功</div>
6248
+ }
6249
+ {
6250
+ this.state.cardResuly == 'fail' && <div className='errorClassFace'>
6251
+ <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>识别失败--{this.state.cardFailReason}</div>
6252
+ }
6153
6253
  <div className='imgDIV'>
6154
6254
  <img className="faceImgCard" src={this.state.facialImgFront} alt=""></img>
6155
6255
  <img className="faceImgCard" src={this.state.facialImgBack} alt=""></img>
6156
6256
  </div>
6157
6257
  <div>证件信息确认</div>
6158
6258
  <div><span>客户姓名</span> <input disabled={this.state.disabledIdCard} type="text" value={this.state.idCardName} onChange={this.handleChangeIdCardName} /></div>
6159
- <div><span>身份证号</span> <input disabled={this.state.disabledIdCard} type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
6259
+ <div><span>证件号码</span> <input disabled={this.state.disabledIdCard} type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
6160
6260
  <div><span>有效期</span> <input disabled={this.state.disabledIdCard} type="text" value={this.state.certificateValidity} onChange={this.handleChangeCertificateValidity} /></div>
6161
6261
  </div>
6162
6262
  }
@@ -6174,7 +6274,7 @@ class Video extends Component {
6174
6274
  }
6175
6275
  <div><span>客户姓名</span> <input disabled type="text" value={this.state.idCardNameFace}/></div>
6176
6276
  <div><span>身份证号</span> <input disabled type="text" value={this.state.idCardNumberFace}/></div>
6177
- <div><span>有效期</span> <input disabled type="text" value={this.state.certificateValidity}/></div>
6277
+ <div><span>有效期</span> <input disabled type="text" value={this.state.certificateValidityFace}/></div>
6178
6278
  </div>
6179
6279
  }
6180
6280
 
@@ -6211,8 +6311,18 @@ class Video extends Component {
6211
6311
  <Modal title={this.state.customerTitleName} closable={false} centered={true} visible={this.state.isModalVisibleCustomer}
6212
6312
  footer={[
6213
6313
  <div key='end'>
6314
+
6315
+
6316
+ {
6317
+ !this.state.isCustomerSelect && <Button className="modelButtonOk" type="primary" danger onClick={this.goBackSelectCustomer}>上一步</Button>
6318
+ }
6214
6319
  <Button className="modelButtonCancel" onClick={this.handleCancelCustomer}>取消</Button>
6215
- <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkCustomer}>下一步</Button>
6320
+ {/* {
6321
+ this.state.customerSelect == '' && <Button className="modelButtonCancel">下一步</Button>
6322
+ } */}
6323
+ {
6324
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkCustomer}>下一步</Button>
6325
+ }
6216
6326
  </div>
6217
6327
  ]}>
6218
6328
  <div>
@@ -6227,7 +6337,9 @@ class Video extends Component {
6227
6337
  <Space direction="vertical">
6228
6338
  {
6229
6339
  this.state.customerList.map((item, index) => {
6230
- return <Radio value={index}>{item.name}</Radio>
6340
+ // if(item.name.indexOf("访客") != -1) {
6341
+ return <Radio value={index}>{item.name}</Radio>
6342
+ // }
6231
6343
  })
6232
6344
  }
6233
6345
  </Space>
@@ -6237,14 +6349,23 @@ class Video extends Component {
6237
6349
  }
6238
6350
  {
6239
6351
  !this.state.isCustomerSelect && <div>
6352
+ {
6353
+ this.state.documentError != '' && <div className='errorClassFace'>
6354
+ <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>{this.state.documentError}</div>
6355
+ }
6240
6356
  <div>
6241
6357
  请您确认您的身份证件类型
6242
6358
  </div>
6243
6359
  <div>
6244
6360
  <Radio.Group onChange={this.onChangeDocumentType} value={this.state.documentType}>
6245
6361
  <Space direction="vertical">
6246
- <Radio value={0}>身份证</Radio>
6247
- <Radio value={1}>护照:或台湾来往大陆通行证;或港澳来往大陆通行证或;外国人永久居住证;或港澳台居民居住证</Radio>
6362
+ <Radio value={'ID_CARD'}>身份证</Radio>
6363
+ <Radio value={'PASSPORT_CARD'}>护照</Radio>
6364
+ <Radio value={'TW_PASS_CARD'}>台湾来往大陆通行证</Radio>
6365
+ <Radio value={'HK_MO_PASS_CARD'}>港澳来往大陆通行证</Radio>
6366
+ <Radio value={'HK_MO_RESIDENCE_CARD'}>港澳台居民居住证</Radio>
6367
+ <Radio value={'TW_RESIDENCE_CARD'}>台湾居民居住证</Radio>
6368
+ <Radio value={'FOREIGNER_RESIDENCE_CARD'}>外国人永久居住证</Radio>
6248
6369
  </Space>
6249
6370
  </Radio.Group>
6250
6371
  </div>
@@ -151,7 +151,7 @@
151
151
  }
152
152
  }
153
153
  .faceImg{
154
- width: 70%;
154
+ width: 60%;
155
155
  }
156
156
  .faceBody{
157
157
  text-align: center;
@@ -161,7 +161,7 @@
161
161
  }
162
162
  .resuleCard{
163
163
  text-align: -webkit-left;
164
- padding: 25Px 20px;
164
+ padding: 0Px 2Px;
165
165
  div{
166
166
  font-size: 16Px;
167
167
  color: #646464;
@@ -560,11 +560,11 @@
560
560
  }
561
561
  .selectCustomer{
562
562
  font-size: 16px;
563
- margin-left: 40px;
563
+ margin: 0 40px;
564
564
  }
565
565
  .faceImgCard{
566
- width: 15rem;
567
- margin-right: 3px;
566
+ width: 20rem;
567
+ margin-right: 3Px;
568
568
  }
569
569
  .titleDiv{
570
570
  font-size: 1.4rem;