react_hsbc_teller 1.9.15 → 1.9.17

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.9.15",
3
+ "version": "1.9.17",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -59,7 +59,7 @@ let videoName
59
59
  let muteJson = new Map()
60
60
  let dateTime = 0
61
61
  let messageValue = ''
62
- let beautyType = false
62
+ // let beautyType = false
63
63
  // let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
64
64
  let rateList = []
65
65
  let beautyDiv = {};
@@ -108,6 +108,7 @@ function clearStreamRemain() {
108
108
  document.body.removeChild(beautyDiv.beauty_div);
109
109
  beautyDiv.beauty_div = null;
110
110
  }
111
+ console.log('clearStreamRemain!!!!!')
111
112
  beautyDiv = {};
112
113
  };
113
114
  async function startBeauty(stream) {
@@ -167,6 +168,7 @@ class Video extends Component {
167
168
  }
168
169
  cancel = axios.CancelToken.source()
169
170
  state = {
171
+ beautyType: false,
170
172
  beautyName: '开启美颜',
171
173
  signNoClick: false,
172
174
  listVideoPicture: [],
@@ -292,7 +294,7 @@ class Video extends Component {
292
294
  saveLog = (val) => {
293
295
  axios({
294
296
  method: 'get',
295
- baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.15&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
297
+ baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.17&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
296
298
 
297
299
  }).then(res => {
298
300
 
@@ -467,6 +469,7 @@ class Video extends Component {
467
469
  // 允许最大断网时间 (超过未重连, 直接关闭)
468
470
  config_param.network_check_timeout = 10000;
469
471
  this.test_controller.Connect(config_param)
472
+ this.saveLog('mrtc connect start')
470
473
  };
471
474
  // 初始化视频
472
475
  ConnectMRTC = () => {
@@ -523,6 +526,7 @@ class Video extends Component {
523
526
  }
524
527
  ];
525
528
  this.test_controller.InitRoomConfig(config_param)
529
+ this.saveLog('mrtc InitRoomConfig start')
526
530
  };
527
531
  rateAll = async () => {
528
532
  let data = ''
@@ -806,6 +810,8 @@ class Video extends Component {
806
810
  // faceFailReason: result.message
807
811
  })
808
812
  this.errorCodeClick('face',result.code)
813
+ // this.saveLog('meeting ID&V error, code=' + result.code )
814
+ this.saveLog('face recognition api error code ' + result.code + '. [ LIVE_SIGN_ALI_FACE_RECOGNITION_ERROR ]')
809
815
  }
810
816
 
811
817
 
@@ -1328,7 +1334,7 @@ class Video extends Component {
1328
1334
  else if (Mival.typeId == 1220) {
1329
1335
  // 一炒多的图片 1214
1330
1336
  if (Mival.sessionId == this.state.sessionId) {
1331
- this.saveLog('imgCallback success' + Mival.data.type)
1337
+ this.saveLog('imgCallback success, typeId=1220, type=' + Mival.data.type)
1332
1338
  this.tabTitlesClick('customerScreen', 'delect')
1333
1339
  this.props.imgCallback({
1334
1340
  type: Mival.data.type + '',
@@ -1339,11 +1345,12 @@ class Video extends Component {
1339
1345
  }
1340
1346
  } else if (Mival.typeId == 1321) {
1341
1347
  this.getBase64Image(Mival.fileName)
1348
+ this.saveLog('signCallback success, typeId=1321, fileName=' + Mival.fileName)
1342
1349
  } else if (Mival.typeId == 1216) {
1343
1350
  // 签字回调 1213
1344
1351
  if (Mival.sessionId == this.state.sessionId) {
1345
1352
  this.tabTitlesClick('customerScreen', 'delect')
1346
- this.saveLog('signatureCallback success')
1353
+ this.saveLog('signatureCallback success, typeId=1216,')
1347
1354
  this.props.signatureCallback({
1348
1355
  errorType: 0
1349
1356
  })
@@ -1353,6 +1360,7 @@ class Video extends Component {
1353
1360
  // 1-开启,2-关闭
1354
1361
  if (Mival.type == 1) {
1355
1362
  this.switchExternal()
1363
+ this.saveLog('whiteboard start, typeId=1218,')
1356
1364
  } else if (Mival.type == 2) {
1357
1365
  if (streamShare) {
1358
1366
  streamShare.getTracks().forEach(track => track.stop());
@@ -1371,6 +1379,7 @@ class Video extends Component {
1371
1379
  isWhiteboard: false
1372
1380
  })
1373
1381
  }
1382
+ this.saveLog('whiteboard close, typeId=1218,')
1374
1383
  }
1375
1384
 
1376
1385
  }
@@ -1398,7 +1407,7 @@ class Video extends Component {
1398
1407
  }
1399
1408
  } else if (Mival.typeId == 121305) {
1400
1409
  if (Mival.sessionId == this.state.sessionId) {
1401
- this.saveLog('signatureCallback fail')
1410
+ this.saveLog('signatureCallback fail, typeId=121305, ')
1402
1411
  this.props.signatureCallback({
1403
1412
  errorType: -1
1404
1413
  })
@@ -1406,7 +1415,7 @@ class Video extends Component {
1406
1415
  } else if (Mival.typeId == 121405) {
1407
1416
  if (Mival.sessionId == this.state.sessionId) {
1408
1417
  console.log('imgCallback')
1409
- this.saveLog('imgCallback fail')
1418
+ this.saveLog('imgCallback fail, typeId=121405, ')
1410
1419
  this.props.imgCallback({
1411
1420
  type: '',
1412
1421
  file: '',
@@ -1416,6 +1425,7 @@ class Video extends Component {
1416
1425
  } else if (Mival.typeId == 4001) {
1417
1426
  // 手机端停止投屏
1418
1427
  this.tabTitlesClick('customerScreen', 'delect')
1428
+ this.saveLog('app stop sharing screen, typeId=4001, ')
1419
1429
 
1420
1430
  } else if (Mival.typeId == 1401) {
1421
1431
  // 用户修改名字
@@ -1584,7 +1594,7 @@ class Video extends Component {
1584
1594
  // 获取设备失败
1585
1595
  this.test_controller.OnGetDevicesFailed = (code, msg) => {
1586
1596
  console.log('获取设备失败', code, msg)
1587
- this.saveLog('Failed to get device')
1597
+ this.saveLog('Failed to get device, code='+code)
1588
1598
  this.state.sessionType = false
1589
1599
  this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头', 'error')
1590
1600
  this.roomCallBack(2, '获取设备失败', 1)
@@ -1625,6 +1635,7 @@ class Video extends Component {
1625
1635
  } else {
1626
1636
  this.test_controller.CreateRoom()
1627
1637
  }
1638
+ this.saveLog('InitRoomConfig successfully')
1628
1639
 
1629
1640
  };
1630
1641
  // 创建房间成功
@@ -1634,6 +1645,7 @@ class Video extends Component {
1634
1645
  this.state.channelId = room_id,
1635
1646
  this.state.rtoken = rtoken
1636
1647
  this.createRoom()
1648
+ this.saveLog('RM mrtc create room successfully, room_id=' + room_id)
1637
1649
  };
1638
1650
  // 创建房间失败
1639
1651
  this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
@@ -1645,10 +1657,12 @@ class Video extends Component {
1645
1657
  // 初始化⾳视频成功
1646
1658
  this.test_controller.OnMediaCallSucc = (sid) => {
1647
1659
  console.log('初始化⾳视频成功', sid)
1660
+ this.saveLog('OnMediaCallSucc:' + sid)
1648
1661
  };
1649
1662
  // 初始化音视频失败
1650
1663
  this.test_controller.OnMediaCallFail = (err_code, err_msg) => {
1651
1664
  console.log('初始化音视频失败', err_code, err_msg)
1665
+ this.saveLog('OnMediaCallFail, code=' + err_code)
1652
1666
  };
1653
1667
  // 音视频关闭通知
1654
1668
  this.test_controller.OnMediaClose = (code, sid) => {
@@ -1679,10 +1693,11 @@ class Video extends Component {
1679
1693
  publish_config.publish_tag = 'tag1'
1680
1694
  this.test_controller.Publish(publish_config)
1681
1695
  this.roomCallBack(1, '', 0)
1696
+ this.saveLog('mrtc join room success')
1682
1697
  };
1683
1698
  // 加入房间失败
1684
1699
  this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
1685
- this.saveLog('Join room failed,' + err_code)
1700
+ this.saveLog('mrtc join room failed,' + err_code)
1686
1701
  console.log('加入房间失败', err_code, err_msg)
1687
1702
  // this.setState({
1688
1703
  // sessionType: false,
@@ -1714,12 +1729,14 @@ class Video extends Component {
1714
1729
  documentError: '',
1715
1730
  isModalVisibleCustomer: false,
1716
1731
  })
1732
+ this.saveLog('mrtc OnSendTextMsgSucc:' + msgId)
1717
1733
  }
1718
1734
  this.test_controller.OnSendTextMsgFailed = (msgId, code, msg) => {
1719
1735
  console.log('发送失败', msgId, code, msg)
1720
1736
  this.setState({
1721
1737
  documentError: '推送授权白板失败,请重试'
1722
1738
  })
1739
+ this.saveLog('mrtc OnSendTextMsgFail:' + msgId +', code=' + code + ',msg=' + msg)
1723
1740
  }
1724
1741
  this.test_controller.OnReceiveTextMsg = (uid, msg) => {
1725
1742
  console.log('收到手机端消息', uid, msg, JSON.parse(msg).typeId, JSON.parse(msg).data.sessionId, this.state.sessionId)
@@ -1729,6 +1746,7 @@ class Video extends Component {
1729
1746
  this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
1730
1747
  }
1731
1748
  }
1749
+ this.saveLog('mrtc OnReceiveTextMsg info:', uid, msg, JSON.parse(msg).typeId, JSON.parse(msg).data.sessionId, this.state.sessionId)
1732
1750
  }
1733
1751
  this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) => {
1734
1752
  console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
@@ -1893,7 +1911,7 @@ class Video extends Component {
1893
1911
  };
1894
1912
  // 发布媒体流失败
1895
1913
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
1896
- this.saveLog('发布失败' + err_code)
1914
+ this.saveLog('mrtc OnPublishFailed 发布失败, code=' + err_code)
1897
1915
  console.log('Publishing media stream failed,', sid, err_code, err_msg)
1898
1916
  if (sid == document.getElementById('publish_video1').name) {
1899
1917
  this.state.sessionType = false
@@ -2018,6 +2036,7 @@ class Video extends Component {
2018
2036
  // 推送“新加⼊房间者”给与会者
2019
2037
  this.test_controller.OnNewJoinerIn = (participant) => {
2020
2038
  console.log('新加⼊房间者', participant);
2039
+ this.saveLog('mrtc someone joined room, userId=' + participant)
2021
2040
  this.state.isCustomer = true
2022
2041
  };
2023
2042
  // 推送“有新发布”给与会者
@@ -2257,6 +2276,7 @@ class Video extends Component {
2257
2276
  let data = res ? res.username ? res.username : '客户' : '客户'
2258
2277
  console.log(data)
2259
2278
  this.messageClick((data + '已退出会议'), 'error')
2279
+ this.saveLog(data + ' leave room')
2260
2280
  if (res.userType == 1) {
2261
2281
  // 2--坐席  1--客户
2262
2282
  this.props.userExit({
@@ -2287,6 +2307,7 @@ class Video extends Component {
2287
2307
  console.log('弱网回调', bpsSend, bpsRecv, sid)
2288
2308
  if (sid == document.getElementById('publish_video1').name) {
2289
2309
  this.messageClick('当前网络环境较差', 'error')
2310
+ this.saveLog('mrtc OnNetworkWeak')
2290
2311
  }
2291
2312
  };
2292
2313
  // 开始服务端录制成功
@@ -2294,6 +2315,7 @@ class Video extends Component {
2294
2315
  console.log('开始服务端录制成功', record_id);
2295
2316
  this.state.recordId = record_id
2296
2317
  this.videoRecordCallback('1', true)
2318
+ this.saveLog('mrtc OnStartRemoteRecordSucc')
2297
2319
  };
2298
2320
  // 开始服务端录制失败
2299
2321
  this.test_controller.OnStartRemoteRecordFailed = (
@@ -2303,11 +2325,13 @@ class Video extends Component {
2303
2325
  ) => {
2304
2326
  this.videoRecordCallback('1', false)
2305
2327
  console.log('开始服务端录制失败', record_id, err_code, err_msg)
2328
+ this.saveLog('mrtc OnStartRemoteRecordFailed, code='+err_code)
2306
2329
  };
2307
2330
  // 结束服务端录制成功
2308
2331
  this.test_controller.OnStopRemoteRecordSucc = (recordId) => {
2309
2332
  console.log('结束服务端录制成功', recordId);
2310
2333
  this.videoRecordCallback('2', true)
2334
+ this.saveLog('mrtc OnStopRemoteRecordSucc, recordId='+recordId)
2311
2335
  // this.endSessionValue()
2312
2336
  // 获取服务端录制结果
2313
2337
  };
@@ -2319,6 +2343,7 @@ class Video extends Component {
2319
2343
  ) => {
2320
2344
  this.videoRecordCallback('2', false)
2321
2345
  console.log('结束服务端录制失败', recordId, err_code, err_msg)
2346
+ this.saveLog('mrtc OnStopRemoteRecordFailed, err_code='+err_code)
2322
2347
  };
2323
2348
  // 开启浏览器录制成功
2324
2349
  this.test_controller.OnClientStartRecordSuccess = (
@@ -2464,6 +2489,7 @@ class Video extends Component {
2464
2489
  msg
2465
2490
  ) => {
2466
2491
  console.log('切流失败通知', sid, code, msg)
2492
+ this.saveLog('mrtc OnChangeMediaStreamFailed, code=' + code)
2467
2493
  if (this.state.loading) {
2468
2494
  this.setState({
2469
2495
  loading: false
@@ -2706,6 +2732,13 @@ class Video extends Component {
2706
2732
  clearStreamRemain()
2707
2733
  this.test_controller.LeaveRoom()
2708
2734
  this.test_controller.Disconnect()
2735
+ try {
2736
+ beautySetMode('none');
2737
+ beautyStop();
2738
+ console.log('beautyStop!!')
2739
+ } catch (err){
2740
+ console.error(err)
2741
+ }
2709
2742
  }
2710
2743
  if (this.state.imStatus) {
2711
2744
  console.log('disconnect断开连接')
@@ -2903,7 +2936,7 @@ class Video extends Component {
2903
2936
  }
2904
2937
  }
2905
2938
  componentWillMount() {
2906
- console.log('hsbc_teller_sdk', '1.9.15')
2939
+ console.log('hsbc_teller_sdk', '1.9.17')
2907
2940
  let arr = []
2908
2941
  for(let i=1;i<=12;i++){
2909
2942
  arr.push({
@@ -3264,7 +3297,8 @@ class Video extends Component {
3264
3297
  isModalVisibleSFP: false,
3265
3298
  disabledIdCard: false,
3266
3299
  isStaffState: 'success',
3267
- loadingStaff: false
3300
+ loadingStaff: false,
3301
+ authorizeStaffId: this.state.StaffidSFP,
3268
3302
  })
3269
3303
  }).catch((err) => {
3270
3304
  console.log(err)
@@ -3302,6 +3336,10 @@ class Video extends Component {
3302
3336
  idCardNumber: '',
3303
3337
  idCardName: '',
3304
3338
  certificateValidity: '',
3339
+ resultIdCardName: '',
3340
+ resultIdCardNumber: '',
3341
+ resultCertificateDate: '',
3342
+ authorizeStaffId: ''
3305
3343
  })
3306
3344
  // })
3307
3345
  } else {
@@ -3312,6 +3350,10 @@ class Video extends Component {
3312
3350
  idCardNumber: this.state.idCardNumber,
3313
3351
  customerName: this.state.customerName,
3314
3352
  certificateValidity: this.state.certificateValidity,
3353
+ resultIdCardName: this.state.resultIdCardName,
3354
+ resultIdCardNumber: this.state.resultIdCardNumber,
3355
+ resultCertificateDate: this.state.resultCertificateDate,
3356
+ authorizeStaffId: this.state.authorizeStaffId,
3315
3357
  }
3316
3358
  console.log(this.state.userIdCardResults)
3317
3359
  this.setState({
@@ -3326,6 +3368,10 @@ class Video extends Component {
3326
3368
  certificateValidity: '',
3327
3369
  idCardNumber: '',
3328
3370
  idCardName: '',
3371
+ resultIdCardName: '',
3372
+ resultIdCardNumber: '',
3373
+ resultCertificateDate: '',
3374
+ authorizeStaffId: '',
3329
3375
  titleModal: '身份验证',
3330
3376
  // clickedFacial: true,
3331
3377
  facialImg: faceImage,
@@ -3340,18 +3386,38 @@ class Video extends Component {
3340
3386
  // ocr结果入库
3341
3387
  confirmCallback = async (data) => {
3342
3388
  try {
3343
- let result = await API.confirmCallback({
3344
- idCardName: this.state.idCardName,
3389
+ // 原始证件参数
3390
+ let data = {
3391
+ idCardName: this.state.resultIdCardName,
3345
3392
  staffId: this.props.tellerAccount,
3346
3393
  activityId: this.props.businessNumber,
3347
3394
  appAccount: this.state.faceCustomerUid,
3348
- idCardNumber: this.state.idCardNumber,
3395
+ idCardNumber: this.state.resultIdCardNumber,
3349
3396
  sessionId: this.state.sessionId,
3350
3397
  certificateType: this.state.certificateType,
3351
3398
  customerName: this.state.customerName,
3352
- startDate: this.state.documentType == 'PASSPORT_CARD' ? '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[0] : '',
3353
- endDate: this.state.documentType == 'PASSPORT_CARD' ? this.state.certificateValidity ? this.state.certificateValidity.split('-')[0]: '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[1] : '',
3354
- });
3399
+ startDate: this.state.documentType == 'PASSPORT_CARD' ? '' : this.state.resultCertificateDate ? this.state.resultCertificateDate.split('-')[0] : '',
3400
+ endDate: this.state.documentType == 'PASSPORT_CARD' ? this.state.resultCertificateDate ? this.state.resultCertificateDate.split('-')[0]: '' : this.state.resultCertificateDate ? this.state.resultCertificateDate.split('-')[1] : '',
3401
+ }
3402
+ // 添加修改后的证件参数
3403
+ if (this.state.authorizeStaffId) {
3404
+ data.authorizeStaffId = this.state.authorizeStaffId
3405
+ }
3406
+ if (this.state.idCardName != this.state.resultIdCardName) {
3407
+ data.reviseIdCardName = this.state.idCardName
3408
+ }
3409
+ if (this.state.idCardNumber != this.state.resultIdCardNumber) {
3410
+ data.reviseIdCardNumber = this.state.idCardNumber
3411
+ }
3412
+ let reviseCertificateStartDate = this.state.documentType == 'PASSPORT_CARD' ? '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[0] : '';
3413
+ let reviseCertificateEndDate = this.state.documentType == 'PASSPORT_CARD' ? this.state.certificateValidity ? this.state.certificateValidity.split('-')[0]: '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[1] : '';
3414
+ if (reviseCertificateStartDate != data.startDate) {
3415
+ data.reviseCertificateStartDate = reviseCertificateStartDate
3416
+ }
3417
+ if (reviseCertificateEndDate != data.endDate) {
3418
+ data.reviseCertificateEndDate = reviseCertificateEndDate
3419
+ }
3420
+ let result = await API.confirmCallback(data);
3355
3421
  console.log('confirmCallback', result)
3356
3422
  if (result.code == 200) {
3357
3423
  // console.log(data)
@@ -3401,6 +3467,8 @@ class Video extends Component {
3401
3467
  this.setState({
3402
3468
  idCardNumber: result.data.idCardNumber,
3403
3469
  idCardName: result.data.idCardName,
3470
+ resultIdCardName: result.data.idCardName,
3471
+ resultIdCardNumber: result.data.idCardNumber,
3404
3472
  loadingFace: false,
3405
3473
  cardFailReason: '',
3406
3474
  cardResuly: 'success',
@@ -3409,6 +3477,8 @@ class Video extends Component {
3409
3477
  this.setState({
3410
3478
  idCardNumber: result.data.idCardNumber,
3411
3479
  idCardName: result.data.idCardName,
3480
+ resultIdCardName: result.data.idCardName,
3481
+ resultIdCardNumber: result.data.idCardNumber,
3412
3482
  certificateValidityType: false,
3413
3483
  cardFailReason: '证件已过期[#'+result.code+'#]',
3414
3484
  loadingFace: false,
@@ -3420,7 +3490,9 @@ class Video extends Component {
3420
3490
  this.setState({
3421
3491
  // isModalVisibleFacial: false
3422
3492
  idCardNumber: result.data.idCardNumber,
3423
- idCardName: result.data.idCardName
3493
+ idCardName: result.data.idCardName,
3494
+ resultIdCardName: result.data.idCardName,
3495
+ resultIdCardNumber: result.data.idCardNumber,
3424
3496
  })
3425
3497
  this.ocrCallback(2)
3426
3498
  }
@@ -3438,6 +3510,7 @@ class Video extends Component {
3438
3510
  if(this.state.idCardName && this.dateNewTime(endDate)) {
3439
3511
  this.setState({
3440
3512
  certificateValidity: startDate + '-' + endDate,
3513
+ resultCertificateDate: startDate + '-' + endDate,
3441
3514
  loadingFace: false,
3442
3515
  cardFailReason: '',
3443
3516
  cardResuly: 'success',
@@ -3446,6 +3519,7 @@ class Video extends Component {
3446
3519
  } else if(this.state.idCardName && !this.dateNewTime(endDate)) {
3447
3520
  this.setState({
3448
3521
  certificateValidity: startDate + '-' + endDate,
3522
+ resultCertificateDate: startDate + '-' + endDate,
3449
3523
  loadingFace: false,
3450
3524
  certificateValidityType: false,
3451
3525
  cardFailReason: '证件已过期[#'+result.code+'#]',
@@ -3484,13 +3558,16 @@ class Video extends Component {
3484
3558
  this.setState({
3485
3559
  // isModalVisibleFacial: false
3486
3560
  idCardNumber: result.data.resident.idNum,
3487
- idCardName: result.data.resident.name
3561
+ idCardName: result.data.resident.name,
3562
+ resultIdCardName: result.data.resident.name,
3563
+ resultIdCardNumber: result.data.resident.idNum,
3488
3564
  })
3489
3565
  this.ocrCallback(2)
3490
3566
  } else if (result.data.side == 'back' && val != 1) {
3491
3567
  console.log(result.data.resident.startDate, result.data.resident.endDate)
3492
3568
  this.setState({
3493
3569
  certificateValidity: result.data.resident.startDate + '-' + result.data.resident.endDate,
3570
+ resultCertificateDate: result.data.resident.startDate + '-' + result.data.resident.endDate,
3494
3571
  loadingFace: false,
3495
3572
  cardFailReason: result.code == 40002 ? '证件已过期[#'+result.code+'#]' : '',
3496
3573
  certificateValidityType: result.code == 40002 ? false : true,
@@ -3508,7 +3585,10 @@ class Video extends Component {
3508
3585
  this.setState({
3509
3586
  idCardNumber: result.data.passport.passportCode,
3510
3587
  idCardName: result.data.passport.nameEN,
3588
+ resultIdCardName: result.data.passport.nameEN,
3589
+ resultIdCardNumber: result.data.passport.passportCode,
3511
3590
  certificateValidity: result.data.passport.expiryDate,
3591
+ resultCertificateDate: result.data.passport.expiryDate,
3512
3592
  loadingFace: false,
3513
3593
  cardFailReason: result.code == 30002 ? '证件已过期[#'+result.code+'#]' : '',
3514
3594
  certificateValidityType: result.code == 30002 ? false : true,
@@ -3520,7 +3600,10 @@ class Video extends Component {
3520
3600
  this.setState({
3521
3601
  idCardNumber: result.data.permission.cardNum,
3522
3602
  idCardName: result.data.permission.nameEN,
3603
+ resultIdCardName: result.data.permission.nameEN,
3604
+ resultIdCardNumber: result.data.permission.cardNum,
3523
3605
  certificateValidity: result.data.permission.validDate,
3606
+ resultCertificateDate: result.data.permission.validDate,
3524
3607
  loadingFace: false,
3525
3608
  cardFailReason: result.code == 50002 ? '证件已过期[#'+result.code+'#]' : '',
3526
3609
  certificateValidityType: result.code == 50002 ? false : true,
@@ -3593,18 +3676,38 @@ class Video extends Component {
3593
3676
  }
3594
3677
  this.handleCancelFacial();
3595
3678
  try {
3596
- let result = await API.confirmCallback({
3597
- idCardName: userInfo.idCardName,
3679
+ // 原始证件参数
3680
+ let data = {
3681
+ idCardName: userInfo.resultIdCardName,
3598
3682
  staffId: this.props.tellerAccount,
3599
3683
  activityId: this.props.businessNumber,
3600
3684
  appAccount: this.state.faceCustomerUid,
3601
- idCardNumber: userInfo.idCardNumber,
3685
+ idCardNumber: userInfo.resultIdCardNumber,
3602
3686
  sessionId: this.state.sessionId,
3603
3687
  certificateType: 'ID_CARD',
3604
3688
  customerName: userInfo.customerName,
3605
- startDate: userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[0] : '',
3606
- endDate: userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[1] : '',
3607
- });
3689
+ startDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[0] : '',
3690
+ endDate: userInfo.resultCertificateDate ? userInfo.resultCertificateDate.split('-')[1] : '',
3691
+ }
3692
+ // 添加修改后的证件参数
3693
+ if (userInfo.authorizeStaffId) {
3694
+ data.authorizeStaffId = userInfo.authorizeStaffId
3695
+ }
3696
+ if (userInfo.idCardName != userInfo.resultIdCardName) {
3697
+ data.reviseIdCardName = userInfo.idCardName
3698
+ }
3699
+ if (userInfo.idCardNumber != userInfo.resultIdCardNumber) {
3700
+ data.reviseIdCardNumber = userInfo.idCardNumber
3701
+ }
3702
+ let reviseCertificateStartDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[0] : '';
3703
+ let reviseCertificateEndDate = userInfo.certificateValidity ? userInfo.certificateValidity.split('-')[1] : '';
3704
+ if (reviseCertificateStartDate != data.startDate) {
3705
+ data.reviseCertificateStartDate = reviseCertificateStartDate
3706
+ }
3707
+ if (reviseCertificateEndDate != data.endDate) {
3708
+ data.reviseCertificateEndDate = reviseCertificateEndDate
3709
+ }
3710
+ let result = await API.confirmCallback(data);
3608
3711
  console.log('confirmCallback', result)
3609
3712
  if (result.code == 200) {
3610
3713
  // console.log(data)
@@ -4354,14 +4457,14 @@ class Video extends Component {
4354
4457
  // publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
4355
4458
  // this.test_controller.ChangeMediaStream(publish_config)
4356
4459
  // beautyNum = beautyNum == 0 ? 1 : 0
4357
- if (beautyType) {
4358
- beautyType = false
4460
+ if (this.state.beautyType) {
4461
+ this.state.beautyType = false
4359
4462
  this.setState({
4360
4463
  beautyName: '开启美颜'
4361
4464
  })
4362
4465
  beautySetMode('none')
4363
4466
  } else {
4364
- beautyType = true
4467
+ this.state.beautyType = true
4365
4468
  beautySetMode('beauty')
4366
4469
  this.setState({
4367
4470
  beautyName: '关闭美颜'
@@ -4783,8 +4886,7 @@ class Video extends Component {
4783
4886
 
4784
4887
  return a.idIndex - b.idIndex;
4785
4888
  })
4786
- console.log('排序后list');
4787
- console.log(list);
4889
+ console.log('排序后list', list);
4788
4890
  for(let i=0;i<12;i++){
4789
4891
  for(let j=0;j<12;j++){
4790
4892
  if (list[j].videoName == this.state.videoList[i].videoName) {
@@ -4935,7 +5037,7 @@ class Video extends Component {
4935
5037
  <CanvasHome zIndexNum={this.state.zIndexNum} style={{ width: isGraffiti ? this.state.widthVideo + 'px' : this.state.whiteboardWidth + 'Px', height: this.state.whiteboardHeight + 'Px', top: this.state.whiteboardTop + 'Px', left: isGraffiti ? this.state.leftVideo + 'px' : this.state.whiteboardLeft + 'Px' }}>
4936
5038
  {this.state.operateShow &&
4937
5039
  <OpreateDiv id="operate">
4938
- <span style={{ color: this.state.selectSpan == 'pen' ? '#1890ff' : '#333' }} onClick={() => this.setTool('pen')}>铅笔</span>
5040
+ <span style={{ color: this.state.selectSpan == 'pen' ? '#1890ff' : '#333' }} onClick={() => this.setTool('pen')}>黑笔</span>
4939
5041
  <span style={{ color: this.state.selectSpan == 'redPen' ? '#1890ff' : '#333' }} onClick={() => this.setStrokeColor()}>红笔</span>
4940
5042
  <span style={{ color: this.state.selectSpan == 'eraser' ? '#1890ff' : '#333' }} onClick={() => this.setTool('eraser')}>橡皮</span>
4941
5043
  <span onClick={() => this.setOpreate('undo')}>撤销</span>