react_hsbc_teller 2.0.33 → 2.0.35
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 +23 -0
- package/packages/assets/mp3/ipad_join_meeting.mp3 +0 -0
- package/packages/assets/mp3/ipad_leave_meeting.mp3 +0 -0
- package/packages/demo/demo.js +1 -0
- package/packages/pages/header/header.jsx +1 -1
- package/packages/pages/video/video.jsx +49 -9
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -81,6 +81,29 @@ class API extends Server{
|
|
|
81
81
|
throw err;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
+
/**
|
|
85
|
+
* 用途:保存共享状态
|
|
86
|
+
* 返回http_code为200表示成功
|
|
87
|
+
* @method post
|
|
88
|
+
* @return {promise}
|
|
89
|
+
*/
|
|
90
|
+
async editRmScreenStatus(params = {}){
|
|
91
|
+
try{
|
|
92
|
+
let result = await this.axios('post', '/hsbc/editRmScreenStatus', params);
|
|
93
|
+
if(result && result.code === 200){
|
|
94
|
+
return result.data||[];
|
|
95
|
+
}else{
|
|
96
|
+
let err = {
|
|
97
|
+
tip: '共享状态保存失败',
|
|
98
|
+
response: result,
|
|
99
|
+
data: params,
|
|
100
|
+
}
|
|
101
|
+
throw err;
|
|
102
|
+
}
|
|
103
|
+
}catch(err){
|
|
104
|
+
throw err;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
84
107
|
/**
|
|
85
108
|
* 用途:敏感词检测
|
|
86
109
|
* @url https://api.cangdu.org/shopro/data/products
|
|
Binary file
|
|
Binary file
|
package/packages/demo/demo.js
CHANGED
|
@@ -20,7 +20,9 @@ import cameraImgCloe from '../../assets/img/icon_cameraOne.png'
|
|
|
20
20
|
import beautyImg from '../../assets/img/whiteningLut.jpg'
|
|
21
21
|
import ocrImage from '../../assets/img/jietu.png'
|
|
22
22
|
import faceImage from '../../assets/img/jietu_face.png'
|
|
23
|
-
import
|
|
23
|
+
import joinMeeting from '../../assets/mp3/joinmeeting.mp3'
|
|
24
|
+
import ipadjoinMeeting from '../../assets/mp3/ipad_join_meeting.mp3'
|
|
25
|
+
import ipadLeaveMeeting from '../../assets/mp3/ipad_leave_meeting.mp3'
|
|
24
26
|
import recordErrorAudio from '../../assets/mp3/record_error.mp3'
|
|
25
27
|
import IpadLeaveAudio from '../../assets/mp3/ipad_leave_error.mp3';
|
|
26
28
|
import IpadLowPowerAudio from '../../assets/mp3/ipad_low_power.mp3';
|
|
@@ -58,7 +60,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
|
|
|
58
60
|
import axios from 'axios';
|
|
59
61
|
import CryptoJS from "crypto-js";
|
|
60
62
|
|
|
61
|
-
const SDK_VERISON = '2.0.
|
|
63
|
+
const SDK_VERISON = '2.0.35'
|
|
62
64
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
63
65
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
64
66
|
const { Option } = Select;
|
|
@@ -2336,6 +2338,9 @@ class Video extends Component {
|
|
|
2336
2338
|
this.state.imStatus = true
|
|
2337
2339
|
this.saveLog('Join im room')
|
|
2338
2340
|
console.log('加入IM房间')
|
|
2341
|
+
|
|
2342
|
+
// 如果重新加入房间,手动重置一下投屏状态
|
|
2343
|
+
this.setSharedScreenState(false)
|
|
2339
2344
|
};
|
|
2340
2345
|
// 加入房间失败
|
|
2341
2346
|
this.test_controller.OnJoinRoomFailed = (err_code, err_msg) => {
|
|
@@ -2494,9 +2499,10 @@ class Video extends Component {
|
|
|
2494
2499
|
'sharedScreen': 1,
|
|
2495
2500
|
'tellerId': this.props.tellerAccount
|
|
2496
2501
|
})
|
|
2497
|
-
if (this.state.screenName == '
|
|
2502
|
+
if (this.state.screenName == '切换共享') {
|
|
2498
2503
|
this.state.isSharedScreen = true
|
|
2499
2504
|
this.state.isScreenSwitching = false
|
|
2505
|
+
this.setSharedScreenState(true)
|
|
2500
2506
|
}
|
|
2501
2507
|
}
|
|
2502
2508
|
if (sid == document.getElementById('publish_streamId1').name) {
|
|
@@ -2803,6 +2809,7 @@ class Video extends Component {
|
|
|
2803
2809
|
'tellerId': this.props.tellerAccount
|
|
2804
2810
|
})
|
|
2805
2811
|
this.state.isSharedScreen = false
|
|
2812
|
+
this.setSharedScreenState(false)
|
|
2806
2813
|
this.setState({
|
|
2807
2814
|
|
|
2808
2815
|
screenName: '共享模式'
|
|
@@ -2906,9 +2913,7 @@ class Video extends Component {
|
|
|
2906
2913
|
}
|
|
2907
2914
|
|
|
2908
2915
|
if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
|
|
2909
|
-
// ipad
|
|
2910
|
-
console.log('iPad退出房间', participant)
|
|
2911
|
-
|
|
2916
|
+
// ipad单独处理,双录过程中ipad如果离开,要提示+循环播报直到ipad重新入会
|
|
2912
2917
|
this.setState({
|
|
2913
2918
|
IpadLeaveErrorModalVisible: true,
|
|
2914
2919
|
ipadTag: '',
|
|
@@ -2925,9 +2930,17 @@ class Video extends Component {
|
|
|
2925
2930
|
setTimeout(this.ipadLeavePlay, 0);
|
|
2926
2931
|
return
|
|
2927
2932
|
} else if (participant.includes(IPAD_SUFFIX)) {
|
|
2933
|
+
// 非双录下ipad离开提示iPad已断开
|
|
2928
2934
|
this.setState({
|
|
2929
2935
|
ipadTag: '',
|
|
2930
2936
|
})
|
|
2937
|
+
this.messageClick(('iPad 已断开'), 'error')
|
|
2938
|
+
this.saveLog('iPad leave room')
|
|
2939
|
+
if (this.props.isOpenSound && !this.state.businessId) {
|
|
2940
|
+
let audio = new Audio(ipadLeaveMeeting)
|
|
2941
|
+
audio.play()
|
|
2942
|
+
}
|
|
2943
|
+
return
|
|
2931
2944
|
}
|
|
2932
2945
|
|
|
2933
2946
|
|
|
@@ -3261,6 +3274,7 @@ class Video extends Component {
|
|
|
3261
3274
|
if (this.state.screenName == '切换共享') {
|
|
3262
3275
|
this.state.isSharedScreen = true
|
|
3263
3276
|
this.state.isScreenSwitching = false
|
|
3277
|
+
this.setSharedScreenState(true)
|
|
3264
3278
|
}
|
|
3265
3279
|
}
|
|
3266
3280
|
};
|
|
@@ -3281,6 +3295,7 @@ class Video extends Component {
|
|
|
3281
3295
|
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
3282
3296
|
this.state.isSharedScreen = false
|
|
3283
3297
|
this.state.isScreenSwitching = false
|
|
3298
|
+
this.setSharedScreenState(false)
|
|
3284
3299
|
this.setState({
|
|
3285
3300
|
screenName: '共享模式'
|
|
3286
3301
|
});
|
|
@@ -3420,6 +3435,7 @@ class Video extends Component {
|
|
|
3420
3435
|
}
|
|
3421
3436
|
this.state.isSharedScreen = false
|
|
3422
3437
|
this.state.isScreenSwitching = false
|
|
3438
|
+
this.setSharedScreenState(false)
|
|
3423
3439
|
this.setState({
|
|
3424
3440
|
screenName: '共享模式'
|
|
3425
3441
|
});
|
|
@@ -3660,6 +3676,7 @@ class Video extends Component {
|
|
|
3660
3676
|
screenName: '共享模式',
|
|
3661
3677
|
})
|
|
3662
3678
|
this.state.isSharedScreen = false
|
|
3679
|
+
this.setSharedScreenState(false)
|
|
3663
3680
|
this.state.laveRoomSharedScreen = true
|
|
3664
3681
|
// this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
3665
3682
|
|
|
@@ -3673,6 +3690,7 @@ class Video extends Component {
|
|
|
3673
3690
|
screenName: '共享模式',
|
|
3674
3691
|
});
|
|
3675
3692
|
this.state.isSharedScreen = false
|
|
3693
|
+
this.setSharedScreenState(false)
|
|
3676
3694
|
this.state.laveRoomSharedScreen = true
|
|
3677
3695
|
this.props.onLeaveRoom({
|
|
3678
3696
|
code: LEAVE_TYPE.TELLER_EXIT,
|
|
@@ -4076,6 +4094,20 @@ class Video extends Component {
|
|
|
4076
4094
|
}
|
|
4077
4095
|
}
|
|
4078
4096
|
}
|
|
4097
|
+
setSharedScreenState = async (state) => {
|
|
4098
|
+
const status = state? 'open' : 'close'
|
|
4099
|
+
try {
|
|
4100
|
+
let result = await API.editRmScreenStatus({
|
|
4101
|
+
roomId: this.state.channelId + '',
|
|
4102
|
+
status,
|
|
4103
|
+
staffId: this.props.tellerAccount,
|
|
4104
|
+
});
|
|
4105
|
+
} catch (err) {
|
|
4106
|
+
if(err.status == 502 || err.status== 404) {
|
|
4107
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
4108
|
+
}
|
|
4109
|
+
}
|
|
4110
|
+
}
|
|
4079
4111
|
isFileSuccuse = () => {
|
|
4080
4112
|
if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
|
|
4081
4113
|
this.messageClick('当前程序异常请先退出重开', 'error')
|
|
@@ -5154,8 +5186,14 @@ class Video extends Component {
|
|
|
5154
5186
|
this.messageClick('查询失败', 'error')
|
|
5155
5187
|
}
|
|
5156
5188
|
if (this.props.isOpenSound && sid != document.getElementById('publish_streamId1').name) {
|
|
5157
|
-
if (
|
|
5158
|
-
|
|
5189
|
+
if (userId.includes(IPAD_SUFFIX)) {
|
|
5190
|
+
if (!this.state.businessId) {
|
|
5191
|
+
let src = ipadjoinMeeting
|
|
5192
|
+
let audio = new Audio(src)
|
|
5193
|
+
audio.play()
|
|
5194
|
+
}
|
|
5195
|
+
} else if (result.data.userType == 1) {
|
|
5196
|
+
let src = joinMeeting
|
|
5159
5197
|
let audio = new Audio(src)
|
|
5160
5198
|
audio.play()
|
|
5161
5199
|
} else if (result.data.userType == 2) {
|
|
@@ -5385,6 +5423,7 @@ class Video extends Component {
|
|
|
5385
5423
|
document.getElementById('video20') && document.getElementById('video20').name ? this.test_controller.UnPublish(document.getElementById('video20').name) : ''
|
|
5386
5424
|
that.state.isSharedScreen = false
|
|
5387
5425
|
that.state.isScreenSwitching = false
|
|
5426
|
+
that.setSharedScreenState(false)
|
|
5388
5427
|
that.setState({
|
|
5389
5428
|
screenName: '共享模式'
|
|
5390
5429
|
});
|
|
@@ -5495,6 +5534,7 @@ class Video extends Component {
|
|
|
5495
5534
|
}, 'add')
|
|
5496
5535
|
if (this.state.isSharedScreen) {
|
|
5497
5536
|
this.state.isSharedScreen = false
|
|
5537
|
+
this.setSharedScreenState(false)
|
|
5498
5538
|
this.setState({
|
|
5499
5539
|
|
|
5500
5540
|
screenName: '共享模式'
|
|
@@ -6415,7 +6455,7 @@ class Video extends Component {
|
|
|
6415
6455
|
return (
|
|
6416
6456
|
<div className="all" id="allHSBC">
|
|
6417
6457
|
<Spin spinning={this.state.loading} tip="视频初始化中...">
|
|
6418
|
-
<Header></Header>
|
|
6458
|
+
<Header recordMode={this.props.recordMode}></Header>
|
|
6419
6459
|
<div className="health">
|
|
6420
6460
|
<div className="healthVideo">
|
|
6421
6461
|
<div className="projection" style={{ background: this.state.tabTitles.length > 0 ? '#f0f0f0' : '#ffffff' }}>
|