react_hsbc_teller 1.9.37 → 1.9.39
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/pages/video/video.jsx +184 -322
- package/dist_wpb.zip +0 -0
- 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.39'
|
|
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 = {
|
|
@@ -1843,28 +1817,30 @@ class Video extends Component {
|
|
|
1843
1817
|
};
|
|
1844
1818
|
this.test_controller.OnSendTextMsgSucc = (msgId) => {
|
|
1845
1819
|
console.log('发送成功', msgId)
|
|
1846
|
-
this.
|
|
1847
|
-
documentError: '',
|
|
1848
|
-
isModalVisibleCustomer: false,
|
|
1849
|
-
})
|
|
1850
|
-
this.saveLog('mrtc OnSendTextMsgSucc:' + msgId)
|
|
1820
|
+
// this.saveLog('mrtc OnSendTextMsgSucc:' + msgId)
|
|
1851
1821
|
}
|
|
1852
1822
|
this.test_controller.OnSendTextMsgFailed = (msgId, code, msg) => {
|
|
1853
1823
|
console.log('发送失败', msgId, code, msg)
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1824
|
+
const Mival = JSON.parse(msg)
|
|
1825
|
+
// 失败处理
|
|
1826
|
+
if (Mival.typeId == '3300') {
|
|
1827
|
+
this.setState({
|
|
1828
|
+
documentError: '推送授权白板失败,请重试'
|
|
1829
|
+
})
|
|
1830
|
+
}
|
|
1857
1831
|
this.saveLog('mrtc OnSendTextMsgFail:' + msgId +', code=' + code + ',msg=' + msg)
|
|
1858
1832
|
}
|
|
1859
1833
|
this.test_controller.OnReceiveTextMsg = (uid, msg) => {
|
|
1860
|
-
console.log('收到手机端消息',
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
this.
|
|
1834
|
+
console.log('收到手机端消息',uid, msg, JSON.parse(msg))
|
|
1835
|
+
// this.saveLog('mrtc OnReceiveTextMsg info:' + msg)
|
|
1836
|
+
this.handleReceiveMsg(msg)
|
|
1837
|
+
// 33001 已合并到 handleReceiveMsg
|
|
1838
|
+
// if (JSON.parse(msg).typeId == 33001 && this.state.sessionId == JSON.parse(msg).data.sessionId) {
|
|
1839
|
+
// if (JSON.parse(msg).type == 1) {
|
|
1840
|
+
// this.saveAuthorize(JSON.parse(msg).data.userId)
|
|
1841
|
+
// this.customerFaceClick(this.state.customerList[this.state.customerSelect - 1])
|
|
1842
|
+
// }
|
|
1843
|
+
// }
|
|
1868
1844
|
}
|
|
1869
1845
|
this.test_controller.StreamFilterHandler = async (publish_tag, stream, stream_type, publish_device, media_type) => {
|
|
1870
1846
|
console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
@@ -1972,15 +1948,12 @@ class Video extends Component {
|
|
|
1972
1948
|
console.log('发布媒体流成功', sid)
|
|
1973
1949
|
this.state.sessionType = true
|
|
1974
1950
|
if (sid == document.getElementById('video20').name) {
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
'tellerId': this.props.tellerAccount
|
|
1982
|
-
})
|
|
1983
|
-
});
|
|
1951
|
+
this.sendMessage({
|
|
1952
|
+
'typeId': 2030,
|
|
1953
|
+
'sessionId': this.state.sessionId,
|
|
1954
|
+
'sharedScreen': 1,
|
|
1955
|
+
'tellerId': this.props.tellerAccount
|
|
1956
|
+
})
|
|
1984
1957
|
// if (this.state.screenName == '切换共享') {
|
|
1985
1958
|
// this.state.isSharedScreen = true
|
|
1986
1959
|
// this.state.isScreenSwitching = false
|
|
@@ -2002,19 +1975,15 @@ class Video extends Component {
|
|
|
2002
1975
|
this.timer = setInterval(
|
|
2003
1976
|
() => {
|
|
2004
1977
|
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
|
-
});
|
|
1978
|
+
this.sendMessage({
|
|
1979
|
+
'typeId': 3200,
|
|
1980
|
+
'decibelValue': this.state.analyserHeight.get(sid).toFixed(2),
|
|
1981
|
+
"data": {
|
|
1982
|
+
'sessionId': this.state.sessionId,
|
|
1983
|
+
'userId': this.props.tellerAccount,
|
|
1984
|
+
'data': (new Date()).valueOf()
|
|
1985
|
+
}
|
|
1986
|
+
})
|
|
2018
1987
|
}
|
|
2019
1988
|
},
|
|
2020
1989
|
1000
|
|
@@ -2181,22 +2150,15 @@ class Video extends Component {
|
|
|
2181
2150
|
console.log('过滤订阅的tag:', feed.tag)
|
|
2182
2151
|
return
|
|
2183
2152
|
}
|
|
2184
|
-
|
|
2185
|
-
customId: this.state.imRoomId,
|
|
2186
|
-
content: JSON.stringify({
|
|
2153
|
+
this.sendMessage({
|
|
2187
2154
|
'typeId': 1013,
|
|
2188
2155
|
'muteStatus': this.state.voiceStatue ? 1 : 0,
|
|
2189
2156
|
'data': {
|
|
2190
2157
|
'sessionId': this.state.sessionId,
|
|
2191
2158
|
'userId': this.props.tellerAccount
|
|
2192
2159
|
}
|
|
2193
|
-
})
|
|
2194
|
-
}, function (code, message, data) {
|
|
2195
|
-
console.log(data)
|
|
2196
2160
|
})
|
|
2197
|
-
|
|
2198
|
-
customId: this.state.imRoomId,
|
|
2199
|
-
content: JSON.stringify({
|
|
2161
|
+
this.sendMessage({
|
|
2200
2162
|
'typeId': 1014,
|
|
2201
2163
|
'sessionId': this.state.sessionId,
|
|
2202
2164
|
'meetingInfo': {
|
|
@@ -2205,9 +2167,6 @@ class Video extends Component {
|
|
|
2205
2167
|
'customers': this.props.meetingInfo.customers,
|
|
2206
2168
|
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
2207
2169
|
}
|
|
2208
|
-
|
|
2209
|
-
})
|
|
2210
|
-
}, function (code, message, data) {
|
|
2211
2170
|
})
|
|
2212
2171
|
this.sendNotification()
|
|
2213
2172
|
let array = this.state.roomCustomerList;
|
|
@@ -2294,14 +2253,11 @@ class Video extends Component {
|
|
|
2294
2253
|
this.test_controller.OnUnPublishSucc = (sid) => {
|
|
2295
2254
|
console.log('取消发布成功', sid, document.getElementById('publish_video1').name)
|
|
2296
2255
|
if (document.getElementById('publish_video1').name && sid != document.getElementById('publish_video1').name) {
|
|
2297
|
-
|
|
2298
|
-
customId: this.state.imRoomId,
|
|
2299
|
-
content: JSON.stringify({
|
|
2256
|
+
this.sendMessage({
|
|
2300
2257
|
'typeId': 2030,
|
|
2301
2258
|
'sessionId': this.state.sessionId,
|
|
2302
2259
|
'sharedScreen': 0,
|
|
2303
2260
|
'tellerId': this.props.tellerAccount
|
|
2304
|
-
})
|
|
2305
2261
|
})
|
|
2306
2262
|
this.state.isSharedScreen = false
|
|
2307
2263
|
this.setState({
|
|
@@ -2897,9 +2853,7 @@ class Video extends Component {
|
|
|
2897
2853
|
});
|
|
2898
2854
|
console.log(result);
|
|
2899
2855
|
this.appGetUsername(document.getElementById('publish_video1').name)
|
|
2900
|
-
|
|
2901
|
-
customId: this.state.imRoomId,
|
|
2902
|
-
content: JSON.stringify({
|
|
2856
|
+
this.sendMessage({
|
|
2903
2857
|
'typeId': 1014,
|
|
2904
2858
|
'sessionId': this.state.sessionId,
|
|
2905
2859
|
'meetingInfo': {
|
|
@@ -2908,9 +2862,6 @@ class Video extends Component {
|
|
|
2908
2862
|
'customers': this.props.meetingInfo.customers,
|
|
2909
2863
|
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
2910
2864
|
}
|
|
2911
|
-
|
|
2912
|
-
})
|
|
2913
|
-
}, function (code, message, data) {
|
|
2914
2865
|
})
|
|
2915
2866
|
} catch (err) {
|
|
2916
2867
|
console.error(err);
|
|
@@ -2933,11 +2884,6 @@ class Video extends Component {
|
|
|
2933
2884
|
console.error(err)
|
|
2934
2885
|
}
|
|
2935
2886
|
}
|
|
2936
|
-
if (this.state.imStatus) {
|
|
2937
|
-
console.log('disconnect断开连接')
|
|
2938
|
-
this.state.manualClose = true
|
|
2939
|
-
disconnect();
|
|
2940
|
-
}
|
|
2941
2887
|
message.destroy()
|
|
2942
2888
|
clearInterval(this.state.drawCanvasInterval)
|
|
2943
2889
|
}
|
|
@@ -3182,20 +3128,14 @@ class Video extends Component {
|
|
|
3182
3128
|
sid = document.getElementById('publish_streamId1').name
|
|
3183
3129
|
}
|
|
3184
3130
|
this.test_controller.SetLocalAudioEnable(0, parseInt(sid, 10));
|
|
3185
|
-
|
|
3186
|
-
customId: this.state.imRoomId,
|
|
3187
|
-
content: JSON.stringify({
|
|
3131
|
+
this.sendMessage({
|
|
3188
3132
|
'typeId': 1013,
|
|
3189
3133
|
'muteStatus': 1,
|
|
3190
3134
|
'data': {
|
|
3191
3135
|
'sessionId': this.state.sessionId,
|
|
3192
3136
|
'userId': this.props.tellerAccount
|
|
3193
3137
|
}
|
|
3194
|
-
})
|
|
3195
|
-
}, function (code, message, data) {
|
|
3196
|
-
console.log(data)
|
|
3197
3138
|
})
|
|
3198
|
-
|
|
3199
3139
|
} else if (this.state.voiceStatue) {
|
|
3200
3140
|
// 打开本地
|
|
3201
3141
|
this.setState({
|
|
@@ -3209,18 +3149,13 @@ class Video extends Component {
|
|
|
3209
3149
|
sid = document.getElementById('publish_streamId1').name
|
|
3210
3150
|
}
|
|
3211
3151
|
this.test_controller.SetLocalAudioEnable(1, parseInt(sid, 10));
|
|
3212
|
-
|
|
3213
|
-
customId: this.state.imRoomId,
|
|
3214
|
-
content: JSON.stringify({
|
|
3152
|
+
this.sendMessage({
|
|
3215
3153
|
'typeId': 1013,
|
|
3216
3154
|
'muteStatus': 0,
|
|
3217
3155
|
'data': {
|
|
3218
3156
|
'sessionId': this.state.sessionId,
|
|
3219
3157
|
'userId': this.props.tellerAccount
|
|
3220
3158
|
}
|
|
3221
|
-
})
|
|
3222
|
-
}, function (code, message, data) {
|
|
3223
|
-
console.log(data)
|
|
3224
3159
|
})
|
|
3225
3160
|
}
|
|
3226
3161
|
if (this.state.isPictureInPicture) {
|
|
@@ -3252,17 +3187,12 @@ class Video extends Component {
|
|
|
3252
3187
|
sid = document.getElementById('publish_streamId1').name
|
|
3253
3188
|
}
|
|
3254
3189
|
this.test_controller.SetLocalVideoEnable(0, parseInt(sid, 10));
|
|
3255
|
-
|
|
3256
|
-
customId: this.state.imRoomId,
|
|
3257
|
-
content: JSON.stringify({
|
|
3190
|
+
this.sendMessage({
|
|
3258
3191
|
'typeId': 1012,
|
|
3259
3192
|
'state': 0,
|
|
3260
3193
|
'sessionId': this.state.sessionId,
|
|
3261
3194
|
'userId': this.props.tellerAccount
|
|
3262
|
-
|
|
3263
|
-
}, function (code, message, data) {
|
|
3264
|
-
console.log(data)
|
|
3265
|
-
})
|
|
3195
|
+
})
|
|
3266
3196
|
} else if (this.state.audioed) {
|
|
3267
3197
|
this.state.audioed = false,
|
|
3268
3198
|
this.setState({
|
|
@@ -3274,16 +3204,11 @@ class Video extends Component {
|
|
|
3274
3204
|
sid = document.getElementById('publish_streamId1').name
|
|
3275
3205
|
}
|
|
3276
3206
|
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)
|
|
3207
|
+
this.sendMessage({
|
|
3208
|
+
'typeId': 1012,
|
|
3209
|
+
'state': 1,
|
|
3210
|
+
'sessionId': this.state.sessionId,
|
|
3211
|
+
'userId': this.props.tellerAccount
|
|
3287
3212
|
})
|
|
3288
3213
|
}
|
|
3289
3214
|
}
|
|
@@ -3436,15 +3361,11 @@ class Video extends Component {
|
|
|
3436
3361
|
voiceName: '静音'
|
|
3437
3362
|
})
|
|
3438
3363
|
}
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
'sessionId': this.state.sessionId,
|
|
3445
|
-
'userId': this.props.tellerAccount
|
|
3446
|
-
})
|
|
3447
|
-
}, function (code, message, data) {
|
|
3364
|
+
this.sendMessage({
|
|
3365
|
+
'typeId': 1011,
|
|
3366
|
+
'state': 1,
|
|
3367
|
+
'sessionId': this.state.sessionId,
|
|
3368
|
+
'userId': this.props.tellerAccount
|
|
3448
3369
|
})
|
|
3449
3370
|
} else {
|
|
3450
3371
|
this.setState({
|
|
@@ -3455,32 +3376,22 @@ class Video extends Component {
|
|
|
3455
3376
|
};
|
|
3456
3377
|
handleOk = () => {
|
|
3457
3378
|
// 代表此时按钮是暂停会话,把isSuspend改成true变成恢复会话
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
|
|
3461
|
-
|
|
3462
|
-
|
|
3463
|
-
|
|
3464
|
-
'userId': this.props.tellerAccount
|
|
3465
|
-
})
|
|
3466
|
-
}, function (code, message, data) {
|
|
3467
|
-
console.log(data)
|
|
3468
|
-
});
|
|
3379
|
+
this.sendMessage({
|
|
3380
|
+
'typeId': 1012,
|
|
3381
|
+
'state': 1,
|
|
3382
|
+
'sessionId': this.state.sessionId,
|
|
3383
|
+
'userId': this.props.tellerAccount
|
|
3384
|
+
})
|
|
3469
3385
|
this.setState({
|
|
3470
3386
|
isSuspend: true,
|
|
3471
3387
|
suspendName: '恢复'
|
|
3472
3388
|
});
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3478
|
-
|
|
3479
|
-
'userId': this.props.tellerAccount
|
|
3480
|
-
})
|
|
3481
|
-
}, function (code, message, data) {
|
|
3482
|
-
console.log(data)
|
|
3483
|
-
});
|
|
3389
|
+
this.sendMessage({
|
|
3390
|
+
'typeId': 1011,
|
|
3391
|
+
'state': 0,
|
|
3392
|
+
'sessionId': this.state.sessionId,
|
|
3393
|
+
'userId': this.props.tellerAccount
|
|
3394
|
+
})
|
|
3484
3395
|
let sid = document.getElementById('publish_video1').name;
|
|
3485
3396
|
if (!sid) {
|
|
3486
3397
|
// 纯音频的时候sid在publish_streamId标签中
|
|
@@ -3694,15 +3605,12 @@ class Video extends Component {
|
|
|
3694
3605
|
console.log('ocrCallback', result.data,val)
|
|
3695
3606
|
// this.messageClick('姓名:' + result.data.idCardName + ',身份证号:' + result.data.idCardNumber,'success')
|
|
3696
3607
|
// this.messageClick('识别成功','success')
|
|
3697
|
-
|
|
3698
|
-
|
|
3699
|
-
|
|
3700
|
-
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
"userId": this.state.faceCustomerUid
|
|
3704
|
-
})
|
|
3705
|
-
});
|
|
3608
|
+
this.sendMessage({
|
|
3609
|
+
'typeId': 1020,
|
|
3610
|
+
'sessionId': this.state.sessionId,
|
|
3611
|
+
'cameraState': 1,
|
|
3612
|
+
"userId": this.state.faceCustomerUid
|
|
3613
|
+
})
|
|
3706
3614
|
if(this.state.documentType == 'ID_CARD') {
|
|
3707
3615
|
if (result.data.side == 'front' && val == 1) {
|
|
3708
3616
|
if(this.state.certificateValidity) {
|
|
@@ -3974,15 +3882,12 @@ class Video extends Component {
|
|
|
3974
3882
|
}
|
|
3975
3883
|
};
|
|
3976
3884
|
handleCancelFacial = () => {
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
|
|
3980
|
-
|
|
3981
|
-
|
|
3982
|
-
|
|
3983
|
-
"userId": this.state.faceCustomerUid
|
|
3984
|
-
})
|
|
3985
|
-
});
|
|
3885
|
+
this.sendMessage({
|
|
3886
|
+
'typeId': 1020,
|
|
3887
|
+
'sessionId': this.state.sessionId,
|
|
3888
|
+
'cameraState': 1, // 1--打开前置 2--打开后置
|
|
3889
|
+
"userId": this.state.faceCustomerUid
|
|
3890
|
+
})
|
|
3986
3891
|
this.setState({
|
|
3987
3892
|
isModalVisibleFacial: false
|
|
3988
3893
|
})
|
|
@@ -4007,15 +3912,12 @@ class Video extends Component {
|
|
|
4007
3912
|
}
|
|
4008
3913
|
}
|
|
4009
3914
|
newFaceClick=()=>{
|
|
4010
|
-
|
|
4011
|
-
|
|
4012
|
-
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
4016
|
-
"userId": this.state.faceCustomerUid
|
|
4017
|
-
})
|
|
4018
|
-
});
|
|
3915
|
+
this.sendMessage({
|
|
3916
|
+
'typeId': 1020,
|
|
3917
|
+
'sessionId': this.state.sessionId,
|
|
3918
|
+
'cameraState': 2, // 1--打开前置 2--打开后置
|
|
3919
|
+
"userId": this.state.faceCustomerUid
|
|
3920
|
+
})
|
|
4019
3921
|
this.setState({
|
|
4020
3922
|
clickedFacial: false,
|
|
4021
3923
|
clickedOcr: false,
|
|
@@ -4126,15 +4028,12 @@ class Video extends Component {
|
|
|
4126
4028
|
} else {
|
|
4127
4029
|
if (this.state.faceCustomerType == 2) {
|
|
4128
4030
|
// ocr
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4135
|
-
"userId": item.customId
|
|
4136
|
-
})
|
|
4137
|
-
});
|
|
4031
|
+
this.sendMessage({
|
|
4032
|
+
'typeId': 1020,
|
|
4033
|
+
'sessionId': this.state.sessionId,
|
|
4034
|
+
'cameraState': 2, // 1--打开前置 2--打开后置
|
|
4035
|
+
"userId": item.customId
|
|
4036
|
+
})
|
|
4138
4037
|
}
|
|
4139
4038
|
var sid
|
|
4140
4039
|
if (item.feedId == document.getElementById("feedId1").innerText) {
|
|
@@ -4794,117 +4693,81 @@ class Video extends Component {
|
|
|
4794
4693
|
muteOpposite = (value) => {
|
|
4795
4694
|
console.log(value);
|
|
4796
4695
|
if (value == 'video1') {
|
|
4797
|
-
|
|
4798
|
-
|
|
4799
|
-
|
|
4800
|
-
|
|
4801
|
-
|
|
4802
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId1').innerText).uid
|
|
4803
|
-
})
|
|
4804
|
-
});
|
|
4696
|
+
this.sendMessage({
|
|
4697
|
+
'typeId': 1223,
|
|
4698
|
+
'sessionId': this.state.sessionId,
|
|
4699
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId1').innerText).uid
|
|
4700
|
+
})
|
|
4805
4701
|
}
|
|
4806
4702
|
if (value == 'video2') {
|
|
4807
|
-
|
|
4808
|
-
|
|
4809
|
-
|
|
4810
|
-
|
|
4811
|
-
|
|
4812
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId2').innerText).uid
|
|
4813
|
-
})
|
|
4814
|
-
});
|
|
4703
|
+
this.sendMessage({
|
|
4704
|
+
'typeId': 1223,
|
|
4705
|
+
'sessionId': this.state.sessionId,
|
|
4706
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId2').innerText).uid
|
|
4707
|
+
})
|
|
4815
4708
|
} if (value == 'video3') {
|
|
4816
|
-
|
|
4817
|
-
|
|
4818
|
-
|
|
4819
|
-
|
|
4820
|
-
|
|
4821
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId3').innerText).uid
|
|
4822
|
-
})
|
|
4823
|
-
});
|
|
4709
|
+
this.sendMessage({
|
|
4710
|
+
'typeId': 1223,
|
|
4711
|
+
'sessionId': this.state.sessionId,
|
|
4712
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId3').innerText).uid
|
|
4713
|
+
})
|
|
4824
4714
|
} if (value == 'video4') {
|
|
4825
|
-
|
|
4826
|
-
|
|
4827
|
-
|
|
4828
|
-
|
|
4829
|
-
|
|
4830
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId4').innerText).uid
|
|
4831
|
-
})
|
|
4832
|
-
});
|
|
4715
|
+
this.sendMessage({
|
|
4716
|
+
'typeId': 1223,
|
|
4717
|
+
'sessionId': this.state.sessionId,
|
|
4718
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId4').innerText).uid
|
|
4719
|
+
})
|
|
4833
4720
|
} if (value == 'video5') {
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4837
|
-
|
|
4838
|
-
|
|
4839
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId5').innerText).uid
|
|
4840
|
-
})
|
|
4841
|
-
});
|
|
4721
|
+
this.sendMessage({
|
|
4722
|
+
'typeId': 1223,
|
|
4723
|
+
'sessionId': this.state.sessionId,
|
|
4724
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId5').innerText).uid
|
|
4725
|
+
})
|
|
4842
4726
|
} if (value == 'video6') {
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4848
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId6').innerText).uid
|
|
4849
|
-
})
|
|
4850
|
-
});
|
|
4727
|
+
this.sendMessage({
|
|
4728
|
+
'typeId': 1223,
|
|
4729
|
+
'sessionId': this.state.sessionId,
|
|
4730
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId6').innerText).uid
|
|
4731
|
+
})
|
|
4851
4732
|
} if (value == 'video7') {
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId7').innerText).uid
|
|
4858
|
-
})
|
|
4859
|
-
});
|
|
4733
|
+
this.sendMessage({
|
|
4734
|
+
'typeId': 1223,
|
|
4735
|
+
'sessionId': this.state.sessionId,
|
|
4736
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId7').innerText).uid
|
|
4737
|
+
})
|
|
4860
4738
|
} if (value == 'video8') {
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId8').innerText).uid
|
|
4867
|
-
})
|
|
4868
|
-
});
|
|
4739
|
+
this.sendMessage({
|
|
4740
|
+
'typeId': 1223,
|
|
4741
|
+
'sessionId': this.state.sessionId,
|
|
4742
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId8').innerText).uid
|
|
4743
|
+
})
|
|
4869
4744
|
} if (value == 'video9') {
|
|
4870
|
-
|
|
4871
|
-
|
|
4872
|
-
|
|
4873
|
-
|
|
4874
|
-
|
|
4875
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId9').innerText).uid
|
|
4876
|
-
})
|
|
4877
|
-
});
|
|
4745
|
+
this.sendMessage({
|
|
4746
|
+
'typeId': 1223,
|
|
4747
|
+
'sessionId': this.state.sessionId,
|
|
4748
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId9').innerText).uid
|
|
4749
|
+
})
|
|
4878
4750
|
}
|
|
4879
4751
|
if (value == 'video10') {
|
|
4880
|
-
|
|
4881
|
-
|
|
4882
|
-
|
|
4883
|
-
|
|
4884
|
-
|
|
4885
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId10').innerText).uid
|
|
4886
|
-
})
|
|
4887
|
-
});
|
|
4752
|
+
this.sendMessage({
|
|
4753
|
+
'typeId': 1223,
|
|
4754
|
+
'sessionId': this.state.sessionId,
|
|
4755
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId10').innerText).uid
|
|
4756
|
+
})
|
|
4888
4757
|
}
|
|
4889
4758
|
if (value == 'video11') {
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId11').innerText).uid
|
|
4896
|
-
})
|
|
4897
|
-
});
|
|
4759
|
+
this.sendMessage({
|
|
4760
|
+
'typeId': 1223,
|
|
4761
|
+
'sessionId': this.state.sessionId,
|
|
4762
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId11').innerText).uid
|
|
4763
|
+
})
|
|
4898
4764
|
}
|
|
4899
4765
|
if (value == 'video12') {
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId12').innerText).uid
|
|
4906
|
-
})
|
|
4907
|
-
});
|
|
4766
|
+
this.sendMessage({
|
|
4767
|
+
'typeId': 1223,
|
|
4768
|
+
'sessionId': this.state.sessionId,
|
|
4769
|
+
'userId': this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById('feedId12').innerText).uid
|
|
4770
|
+
})
|
|
4908
4771
|
}
|
|
4909
4772
|
|
|
4910
4773
|
}
|
|
@@ -4913,14 +4776,11 @@ class Video extends Component {
|
|
|
4913
4776
|
this.state.shareMaskState = this.props.shareMask
|
|
4914
4777
|
// 加延迟是因为在关闭的时候可以看到部分rm的操作
|
|
4915
4778
|
setTimeout(() => {
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
'type': this.state.shareMaskState ? 1 : 2
|
|
4922
|
-
})
|
|
4923
|
-
});
|
|
4779
|
+
this.sendMessage({
|
|
4780
|
+
'typeId': 1230,
|
|
4781
|
+
'sessionId': this.state.sessionId,
|
|
4782
|
+
'type': this.state.shareMaskState ? 1 : 2
|
|
4783
|
+
})
|
|
4924
4784
|
}, 100)
|
|
4925
4785
|
|
|
4926
4786
|
}
|
|
@@ -5120,8 +4980,10 @@ class Video extends Component {
|
|
|
5120
4980
|
|
|
5121
4981
|
}))
|
|
5122
4982
|
}
|
|
5123
|
-
|
|
5124
|
-
|
|
4983
|
+
this.setState({
|
|
4984
|
+
documentError: '',
|
|
4985
|
+
isModalVisibleCustomer: false,
|
|
4986
|
+
})
|
|
5125
4987
|
}
|
|
5126
4988
|
})
|
|
5127
4989
|
// this.customerFaceClick(this.state.customerList[this.state.customerSelect])
|
|
@@ -5529,7 +5391,7 @@ class Video extends Component {
|
|
|
5529
5391
|
<audio id={'audio'+(item.idIndex)} autoPlay />
|
|
5530
5392
|
<label style={{ display: 'none' }} id={'feedId'+(item.idIndex)} type="text" />
|
|
5531
5393
|
|
|
5532
|
-
<div style={{ display: (item.videoName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
|
|
5394
|
+
<div onClick={this.muteOpposite.bind(this, 'video'+(item.idIndex))} style={{ display: (item.videoName) ? '' : 'none'}} className={`customerTitle titleSamlle`}>
|
|
5533
5395
|
{
|
|
5534
5396
|
item.mute && <img
|
|
5535
5397
|
alt=""
|