react_hsbc_teller 1.9.37 → 1.9.38
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/demo/demo.js +1 -1
- package/packages/pages/video/video.jsx +177 -313
- package/packages/common/JKL.js +0 -61
- package/packages/common/XML.js +0 -271
- package/packages/common/websocket.js +0 -267
- package/packages/utils/cell.js +0 -64
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
/* eslint-disable eqeqeq */
|
|
4
4
|
import React, { Component, useState } from 'react';
|
|
5
5
|
import API from '../../api/api';
|
|
6
|
-
import { initWebSocket, joinRoom, disconnect } from '../../common/websocket';
|
|
7
6
|
import { BoardOperate } from '../../common/index.esm.js';
|
|
8
7
|
import './video.less'
|
|
9
8
|
import { compressImage } from '../../utils/utils'
|
|
@@ -22,7 +21,6 @@ import internalLeft from '../../assets/mp3/internalLeft.mp3'
|
|
|
22
21
|
import leftMetting from '../../assets/mp3/leftmeeting.mp3'
|
|
23
22
|
import networkWeakAudio from '../../assets/mp3/networkweak.mp3'
|
|
24
23
|
import errorPng from '../../assets/img/tooltips2_fail.png'
|
|
25
|
-
import { callNimIM } from '../../utils/cell.js'
|
|
26
24
|
import Modal from "antd/lib/modal";
|
|
27
25
|
import 'antd/lib/modal/style'
|
|
28
26
|
import message from "antd/lib/message";
|
|
@@ -47,7 +45,7 @@ import Step from '../components/step/step.jsx'
|
|
|
47
45
|
import axios from 'axios';
|
|
48
46
|
import CryptoJS from "crypto-js";
|
|
49
47
|
|
|
50
|
-
const SDK_VERISON = '1.9.
|
|
48
|
+
const SDK_VERISON = '1.9.38'
|
|
51
49
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
52
50
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
53
51
|
const { Option } = Select;
|
|
@@ -253,11 +251,9 @@ class Video extends Component {
|
|
|
253
251
|
cameraValue: '',
|
|
254
252
|
microphoneValue: '',
|
|
255
253
|
imStatus: false,
|
|
256
|
-
imJoinRoom: false,
|
|
257
254
|
analyserData: new Map(),
|
|
258
255
|
analyserHeight: new Map(),
|
|
259
256
|
OnVolumeAnalyserMap: new Map(),
|
|
260
|
-
manualClose: false,
|
|
261
257
|
defaultValue: '1',
|
|
262
258
|
customOcrSid: '',
|
|
263
259
|
shareMaskState: false,
|
|
@@ -348,15 +344,7 @@ class Video extends Component {
|
|
|
348
344
|
publish_config.publish_streamId_id = 'publish_streamId1'
|
|
349
345
|
publish_config.publish_tag = 'tag1'
|
|
350
346
|
this.test_controller.Publish(publish_config)
|
|
351
|
-
|
|
352
|
-
setTimeout(() => {
|
|
353
|
-
if (this.state.imStatus && !this.state.imJoinRoom) {
|
|
354
|
-
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
355
|
-
this.state.imJoinRoom = true
|
|
356
|
-
this.saveLog('Join im room')
|
|
357
|
-
console.log('加入IM房间')
|
|
358
|
-
}
|
|
359
|
-
})
|
|
347
|
+
|
|
360
348
|
this.props.createRoomCallback({
|
|
361
349
|
type: 1,
|
|
362
350
|
errorManage: '',
|
|
@@ -466,11 +454,6 @@ class Video extends Component {
|
|
|
466
454
|
handleEdit = () => {
|
|
467
455
|
console.log(JSON.parse(window.sessionStorage.getItem('sigData')));
|
|
468
456
|
// eslint-disable-next-line no-undef
|
|
469
|
-
// initWebSocket('wss://im.uat.dsp.hsbcfts.com.cn:443/wealth/im/ws/')
|
|
470
|
-
if (!this.state.imStatus) {
|
|
471
|
-
this.state.manualClose = false
|
|
472
|
-
initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
|
|
473
|
-
}
|
|
474
457
|
const config_param = {};
|
|
475
458
|
config_param.workspaceId = this.state.workSpaceId;
|
|
476
459
|
config_param.uid = this.props.tellerAccount;
|
|
@@ -730,6 +713,14 @@ class Video extends Component {
|
|
|
730
713
|
})
|
|
731
714
|
}
|
|
732
715
|
};
|
|
716
|
+
sendMessage = (msg) => {
|
|
717
|
+
try {
|
|
718
|
+
this.test_controller.SendTextMsg(JSON.stringify(msg))
|
|
719
|
+
} catch (err) {
|
|
720
|
+
console.error(`内部错误, msg = ${JSON.stringify(msg)} `)
|
|
721
|
+
console.error(err)
|
|
722
|
+
}
|
|
723
|
+
}
|
|
733
724
|
errorCodeClick=(type,value)=>{
|
|
734
725
|
if(type == 'ocr'){
|
|
735
726
|
if(value == -1007 || value == -100701 || value == -100702 || value == -200001 || value == -300901 || value == -300902 || value == -400001) {
|
|
@@ -1386,9 +1377,8 @@ class Video extends Component {
|
|
|
1386
1377
|
})
|
|
1387
1378
|
}
|
|
1388
1379
|
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
console.log(JSON.parse(msg));
|
|
1380
|
+
handleReceiveMsg = (msg) => {
|
|
1381
|
+
console.log(JSON.parse(msg));
|
|
1392
1382
|
const Mival = JSON.parse(msg);
|
|
1393
1383
|
if (Mival.typeId == 1210) {
|
|
1394
1384
|
// 进行初始化操作
|
|
@@ -1555,36 +1545,15 @@ class Video extends Component {
|
|
|
1555
1545
|
this.pictureInPicture('Refresh')
|
|
1556
1546
|
}
|
|
1557
1547
|
}
|
|
1558
|
-
}
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
if (msg.status == 'error') {
|
|
1563
|
-
this.state.imStatus = false
|
|
1564
|
-
this.saveLog('Im connection establishment failed')
|
|
1565
|
-
this.roomCallBack(2, 'im建立连接失败', 5)
|
|
1566
|
-
} else if (msg.status == 'success') {
|
|
1567
|
-
this.state.imStatus = true
|
|
1568
|
-
setTimeout(() => {
|
|
1569
|
-
if (this.state.imRoomId && !this.state.imJoinRoom) {
|
|
1570
|
-
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
1571
|
-
this.state.imJoinRoom = true
|
|
1572
|
-
console.log('IMOpenfire 加入im房间')
|
|
1573
|
-
}
|
|
1574
|
-
}, 200);
|
|
1575
|
-
} else if (msg.status == 'close') {
|
|
1576
|
-
if (!this.state.manualClose) {
|
|
1577
|
-
this.timer && clearInterval(this.timer);
|
|
1578
|
-
this.state.imStatus = false
|
|
1579
|
-
console.log('IMOpenfireclose')
|
|
1580
|
-
this.saveLog('Repeated login of account')
|
|
1581
|
-
this.roomCallBack(2, '账号重复登录', 9)
|
|
1582
|
-
|
|
1548
|
+
} else if (Mival.typeId == 33001 && this.state.sessionId == Mival.data.sessionId) {
|
|
1549
|
+
if (Mival.type == 1) {
|
|
1550
|
+
this.saveAuthorize(Mival.data.userId)
|
|
1551
|
+
this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
|
|
1583
1552
|
}
|
|
1584
|
-
|
|
1553
|
+
console.log('33001 done')
|
|
1585
1554
|
}
|
|
1586
|
-
|
|
1587
|
-
|
|
1555
|
+
}
|
|
1556
|
+
mountClick = () => {
|
|
1588
1557
|
let data = {
|
|
1589
1558
|
account: this.props.tellerAccount,
|
|
1590
1559
|
type: '2',
|
|
@@ -1764,6 +1733,10 @@ class Video extends Component {
|
|
|
1764
1733
|
this.state.rtoken = rtoken
|
|
1765
1734
|
this.createRoom()
|
|
1766
1735
|
this.saveLog('RM mrtc create room successfully, room_id=' + room_id)
|
|
1736
|
+
|
|
1737
|
+
this.state.imStatus = true
|
|
1738
|
+
this.saveLog('Join im room')
|
|
1739
|
+
console.log('加入IM房间')
|
|
1767
1740
|
};
|
|
1768
1741
|
// 创建房间失败
|
|
1769
1742
|
this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
|
|
@@ -1812,6 +1785,10 @@ class Video extends Component {
|
|
|
1812
1785
|
this.test_controller.Publish(publish_config)
|
|
1813
1786
|
this.roomCallBack(1, '', 0)
|
|
1814
1787
|
this.saveLog('mrtc join room success')
|
|
1788
|
+
|
|
1789
|
+
this.state.imStatus = true
|
|
1790
|
+
this.saveLog('Join im room')
|
|
1791
|
+
console.log('加入IM房间')
|
|
1815
1792
|
};
|
|
1816
1793
|
// 加入房间失败
|
|
1817
1794
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
@@ -1826,12 +1803,9 @@ class Video extends Component {
|
|
|
1826
1803
|
this.state.rtoken = '',
|
|
1827
1804
|
this.state.sessionId = '',
|
|
1828
1805
|
this.state.imRoomId = ''
|
|
1829
|
-
this.state.imJoinRoom = false
|
|
1830
1806
|
if (this.state.imStatus) {
|
|
1831
1807
|
console.log('disconnect断开连接')
|
|
1832
|
-
this.state.manualClose = true
|
|
1833
1808
|
this.state.imStatus = false
|
|
1834
|
-
disconnect();
|
|
1835
1809
|
}
|
|
1836
1810
|
this.test_controller.Disconnect()
|
|
1837
1811
|
let data = {
|
|
@@ -1851,20 +1825,26 @@ class Video extends Component {
|
|
|
1851
1825
|
}
|
|
1852
1826
|
this.test_controller.OnSendTextMsgFailed = (msgId, code, msg) => {
|
|
1853
1827
|
console.log('发送失败', msgId, code, msg)
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1828
|
+
const Mival = JSON.parse(msg)
|
|
1829
|
+
// 失败处理
|
|
1830
|
+
if (Mival.typeId == '3300') {
|
|
1831
|
+
this.setState({
|
|
1832
|
+
documentError: '推送授权白板失败,请重试'
|
|
1833
|
+
})
|
|
1834
|
+
}
|
|
1857
1835
|
this.saveLog('mrtc OnSendTextMsgFail:' + msgId +', code=' + code + ',msg=' + msg)
|
|
1858
1836
|
}
|
|
1859
1837
|
this.test_controller.OnReceiveTextMsg = (uid, msg) => {
|
|
1860
|
-
console.log('收到手机端消息',
|
|
1861
|
-
if (JSON.parse(msg).typeId == 33001 && this.state.sessionId == JSON.parse(msg).data.sessionId) {
|
|
1862
|
-
if (JSON.parse(msg).type == 1) {
|
|
1863
|
-
this.saveAuthorize(JSON.parse(msg).data.userId)
|
|
1864
|
-
this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
|
|
1865
|
-
}
|
|
1866
|
-
}
|
|
1838
|
+
console.log('收到手机端消息',uid, msg, JSON.parse(msg))
|
|
1867
1839
|
this.saveLog('mrtc OnReceiveTextMsg info:' + msg)
|
|
1840
|
+
this.handleReceiveMsg(msg)
|
|
1841
|
+
// 33001 已合并到 handleReceiveMsg
|
|
1842
|
+
// if (JSON.parse(msg).typeId == 33001 && this.state.sessionId == JSON.parse(msg).data.sessionId) {
|
|
1843
|
+
// if (JSON.parse(msg).type == 1) {
|
|
1844
|
+
// this.saveAuthorize(JSON.parse(msg).data.userId)
|
|
1845
|
+
// this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
|
|
1846
|
+
// }
|
|
1847
|
+
// }
|
|
1868
1848
|
}
|
|
1869
1849
|
this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) => {
|
|
1870
1850
|
console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
@@ -1972,15 +1952,12 @@ class Video extends Component {
|
|
|
1972
1952
|
console.log('发布媒体流成功', sid)
|
|
1973
1953
|
this.state.sessionType = true
|
|
1974
1954
|
if (sid == document.getElementById('video20').name) {
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
'tellerId': this.props.tellerAccount
|
|
1982
|
-
})
|
|
1983
|
-
});
|
|
1955
|
+
this.sendMessage({
|
|
1956
|
+
'typeId': 2030,
|
|
1957
|
+
'sessionId': this.state.sessionId,
|
|
1958
|
+
'sharedScreen': 1,
|
|
1959
|
+
'tellerId': this.props.tellerAccount
|
|
1960
|
+
})
|
|
1984
1961
|
// if (this.state.screenName == '切换共享') {
|
|
1985
1962
|
// this.state.isSharedScreen = true
|
|
1986
1963
|
// this.state.isScreenSwitching = false
|
|
@@ -2002,19 +1979,15 @@ class Video extends Component {
|
|
|
2002
1979
|
this.timer = setInterval(
|
|
2003
1980
|
() => {
|
|
2004
1981
|
if (!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0.1) {
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
'
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
|
|
2014
|
-
}
|
|
2015
|
-
|
|
2016
|
-
})
|
|
2017
|
-
});
|
|
1982
|
+
this.sendMessage({
|
|
1983
|
+
'typeId': 3200,
|
|
1984
|
+
'decibelValue': this.state.analyserHeight.get(sid).toFixed(2),
|
|
1985
|
+
"data": {
|
|
1986
|
+
'sessionId': this.state.sessionId,
|
|
1987
|
+
'userId': this.props.tellerAccount,
|
|
1988
|
+
'data': (new Date()).valueOf()
|
|
1989
|
+
}
|
|
1990
|
+
})
|
|
2018
1991
|
}
|
|
2019
1992
|
},
|
|
2020
1993
|
1000
|
|
@@ -2181,22 +2154,15 @@ class Video extends Component {
|
|
|
2181
2154
|
console.log('过滤订阅的tag:', feed.tag)
|
|
2182
2155
|
return
|
|
2183
2156
|
}
|
|
2184
|
-
|
|
2185
|
-
customId: this.state.imRoomId,
|
|
2186
|
-
content: JSON.stringify({
|
|
2157
|
+
this.sendMessage({
|
|
2187
2158
|
'typeId': 1013,
|
|
2188
2159
|
'muteStatus': this.state.voiceStatue ? 1 : 0,
|
|
2189
2160
|
'data': {
|
|
2190
2161
|
'sessionId': this.state.sessionId,
|
|
2191
2162
|
'userId': this.props.tellerAccount
|
|
2192
2163
|
}
|
|
2193
|
-
})
|
|
2194
|
-
}, function (code, message, data) {
|
|
2195
|
-
console.log(data)
|
|
2196
2164
|
})
|
|
2197
|
-
|
|
2198
|
-
customId: this.state.imRoomId,
|
|
2199
|
-
content: JSON.stringify({
|
|
2165
|
+
this.sendMessage({
|
|
2200
2166
|
'typeId': 1014,
|
|
2201
2167
|
'sessionId': this.state.sessionId,
|
|
2202
2168
|
'meetingInfo': {
|
|
@@ -2205,9 +2171,6 @@ class Video extends Component {
|
|
|
2205
2171
|
'customers': this.props.meetingInfo.customers,
|
|
2206
2172
|
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
2207
2173
|
}
|
|
2208
|
-
|
|
2209
|
-
})
|
|
2210
|
-
}, function (code, message, data) {
|
|
2211
2174
|
})
|
|
2212
2175
|
this.sendNotification()
|
|
2213
2176
|
let array = this.state.roomCustomerList;
|
|
@@ -2294,14 +2257,11 @@ class Video extends Component {
|
|
|
2294
2257
|
this.test_controller.OnUnPublishSucc = (sid) => {
|
|
2295
2258
|
console.log('取消发布成功', sid, document.getElementById('publish_video1').name)
|
|
2296
2259
|
if (document.getElementById('publish_video1').name && sid != document.getElementById('publish_video1').name) {
|
|
2297
|
-
|
|
2298
|
-
customId: this.state.imRoomId,
|
|
2299
|
-
content: JSON.stringify({
|
|
2260
|
+
this.sendMessage({
|
|
2300
2261
|
'typeId': 2030,
|
|
2301
2262
|
'sessionId': this.state.sessionId,
|
|
2302
2263
|
'sharedScreen': 0,
|
|
2303
2264
|
'tellerId': this.props.tellerAccount
|
|
2304
|
-
})
|
|
2305
2265
|
})
|
|
2306
2266
|
this.state.isSharedScreen = false
|
|
2307
2267
|
this.setState({
|
|
@@ -2897,9 +2857,7 @@ class Video extends Component {
|
|
|
2897
2857
|
});
|
|
2898
2858
|
console.log(result);
|
|
2899
2859
|
this.appGetUsername(document.getElementById('publish_video1').name)
|
|
2900
|
-
|
|
2901
|
-
customId: this.state.imRoomId,
|
|
2902
|
-
content: JSON.stringify({
|
|
2860
|
+
this.sendMessage({
|
|
2903
2861
|
'typeId': 1014,
|
|
2904
2862
|
'sessionId': this.state.sessionId,
|
|
2905
2863
|
'meetingInfo': {
|
|
@@ -2908,9 +2866,6 @@ class Video extends Component {
|
|
|
2908
2866
|
'customers': this.props.meetingInfo.customers,
|
|
2909
2867
|
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
2910
2868
|
}
|
|
2911
|
-
|
|
2912
|
-
})
|
|
2913
|
-
}, function (code, message, data) {
|
|
2914
2869
|
})
|
|
2915
2870
|
} catch (err) {
|
|
2916
2871
|
console.error(err);
|
|
@@ -2933,11 +2888,6 @@ class Video extends Component {
|
|
|
2933
2888
|
console.error(err)
|
|
2934
2889
|
}
|
|
2935
2890
|
}
|
|
2936
|
-
if (this.state.imStatus) {
|
|
2937
|
-
console.log('disconnect断开连接')
|
|
2938
|
-
this.state.manualClose = true
|
|
2939
|
-
disconnect();
|
|
2940
|
-
}
|
|
2941
2891
|
message.destroy()
|
|
2942
2892
|
clearInterval(this.state.drawCanvasInterval)
|
|
2943
2893
|
}
|
|
@@ -3182,20 +3132,14 @@ class Video extends Component {
|
|
|
3182
3132
|
sid = document.getElementById('publish_streamId1').name
|
|
3183
3133
|
}
|
|
3184
3134
|
this.test_controller.SetLocalAudioEnable(0, parseInt(sid, 10));
|
|
3185
|
-
|
|
3186
|
-
customId: this.state.imRoomId,
|
|
3187
|
-
content: JSON.stringify({
|
|
3135
|
+
this.sendMessage({
|
|
3188
3136
|
'typeId': 1013,
|
|
3189
3137
|
'muteStatus': 1,
|
|
3190
3138
|
'data': {
|
|
3191
3139
|
'sessionId': this.state.sessionId,
|
|
3192
3140
|
'userId': this.props.tellerAccount
|
|
3193
3141
|
}
|
|
3194
|
-
})
|
|
3195
|
-
}, function (code, message, data) {
|
|
3196
|
-
console.log(data)
|
|
3197
3142
|
})
|
|
3198
|
-
|
|
3199
3143
|
} else if (this.state.voiceStatue) {
|
|
3200
3144
|
// 打开本地
|
|
3201
3145
|
this.setState({
|
|
@@ -3209,18 +3153,13 @@ class Video extends Component {
|
|
|
3209
3153
|
sid = document.getElementById('publish_streamId1').name
|
|
3210
3154
|
}
|
|
3211
3155
|
this.test_controller.SetLocalAudioEnable(1, parseInt(sid, 10));
|
|
3212
|
-
|
|
3213
|
-
customId: this.state.imRoomId,
|
|
3214
|
-
content: JSON.stringify({
|
|
3156
|
+
this.sendMessage({
|
|
3215
3157
|
'typeId': 1013,
|
|
3216
3158
|
'muteStatus': 0,
|
|
3217
3159
|
'data': {
|
|
3218
3160
|
'sessionId': this.state.sessionId,
|
|
3219
3161
|
'userId': this.props.tellerAccount
|
|
3220
3162
|
}
|
|
3221
|
-
})
|
|
3222
|
-
}, function (code, message, data) {
|
|
3223
|
-
console.log(data)
|
|
3224
3163
|
})
|
|
3225
3164
|
}
|
|
3226
3165
|
if (this.state.isPictureInPicture) {
|
|
@@ -3252,17 +3191,12 @@ class Video extends Component {
|
|
|
3252
3191
|
sid = document.getElementById('publish_streamId1').name
|
|
3253
3192
|
}
|
|
3254
3193
|
this.test_controller.SetLocalVideoEnable(0, parseInt(sid, 10));
|
|
3255
|
-
|
|
3256
|
-
customId: this.state.imRoomId,
|
|
3257
|
-
content: JSON.stringify({
|
|
3194
|
+
this.sendMessage({
|
|
3258
3195
|
'typeId': 1012,
|
|
3259
3196
|
'state': 0,
|
|
3260
3197
|
'sessionId': this.state.sessionId,
|
|
3261
3198
|
'userId': this.props.tellerAccount
|
|
3262
|
-
|
|
3263
|
-
}, function (code, message, data) {
|
|
3264
|
-
console.log(data)
|
|
3265
|
-
})
|
|
3199
|
+
})
|
|
3266
3200
|
} else if (this.state.audioed) {
|
|
3267
3201
|
this.state.audioed = false,
|
|
3268
3202
|
this.setState({
|
|
@@ -3274,16 +3208,11 @@ class Video extends Component {
|
|
|
3274
3208
|
sid = document.getElementById('publish_streamId1').name
|
|
3275
3209
|
}
|
|
3276
3210
|
this.test_controller.SetLocalVideoEnable(1, parseInt(sid, 10));
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
'sessionId': this.state.sessionId,
|
|
3283
|
-
'userId': this.props.tellerAccount
|
|
3284
|
-
})
|
|
3285
|
-
}, function (code, message, data) {
|
|
3286
|
-
console.log(data)
|
|
3211
|
+
this.sendMessage({
|
|
3212
|
+
'typeId': 1012,
|
|
3213
|
+
'state': 1,
|
|
3214
|
+
'sessionId': this.state.sessionId,
|
|
3215
|
+
'userId': this.props.tellerAccount
|
|
3287
3216
|
})
|
|
3288
3217
|
}
|
|
3289
3218
|
}
|
|
@@ -3436,15 +3365,11 @@ class Video extends Component {
|
|
|
3436
3365
|
voiceName: '静音'
|
|
3437
3366
|
})
|
|
3438
3367
|
}
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
'sessionId': this.state.sessionId,
|
|
3445
|
-
'userId': this.props.tellerAccount
|
|
3446
|
-
})
|
|
3447
|
-
}, function (code, message, data) {
|
|
3368
|
+
this.sendMessage({
|
|
3369
|
+
'typeId': 1011,
|
|
3370
|
+
'state': 1,
|
|
3371
|
+
'sessionId': this.state.sessionId,
|
|
3372
|
+
'userId': this.props.tellerAccount
|
|
3448
3373
|
})
|
|
3449
3374
|
} else {
|
|
3450
3375
|
this.setState({
|
|
@@ -3455,32 +3380,22 @@ class Video extends Component {
|
|
|
3455
3380
|
};
|
|
3456
3381
|
handleOk = () => {
|
|
3457
3382
|
// 代表此时按钮是暂停会话,把isSuspend改成true变成恢复会话
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
'userId': this.props.tellerAccount
|
|
3465
|
-
})
|
|
3466
|
-
}, function (code, message, data) {
|
|
3467
|
-
console.log(data)
|
|
3468
|
-
});
|
|
3383
|
+
this.sendMessage({
|
|
3384
|
+
'typeId': 1012,
|
|
3385
|
+
'state': 1,
|
|
3386
|
+
'sessionId': this.state.sessionId,
|
|
3387
|
+
'userId': this.props.tellerAccount
|
|
3388
|
+
})
|
|
3469
3389
|
this.setState({
|
|
3470
3390
|
isSuspend: true,
|
|
3471
3391
|
suspendName: '恢复'
|
|
3472
3392
|
});
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
'userId': this.props.tellerAccount
|
|
3480
|
-
})
|
|
3481
|
-
}, function (code, message, data) {
|
|
3482
|
-
console.log(data)
|
|
3483
|
-
});
|
|
3393
|
+
this.sendMessage({
|
|
3394
|
+
'typeId': 1011,
|
|
3395
|
+
'state': 0,
|
|
3396
|
+
'sessionId': this.state.sessionId,
|
|
3397
|
+
'userId': this.props.tellerAccount
|
|
3398
|
+
})
|
|
3484
3399
|
let sid = document.getElementById('publish_video1').name;
|
|
3485
3400
|
if (!sid) {
|
|
3486
3401
|
// 纯音频的时候sid在publish_streamId标签中
|
|
@@ -3694,15 +3609,12 @@ class Video extends Component {
|
|
|
3694
3609
|
console.log('ocrCallback', result.data,val)
|
|
3695
3610
|
// this.messageClick('姓名:' + result.data.idCardName + ',身份证号:' + result.data.idCardNumber,'success')
|
|
3696
3611
|
// this.messageClick('识别成功','success')
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
"userId": this.state.faceCustomerUid
|
|
3704
|
-
})
|
|
3705
|
-
});
|
|
3612
|
+
this.sendMessage({
|
|
3613
|
+
'typeId': 1020,
|
|
3614
|
+
'sessionId': this.state.sessionId,
|
|
3615
|
+
'cameraState': 1,
|
|
3616
|
+
"userId": this.state.faceCustomerUid
|
|
3617
|
+
})
|
|
3706
3618
|
if(this.state.documentType == 'ID_CARD') {
|
|
3707
3619
|
if (result.data.side == 'front' && val == 1) {
|
|
3708
3620
|
if(this.state.certificateValidity) {
|
|
@@ -3974,15 +3886,12 @@ class Video extends Component {
|
|
|
3974
3886
|
}
|
|
3975
3887
|
};
|
|
3976
3888
|
handleCancelFacial = () => {
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
"userId": this.state.faceCustomerUid
|
|
3984
|
-
})
|
|
3985
|
-
});
|
|
3889
|
+
this.sendMessage({
|
|
3890
|
+
'typeId': 1020,
|
|
3891
|
+
'sessionId': this.state.sessionId,
|
|
3892
|
+
'cameraState': 1, // 1--打开前置 2--打开后置
|
|
3893
|
+
"userId": this.state.faceCustomerUid
|
|
3894
|
+
})
|
|
3986
3895
|
this.setState({
|
|
3987
3896
|
isModalVisibleFacial: false
|
|
3988
3897
|
})
|
|
@@ -4007,15 +3916,12 @@ class Video extends Component {
|
|
|
4007
3916
|
}
|
|
4008
3917
|
}
|
|
4009
3918
|
newFaceClick=()=>{
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
"userId": this.state.faceCustomerUid
|
|
4017
|
-
})
|
|
4018
|
-
});
|
|
3919
|
+
this.sendMessage({
|
|
3920
|
+
'typeId': 1020,
|
|
3921
|
+
'sessionId': this.state.sessionId,
|
|
3922
|
+
'cameraState': 2, // 1--打开前置 2--打开后置
|
|
3923
|
+
"userId": this.state.faceCustomerUid
|
|
3924
|
+
})
|
|
4019
3925
|
this.setState({
|
|
4020
3926
|
clickedFacial: false,
|
|
4021
3927
|
clickedOcr: false,
|
|
@@ -4126,15 +4032,12 @@ class Video extends Component {
|
|
|
4126
4032
|
} else {
|
|
4127
4033
|
if (this.state.faceCustomerType == 2) {
|
|
4128
4034
|
// ocr
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
"userId": item.customId
|
|
4136
|
-
})
|
|
4137
|
-
});
|
|
4035
|
+
this.sendMessage({
|
|
4036
|
+
'typeId': 1020,
|
|
4037
|
+
'sessionId': this.state.sessionId,
|
|
4038
|
+
'cameraState': 2, // 1--打开前置 2--打开后置
|
|
4039
|
+
"userId": item.customId
|
|
4040
|
+
})
|
|
4138
4041
|
}
|
|
4139
4042
|
var sid
|
|
4140
4043
|
if (item.feedId == document.getElementById("feedId1").innerText) {
|
|
@@ -4794,117 +4697,81 @@ class Video extends Component {
|
|
|
4794
4697
|
muteOpposite = (value) => {
|
|
4795
4698
|
console.log(value);
|
|
4796
4699
|
if (value == 'video1') {
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId1').innerText).uid
|
|
4803
|
-
})
|
|
4804
|
-
});
|
|
4700
|
+
this.sendMessage({
|
|
4701
|
+
'typeId': 1223,
|
|
4702
|
+
'sessionId': this.state.sessionId,
|
|
4703
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId1').innerText).uid
|
|
4704
|
+
})
|
|
4805
4705
|
}
|
|
4806
4706
|
if (value == 'video2') {
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId2').innerText).uid
|
|
4813
|
-
})
|
|
4814
|
-
});
|
|
4707
|
+
this.sendMessage({
|
|
4708
|
+
'typeId': 1223,
|
|
4709
|
+
'sessionId': this.state.sessionId,
|
|
4710
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId2').innerText).uid
|
|
4711
|
+
})
|
|
4815
4712
|
} if (value == 'video3') {
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId3').innerText).uid
|
|
4822
|
-
})
|
|
4823
|
-
});
|
|
4713
|
+
this.sendMessage({
|
|
4714
|
+
'typeId': 1223,
|
|
4715
|
+
'sessionId': this.state.sessionId,
|
|
4716
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId3').innerText).uid
|
|
4717
|
+
})
|
|
4824
4718
|
} if (value == 'video4') {
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId4').innerText).uid
|
|
4831
|
-
})
|
|
4832
|
-
});
|
|
4719
|
+
this.sendMessage({
|
|
4720
|
+
'typeId': 1223,
|
|
4721
|
+
'sessionId': this.state.sessionId,
|
|
4722
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId4').innerText).uid
|
|
4723
|
+
})
|
|
4833
4724
|
} if (value == 'video5') {
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId5').innerText).uid
|
|
4840
|
-
})
|
|
4841
|
-
});
|
|
4725
|
+
this.sendMessage({
|
|
4726
|
+
'typeId': 1223,
|
|
4727
|
+
'sessionId': this.state.sessionId,
|
|
4728
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId5').innerText).uid
|
|
4729
|
+
})
|
|
4842
4730
|
} if (value == 'video6') {
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId6').innerText).uid
|
|
4849
|
-
})
|
|
4850
|
-
});
|
|
4731
|
+
this.sendMessage({
|
|
4732
|
+
'typeId': 1223,
|
|
4733
|
+
'sessionId': this.state.sessionId,
|
|
4734
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId6').innerText).uid
|
|
4735
|
+
})
|
|
4851
4736
|
} if (value == 'video7') {
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId7').innerText).uid
|
|
4858
|
-
})
|
|
4859
|
-
});
|
|
4737
|
+
this.sendMessage({
|
|
4738
|
+
'typeId': 1223,
|
|
4739
|
+
'sessionId': this.state.sessionId,
|
|
4740
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId7').innerText).uid
|
|
4741
|
+
})
|
|
4860
4742
|
} if (value == 'video8') {
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId8').innerText).uid
|
|
4867
|
-
})
|
|
4868
|
-
});
|
|
4743
|
+
this.sendMessage({
|
|
4744
|
+
'typeId': 1223,
|
|
4745
|
+
'sessionId': this.state.sessionId,
|
|
4746
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId8').innerText).uid
|
|
4747
|
+
})
|
|
4869
4748
|
} if (value == 'video9') {
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId9').innerText).uid
|
|
4876
|
-
})
|
|
4877
|
-
});
|
|
4749
|
+
this.sendMessage({
|
|
4750
|
+
'typeId': 1223,
|
|
4751
|
+
'sessionId': this.state.sessionId,
|
|
4752
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId9').innerText).uid
|
|
4753
|
+
})
|
|
4878
4754
|
}
|
|
4879
4755
|
if (value == 'video10') {
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId10').innerText).uid
|
|
4886
|
-
})
|
|
4887
|
-
});
|
|
4756
|
+
this.sendMessage({
|
|
4757
|
+
'typeId': 1223,
|
|
4758
|
+
'sessionId': this.state.sessionId,
|
|
4759
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId10').innerText).uid
|
|
4760
|
+
})
|
|
4888
4761
|
}
|
|
4889
4762
|
if (value == 'video11') {
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId11').innerText).uid
|
|
4896
|
-
})
|
|
4897
|
-
});
|
|
4763
|
+
this.sendMessage({
|
|
4764
|
+
'typeId': 1223,
|
|
4765
|
+
'sessionId': this.state.sessionId,
|
|
4766
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId11').innerText).uid
|
|
4767
|
+
})
|
|
4898
4768
|
}
|
|
4899
4769
|
if (value == 'video12') {
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId12').innerText).uid
|
|
4906
|
-
})
|
|
4907
|
-
});
|
|
4770
|
+
this.sendMessage({
|
|
4771
|
+
'typeId': 1223,
|
|
4772
|
+
'sessionId': this.state.sessionId,
|
|
4773
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId12').innerText).uid
|
|
4774
|
+
})
|
|
4908
4775
|
}
|
|
4909
4776
|
|
|
4910
4777
|
}
|
|
@@ -4913,14 +4780,11 @@ class Video extends Component {
|
|
|
4913
4780
|
this.state.shareMaskState = this.props.shareMask
|
|
4914
4781
|
// 加延迟是因为在关闭的时候可以看到部分rm的操作
|
|
4915
4782
|
setTimeout(() => {
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
'type': this.state.shareMaskState ? 1 : 2
|
|
4922
|
-
})
|
|
4923
|
-
});
|
|
4783
|
+
this.sendMessage({
|
|
4784
|
+
'typeId': 1230,
|
|
4785
|
+
'sessionId': this.state.sessionId,
|
|
4786
|
+
'type': this.state.shareMaskState ? 1 : 2
|
|
4787
|
+
})
|
|
4924
4788
|
}, 100)
|
|
4925
4789
|
|
|
4926
4790
|
}
|