react_hsbc_teller 0.5.6 → 0.6.0
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/foot/foot.less +2 -1
- package/packages/pages/video/video.jsx +57 -24
- package/packages/pages/video/video.less +48 -18
- package/src/index.js +2 -2
package/package.json
CHANGED
|
@@ -23,9 +23,10 @@ import { Button } from '../../../node_modules/antd/lib/index';
|
|
|
23
23
|
import CanvasDraw from "react-canvas-draw";
|
|
24
24
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
25
25
|
import html2canvas from 'html2canvas';
|
|
26
|
+
import axios from 'axios';
|
|
26
27
|
const LEAVE_TYPE = {
|
|
27
|
-
TELLER_EXIT:
|
|
28
|
-
ROOM_DESTROYED:
|
|
28
|
+
TELLER_EXIT: 1, // 坐席退出
|
|
29
|
+
ROOM_DESTROYED: -1, // 房间异常
|
|
29
30
|
}
|
|
30
31
|
let pictureInPictureVideo = ''
|
|
31
32
|
@injectIntl
|
|
@@ -144,6 +145,7 @@ class Video extends Component {
|
|
|
144
145
|
this.props.createRoomCallback({
|
|
145
146
|
type: 1,
|
|
146
147
|
errorManage: '',
|
|
148
|
+
errorCode: 0,
|
|
147
149
|
data: {
|
|
148
150
|
mtoken: this.state.rtoken,
|
|
149
151
|
imRoomId: result.imRoomId,
|
|
@@ -156,6 +158,7 @@ class Video extends Component {
|
|
|
156
158
|
this.props.createRoomCallback({
|
|
157
159
|
type: 2,
|
|
158
160
|
errorManage: '保存房间信息失败',
|
|
161
|
+
errorCode:-9,
|
|
159
162
|
data: {}
|
|
160
163
|
})
|
|
161
164
|
}
|
|
@@ -181,7 +184,7 @@ class Video extends Component {
|
|
|
181
184
|
}
|
|
182
185
|
} catch (err) {
|
|
183
186
|
console.error(err);
|
|
184
|
-
this.roomCallBack(2, '签名失败')
|
|
187
|
+
this.roomCallBack(2, '签名失败',-8)
|
|
185
188
|
}
|
|
186
189
|
};
|
|
187
190
|
handleEdit = () => {
|
|
@@ -751,17 +754,19 @@ class Video extends Component {
|
|
|
751
754
|
});
|
|
752
755
|
}
|
|
753
756
|
};
|
|
754
|
-
roomCallBack = (type, manege) => {
|
|
757
|
+
roomCallBack = (type, manege,code) => {
|
|
755
758
|
if (this.state.sessionId) {
|
|
756
759
|
this.props.joinRoomCallback({
|
|
757
760
|
type: type,
|
|
758
761
|
errorManage: manege,
|
|
762
|
+
errorCode: code,
|
|
759
763
|
data: {}
|
|
760
764
|
})
|
|
761
765
|
} else {
|
|
762
766
|
this.props.createRoomCallback({
|
|
763
767
|
type: type,
|
|
764
768
|
errorManage: manege,
|
|
769
|
+
errorCode: code,
|
|
765
770
|
data: {}
|
|
766
771
|
})
|
|
767
772
|
}
|
|
@@ -805,11 +810,13 @@ class Video extends Component {
|
|
|
805
810
|
this.test_controller.StopRemoteRecord(this.state.recordId)
|
|
806
811
|
}
|
|
807
812
|
}
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
}
|
|
813
|
+
}
|
|
814
|
+
// else if (Mival.typeId == 1010) {
|
|
815
|
+
// if (Mival.sessionId == this.state.sessionId) {
|
|
816
|
+
// this.endSession('customerHangUp')
|
|
817
|
+
// }
|
|
818
|
+
// }
|
|
819
|
+
else if (Mival.typeId == 1215) {
|
|
813
820
|
// 一炒多的图片
|
|
814
821
|
if (Mival.sessionId == this.state.sessionId) {
|
|
815
822
|
this.props.imgCallback(Mival.data.type, Mival.data.file) // 文字抄录和风险抄录,3--风险,,2--文字
|
|
@@ -1017,7 +1024,7 @@ class Video extends Component {
|
|
|
1017
1024
|
window.IMOpenfire = msg =>{
|
|
1018
1025
|
console.log('im登录', msg)
|
|
1019
1026
|
if(!msg) {
|
|
1020
|
-
this.roomCallBack(2, 'im建立连接失败')
|
|
1027
|
+
this.roomCallBack(2, 'im建立连接失败',-7)
|
|
1021
1028
|
} else {
|
|
1022
1029
|
this.setState({
|
|
1023
1030
|
imStatus: msg
|
|
@@ -1111,7 +1118,7 @@ class Video extends Component {
|
|
|
1111
1118
|
this.test_controller.OnGetDevicesFailed = (code, msg) => {
|
|
1112
1119
|
console.log('获取设备失败', code, msg)
|
|
1113
1120
|
this.messageClick('获取设备失败,请检查摄像头设备是否可用或是否禁用摄像头','error')
|
|
1114
|
-
this.roomCallBack(2, '
|
|
1121
|
+
this.roomCallBack(2, '获取设备失败',-1)
|
|
1115
1122
|
};
|
|
1116
1123
|
// 建立连接成功
|
|
1117
1124
|
this.test_controller.OnConnectOK = () => {
|
|
@@ -1120,7 +1127,7 @@ class Video extends Component {
|
|
|
1120
1127
|
};
|
|
1121
1128
|
this.test_controller.OnConnectFailed = (code, msg) => {
|
|
1122
1129
|
console.log('建立连接失败', code, msg)
|
|
1123
|
-
this.roomCallBack(2, '连接失败')
|
|
1130
|
+
this.roomCallBack(2, '连接失败',-2)
|
|
1124
1131
|
};
|
|
1125
1132
|
// 断开连接回调
|
|
1126
1133
|
this.test_controller.OnConnectClose = (code, msg) => {
|
|
@@ -1134,7 +1141,7 @@ class Video extends Component {
|
|
|
1134
1141
|
// 初始化房间失败
|
|
1135
1142
|
this.test_controller.OnInitRoomConfigFail = (err_code, err_msg) => {
|
|
1136
1143
|
console.log('初始化房间失败', err_code, err_msg)
|
|
1137
|
-
this.roomCallBack(2, '初始化失败')
|
|
1144
|
+
this.roomCallBack(2, '初始化失败',-3)
|
|
1138
1145
|
};
|
|
1139
1146
|
// 初始化成功回调
|
|
1140
1147
|
this.test_controller.OnInitRoomConfigOK = () => {
|
|
@@ -1160,7 +1167,7 @@ class Video extends Component {
|
|
|
1160
1167
|
// 创建房间失败
|
|
1161
1168
|
this.test_controller.OnCreateRoomFailed = (err_code, err_msg) => {
|
|
1162
1169
|
console.log('创建房间失败', err_code, err_msg)
|
|
1163
|
-
this.roomCallBack(2, '
|
|
1170
|
+
this.roomCallBack(2, '创建房间失败',-4)
|
|
1164
1171
|
};
|
|
1165
1172
|
// 初始化⾳视频成功
|
|
1166
1173
|
this.test_controller.OnMediaCallSucc = (sid) => {
|
|
@@ -1177,12 +1184,12 @@ class Video extends Component {
|
|
|
1177
1184
|
// 加入房间成功
|
|
1178
1185
|
this.test_controller.OnJoinRoomSucc = () => {
|
|
1179
1186
|
console.log('加入房间成功')
|
|
1180
|
-
this.roomCallBack(1, '')
|
|
1187
|
+
this.roomCallBack(1, '',0)
|
|
1181
1188
|
};
|
|
1182
1189
|
// 加入房间失败
|
|
1183
1190
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
1184
1191
|
console.log('加入房间失败', err_code, err_msg)
|
|
1185
|
-
this.roomCallBack(2, '加入失败')
|
|
1192
|
+
this.roomCallBack(2, '加入失败',-5)
|
|
1186
1193
|
};
|
|
1187
1194
|
// 发布媒体流成功
|
|
1188
1195
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
@@ -1202,6 +1209,7 @@ class Video extends Component {
|
|
|
1202
1209
|
// 发布媒体流失败
|
|
1203
1210
|
this.test_controller.OnPublishFailed = (sid, err_code, err_msg) => {
|
|
1204
1211
|
console.log('发布媒体流失败', sid, err_code, err_msg)
|
|
1212
|
+
this.roomCallBack(2, '发布失败',-6)
|
|
1205
1213
|
};
|
|
1206
1214
|
// 订阅媒体流成功
|
|
1207
1215
|
this.test_controller.OnSubscribeSucc = (feed, sid) => {
|
|
@@ -1401,7 +1409,7 @@ class Video extends Component {
|
|
|
1401
1409
|
customId: this.state.imRoomId,
|
|
1402
1410
|
content: JSON.stringify({
|
|
1403
1411
|
'typeId': 1013,
|
|
1404
|
-
'muteStatus':
|
|
1412
|
+
'muteStatus': 1,
|
|
1405
1413
|
'data': {
|
|
1406
1414
|
'sessionId': this.state.sessionId,
|
|
1407
1415
|
'userId': this.props.tellerAccount
|
|
@@ -2090,6 +2098,15 @@ class Video extends Component {
|
|
|
2090
2098
|
this.setState({
|
|
2091
2099
|
loading: true,
|
|
2092
2100
|
})
|
|
2101
|
+
axios.get(this.props.resourcePath + "/beauty/beauty.js")
|
|
2102
|
+
.then(response => this.addToScriptClick()).catch(function (error) {
|
|
2103
|
+
console.log(error);
|
|
2104
|
+
this.roomCallBack(2, '创建房间失败',-4)
|
|
2105
|
+
|
|
2106
|
+
})
|
|
2107
|
+
|
|
2108
|
+
}
|
|
2109
|
+
addToScriptClick=()=>{
|
|
2093
2110
|
const _dependScripts = [
|
|
2094
2111
|
// https://counter-web.leimondata.cn:7199
|
|
2095
2112
|
this.props.resourcePath + "/beauty/beauty.js",
|
|
@@ -2828,7 +2845,11 @@ class Video extends Component {
|
|
|
2828
2845
|
{
|
|
2829
2846
|
this.state.cameraList.map((item, index) => {
|
|
2830
2847
|
return <div>
|
|
2831
|
-
<
|
|
2848
|
+
<label className="radio">
|
|
2849
|
+
<input type="radio" name="camere" value={item.actionid} style={{float: 'left'}} checked={this.state.cameraValue == item.actionid} onChange={(e) => this.getCameraValue(e)} /><i></i>
|
|
2850
|
+
{item.actionname}
|
|
2851
|
+
</label>
|
|
2852
|
+
{/* <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 /> */}
|
|
2832
2853
|
</div>
|
|
2833
2854
|
})
|
|
2834
2855
|
}
|
|
@@ -2840,7 +2861,11 @@ class Video extends Component {
|
|
|
2840
2861
|
{
|
|
2841
2862
|
this.state.microphoneList.map((item, index) => {
|
|
2842
2863
|
return <div class="cameraAnMicrophone">
|
|
2843
|
-
<
|
|
2864
|
+
<label className="radio">
|
|
2865
|
+
<input type="radio" name="microphone" value={item.actionid} style={{float: 'left'}} checked={this.state.microphoneValue == item.actionid} onChange={(e) => this.getMicrophoneValue(e)} /><i></i>
|
|
2866
|
+
{item.actionname}
|
|
2867
|
+
</label>
|
|
2868
|
+
{/* <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 /> */}
|
|
2844
2869
|
</div>
|
|
2845
2870
|
})
|
|
2846
2871
|
}
|
|
@@ -2851,14 +2876,22 @@ class Video extends Component {
|
|
|
2851
2876
|
width:'100%',
|
|
2852
2877
|
height:'100%',
|
|
2853
2878
|
position: 'absolute',
|
|
2854
|
-
left: 0
|
|
2879
|
+
left: 0,
|
|
2880
|
+
top: 0,
|
|
2881
|
+
right: 0,
|
|
2882
|
+
bottom: 0,
|
|
2883
|
+
margin: 'auto'
|
|
2855
2884
|
|
|
2856
2885
|
} :{
|
|
2857
2886
|
'z-index': '0',
|
|
2858
2887
|
width:'100%',
|
|
2859
|
-
height:'100%',
|
|
2888
|
+
// height:'100%',
|
|
2860
2889
|
position: 'absolute',
|
|
2861
|
-
left: 0
|
|
2890
|
+
left: 0,
|
|
2891
|
+
top: 0,
|
|
2892
|
+
right: 0,
|
|
2893
|
+
bottom: 0,
|
|
2894
|
+
margin: 'auto'
|
|
2862
2895
|
};
|
|
2863
2896
|
return (
|
|
2864
2897
|
<div className="all">
|
|
@@ -2912,11 +2945,11 @@ class Video extends Component {
|
|
|
2912
2945
|
<label className='labelClass'>{meetingInfo.title}</label>
|
|
2913
2946
|
</li>
|
|
2914
2947
|
<li>
|
|
2915
|
-
<span
|
|
2948
|
+
<span>客户:</span>
|
|
2916
2949
|
<label className='labelClass'>{meetingInfo.host}</label>
|
|
2917
2950
|
</li>
|
|
2918
2951
|
<li>
|
|
2919
|
-
<span
|
|
2952
|
+
<span>参会人:</span>
|
|
2920
2953
|
{customerNameList}
|
|
2921
2954
|
</li>
|
|
2922
2955
|
</ul>
|
|
@@ -216,8 +216,13 @@
|
|
|
216
216
|
}
|
|
217
217
|
.themeClass{
|
|
218
218
|
position: absolute;
|
|
219
|
-
top:
|
|
220
|
-
left:
|
|
219
|
+
top: 0;
|
|
220
|
+
left: 0;
|
|
221
|
+
right: 0;
|
|
222
|
+
bottom: 0;
|
|
223
|
+
margin: auto;
|
|
224
|
+
width: 500px;
|
|
225
|
+
height: 150px;
|
|
221
226
|
font-size: 22px;
|
|
222
227
|
color: #222222;
|
|
223
228
|
font-weight: 600;
|
|
@@ -225,6 +230,7 @@
|
|
|
225
230
|
li{
|
|
226
231
|
list-style: none;
|
|
227
232
|
margin: 21px 0;
|
|
233
|
+
text-align: left;
|
|
228
234
|
span{
|
|
229
235
|
font-size: 20px;
|
|
230
236
|
width: 143px;
|
|
@@ -363,27 +369,51 @@
|
|
|
363
369
|
|
|
364
370
|
}
|
|
365
371
|
|
|
366
|
-
|
|
367
|
-
|
|
372
|
+
.radio {
|
|
373
|
+
position: relative;
|
|
368
374
|
display: inline-block;
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
375
|
+
font-weight: 400;
|
|
376
|
+
padding-left: 25px;
|
|
377
|
+
text-align: left;
|
|
378
|
+
width: 100%;
|
|
379
|
+
display: flex;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.radio input {
|
|
383
|
+
position: absolute;
|
|
384
|
+
left: -9999px;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.radio i {
|
|
388
|
+
display: block;
|
|
389
|
+
position: absolute;
|
|
390
|
+
top: 3px;
|
|
391
|
+
left: 2px;
|
|
392
|
+
width: 15px;
|
|
393
|
+
height: 15px;
|
|
394
|
+
outline: 0;
|
|
395
|
+
border: 1px solid rgb(133, 133, 133);
|
|
396
|
+
background: transparent;
|
|
372
397
|
border-radius: 50%;
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
box-sizing: border-box;
|
|
376
|
-
margin-top: -0.1rem;
|
|
398
|
+
transition: border-color .3s;
|
|
399
|
+
-webkit-transition: border-color .3s;
|
|
377
400
|
}
|
|
378
401
|
|
|
379
|
-
input
|
|
402
|
+
.radio input+i:after {
|
|
403
|
+
position: absolute;
|
|
404
|
+
content: '';
|
|
405
|
+
top: 1.5px;
|
|
406
|
+
left: 1.5px;
|
|
407
|
+
width: 10px;
|
|
408
|
+
height: 10px;
|
|
409
|
+
border-radius: 50%;
|
|
380
410
|
background-color: #269792;
|
|
381
|
-
background-clip: content-box;
|
|
382
411
|
border: 1px solid #269792;
|
|
383
|
-
|
|
384
|
-
|
|
412
|
+
opacity: 0;
|
|
413
|
+
transition: opacity .1s;
|
|
414
|
+
-webkit-transition: opacity .1s;
|
|
385
415
|
}
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
416
|
+
|
|
417
|
+
.radio input:checked+i:after {
|
|
418
|
+
opacity: 1;
|
|
389
419
|
}
|
package/src/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import "./index.less";
|
|
4
4
|
import '@babel/polyfill';
|
|
5
|
-
|
|
6
|
-
import {HSBC} from "../packages";
|
|
5
|
+
import { HSBC } from "../lib/hsbc";
|
|
6
|
+
// import {HSBC} from "../packages";
|
|
7
7
|
|
|
8
8
|
ReactDOM.render(
|
|
9
9
|
<div className="hsbc"><HSBC></HSBC></div>,
|