react_hsbc_teller 2.0.16 → 2.0.18
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 +24 -0
- package/packages/demo/demo.js +1 -0
- package/packages/pages/video/video.jsx +46 -4
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -57,6 +57,30 @@ class API extends Server{
|
|
|
57
57
|
throw err;
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* 用途:获取录制状态
|
|
62
|
+
* @url https://api.cangdu.org/shopro/data/products
|
|
63
|
+
* 返回http_code为200表示成功
|
|
64
|
+
* @method post
|
|
65
|
+
* @return {promise}
|
|
66
|
+
*/
|
|
67
|
+
async getRecordStatus(params = {}){
|
|
68
|
+
try{
|
|
69
|
+
let result = await this.axios('get', '/hsbc/record/status?roomId=' + params.roomId, params);
|
|
70
|
+
if(result && result.code === 200){
|
|
71
|
+
return result.data||[];
|
|
72
|
+
}else{
|
|
73
|
+
let err = {
|
|
74
|
+
tip: '录制状态获取失败',
|
|
75
|
+
response: result,
|
|
76
|
+
data: params,
|
|
77
|
+
}
|
|
78
|
+
throw err;
|
|
79
|
+
}
|
|
80
|
+
}catch(err){
|
|
81
|
+
throw err;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
60
84
|
/**
|
|
61
85
|
* 用途:人脸检测
|
|
62
86
|
* @url https://api.cangdu.org/shopro/data/products
|
package/packages/demo/demo.js
CHANGED
|
@@ -31,6 +31,7 @@ roomId
|
|
|
31
31
|
// roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
|
|
32
32
|
// baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
|
|
33
33
|
// resourcePath: 'https://counter-web.leimondata.cn:7199',
|
|
34
|
+
// resourcePath:'http://121.196.19.70:8027/',
|
|
34
35
|
roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
|
|
35
36
|
baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
|
|
36
37
|
resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
|
|
@@ -53,7 +53,7 @@ import Step from '../components/step/step.jsx'
|
|
|
53
53
|
import axios from 'axios';
|
|
54
54
|
import CryptoJS from "crypto-js";
|
|
55
55
|
|
|
56
|
-
const SDK_VERISON = '2.0.
|
|
56
|
+
const SDK_VERISON = '2.0.18'
|
|
57
57
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
58
58
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
59
59
|
const { Option } = Select;
|
|
@@ -86,6 +86,7 @@ let muteJson = new Map()
|
|
|
86
86
|
// let dateTime = 0
|
|
87
87
|
let messageValue = ''
|
|
88
88
|
let messageValueMap = new Map()
|
|
89
|
+
let third_id_Map = new Map()
|
|
89
90
|
// let beautyType = false
|
|
90
91
|
// let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
|
|
91
92
|
let rateList = []
|
|
@@ -1728,7 +1729,7 @@ class Video extends Component {
|
|
|
1728
1729
|
}
|
|
1729
1730
|
} else if (Mival.status == 2) {
|
|
1730
1731
|
// 关闭了业务录制
|
|
1731
|
-
console.log('业务录制关闭')
|
|
1732
|
+
console.log('业务录制关闭', this.state.businessRecordId)
|
|
1732
1733
|
this.saveLog('Stop business recording')
|
|
1733
1734
|
this.test_controller.StopRemoteRecord(this.state.businessRecordId)
|
|
1734
1735
|
this.state.businessId = '';
|
|
@@ -2760,6 +2761,10 @@ class Video extends Component {
|
|
|
2760
2761
|
// 结束服务端录制成功
|
|
2761
2762
|
this.test_controller.OnStopRemoteRecordSucc = (recordId, record_third_id) => {
|
|
2762
2763
|
console.log('结束服务端录制成功', recordId, record_third_id);
|
|
2764
|
+
// 重进会议前端会丢失之前的third_id,从服务端去取
|
|
2765
|
+
if (!record_third_id && third_id_Map.get(recordId)) {
|
|
2766
|
+
record_third_id = third_id_Map.get(recordId)
|
|
2767
|
+
}
|
|
2763
2768
|
if (!record_third_id) {
|
|
2764
2769
|
this.videoRecordCallback('2', true)
|
|
2765
2770
|
this.saveLog('mrtc OnStopRemoteRecordSucc, recordId='+recordId)
|
|
@@ -2779,6 +2784,10 @@ class Video extends Component {
|
|
|
2779
2784
|
record_third_id
|
|
2780
2785
|
) => {
|
|
2781
2786
|
console.log('结束服务端录制失败', recordId, err_code, err_msg, record_third_id)
|
|
2787
|
+
// 重进会议前端会丢失之前的third_id,从服务端去取
|
|
2788
|
+
if (!record_third_id && third_id_Map.get(recordId)) {
|
|
2789
|
+
record_third_id = third_id_Map.get(recordId)
|
|
2790
|
+
}
|
|
2782
2791
|
if (!record_third_id) {
|
|
2783
2792
|
this.videoRecordCallback('2', false)
|
|
2784
2793
|
this.saveLog('mrtc OnStopRemoteRecordFailed, err_code='+err_code)
|
|
@@ -3349,6 +3358,7 @@ class Video extends Component {
|
|
|
3349
3358
|
type: '2'
|
|
3350
3359
|
});
|
|
3351
3360
|
console.log(result);
|
|
3361
|
+
this.queryRecordStatus()
|
|
3352
3362
|
this.appGetUsername(document.getElementById('publish_video1').name)
|
|
3353
3363
|
this.sendMessage({
|
|
3354
3364
|
'typeId': 1014,
|
|
@@ -3507,7 +3517,7 @@ class Video extends Component {
|
|
|
3507
3517
|
loading: true,
|
|
3508
3518
|
})
|
|
3509
3519
|
const that = this
|
|
3510
|
-
axios.get(this.props.resourcePath +
|
|
3520
|
+
axios.get(this.props.resourcePath + `/mcu.js?v=${SDK_VERISON}`)
|
|
3511
3521
|
.then(response => this.addToScriptClick()).catch(function (error) {
|
|
3512
3522
|
console.log(error);
|
|
3513
3523
|
that.state.sessionType = false
|
|
@@ -3718,6 +3728,34 @@ class Video extends Component {
|
|
|
3718
3728
|
}
|
|
3719
3729
|
}
|
|
3720
3730
|
};
|
|
3731
|
+
queryRecordStatus = async()=>{
|
|
3732
|
+
try {
|
|
3733
|
+
let result = await API.getRecordStatus({
|
|
3734
|
+
roomId: this.state.channelId + ''
|
|
3735
|
+
});
|
|
3736
|
+
console.log('RecordStatus', result)
|
|
3737
|
+
if (result.fullRecordStatus == 1) { // 1开启 2未开启
|
|
3738
|
+
// 全局录制
|
|
3739
|
+
this.state.recordId = result.fullRecordId
|
|
3740
|
+
if (result.businessRecordStatus == 1){
|
|
3741
|
+
// 业务录制
|
|
3742
|
+
this.state.businessRecordId = result.businessRecordId;
|
|
3743
|
+
this.state.businessId = result.businessId;
|
|
3744
|
+
third_id_Map.set(result.businessRecordId, result.businessId);
|
|
3745
|
+
console.log(third_id_Map)
|
|
3746
|
+
if (this.props.whetherDetectFace) this.startFaceDetection();
|
|
3747
|
+
if (this.props.whetherDetectLight) this.startImageDetection();
|
|
3748
|
+
}
|
|
3749
|
+
} else {
|
|
3750
|
+
this.state.recordId = ''
|
|
3751
|
+
}
|
|
3752
|
+
} catch (err) {
|
|
3753
|
+
console.error(err);
|
|
3754
|
+
if(err.status == 502 || err.status== 404) {
|
|
3755
|
+
this.roomCallBack(2, '连接服务器失败','SYS-02')
|
|
3756
|
+
}
|
|
3757
|
+
}
|
|
3758
|
+
}
|
|
3721
3759
|
isFileSuccuse = () => {
|
|
3722
3760
|
if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
|
|
3723
3761
|
this.messageClick('当前程序异常请先退出重开', 'error')
|
|
@@ -6073,7 +6111,11 @@ class Video extends Component {
|
|
|
6073
6111
|
{!this.state.loading && this.state.sessionType && this.state.sessionId?
|
|
6074
6112
|
<div className='QRCode'>
|
|
6075
6113
|
<QRCode
|
|
6076
|
-
value={
|
|
6114
|
+
value={JSON.stringify({
|
|
6115
|
+
sessionId:this.state.sessionId,
|
|
6116
|
+
staffId: this.props.tellerAccount,
|
|
6117
|
+
staffName: this.props.staffName
|
|
6118
|
+
})} //value参数为生成二维码的链接
|
|
6077
6119
|
size={110} //二维码的宽高尺寸
|
|
6078
6120
|
fgColor="#000000" //二维码的颜色
|
|
6079
6121
|
/>
|