react_hsbc_teller 0.5.4 → 0.5.8
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/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html><head><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"><meta content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/><title>汇丰银行营业厅 | lib 创建 library</title><script defer="defer" src="hsbc.js"></script></head><body><div id="root"></div></body></html>
|
|
1
|
+
<!doctype html><html><head><meta charset="utf-8"/><link rel="shortcut icon" href="favicon.ico"><meta content="width=device-width,minimum-scale=1,maximum-scale=1,user-scalable=no" name="viewport"/><meta name="renderer" content="webkit"/><meta name="force-rendering" content="webkit"/><meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/><title>汇丰银行营业厅 | lib 创建 library</title><script defer="defer" src="hsbc.js"></script></head><body><div id="root"></div></body></html>
|
package/package.json
CHANGED
|
@@ -102,7 +102,9 @@ class Video extends Component {
|
|
|
102
102
|
microphoneList: [],
|
|
103
103
|
isModalVisibleInspection: false,
|
|
104
104
|
cameraValue: '',
|
|
105
|
-
microphoneValue: ''
|
|
105
|
+
microphoneValue: '',
|
|
106
|
+
imStatus: false,
|
|
107
|
+
imJoinRoom: false
|
|
106
108
|
};
|
|
107
109
|
// eslint-disable-next-line no-undef
|
|
108
110
|
test_controller = '';
|
|
@@ -132,7 +134,13 @@ class Video extends Component {
|
|
|
132
134
|
sessionId: result.sessionId
|
|
133
135
|
});
|
|
134
136
|
// eslint-disable-next-line no-undef
|
|
135
|
-
|
|
137
|
+
if(this.state.imStatus) {
|
|
138
|
+
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
139
|
+
this.setState({
|
|
140
|
+
imJoinRoom:true
|
|
141
|
+
})
|
|
142
|
+
console.log('加入IM房间')
|
|
143
|
+
}
|
|
136
144
|
this.props.createRoomCallback({
|
|
137
145
|
type: 1,
|
|
138
146
|
errorManage: '',
|
|
@@ -1006,7 +1014,24 @@ class Video extends Component {
|
|
|
1006
1014
|
}
|
|
1007
1015
|
}
|
|
1008
1016
|
};
|
|
1017
|
+
window.IMOpenfire = msg =>{
|
|
1018
|
+
console.log('im登录', msg)
|
|
1019
|
+
if(!msg) {
|
|
1020
|
+
this.roomCallBack(2, 'im建立连接失败')
|
|
1021
|
+
} else {
|
|
1022
|
+
this.setState({
|
|
1023
|
+
imStatus: msg
|
|
1024
|
+
})
|
|
1025
|
+
if(this.state.imRoomId && !this.state.imJoinRoom) {
|
|
1026
|
+
joinRoom((this.props.tellerAccount + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), this.state.imRoomId)
|
|
1027
|
+
this.setState({
|
|
1028
|
+
imJoinRoom:true
|
|
1029
|
+
})
|
|
1030
|
+
console.log('加入im房间')
|
|
1031
|
+
}
|
|
1032
|
+
}
|
|
1009
1033
|
|
|
1034
|
+
}
|
|
1010
1035
|
let data = {
|
|
1011
1036
|
account: this.props.tellerAccount,
|
|
1012
1037
|
type: '2',
|
|
@@ -1086,7 +1111,7 @@ class Video extends Component {
|
|
|
1086
1111
|
this.test_controller.OnGetDevicesFailed = (code, msg) => {
|
|
1087
1112
|
console.log('获取设备失败', code, msg)
|
|
1088
1113
|
this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
|
|
1089
|
-
this.roomCallBack(2, '
|
|
1114
|
+
this.roomCallBack(2, '获取失败')
|
|
1090
1115
|
};
|
|
1091
1116
|
// 建立连接成功
|
|
1092
1117
|
this.test_controller.OnConnectOK = () => {
|
|
@@ -1371,6 +1396,21 @@ class Video extends Component {
|
|
|
1371
1396
|
})
|
|
1372
1397
|
}, function (code, message, data) {
|
|
1373
1398
|
})
|
|
1399
|
+
if(this.state.voiceStatue) {
|
|
1400
|
+
callNimIM('sendCustomCmdMsg', {
|
|
1401
|
+
customId: this.state.imRoomId,
|
|
1402
|
+
content: JSON.stringify({
|
|
1403
|
+
'typeId': 1013,
|
|
1404
|
+
'muteStatus': 1,
|
|
1405
|
+
'data': {
|
|
1406
|
+
'sessionId': this.state.sessionId,
|
|
1407
|
+
'userId': this.props.tellerAccount
|
|
1408
|
+
}
|
|
1409
|
+
})
|
|
1410
|
+
}, function (code, message, data) {
|
|
1411
|
+
console.log(data)
|
|
1412
|
+
})
|
|
1413
|
+
}
|
|
1374
1414
|
let array = this.state.roomCustomerList;
|
|
1375
1415
|
let newArray = [...array];
|
|
1376
1416
|
newArray.push({
|
|
@@ -2015,6 +2055,8 @@ class Video extends Component {
|
|
|
2015
2055
|
isCustomer: false,
|
|
2016
2056
|
isWhiteboard: false,
|
|
2017
2057
|
isPictureInPicture: false,
|
|
2058
|
+
imStatus: false,
|
|
2059
|
+
imJoinRoom: false
|
|
2018
2060
|
});
|
|
2019
2061
|
this.props.onLeaveRoom({
|
|
2020
2062
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
@@ -2786,7 +2828,11 @@ class Video extends Component {
|
|
|
2786
2828
|
{
|
|
2787
2829
|
this.state.cameraList.map((item, index) => {
|
|
2788
2830
|
return <div>
|
|
2789
|
-
<
|
|
2831
|
+
<label className="radio">
|
|
2832
|
+
<input type="radio" name="camere" value={item.actionid} style={{float: 'left'}} checked={this.state.cameraValue == item.actionid} onChange={(e) => this.getCameraValue(e)} /><i></i>
|
|
2833
|
+
{item.actionname}
|
|
2834
|
+
</label>
|
|
2835
|
+
{/* <input type="radio" name="camere" value={item.actionid} checked={this.state.cameraValue == item.actionid} onChange={(e) => this.getCameraValue(e)} /><label for={item.actionid}>{item.actionname}</label> <br /> */}
|
|
2790
2836
|
</div>
|
|
2791
2837
|
})
|
|
2792
2838
|
}
|
|
@@ -2798,7 +2844,11 @@ class Video extends Component {
|
|
|
2798
2844
|
{
|
|
2799
2845
|
this.state.microphoneList.map((item, index) => {
|
|
2800
2846
|
return <div class="cameraAnMicrophone">
|
|
2801
|
-
<
|
|
2847
|
+
<label className="radio">
|
|
2848
|
+
<input type="radio" name="microphone" value={item.actionid} style={{float: 'left'}} checked={this.state.microphoneValue == item.actionid} onChange={(e) => this.getMicrophoneValue(e)} /><i></i>
|
|
2849
|
+
{item.actionname}
|
|
2850
|
+
</label>
|
|
2851
|
+
{/* <input type="radio" name="microphone" value={item.actionid} checked={this.state.microphoneValue == item.actionid} onChange={(e) => this.getMicrophoneValue(e)} /><label for={item.actionid}>{item.actionname}</label> <br /> */}
|
|
2802
2852
|
</div>
|
|
2803
2853
|
})
|
|
2804
2854
|
}
|
|
@@ -2808,12 +2858,15 @@ class Video extends Component {
|
|
|
2808
2858
|
'z-index': '-1',
|
|
2809
2859
|
width:'100%',
|
|
2810
2860
|
height:'100%',
|
|
2811
|
-
position: 'absolute'
|
|
2861
|
+
position: 'absolute',
|
|
2862
|
+
left: 0
|
|
2863
|
+
|
|
2812
2864
|
} :{
|
|
2813
2865
|
'z-index': '0',
|
|
2814
2866
|
width:'100%',
|
|
2815
2867
|
height:'100%',
|
|
2816
|
-
position: 'absolute'
|
|
2868
|
+
position: 'absolute',
|
|
2869
|
+
left: 0
|
|
2817
2870
|
};
|
|
2818
2871
|
return (
|
|
2819
2872
|
<div className="all">
|
|
@@ -3325,9 +3378,9 @@ class Video extends Component {
|
|
|
3325
3378
|
</div>
|
|
3326
3379
|
</div>
|
|
3327
3380
|
</Modal>
|
|
3328
|
-
<Modal title="签字白板" closable={false} visible={this.state.isModalVisibleSign} footer={
|
|
3381
|
+
<Modal title="签字白板" closable={false} centered={true} visible={this.state.isModalVisibleSign} footer={
|
|
3329
3382
|
[
|
|
3330
|
-
<Button type="primary" danger onClick={this.handleOkSign}>确定</Button>
|
|
3383
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkSign}>确定</Button>
|
|
3331
3384
|
]
|
|
3332
3385
|
}>
|
|
3333
3386
|
<div className="content">
|
|
@@ -276,7 +276,7 @@
|
|
|
276
276
|
// position: absolute;
|
|
277
277
|
// bottom: 0;
|
|
278
278
|
// left: 0;
|
|
279
|
-
transform: rotateY(180deg);
|
|
279
|
+
// transform: rotateY(180deg);
|
|
280
280
|
}
|
|
281
281
|
.cameraAnMicrophone{
|
|
282
282
|
margin: 10px 20px;
|
|
@@ -361,4 +361,53 @@
|
|
|
361
361
|
margin-bottom: 3px;
|
|
362
362
|
}
|
|
363
363
|
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
.radio {
|
|
367
|
+
position: relative;
|
|
368
|
+
display: inline-block;
|
|
369
|
+
font-weight: 400;
|
|
370
|
+
padding-left: 25px;
|
|
371
|
+
text-align: left;
|
|
372
|
+
width: 100%;
|
|
373
|
+
display: flex;
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.radio input {
|
|
377
|
+
position: absolute;
|
|
378
|
+
left: -9999px;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
.radio i {
|
|
382
|
+
display: block;
|
|
383
|
+
position: absolute;
|
|
384
|
+
top: 3px;
|
|
385
|
+
left: 2px;
|
|
386
|
+
width: 15px;
|
|
387
|
+
height: 15px;
|
|
388
|
+
outline: 0;
|
|
389
|
+
border: 1px solid rgb(133, 133, 133);
|
|
390
|
+
background: transparent;
|
|
391
|
+
border-radius: 50%;
|
|
392
|
+
transition: border-color .3s;
|
|
393
|
+
-webkit-transition: border-color .3s;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
.radio input+i:after {
|
|
397
|
+
position: absolute;
|
|
398
|
+
content: '';
|
|
399
|
+
top: 1.5px;
|
|
400
|
+
left: 1.5px;
|
|
401
|
+
width: 10px;
|
|
402
|
+
height: 10px;
|
|
403
|
+
border-radius: 50%;
|
|
404
|
+
background-color: #269792;
|
|
405
|
+
border: 1px solid #269792;
|
|
406
|
+
opacity: 0;
|
|
407
|
+
transition: opacity .1s;
|
|
408
|
+
-webkit-transition: opacity .1s;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
.radio input:checked+i:after {
|
|
412
|
+
opacity: 1;
|
|
364
413
|
}
|
package/packages/utils/cell.js
CHANGED
|
@@ -25,9 +25,9 @@ function callNimIM(method, json, callback) {
|
|
|
25
25
|
|
|
26
26
|
callbackRegister.set(callId, fn)
|
|
27
27
|
if (method == 'sendGroupMsg') {
|
|
28
|
-
sendMessage(json.groupId, (window.sessionStorage.getItem('
|
|
28
|
+
sendMessage(json.groupId, (JSON.parse(window.sessionStorage.getItem('sigData')).account + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), 'groupchat', json.content)
|
|
29
29
|
} else if (method == 'sendCustomCmdMsg') {
|
|
30
|
-
sendMessage(json.customId, (window.sessionStorage.getItem('
|
|
30
|
+
sendMessage(json.customId, (JSON.parse(window.sessionStorage.getItem('sigData')).account + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), 'groupchat', json.content)
|
|
31
31
|
} else if (method == 'transfer' || method == 'transferreject' || method == 'transferagree') {
|
|
32
32
|
// 发起转接或者邀请
|
|
33
33
|
json.event = 'IMVedio'
|
|
@@ -39,7 +39,7 @@ function callNimIM(method, json, callback) {
|
|
|
39
39
|
json.command = 'transfer_reject'
|
|
40
40
|
}
|
|
41
41
|
console.log('json', json)
|
|
42
|
-
sendMessage((json.distUserId + '@' + window.sessionStorage.getItem('
|
|
42
|
+
sendMessage((json.distUserId + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), (JSON.parse(window.sessionStorage.getItem('sigData')).account + '@' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname), 'chat', JSON.stringify(json))
|
|
43
43
|
}
|
|
44
44
|
// window.RemoteShellBridge.callNimIM(method, JSON.stringify(json), callId)
|
|
45
45
|
}
|
package/public/index.html
CHANGED
|
@@ -4,6 +4,12 @@
|
|
|
4
4
|
<meta charset="utf-8"/>
|
|
5
5
|
<link rel="shortcut icon" href="favicon.ico">
|
|
6
6
|
<meta content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport" />
|
|
7
|
+
<!-- // 强制Chromium内核,作用于360浏览器、QQ浏览器等国产双核浏览器: -->
|
|
8
|
+
<meta name="renderer" content="webkit"/>
|
|
9
|
+
<!-- // 强制Chromium内核,作用于其他双核浏览器: -->
|
|
10
|
+
<meta name="force-rendering" content="webkit"/>
|
|
11
|
+
<!-- // 如果有安装 Google Chrome Frame 插件则强制为Chromium内核,否则强制本机支持的最高版本IE内核,作用于IE浏览器: -->
|
|
12
|
+
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/>
|
|
7
13
|
<!-- <script src="/mrtc1.4.7/lib/tfjs.js"></script>
|
|
8
14
|
<script src="./mrtc1.4.7/lib/pix.js"></script>
|
|
9
15
|
<script src="./mrtc1.4.7/lib/log4b.js"></script>
|