react_hsbc_teller 1.8.1 → 1.8.4
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/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/api/api.js +56 -1
- package/packages/api/server.js +3 -1
- package/packages/assets/img/whiteningLut.jpg +0 -0
- package/packages/pages/foot/foot.jsx +5 -4
- package/packages/pages/video/video.jsx +325 -94
- package/packages/pages/video/video.less +7 -3
|
@@ -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
|
|
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
|
-
|
|
96
|
-
|
|
97
|
-
|
|
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,44 @@ 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: 'post',
|
|
329
|
+
baseURL: this.props.logUrl,
|
|
330
|
+
headers: {
|
|
331
|
+
'x-log-apiversion': '0.6.0',
|
|
332
|
+
'x-log-bodyrawsize': '1234',
|
|
333
|
+
},
|
|
334
|
+
data: {
|
|
335
|
+
"__logs__": [
|
|
336
|
+
{
|
|
337
|
+
"key": val + this.state.channelId
|
|
338
|
+
}
|
|
339
|
+
]
|
|
340
|
+
},
|
|
341
|
+
|
|
342
|
+
}).then(res => {
|
|
343
|
+
|
|
344
|
+
},error => {
|
|
345
|
+
if(error.response){
|
|
346
|
+
|
|
347
|
+
}else{
|
|
348
|
+
|
|
349
|
+
}
|
|
350
|
+
})
|
|
351
|
+
}
|
|
311
352
|
/**
|
|
312
353
|
* 创建房间成功后回调后台
|
|
313
354
|
* @param {JSON} data 数据类型
|
|
@@ -319,7 +360,8 @@ class Video extends Component {
|
|
|
319
360
|
activityId: this.props.businessNumber,
|
|
320
361
|
callbackUrl: this.props.callbackUrl,
|
|
321
362
|
roomId: this.state.channelId,
|
|
322
|
-
mtoken: this.state.rtoken
|
|
363
|
+
mtoken: this.state.rtoken,
|
|
364
|
+
type: 2
|
|
323
365
|
});
|
|
324
366
|
console.log(result);
|
|
325
367
|
this.state.imRoomId = result.imRoomId,
|
|
@@ -342,6 +384,7 @@ class Video extends Component {
|
|
|
342
384
|
if(this.state.imStatus && !this.state.imJoinRoom) {
|
|
343
385
|
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
344
386
|
this.state.imJoinRoom =true
|
|
387
|
+
this.saveLog('加入IM房间')
|
|
345
388
|
console.log('加入IM房间')
|
|
346
389
|
}
|
|
347
390
|
})
|
|
@@ -356,10 +399,13 @@ class Video extends Component {
|
|
|
356
399
|
roomId: this.state.channelId
|
|
357
400
|
}
|
|
358
401
|
})
|
|
402
|
+
// this.getToken()
|
|
403
|
+
// this.saveLog()
|
|
359
404
|
} catch (err) {
|
|
360
405
|
console.error(err);
|
|
361
406
|
|
|
362
407
|
this.state.sessionType = false
|
|
408
|
+
this.saveLog('创建房间---保存信息失败')
|
|
363
409
|
if(err.status == 502 || err.status== 404) {
|
|
364
410
|
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
365
411
|
} else {
|
|
@@ -436,6 +482,7 @@ class Video extends Component {
|
|
|
436
482
|
this.handleEdit()
|
|
437
483
|
}
|
|
438
484
|
} catch (err) {
|
|
485
|
+
this.saveLog('签名失败')
|
|
439
486
|
console.error(err);
|
|
440
487
|
if(err.status == 502 || err.status== 404) {
|
|
441
488
|
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
@@ -453,7 +500,6 @@ class Video extends Component {
|
|
|
453
500
|
if(!this.state.imStatus){
|
|
454
501
|
this.state.manualClose = false
|
|
455
502
|
initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
|
|
456
|
-
|
|
457
503
|
}
|
|
458
504
|
const config_param = {};
|
|
459
505
|
config_param.workspaceId = this.state.workSpaceId;
|
|
@@ -999,10 +1045,17 @@ class Video extends Component {
|
|
|
999
1045
|
})
|
|
1000
1046
|
}
|
|
1001
1047
|
}
|
|
1048
|
+
console.log(list)
|
|
1049
|
+
this.setState({
|
|
1050
|
+
customerList: list
|
|
1051
|
+
})
|
|
1002
1052
|
if (list.length > 0) {
|
|
1003
1053
|
if (val == 'ocr') {
|
|
1004
1054
|
this.setState({
|
|
1005
|
-
|
|
1055
|
+
isModalVisibleCustomer: true,
|
|
1056
|
+
isCustomerSelect: true,
|
|
1057
|
+
customerSelect: '',
|
|
1058
|
+
customerTitleName: '客户身份识别'
|
|
1006
1059
|
})
|
|
1007
1060
|
} else if (val == 'facial') {
|
|
1008
1061
|
this.setState({
|
|
@@ -1012,9 +1065,6 @@ class Video extends Component {
|
|
|
1012
1065
|
} else {
|
|
1013
1066
|
this.messageClick('当前暂无客户','error')
|
|
1014
1067
|
}
|
|
1015
|
-
this.setState({
|
|
1016
|
-
customerList: list
|
|
1017
|
-
})
|
|
1018
1068
|
}
|
|
1019
1069
|
messageClick=(value,valueOne)=>{
|
|
1020
1070
|
console.log(value,valueOne)
|
|
@@ -1080,6 +1130,7 @@ class Video extends Component {
|
|
|
1080
1130
|
}
|
|
1081
1131
|
};
|
|
1082
1132
|
endSessionValue = () => {
|
|
1133
|
+
this.saveLog('主动退出会议')
|
|
1083
1134
|
if(streamShare) {
|
|
1084
1135
|
streamShare.getTracks().forEach(track => track.stop());
|
|
1085
1136
|
streamShare=''
|
|
@@ -1412,6 +1463,7 @@ class Video extends Component {
|
|
|
1412
1463
|
this.setState({
|
|
1413
1464
|
loading: false,
|
|
1414
1465
|
})
|
|
1466
|
+
this.saveLog('失败的code:' + code)
|
|
1415
1467
|
if (this.state.sessionId) {
|
|
1416
1468
|
if(code == 'SYS-01' || code == 'SYS-02') {
|
|
1417
1469
|
this.props.joinRoomCallback({
|
|
@@ -1948,6 +2000,7 @@ class Video extends Component {
|
|
|
1948
2000
|
console.log('im登录', msg)
|
|
1949
2001
|
if(msg.status == 'error') {
|
|
1950
2002
|
this.state.imStatus = false
|
|
2003
|
+
this.saveLog('im建立连接失败')
|
|
1951
2004
|
this.roomCallBack(2, 'im建立连接失败',5)
|
|
1952
2005
|
} else if (msg.status == 'success') {
|
|
1953
2006
|
this.state.imStatus = true
|
|
@@ -1963,6 +2016,7 @@ class Video extends Component {
|
|
|
1963
2016
|
this.timer && clearInterval(this.timer);
|
|
1964
2017
|
this.state.imStatus = false
|
|
1965
2018
|
console.log('IMOpenfireclose')
|
|
2019
|
+
this.saveLog('账号重复登录')
|
|
1966
2020
|
this.roomCallBack(2, '账号重复登录',9)
|
|
1967
2021
|
|
|
1968
2022
|
}
|
|
@@ -1988,9 +2042,6 @@ class Video extends Component {
|
|
|
1988
2042
|
this.test_controller.OnGetDevicesSuccess = (devicesInfo) => {
|
|
1989
2043
|
console.log('devicesInfo' + JSON.stringify(devicesInfo));
|
|
1990
2044
|
const obj = [
|
|
1991
|
-
// {actionid: '0133d06019b8fe9426818ae7573ccfc31c150e09138e7f5ccfda03d6e224ffd4', groupId: '9c0334ba5cba71b60acb3ec6669c3aac78371ec9d9e33d2e8af72a758d895d27', actionname: 'Integrated Camera (13d3:56fb)'},
|
|
1992
|
-
|
|
1993
|
-
// {actionid: '4695c628677498d876074b941c16f6921d4e57534b50bfc2cb973da84e0e2622', groupId: '0d86c9467f096440ed74449192be5fafea59ac469866975f30b61fe964e2a80e', actionname: 'C2D Camera (0416:5035)'}
|
|
1994
2045
|
];
|
|
1995
2046
|
const obj1 = [];
|
|
1996
2047
|
const obj2 = [];
|
|
@@ -2098,6 +2149,7 @@ class Video extends Component {
|
|
|
2098
2149
|
// 获取设备失败
|
|
2099
2150
|
this.test_controller.OnGetDevicesFailed = (code, msg) => {
|
|
2100
2151
|
console.log('获取设备失败', code, msg)
|
|
2152
|
+
this.saveLog('获取设备失败')
|
|
2101
2153
|
this.state.sessionType = false
|
|
2102
2154
|
this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
|
|
2103
2155
|
this.roomCallBack(2, '获取设备失败',1)
|
|
@@ -2109,6 +2161,7 @@ class Video extends Component {
|
|
|
2109
2161
|
};
|
|
2110
2162
|
this.test_controller.OnConnectFailed = (code, msg) => {
|
|
2111
2163
|
console.log('建立连接失败', code, msg)
|
|
2164
|
+
this.saveLog('建立连接失败,'+ code)
|
|
2112
2165
|
this.state.sessionType = false
|
|
2113
2166
|
this.roomCallBack(2, '连接失败',2)
|
|
2114
2167
|
};
|
|
@@ -2124,6 +2177,7 @@ class Video extends Component {
|
|
|
2124
2177
|
// 初始化房间失败
|
|
2125
2178
|
this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
|
|
2126
2179
|
console.log('初始化房间失败', err_code, err_msg)
|
|
2180
|
+
this.saveLog('初始化房间失败,' + err_code)
|
|
2127
2181
|
this.state.sessionType = false
|
|
2128
2182
|
this.roomCallBack(2, '初始化失败',3)
|
|
2129
2183
|
};
|
|
@@ -2149,6 +2203,7 @@ class Video extends Component {
|
|
|
2149
2203
|
// 创建房间失败
|
|
2150
2204
|
this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
|
|
2151
2205
|
console.log('创建房间失败', err_code, err_msg)
|
|
2206
|
+
this.saveLog('创建房间失败,' + err_code)
|
|
2152
2207
|
this.state.sessionType = false
|
|
2153
2208
|
this.roomCallBack(2, '创建房间失败',7)
|
|
2154
2209
|
};
|
|
@@ -2165,6 +2220,7 @@ class Video extends Component {
|
|
|
2165
2220
|
console.log(code, sid)
|
|
2166
2221
|
if(code == 5003 || code == 5004 || code == 5005|| code == 5007|| code == 5009|| code == 5010 || code == 5011|| code == 5012) {
|
|
2167
2222
|
if(sid == document.getElementById('publish_video1').name) {
|
|
2223
|
+
this.saveLog('音视频关闭通知' + code)
|
|
2168
2224
|
this.roomCallBack(2, '音视频异常关闭',8)
|
|
2169
2225
|
} else {
|
|
2170
2226
|
this.state.isScreenSwitching = false
|
|
@@ -2191,6 +2247,7 @@ class Video extends Component {
|
|
|
2191
2247
|
};
|
|
2192
2248
|
// 加入房间失败
|
|
2193
2249
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
2250
|
+
this.saveLog('加入房间失败' + err_code)
|
|
2194
2251
|
console.log('加入房间失败', err_code, err_msg)
|
|
2195
2252
|
// this.setState({
|
|
2196
2253
|
// sessionType: false,
|
|
@@ -2222,6 +2279,15 @@ class Video extends Component {
|
|
|
2222
2279
|
this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
|
|
2223
2280
|
console.log('发送失败',msgId,code, msg)
|
|
2224
2281
|
}
|
|
2282
|
+
this.test_controller.OnReceiveTextMsg = (uid, msg)=>{
|
|
2283
|
+
console.log('收到手机端消息',uid, msg, JSON.parse(msg).typeId,JSON.parse(msg).data.sessionId,this.state.sessionId)
|
|
2284
|
+
if(JSON.parse(msg).typeId == 33001 && this.state.sessionId == JSON.parse(msg).data.sessionId) {
|
|
2285
|
+
if(JSON.parse(msg).type == 1) {
|
|
2286
|
+
this.saveAuthorize(JSON.parse(msg).data.userId)
|
|
2287
|
+
this.customerFaceClick(this.state.customerList[this.state.customerSelect])
|
|
2288
|
+
}
|
|
2289
|
+
}
|
|
2290
|
+
}
|
|
2225
2291
|
this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) =>{
|
|
2226
2292
|
console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
2227
2293
|
if (stream_type == "subscribe") {
|
|
@@ -2236,24 +2302,26 @@ class Video extends Component {
|
|
|
2236
2302
|
if(publish_tag == 'tag1') {
|
|
2237
2303
|
console.log('tag1',stream)
|
|
2238
2304
|
let newStream = stream;
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
newStream.oninactive = function () {
|
|
2244
|
-
|
|
2245
|
-
};
|
|
2246
|
-
newStream.getVideoTracks()[0].onended = function () {
|
|
2247
|
-
|
|
2248
|
-
};
|
|
2249
|
-
function clearOriginStream(stream) {
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
}
|
|
2255
|
-
};
|
|
2305
|
+
// if (stream.getVideoTracks()[0]) {
|
|
2306
|
+
// await startBeauty(newStream);
|
|
2307
|
+
// newStream = beautyCaptureStream();
|
|
2308
|
+
// // 清理原始流
|
|
2309
|
+
// newStream.oninactive = function () {
|
|
2310
|
+
// clearOriginStream(stream);
|
|
2311
|
+
// };
|
|
2312
|
+
// newStream.getVideoTracks()[0].onended = function () {
|
|
2313
|
+
// clearOriginStream(stream);
|
|
2314
|
+
// };
|
|
2315
|
+
// function clearOriginStream(stream) {
|
|
2316
|
+
// stream.getTracks().forEach((track) => {
|
|
2317
|
+
// track.stop();
|
|
2318
|
+
// });
|
|
2319
|
+
// stream = null;
|
|
2320
|
+
// }
|
|
2321
|
+
// };
|
|
2256
2322
|
if (stream.getVideoTracks()[0]) {
|
|
2323
|
+
await startBeauty(newStream);
|
|
2324
|
+
newStream = beautyCaptureStream();
|
|
2257
2325
|
await startHs(newStream);
|
|
2258
2326
|
newStream = hsCaptureStream();
|
|
2259
2327
|
// 清理原始流
|
|
@@ -2347,16 +2415,6 @@ class Video extends Component {
|
|
|
2347
2415
|
this.timer = setInterval(
|
|
2348
2416
|
() => {
|
|
2349
2417
|
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
2418
|
callNimIM('sendCustomCmdMsg', {
|
|
2361
2419
|
customId: this.state.imRoomId,
|
|
2362
2420
|
content: JSON.stringify({
|
|
@@ -2393,6 +2451,7 @@ class Video extends Component {
|
|
|
2393
2451
|
};
|
|
2394
2452
|
// 发布媒体流失败
|
|
2395
2453
|
this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
|
|
2454
|
+
this.saveLog('发布失败' + err_code)
|
|
2396
2455
|
console.log('发布媒体流失败', sid, err_code, err_msg)
|
|
2397
2456
|
if(sid == document.getElementById('publish_video1').name) {
|
|
2398
2457
|
this.state.sessionType = false
|
|
@@ -2579,6 +2638,7 @@ class Video extends Component {
|
|
|
2579
2638
|
err_msg
|
|
2580
2639
|
) => {
|
|
2581
2640
|
console.log('订阅媒体流失败', sid, err_code, err_msg)
|
|
2641
|
+
this.saveLog('订阅媒体流失败' + err_code)
|
|
2582
2642
|
};
|
|
2583
2643
|
// 推送“房间与会者列表”给新加⼊者
|
|
2584
2644
|
this.test_controller.OnRoomAttendanceList = (participants) => {
|
|
@@ -3599,9 +3659,9 @@ userType:'1'
|
|
|
3599
3659
|
}
|
|
3600
3660
|
}
|
|
3601
3661
|
componentWillUnmount() {
|
|
3662
|
+
this.saveLog('退出会议')
|
|
3602
3663
|
if (this.test_controller&&this.state.sessionType) {
|
|
3603
3664
|
clearStreamRemain()
|
|
3604
|
-
beautyNum = 0
|
|
3605
3665
|
this.test_controller.LeaveRoom()
|
|
3606
3666
|
this.test_controller.Disconnect()
|
|
3607
3667
|
}
|
|
@@ -3649,14 +3709,35 @@ userType:'1'
|
|
|
3649
3709
|
console.log('isSharedScreen', this.state.isSharedScreen,this.state.laveRoomSharedScreen)
|
|
3650
3710
|
|
|
3651
3711
|
}
|
|
3712
|
+
getToken = async () =>{
|
|
3713
|
+
try{
|
|
3714
|
+
let result = await API.getToken({
|
|
3715
|
+
sessionId: this.state.sessionId ? this.state.sessionId : this.props.sessionId,
|
|
3716
|
+
roomId: this.state.channelId ? this.state.channelId : this.props.roomId
|
|
3717
|
+
})
|
|
3718
|
+
window.sessionStorage.setItem('authTokenHSBC',result)
|
|
3719
|
+
rateList = []
|
|
3720
|
+
this.rateAll().then((res)=>{
|
|
3721
|
+
Array.isArray(res) ? res.map((item)=>{
|
|
3722
|
+
rateList.push(item.tag)
|
|
3723
|
+
}) : rateList = []
|
|
3724
|
+
console.log('rateList',rateList)
|
|
3725
|
+
})
|
|
3726
|
+
}catch (err) {
|
|
3727
|
+
this.roomCallBack(2, '获取tiken失败','SYS-01')
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3652
3730
|
getRoomStatus = async data => {
|
|
3653
3731
|
try {
|
|
3654
3732
|
let result = await API.getRoomStatus({
|
|
3655
3733
|
sessionId: data.sessionId
|
|
3656
3734
|
});
|
|
3657
3735
|
if (result.code == 200 && result.data.roomStatus == 1) {
|
|
3736
|
+
// this.getToken()
|
|
3658
3737
|
this.addToScript()
|
|
3738
|
+
|
|
3659
3739
|
} else {
|
|
3740
|
+
console.log('123')
|
|
3660
3741
|
this.state.channelId = '',
|
|
3661
3742
|
this.state.rtoken = '',
|
|
3662
3743
|
this.state.sessionId = '',
|
|
@@ -3672,6 +3753,7 @@ userType:'1'
|
|
|
3672
3753
|
// })
|
|
3673
3754
|
}
|
|
3674
3755
|
} catch (err) {
|
|
3756
|
+
console.log('456')
|
|
3675
3757
|
this.state.channelId = '',
|
|
3676
3758
|
this.state.rtoken = '',
|
|
3677
3759
|
this.state.sessionId = '',
|
|
@@ -3692,7 +3774,7 @@ userType:'1'
|
|
|
3692
3774
|
loading: true,
|
|
3693
3775
|
})
|
|
3694
3776
|
const that = this
|
|
3695
|
-
axios.get(this.props.resourcePath + "/
|
|
3777
|
+
axios.get(this.props.resourcePath + "/mcu.js")
|
|
3696
3778
|
.then(response => this.addToScriptClick()).catch(function (error) {
|
|
3697
3779
|
console.log(error);
|
|
3698
3780
|
that.state.sessionType = false
|
|
@@ -3707,14 +3789,9 @@ userType:'1'
|
|
|
3707
3789
|
}
|
|
3708
3790
|
addToScriptClick=()=>{
|
|
3709
3791
|
const _dependScripts = [
|
|
3710
|
-
|
|
3711
|
-
this.props.resourcePath + "/beauty/beauty.js",
|
|
3712
|
-
this.props.resourcePath + "/beauty/meeting_beautify_stream.js",
|
|
3713
|
-
this.props.resourcePath + "/beauty/backgroundBlur.js",
|
|
3714
|
-
|
|
3792
|
+
this.props.resourcePath + "/beauty/beauty_frame_pkg.js",
|
|
3715
3793
|
this.props.resourcePath + "/adapter.js",
|
|
3716
3794
|
this.props.resourcePath + "/getMediaInfo.js",
|
|
3717
|
-
// this.props.resourcePath + "/pdf.js",
|
|
3718
3795
|
this.props.resourcePath + "/EBML.js",
|
|
3719
3796
|
this.props.resourcePath + "/mcu.js",
|
|
3720
3797
|
this.props.resourcePath + "/meeting_desk_stream.js",
|
|
@@ -3748,7 +3825,7 @@ userType:'1'
|
|
|
3748
3825
|
if (i < _dependScripts.length) {
|
|
3749
3826
|
const script = document.createElement("script");
|
|
3750
3827
|
script.src = _dependScripts[i];
|
|
3751
|
-
script.type = 'text/javascript'
|
|
3828
|
+
// script.type = 'text/javascript'
|
|
3752
3829
|
script.async = true;
|
|
3753
3830
|
document.head.appendChild(script);
|
|
3754
3831
|
if (i == _dependScripts.length - 1) {
|
|
@@ -4114,6 +4191,8 @@ userType:'1'
|
|
|
4114
4191
|
appAccount: this.state.faceCustomerUid,
|
|
4115
4192
|
idCardNumber: this.state.idCardNumber,
|
|
4116
4193
|
sessionId: this.state.sessionId,
|
|
4194
|
+
certificateType: this.state.certificateType,
|
|
4195
|
+
customerName: this.state.customerName
|
|
4117
4196
|
});
|
|
4118
4197
|
console.log('confirmCallback',result)
|
|
4119
4198
|
if (result.code == 200) {
|
|
@@ -4269,6 +4348,9 @@ userType:'1'
|
|
|
4269
4348
|
|
|
4270
4349
|
if (result.code == 200) {
|
|
4271
4350
|
this.messageClick('查询客户信息成功','success')
|
|
4351
|
+
this.setState({
|
|
4352
|
+
isModalVisibleCustomer: false
|
|
4353
|
+
})
|
|
4272
4354
|
} else {
|
|
4273
4355
|
this.messageClick('查询客户信息失败','error')
|
|
4274
4356
|
}
|
|
@@ -4327,6 +4409,7 @@ userType:'1'
|
|
|
4327
4409
|
console.log(sid)
|
|
4328
4410
|
this.state.customOcrSid = sid
|
|
4329
4411
|
this.state.faceCustomerUid = item.customId,
|
|
4412
|
+
this.state.customerName = item.name
|
|
4330
4413
|
this.setState({
|
|
4331
4414
|
clickedFacial: false,
|
|
4332
4415
|
clickedOcr: false,
|
|
@@ -4665,7 +4748,7 @@ userType:'1'
|
|
|
4665
4748
|
navigator.mediaDevices.getDisplayMedia({
|
|
4666
4749
|
video: true,
|
|
4667
4750
|
preferCurrentTab:true,
|
|
4668
|
-
audio: true
|
|
4751
|
+
// audio: true
|
|
4669
4752
|
// video: {
|
|
4670
4753
|
// width: document.body.clientWidth,
|
|
4671
4754
|
// height: document.body.clientHeight
|
|
@@ -4898,19 +4981,30 @@ userType:'1'
|
|
|
4898
4981
|
})
|
|
4899
4982
|
}
|
|
4900
4983
|
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
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4984
|
+
// const publish_config = {}
|
|
4985
|
+
// publish_config.sid = document.getElementById('publish_video1').name
|
|
4986
|
+
// publish_config.media_type = 1
|
|
4987
|
+
// publish_config.publish_device = 1
|
|
4988
|
+
// publish_config.videoSource = this.state.cameraValue
|
|
4989
|
+
// publish_config.audioSource = this.state.microphoneValue
|
|
4990
|
+
// publish_config.video_profile_type=100
|
|
4991
|
+
// publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
|
|
4992
|
+
// this.test_controller.ChangeMediaStream(publish_config)
|
|
4993
|
+
// beautyNum = beautyNum == 0 ? 1 : 0
|
|
4994
|
+
if(beautyType) {
|
|
4995
|
+
beautyType = false
|
|
4996
|
+
this.setState({
|
|
4997
|
+
beautyName: '开启美颜'
|
|
4998
|
+
})
|
|
4999
|
+
beautySetMode('none')
|
|
5000
|
+
} else {
|
|
5001
|
+
beautyType = true
|
|
5002
|
+
beautySetMode('beauty')
|
|
5003
|
+
this.setState({
|
|
5004
|
+
beautyName: '关闭美颜'
|
|
5005
|
+
})
|
|
5006
|
+
}
|
|
5007
|
+
|
|
4914
5008
|
}
|
|
4915
5009
|
componentDidMount() {
|
|
4916
5010
|
var box=document.getElementById("whiteboardDIV");
|
|
@@ -5085,25 +5179,123 @@ userType:'1'
|
|
|
5085
5179
|
this.sendNotification()
|
|
5086
5180
|
}
|
|
5087
5181
|
}
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5182
|
+
onChangeOCRCustomer=(e) => {
|
|
5183
|
+
console.log(e)
|
|
5184
|
+
this.setState({
|
|
5185
|
+
customerSelect: e.target.value
|
|
5186
|
+
})
|
|
5187
|
+
}
|
|
5188
|
+
handleCancelCustomer=()=>{
|
|
5189
|
+
this.setState({
|
|
5190
|
+
isModalVisibleCustomer: false
|
|
5191
|
+
})
|
|
5192
|
+
}
|
|
5193
|
+
handleOkCustomer=()=>{
|
|
5194
|
+
if(this.state.isCustomerSelect) {
|
|
5195
|
+
if(this.state.customerList[this.state.customerSelect].tourist) {
|
|
5196
|
+
this.customerFaceClick(this.state.customerList[this.state.customerSelect])
|
|
5197
|
+
} else {
|
|
5198
|
+
this.setState({
|
|
5199
|
+
isCustomerSelect: false,
|
|
5200
|
+
customerTitleName: this.state.customerList[this.state.customerSelect].name
|
|
5201
|
+
})
|
|
5202
|
+
}
|
|
5203
|
+
|
|
5204
|
+
} else {
|
|
5205
|
+
this.getAuthorizeResult(this.state.customerList[this.state.customerSelect].customId).then((res)=>{
|
|
5206
|
+
if(res) {
|
|
5207
|
+
this.customerFaceClick(this.state.customerList[this.state.customerSelect])
|
|
5208
|
+
} else {
|
|
5209
|
+
if(this.state.documentType == 0) {
|
|
5210
|
+
this.test_controller.SendTextMsg(JSON.stringify({
|
|
5211
|
+
'typeId': 3300,
|
|
5212
|
+
"data": {
|
|
5213
|
+
'sessionId': this.state.sessionId,
|
|
5214
|
+
'title': '为了有效确认客户身份,请您配合进行我行的身份识别和核验。请您阅读以下内容,若您同意,请您之后在摄像头前出示您的身份证件,我行将对您的身份证件拍照并采集证件信息;同时,我行会对您进行脸部拍照,采集您的脸部图像。',
|
|
5215
|
+
'list': [
|
|
5216
|
+
{
|
|
5217
|
+
'id': 1,
|
|
5218
|
+
'content': '您是否授权汇丰中国对您的证件以及脸部进行拍照,采集并留存您的证件信息以及脸部图像以便我行进行身份识别?'
|
|
5219
|
+
},
|
|
5220
|
+
{
|
|
5221
|
+
'id': 2,
|
|
5222
|
+
'content': '为了通过人脸对比进行身份识别和核验,我行需要将您的姓名、身份证件号码和脸部图像发送给中国人民银行或全国公民身份证号码查询服务中心授权的第三方,并由第三方进一步发送至中国人民银行或全国公民身份证号码查询服务中心进行人脸对比或信息核对。'
|
|
5223
|
+
}
|
|
5224
|
+
]
|
|
5225
|
+
}
|
|
5226
|
+
|
|
5227
|
+
}))
|
|
5228
|
+
} else if(this.state.documentType == 1) {
|
|
5229
|
+
this.test_controller.SendTextMsg(JSON.stringify({
|
|
5230
|
+
'typeId': 3300,
|
|
5231
|
+
"data": {
|
|
5232
|
+
'sessionId': this.state.sessionId,
|
|
5233
|
+
'title': '为了有效确认客户身份,请您配合进行我行的身份识别。请您阅读以下内容,若您同意,请您之后在摄像头前出示您的身份证件,我行将对您的身份证件拍照并采集证件信息;',
|
|
5234
|
+
'list': [
|
|
5235
|
+
{
|
|
5236
|
+
'id': 1,
|
|
5237
|
+
'content': '您是否授权汇丰中国对您的证件进行拍照,采集并留存您的证件信息以便我行进行身份确认?'
|
|
5238
|
+
}
|
|
5239
|
+
]
|
|
5240
|
+
}
|
|
5241
|
+
|
|
5242
|
+
}))
|
|
5243
|
+
}
|
|
5102
5244
|
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5245
|
+
|
|
5246
|
+
}
|
|
5247
|
+
})
|
|
5248
|
+
this.setState({
|
|
5249
|
+
isModalVisibleCustomer: false,
|
|
5250
|
+
})
|
|
5251
|
+
// this.customerFaceClick(this.state.customerList[this.state.customerSelect])
|
|
5252
|
+
}
|
|
5253
|
+
|
|
5254
|
+
}
|
|
5255
|
+
onChangeDocumentType=(e)=>{
|
|
5256
|
+
this.setState({
|
|
5257
|
+
documentType: e.target.value
|
|
5258
|
+
})
|
|
5259
|
+
}
|
|
5260
|
+
getAuthorizeResult= async (appAccount) => {
|
|
5261
|
+
try {
|
|
5262
|
+
let result = await API.getAuthorizeResult({
|
|
5263
|
+
activityId: this.props.businessNumber,
|
|
5264
|
+
appAccount: appAccount,
|
|
5265
|
+
});
|
|
5266
|
+
console.log(result)
|
|
5267
|
+
if (result.code == 200 && result.data.ifAuthorize) {
|
|
5268
|
+
console.log('成功')
|
|
5269
|
+
return true
|
|
5270
|
+
} else {
|
|
5271
|
+
|
|
5272
|
+
// this.messageClick('保存失败','error')
|
|
5273
|
+
return false
|
|
5274
|
+
}
|
|
5275
|
+
} catch (err) {
|
|
5276
|
+
console.log(err)
|
|
5277
|
+
return false
|
|
5278
|
+
}
|
|
5279
|
+
}
|
|
5280
|
+
saveAuthorize= async (appAccount) => {
|
|
5281
|
+
try {
|
|
5282
|
+
let result = await API.saveAuthorize({
|
|
5283
|
+
activityId: this.props.businessNumber,
|
|
5284
|
+
authorizeType: this.state.documentType==0 ? 'ID' : 'NID',
|
|
5285
|
+
appAccount: appAccount,
|
|
5286
|
+
idCardAuthorize: this.state.documentType==0 ? 'YES' : '',
|
|
5287
|
+
pictureAuthorize: 'YES'
|
|
5288
|
+
});
|
|
5289
|
+
console.log(result)
|
|
5290
|
+
if (result.code == 200) {
|
|
5291
|
+
console.log('成功')
|
|
5292
|
+
} else {
|
|
5293
|
+
// this.messageClick('保存失败','error')
|
|
5294
|
+
}
|
|
5295
|
+
} catch (err) {
|
|
5296
|
+
console.log(err)
|
|
5297
|
+
}
|
|
5298
|
+
}
|
|
5107
5299
|
render() {
|
|
5108
5300
|
const { meetingInfo,isTranscribing } = this.props
|
|
5109
5301
|
var pdfChildren
|
|
@@ -5776,13 +5968,12 @@ userType:'1'
|
|
|
5776
5968
|
<Option value="2">反面</Option>
|
|
5777
5969
|
</Select>
|
|
5778
5970
|
} */}
|
|
5779
|
-
|
|
5780
|
-
!this.state.idCardName &&<div className='faceCardImg'>
|
|
5971
|
+
<div className='faceCardImg'>
|
|
5781
5972
|
<img className="faceImg" src={this.state.facialImg} alt=""></img>
|
|
5782
5973
|
</div>
|
|
5783
|
-
}
|
|
5784
5974
|
{
|
|
5785
5975
|
this.state.idCardName &&<div className='resuleCard'>
|
|
5976
|
+
<div>证件信息确认</div>
|
|
5786
5977
|
<div><span>客户姓名</span> <input type="text" value={this.state.idCardName} onChange={this.handleChangeIdCardName} /></div>
|
|
5787
5978
|
<div><span>身份证号</span> <input type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
|
|
5788
5979
|
</div>
|
|
@@ -5791,13 +5982,52 @@ userType:'1'
|
|
|
5791
5982
|
|
|
5792
5983
|
</div>
|
|
5793
5984
|
</Modal>
|
|
5794
|
-
|
|
5795
|
-
|
|
5796
|
-
|
|
5797
|
-
<
|
|
5985
|
+
<Modal title={this.state.customerTitleName} closable={false} centered={true} visible={this.state.isModalVisibleCustomer}
|
|
5986
|
+
footer={[
|
|
5987
|
+
<div key='end'>
|
|
5988
|
+
<Button className="modelButtonCancel" onClick={this.handleCancelCustomer}>取消</Button>
|
|
5989
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkCustomer}>下一步</Button>
|
|
5990
|
+
</div>
|
|
5991
|
+
]}>
|
|
5992
|
+
<div>
|
|
5993
|
+
<div className='selectCustomer'>
|
|
5994
|
+
{
|
|
5995
|
+
this.state.isCustomerSelect &&<div>
|
|
5996
|
+
<div>
|
|
5997
|
+
请选择进行身份识别的客户
|
|
5998
|
+
</div>
|
|
5999
|
+
<div>
|
|
6000
|
+
<Radio.Group onChange={this.onChangeOCRCustomer} value={this.state.customerSelect}>
|
|
6001
|
+
<Space direction="vertical">
|
|
6002
|
+
{
|
|
6003
|
+
this.state.customerList.map((item,index)=>{
|
|
6004
|
+
return <Radio value={index}>{item.name}</Radio>
|
|
6005
|
+
})
|
|
6006
|
+
}
|
|
6007
|
+
</Space>
|
|
6008
|
+
</Radio.Group>
|
|
6009
|
+
</div>
|
|
6010
|
+
</div>
|
|
6011
|
+
}
|
|
6012
|
+
{
|
|
6013
|
+
!this.state.isCustomerSelect &&<div>
|
|
6014
|
+
<div>
|
|
6015
|
+
请您确认您的身份证件类型
|
|
6016
|
+
</div>
|
|
6017
|
+
<div>
|
|
6018
|
+
<Radio.Group onChange={this.onChangeDocumentType} value={this.state.documentType}>
|
|
6019
|
+
<Space direction="vertical">
|
|
6020
|
+
<Radio value={0}>身份证:或外国人永久居住证;或港澳台居民居住证</Radio>
|
|
6021
|
+
<Radio value={1}>护照:或台湾来往大陆通行证;或港澳来往大陆通行证</Radio>
|
|
6022
|
+
</Space>
|
|
6023
|
+
</Radio.Group>
|
|
6024
|
+
</div>
|
|
6025
|
+
</div>
|
|
6026
|
+
}
|
|
6027
|
+
</div>
|
|
5798
6028
|
</div>
|
|
5799
6029
|
|
|
5800
|
-
</Modal>
|
|
6030
|
+
</Modal>
|
|
5801
6031
|
<Modal className="modelClass" title="邀请参会人员" closable={false} centered={true} visible={this.state.isModalVisibleInvitation} footer={[
|
|
5802
6032
|
<div key='invitation'>
|
|
5803
6033
|
<Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>
|
|
@@ -5917,6 +6147,7 @@ sessionId: "",
|
|
|
5917
6147
|
isTranscribing: false,
|
|
5918
6148
|
shareMask: false,
|
|
5919
6149
|
isOpenSound: false, // true开启进出音效 false不开启
|
|
6150
|
+
logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track',
|
|
5920
6151
|
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
6152
|
}
|
|
5922
6153
|
export default Video
|