react_hsbc_teller 1.8.2 → 1.8.5

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.
@@ -12,6 +12,7 @@ import voiceImgOpen from '../../assets/img/icon_Mute.png'
12
12
  import voiceImgCloe from '../../assets/img/icon_MuteOne.png'
13
13
  import cameraImgOpen from '../../assets/img/icon_camera.png'
14
14
  import cameraImgCloe from '../../assets/img/icon_cameraOne.png'
15
+ import beautyImg from '../../assets/img/whiteningLut.jpg'
15
16
  import ocrImage from '../../assets/img/jietu.png'
16
17
  import autod from '../../assets/mp3/joinmeeting.mp3'
17
18
  import leftMetting from '../../assets/mp3/leftmeeting.mp3'
@@ -25,6 +26,15 @@ import Spin from "antd/lib/spin";
25
26
  import 'antd/lib/spin/style'
26
27
  import Select from "antd/lib/select";
27
28
  import 'antd/lib/select/style'
29
+
30
+ import Radio from "antd/lib/radio";
31
+ import 'antd/lib/radio/style'
32
+
33
+
34
+ import Space from "antd/lib/space";
35
+ import 'antd/lib/space/style'
36
+
37
+
28
38
  import styled from 'styled-components';
29
39
  import { Button } from '../../../node_modules/antd/lib/index';
30
40
  import SignMy from '../sign/signMy.jsx'
@@ -42,7 +52,8 @@ let streamShare
42
52
  let muteJson = new Map()
43
53
  let dateTime = 0
44
54
  let messageValue = ''
45
- let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
55
+ let beautyType = false
56
+ // let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
46
57
  let rateList = []
47
58
  let beautyDiv = {};
48
59
  let isBackgroundBlur = true
@@ -91,12 +102,10 @@ const OpreateDiv = styled.div`
91
102
  }
92
103
  beautyDiv = {};
93
104
  };
94
- function startBeauty(stream) {
95
- let newStream = stream;
96
- beautyDiv = meetingBeautifyStream(newStream, beautyNum);
97
- newStream = beautyDiv.stream;
98
- return newStream
99
- }
105
+ async function startBeauty(stream) {
106
+ await beautyInit();
107
+ beautyStart(stream,"none");
108
+ }
100
109
  async function startMix(stream,onState) {
101
110
  var drawCanvas = document.getElementById('canvas');
102
111
  await mixInit(drawCanvas);
@@ -302,12 +311,33 @@ class Video extends Component {
302
311
  curryControl: 'pen', // 工具类型
303
312
  },
304
313
  zIndexNum: -1,
305
- selectSpan: 'pen'
314
+ selectSpan: 'pen',
315
+ isModalVisibleCustomer: false,
316
+ customerSelect: '',
317
+ documentType: '',
318
+ isCustomerSelect: true,
319
+ customerTitleName: '客户身份识别',
320
+ certificateType: 'identityCard',
321
+ customerName: ''
306
322
  };
307
323
  // eslint-disable-next-line no-undef
308
324
  test_controller = '';
309
325
 
310
-
326
+ saveLog=(val)=>{
327
+ axios({
328
+ method: 'get',
329
+ baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.8.4&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId),
330
+
331
+ }).then(res => {
332
+
333
+ },error => {
334
+ if(error.response){
335
+
336
+ }else{
337
+
338
+ }
339
+ })
340
+ }
311
341
  /**
312
342
  * 创建房间成功后回调后台
313
343
  * @param {JSON} data 数据类型
@@ -319,7 +349,8 @@ class Video extends Component {
319
349
  activityId: this.props.businessNumber,
320
350
  callbackUrl: this.props.callbackUrl,
321
351
  roomId: this.state.channelId,
322
- mtoken: this.state.rtoken
352
+ mtoken: this.state.rtoken,
353
+ type: 2
323
354
  });
324
355
  console.log(result);
325
356
  this.state.imRoomId = result.imRoomId,
@@ -342,6 +373,7 @@ class Video extends Component {
342
373
  if(this.state.imStatus && !this.state.imJoinRoom) {
343
374
  joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
344
375
  this.state.imJoinRoom =true
376
+ this.saveLog('Join im room')
345
377
  console.log('加入IM房间')
346
378
  }
347
379
  })
@@ -356,10 +388,13 @@ class Video extends Component {
356
388
  roomId: this.state.channelId
357
389
  }
358
390
  })
391
+ // this.getToken()
392
+ // this.saveLog()
359
393
  } catch (err) {
360
394
  console.error(err);
361
395
 
362
396
  this.state.sessionType = false
397
+ this.saveLog('Failed to save room information')
363
398
  if(err.status == 502 || err.status== 404) {
364
399
  this.roomCallBack(2, '连接服务器失败','SYS-02')
365
400
  } else {
@@ -436,6 +471,7 @@ class Video extends Component {
436
471
  this.handleEdit()
437
472
  }
438
473
  } catch (err) {
474
+ this.saveLog('Failed to get signature')
439
475
  console.error(err);
440
476
  if(err.status == 502 || err.status== 404) {
441
477
  this.roomCallBack(2, '连接服务器失败','SYS-02')
@@ -453,7 +489,6 @@ class Video extends Component {
453
489
  if(!this.state.imStatus){
454
490
  this.state.manualClose = false
455
491
  initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
456
-
457
492
  }
458
493
  const config_param = {};
459
494
  config_param.workspaceId = this.state.workSpaceId;
@@ -999,10 +1034,17 @@ class Video extends Component {
999
1034
  })
1000
1035
  }
1001
1036
  }
1037
+ console.log(list)
1038
+ this.setState({
1039
+ customerList: list
1040
+ })
1002
1041
  if (list.length > 0) {
1003
1042
  if (val == 'ocr') {
1004
1043
  this.setState({
1005
- clickedOcr: true
1044
+ isModalVisibleCustomer: true,
1045
+ isCustomerSelect: true,
1046
+ customerSelect: '',
1047
+ customerTitleName: '客户身份识别'
1006
1048
  })
1007
1049
  } else if (val == 'facial') {
1008
1050
  this.setState({
@@ -1012,9 +1054,6 @@ class Video extends Component {
1012
1054
  } else {
1013
1055
  this.messageClick('当前暂无客户','error')
1014
1056
  }
1015
- this.setState({
1016
- customerList: list
1017
- })
1018
1057
  }
1019
1058
  messageClick=(value,valueOne)=>{
1020
1059
  console.log(value,valueOne)
@@ -1080,6 +1119,7 @@ class Video extends Component {
1080
1119
  }
1081
1120
  };
1082
1121
  endSessionValue = () => {
1122
+ this.saveLog('RM actively exits the meeting')
1083
1123
  if(streamShare) {
1084
1124
  streamShare.getTracks().forEach(track => track.stop());
1085
1125
  streamShare=''
@@ -1412,6 +1452,7 @@ class Video extends Component {
1412
1452
  this.setState({
1413
1453
  loading: false,
1414
1454
  })
1455
+ this.saveLog('aborted code:' + code)
1415
1456
  if (this.state.sessionId) {
1416
1457
  if(code == 'SYS-01' || code == 'SYS-02') {
1417
1458
  this.props.joinRoomCallback({
@@ -1948,6 +1989,7 @@ class Video extends Component {
1948
1989
  console.log('im登录', msg)
1949
1990
  if(msg.status == 'error') {
1950
1991
  this.state.imStatus = false
1992
+ this.saveLog('Im connection establishment failed')
1951
1993
  this.roomCallBack(2, 'im建立连接失败',5)
1952
1994
  } else if (msg.status == 'success') {
1953
1995
  this.state.imStatus = true
@@ -1963,6 +2005,7 @@ class Video extends Component {
1963
2005
  this.timer && clearInterval(this.timer);
1964
2006
  this.state.imStatus = false
1965
2007
  console.log('IMOpenfireclose')
2008
+ this.saveLog('Repeated login of account')
1966
2009
  this.roomCallBack(2, '账号重复登录',9)
1967
2010
 
1968
2011
  }
@@ -1988,9 +2031,6 @@ class Video extends Component {
1988
2031
  this.test_controller.OnGetDevicesSuccess = (devicesInfo) => {
1989
2032
  console.log('devicesInfo' + JSON.stringify(devicesInfo));
1990
2033
  const obj = [
1991
- // {actionid: '0133d06019b8fe9426818ae7573ccfc31c150e09138e7f5ccfda03d6e224ffd4', groupId: '9c0334ba5cba71b60acb3ec6669c3aac78371ec9d9e33d2e8af72a758d895d27', actionname: 'Integrated Camera (13d3:56fb)'},
1992
-
1993
- // {actionid: '4695c628677498d876074b941c16f6921d4e57534b50bfc2cb973da84e0e2622', groupId: '0d86c9467f096440ed74449192be5fafea59ac469866975f30b61fe964e2a80e', actionname: 'C2D Camera (0416:5035)'}
1994
2034
  ];
1995
2035
  const obj1 = [];
1996
2036
  const obj2 = [];
@@ -2098,6 +2138,7 @@ class Video extends Component {
2098
2138
  // 获取设备失败
2099
2139
  this.test_controller.OnGetDevicesFailed = (code, msg) => {
2100
2140
  console.log('获取设备失败', code, msg)
2141
+ this.saveLog('Failed to get device')
2101
2142
  this.state.sessionType = false
2102
2143
  this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
2103
2144
  this.roomCallBack(2, '获取设备失败',1)
@@ -2109,6 +2150,7 @@ class Video extends Component {
2109
2150
  };
2110
2151
  this.test_controller.OnConnectFailed = (code, msg) => {
2111
2152
  console.log('建立连接失败', code, msg)
2153
+ this.saveLog('Failed to establish connection,'+ code)
2112
2154
  this.state.sessionType = false
2113
2155
  this.roomCallBack(2, '连接失败',2)
2114
2156
  };
@@ -2124,6 +2166,7 @@ class Video extends Component {
2124
2166
  // 初始化房间失败
2125
2167
  this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
2126
2168
  console.log('初始化房间失败', err_code, err_msg)
2169
+ this.saveLog('Failed to initialize room,' + err_code)
2127
2170
  this.state.sessionType = false
2128
2171
  this.roomCallBack(2, '初始化失败',3)
2129
2172
  };
@@ -2149,6 +2192,7 @@ class Video extends Component {
2149
2192
  // 创建房间失败
2150
2193
  this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
2151
2194
  console.log('创建房间失败', err_code, err_msg)
2195
+ this.saveLog('Failed to create room,' + err_code)
2152
2196
  this.state.sessionType = false
2153
2197
  this.roomCallBack(2, '创建房间失败',7)
2154
2198
  };
@@ -2165,6 +2209,7 @@ class Video extends Component {
2165
2209
  console.log(code, sid)
2166
2210
  if(code == 5003 || code == 5004 || code == 5005|| code == 5007|| code == 5009|| code == 5010 || code == 5011|| code == 5012) {
2167
2211
  if(sid == document.getElementById('publish_video1').name) {
2212
+ this.saveLog('Audio and video close notification,' + code)
2168
2213
  this.roomCallBack(2, '音视频异常关闭',8)
2169
2214
  } else {
2170
2215
  this.state.isScreenSwitching = false
@@ -2191,6 +2236,7 @@ class Video extends Component {
2191
2236
  };
2192
2237
  // 加入房间失败
2193
2238
  this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
2239
+ this.saveLog('Join room failed,' + err_code)
2194
2240
  console.log('加入房间失败', err_code, err_msg)
2195
2241
  // this.setState({
2196
2242
  // sessionType: false,
@@ -2222,6 +2268,15 @@ class Video extends Component {
2222
2268
  this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
2223
2269
  console.log('发送失败',msgId,code, msg)
2224
2270
  }
2271
+ this.test_controller.OnReceiveTextMsg = (uid, msg)=>{
2272
+ console.log('收到手机端消息',uid, msg, JSON.parse(msg).typeId,JSON.parse(msg).data.sessionId,this.state.sessionId)
2273
+ if(JSON.parse(msg).typeId == 33001 && this.state.sessionId == JSON.parse(msg).data.sessionId) {
2274
+ if(JSON.parse(msg).type == 1) {
2275
+ this.saveAuthorize(JSON.parse(msg).data.userId)
2276
+ this.customerFaceClick(this.state.customerList[this.state.customerSelect])
2277
+ }
2278
+ }
2279
+ }
2225
2280
  this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) =>{
2226
2281
  console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
2227
2282
  if (stream_type == "subscribe") {
@@ -2236,24 +2291,26 @@ class Video extends Component {
2236
2291
  if(publish_tag == 'tag1') {
2237
2292
  console.log('tag1',stream)
2238
2293
  let newStream = stream;
2239
- let beauty_strength = beautyNum;
2240
- if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
2241
- newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
2242
- // 清理原始流
2243
- newStream.oninactive = function () {
2244
- clearOriginStream(stream);
2245
- };
2246
- newStream.getVideoTracks()[0].onended = function () {
2247
- clearOriginStream(stream);
2248
- };
2249
- function clearOriginStream(stream) {
2250
- stream.getTracks().forEach((track) => {
2251
- track.stop();
2252
- });
2253
- stream = null;
2254
- }
2255
- };
2294
+ // if (stream.getVideoTracks()[0]) {
2295
+ // await startBeauty(newStream);
2296
+ // newStream = beautyCaptureStream();
2297
+ // // 清理原始流
2298
+ // newStream.oninactive = function () {
2299
+ // clearOriginStream(stream);
2300
+ // };
2301
+ // newStream.getVideoTracks()[0].onended = function () {
2302
+ // clearOriginStream(stream);
2303
+ // };
2304
+ // function clearOriginStream(stream) {
2305
+ // stream.getTracks().forEach((track) => {
2306
+ // track.stop();
2307
+ // });
2308
+ // stream = null;
2309
+ // }
2310
+ // };
2256
2311
  if (stream.getVideoTracks()[0]) {
2312
+ await startBeauty(newStream);
2313
+ newStream = beautyCaptureStream();
2257
2314
  await startHs(newStream);
2258
2315
  newStream = hsCaptureStream();
2259
2316
  // 清理原始流
@@ -2347,16 +2404,6 @@ class Video extends Component {
2347
2404
  this.timer = setInterval(
2348
2405
  () => {
2349
2406
  if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0.1) {
2350
- // this.test_controller.SendTextMsg(JSON.stringify({
2351
- // 'typeId': 3200,
2352
- // 'decibelValue': this.state.analyserHeight.get(sid).toFixed(2),
2353
- // "data": {
2354
- // 'sessionId': this.state.sessionId,
2355
- // 'userId': this.props.tellerAccount,
2356
- // 'data': (new Date()).valueOf()
2357
- // }
2358
-
2359
- // }))
2360
2407
  callNimIM('sendCustomCmdMsg', {
2361
2408
  customId: this.state.imRoomId,
2362
2409
  content: JSON.stringify({
@@ -2393,7 +2440,8 @@ class Video extends Component {
2393
2440
  };
2394
2441
  // 发布媒体流失败
2395
2442
  this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
2396
- console.log('发布媒体流失败', sid, err_code, err_msg)
2443
+ this.saveLog('发布失败' + err_code)
2444
+ console.log('Publishing media stream failed,', sid, err_code, err_msg)
2397
2445
  if(sid == document.getElementById('publish_video1').name) {
2398
2446
  this.state.sessionType = false
2399
2447
  this.roomCallBack(2, '发布失败',4)
@@ -2579,6 +2627,7 @@ class Video extends Component {
2579
2627
  err_msg
2580
2628
  ) => {
2581
2629
  console.log('订阅媒体流失败', sid, err_code, err_msg)
2630
+ this.saveLog('Failed to subscribe to media stream,' + err_code)
2582
2631
  };
2583
2632
  // 推送“房间与会者列表”给新加⼊者
2584
2633
  this.test_controller.OnRoomAttendanceList = (participants) => {
@@ -3599,9 +3648,9 @@ userType:'1'
3599
3648
  }
3600
3649
  }
3601
3650
  componentWillUnmount() {
3651
+ this.saveLog('Exit meeting')
3602
3652
  if (this.test_controller&&this.state.sessionType) {
3603
3653
  clearStreamRemain()
3604
- beautyNum = 0
3605
3654
  this.test_controller.LeaveRoom()
3606
3655
  this.test_controller.Disconnect()
3607
3656
  }
@@ -3649,14 +3698,35 @@ userType:'1'
3649
3698
  console.log('isSharedScreen', this.state.isSharedScreen,this.state.laveRoomSharedScreen)
3650
3699
 
3651
3700
  }
3701
+ getToken = async () =>{
3702
+ try{
3703
+ let result = await API.getToken({
3704
+ sessionId: this.state.sessionId ? this.state.sessionId : this.props.sessionId,
3705
+ roomId: this.state.channelId ? this.state.channelId : this.props.roomId
3706
+ })
3707
+ window.sessionStorage.setItem('authTokenHSBC',result)
3708
+ rateList = []
3709
+ this.rateAll().then((res)=>{
3710
+ Array.isArray(res) ? res.map((item)=>{
3711
+ rateList.push(item.tag)
3712
+ }) : rateList = []
3713
+ console.log('rateList',rateList)
3714
+ })
3715
+ }catch (err) {
3716
+ this.roomCallBack(2, '获取tiken失败','SYS-01')
3717
+ }
3718
+ }
3652
3719
  getRoomStatus = async data => {
3653
3720
  try {
3654
3721
  let result = await API.getRoomStatus({
3655
3722
  sessionId: data.sessionId
3656
3723
  });
3657
3724
  if (result.code == 200 && result.data.roomStatus == 1) {
3725
+ // this.getToken()
3658
3726
  this.addToScript()
3727
+
3659
3728
  } else {
3729
+ console.log('123')
3660
3730
  this.state.channelId = '',
3661
3731
  this.state.rtoken = '',
3662
3732
  this.state.sessionId = '',
@@ -3672,6 +3742,7 @@ userType:'1'
3672
3742
  // })
3673
3743
  }
3674
3744
  } catch (err) {
3745
+ console.log('456')
3675
3746
  this.state.channelId = '',
3676
3747
  this.state.rtoken = '',
3677
3748
  this.state.sessionId = '',
@@ -3692,7 +3763,7 @@ userType:'1'
3692
3763
  loading: true,
3693
3764
  })
3694
3765
  const that = this
3695
- axios.get(this.props.resourcePath + "/beauty/beauty.js")
3766
+ axios.get(this.props.resourcePath + "/mcu.js")
3696
3767
  .then(response => this.addToScriptClick()).catch(function (error) {
3697
3768
  console.log(error);
3698
3769
  that.state.sessionType = false
@@ -3707,14 +3778,9 @@ userType:'1'
3707
3778
  }
3708
3779
  addToScriptClick=()=>{
3709
3780
  const _dependScripts = [
3710
- // https://counter-web.leimondata.cn:7199
3711
- this.props.resourcePath + "/beauty/beauty.js",
3712
- this.props.resourcePath + "/beauty/meeting_beautify_stream.js",
3713
- this.props.resourcePath + "/beauty/backgroundBlur.js",
3714
-
3781
+ this.props.resourcePath + "/beauty/beauty_frame_pkg.js",
3715
3782
  this.props.resourcePath + "/adapter.js",
3716
3783
  this.props.resourcePath + "/getMediaInfo.js",
3717
- // this.props.resourcePath + "/pdf.js",
3718
3784
  this.props.resourcePath + "/EBML.js",
3719
3785
  this.props.resourcePath + "/mcu.js",
3720
3786
  this.props.resourcePath + "/meeting_desk_stream.js",
@@ -3748,7 +3814,7 @@ userType:'1'
3748
3814
  if (i < _dependScripts.length) {
3749
3815
  const script = document.createElement("script");
3750
3816
  script.src = _dependScripts[i];
3751
- script.type = 'text/javascript'
3817
+ // script.type = 'text/javascript'
3752
3818
  script.async = true;
3753
3819
  document.head.appendChild(script);
3754
3820
  if (i == _dependScripts.length - 1) {
@@ -4114,6 +4180,8 @@ userType:'1'
4114
4180
  appAccount: this.state.faceCustomerUid,
4115
4181
  idCardNumber: this.state.idCardNumber,
4116
4182
  sessionId: this.state.sessionId,
4183
+ certificateType: this.state.certificateType,
4184
+ customerName: this.state.customerName
4117
4185
  });
4118
4186
  console.log('confirmCallback',result)
4119
4187
  if (result.code == 200) {
@@ -4269,6 +4337,9 @@ userType:'1'
4269
4337
 
4270
4338
  if (result.code == 200) {
4271
4339
  this.messageClick('查询客户信息成功','success')
4340
+ this.setState({
4341
+ isModalVisibleCustomer: false
4342
+ })
4272
4343
  } else {
4273
4344
  this.messageClick('查询客户信息失败','error')
4274
4345
  }
@@ -4327,6 +4398,7 @@ userType:'1'
4327
4398
  console.log(sid)
4328
4399
  this.state.customOcrSid = sid
4329
4400
  this.state.faceCustomerUid = item.customId,
4401
+ this.state.customerName = item.name
4330
4402
  this.setState({
4331
4403
  clickedFacial: false,
4332
4404
  clickedOcr: false,
@@ -4898,19 +4970,30 @@ userType:'1'
4898
4970
  })
4899
4971
  }
4900
4972
  beautyClick = () =>{
4901
- const publish_config = {}
4902
- publish_config.sid = document.getElementById('publish_video1').name
4903
- publish_config.media_type = 1
4904
- publish_config.publish_device = 1
4905
- publish_config.videoSource = this.state.cameraValue
4906
- publish_config.audioSource = this.state.microphoneValue
4907
- publish_config.video_profile_type=100
4908
- publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
4909
- this.test_controller.ChangeMediaStream(publish_config)
4910
- beautyNum = beautyNum == 0 ? 1 : 0
4911
- this.setState({
4912
- beautyName: beautyNum == 0 ? '开启美颜' : '关闭美颜'
4913
- })
4973
+ // const publish_config = {}
4974
+ // publish_config.sid = document.getElementById('publish_video1').name
4975
+ // publish_config.media_type = 1
4976
+ // publish_config.publish_device = 1
4977
+ // publish_config.videoSource = this.state.cameraValue
4978
+ // publish_config.audioSource = this.state.microphoneValue
4979
+ // publish_config.video_profile_type=100
4980
+ // publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
4981
+ // this.test_controller.ChangeMediaStream(publish_config)
4982
+ // beautyNum = beautyNum == 0 ? 1 : 0
4983
+ if(beautyType) {
4984
+ beautyType = false
4985
+ this.setState({
4986
+ beautyName: '开启美颜'
4987
+ })
4988
+ beautySetMode('none')
4989
+ } else {
4990
+ beautyType = true
4991
+ beautySetMode('beauty')
4992
+ this.setState({
4993
+ beautyName: '关闭美颜'
4994
+ })
4995
+ }
4996
+
4914
4997
  }
4915
4998
  componentDidMount() {
4916
4999
  var box=document.getElementById("whiteboardDIV");
@@ -5085,25 +5168,123 @@ userType:'1'
5085
5168
  this.sendNotification()
5086
5169
  }
5087
5170
  }
5088
- // shouldComponentUpdate(nextProps,nextState){
5089
- // console.log('componentDidUpdate',nextProps,nextState)
5090
- // if(nextProps.shareMask != nextState.shareMaskState){
5091
- // this.state.shareMaskState = nextProps.shareMask
5092
- // this.sendNotification()
5093
- // }
5094
- // }
5095
- // static getDerivedStateFromProps(props, state) {
5096
- // console.log('getDerivedStateFromProps',props,state,props.shareMask)
5097
- // if(props.shareMask!==state.shareMaskState){
5098
- // // this.sendNotification()
5099
- // return {
5100
-
5101
- // shareMaskState:shareMask,
5171
+ onChangeOCRCustomer=(e) => {
5172
+ console.log(e)
5173
+ this.setState({
5174
+ customerSelect: e.target.value
5175
+ })
5176
+ }
5177
+ handleCancelCustomer=()=>{
5178
+ this.setState({
5179
+ isModalVisibleCustomer: false
5180
+ })
5181
+ }
5182
+ handleOkCustomer=()=>{
5183
+ if(this.state.isCustomerSelect) {
5184
+ if(this.state.customerList[this.state.customerSelect].tourist) {
5185
+ this.customerFaceClick(this.state.customerList[this.state.customerSelect])
5186
+ } else {
5187
+ this.setState({
5188
+ isCustomerSelect: false,
5189
+ customerTitleName: this.state.customerList[this.state.customerSelect].name
5190
+ })
5191
+ }
5192
+
5193
+ } else {
5194
+ this.getAuthorizeResult(this.state.customerList[this.state.customerSelect].customId).then((res)=>{
5195
+ if(res) {
5196
+ this.customerFaceClick(this.state.customerList[this.state.customerSelect])
5197
+ } else {
5198
+ if(this.state.documentType == 0) {
5199
+ this.test_controller.SendTextMsg(JSON.stringify({
5200
+ 'typeId': 3300,
5201
+ "data": {
5202
+ 'sessionId': this.state.sessionId,
5203
+ 'title': '为了有效确认客户身份,请您配合进行我行的身份识别和核验。请您阅读以下内容,若您同意,请您之后在摄像头前出示您的身份证件,我行将对您的身份证件拍照并采集证件信息;同时,我行会对您进行脸部拍照,采集您的脸部图像。',
5204
+ 'list': [
5205
+ {
5206
+ 'id': 1,
5207
+ 'content': '您是否授权汇丰中国对您的证件以及脸部进行拍照,采集并留存您的证件信息以及脸部图像以便我行进行身份识别?'
5208
+ },
5209
+ {
5210
+ 'id': 2,
5211
+ 'content': '为了通过人脸对比进行身份识别和核验,我行需要将您的姓名、身份证件号码和脸部图像发送给中国人民银行或全国公民身份证号码查询服务中心授权的第三方,并由第三方进一步发送至中国人民银行或全国公民身份证号码查询服务中心进行人脸对比或信息核对。'
5212
+ }
5213
+ ]
5214
+ }
5215
+
5216
+ }))
5217
+ } else if(this.state.documentType == 1) {
5218
+ this.test_controller.SendTextMsg(JSON.stringify({
5219
+ 'typeId': 3300,
5220
+ "data": {
5221
+ 'sessionId': this.state.sessionId,
5222
+ 'title': '为了有效确认客户身份,请您配合进行我行的身份识别。请您阅读以下内容,若您同意,请您之后在摄像头前出示您的身份证件,我行将对您的身份证件拍照并采集证件信息;',
5223
+ 'list': [
5224
+ {
5225
+ 'id': 1,
5226
+ 'content': '您是否授权汇丰中国对您的证件进行拍照,采集并留存您的证件信息以便我行进行身份确认?'
5227
+ }
5228
+ ]
5229
+ }
5230
+
5231
+ }))
5232
+ }
5102
5233
 
5103
- // }
5104
- // }
5105
- // return null
5106
- // }
5234
+
5235
+ }
5236
+ })
5237
+ this.setState({
5238
+ isModalVisibleCustomer: false,
5239
+ })
5240
+ // this.customerFaceClick(this.state.customerList[this.state.customerSelect])
5241
+ }
5242
+
5243
+ }
5244
+ onChangeDocumentType=(e)=>{
5245
+ this.setState({
5246
+ documentType: e.target.value
5247
+ })
5248
+ }
5249
+ getAuthorizeResult= async (appAccount) => {
5250
+ try {
5251
+ let result = await API.getAuthorizeResult({
5252
+ activityId: this.props.businessNumber,
5253
+ appAccount: appAccount,
5254
+ });
5255
+ console.log(result)
5256
+ if (result.code == 200 && result.data.ifAuthorize) {
5257
+ console.log('成功')
5258
+ return true
5259
+ } else {
5260
+
5261
+ // this.messageClick('保存失败','error')
5262
+ return false
5263
+ }
5264
+ } catch (err) {
5265
+ console.log(err)
5266
+ return false
5267
+ }
5268
+ }
5269
+ saveAuthorize= async (appAccount) => {
5270
+ try {
5271
+ let result = await API.saveAuthorize({
5272
+ activityId: this.props.businessNumber,
5273
+ authorizeType: this.state.documentType==0 ? 'ID' : 'NID',
5274
+ appAccount: appAccount,
5275
+ idCardAuthorize: this.state.documentType==0 ? 'YES' : '',
5276
+ pictureAuthorize: 'YES'
5277
+ });
5278
+ console.log(result)
5279
+ if (result.code == 200) {
5280
+ console.log('成功')
5281
+ } else {
5282
+ // this.messageClick('保存失败','error')
5283
+ }
5284
+ } catch (err) {
5285
+ console.log(err)
5286
+ }
5287
+ }
5107
5288
  render() {
5108
5289
  const { meetingInfo,isTranscribing } = this.props
5109
5290
  var pdfChildren
@@ -5776,13 +5957,13 @@ userType:'1'
5776
5957
  <Option value="2">反面</Option>
5777
5958
  </Select>
5778
5959
  } */}
5779
- {
5780
- !this.state.idCardName &&<div className='faceCardImg'>
5960
+ <div className='faceCardImg'>
5961
+ {/* <div>{this.state.IDtypeFrontOrBack}</div> */}
5781
5962
  <img className="faceImg" src={this.state.facialImg} alt=""></img>
5782
5963
  </div>
5783
- }
5784
5964
  {
5785
5965
  this.state.idCardName &&<div className='resuleCard'>
5966
+ <div>证件信息确认</div>
5786
5967
  <div><span>客户姓名</span> <input type="text" value={this.state.idCardName} onChange={this.handleChangeIdCardName} /></div>
5787
5968
  <div><span>身份证号</span> <input type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
5788
5969
  </div>
@@ -5791,13 +5972,52 @@ userType:'1'
5791
5972
 
5792
5973
  </div>
5793
5974
  </Modal>
5794
- {/* <Modal title={this.state.titleModal} cancelText="取消" okText="确定" visible={this.state.isModalVisibleFacial}
5795
- onOk={this.handleOkFacial} onCancel={this.handleCancelFacial}>
5796
- <div className="faceBody">
5797
- <img className="faceImg" src={this.state.facialImg} alt=""></img>
5975
+ <Modal title={this.state.customerTitleName} closable={false} centered={true} visible={this.state.isModalVisibleCustomer}
5976
+ footer={[
5977
+ <div key='end'>
5978
+ <Button className="modelButtonCancel" onClick={this.handleCancelCustomer}>取消</Button>
5979
+ <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkCustomer}>下一步</Button>
5980
+ </div>
5981
+ ]}>
5982
+ <div>
5983
+ <div className='selectCustomer'>
5984
+ {
5985
+ this.state.isCustomerSelect &&<div>
5986
+ <div>
5987
+ 请选择进行身份识别的客户
5988
+ </div>
5989
+ <div>
5990
+ <Radio.Group onChange={this.onChangeOCRCustomer} value={this.state.customerSelect}>
5991
+ <Space direction="vertical">
5992
+ {
5993
+ this.state.customerList.map((item,index)=>{
5994
+ return <Radio value={index}>{item.name}</Radio>
5995
+ })
5996
+ }
5997
+ </Space>
5998
+ </Radio.Group>
5999
+ </div>
6000
+ </div>
6001
+ }
6002
+ {
6003
+ !this.state.isCustomerSelect &&<div>
6004
+ <div>
6005
+ 请您确认您的身份证件类型
6006
+ </div>
6007
+ <div>
6008
+ <Radio.Group onChange={this.onChangeDocumentType} value={this.state.documentType}>
6009
+ <Space direction="vertical">
6010
+ <Radio value={0}>身份证:或外国人永久居住证;或港澳台居民居住证</Radio>
6011
+ <Radio value={1}>护照:或台湾来往大陆通行证;或港澳来往大陆通行证</Radio>
6012
+ </Space>
6013
+ </Radio.Group>
6014
+ </div>
6015
+ </div>
6016
+ }
6017
+ </div>
5798
6018
  </div>
5799
6019
 
5800
- </Modal> */}
6020
+ </Modal>
5801
6021
  <Modal className="modelClass" title="邀请参会人员" closable={false} centered={true} visible={this.state.isModalVisibleInvitation} footer={[
5802
6022
  <div key='invitation'>
5803
6023
  <Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>
@@ -5917,6 +6137,7 @@ sessionId: "",
5917
6137
  isTranscribing: false,
5918
6138
  shareMask: false,
5919
6139
  isOpenSound: false, // true开启进出音效 false不开启
6140
+ logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track?APIVersion=0.6.0&app=meeting-ui',
5920
6141
  internalUrl: 'https://wp-staff-gateway.wealth-platform.uat.ali.cloud.cn.hsbc/meeting-ui/OHB/CN/HSBC?chnlID=OHB&locale=zh_CN&chnlCC=CN&chnlGMC=HSBC&targetFunc=supervisorMeeting&sourceFunc=rmMeeting'
5921
6142
  }
5922
6143
  export default Video