react_hsbc_teller 2.0.13 → 2.0.15
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 +25 -1
- package/packages/pages/video/video.jsx +88 -55
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -492,7 +492,31 @@ class API extends Server{
|
|
|
492
492
|
throw err;
|
|
493
493
|
}
|
|
494
494
|
}
|
|
495
|
-
|
|
495
|
+
/**
|
|
496
|
+
* 用途:查询分行名称
|
|
497
|
+
* @url https://api.cangdu.org/shopro/data/products
|
|
498
|
+
* 返回http_code为200表示成功
|
|
499
|
+
* @method post
|
|
500
|
+
* @return {promise}
|
|
501
|
+
*/
|
|
502
|
+
async getBranchName(params = {}){
|
|
503
|
+
try{
|
|
504
|
+
let result = await this.axios('get', '/hsbc/getBranchName?branchCode=' + params.branchCode, params);
|
|
505
|
+
if(result && (result.data instanceof Object) && result.code === 200){
|
|
506
|
+
return result.data||[];
|
|
507
|
+
}else{
|
|
508
|
+
let err = {
|
|
509
|
+
tip: '分行名称获取失败',
|
|
510
|
+
response: result,
|
|
511
|
+
data: params,
|
|
512
|
+
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
513
|
+
}
|
|
514
|
+
throw err;
|
|
515
|
+
}
|
|
516
|
+
}catch(err){
|
|
517
|
+
throw err;
|
|
518
|
+
}
|
|
519
|
+
}
|
|
496
520
|
/**
|
|
497
521
|
* 用途:人脸识别
|
|
498
522
|
* @url https://elm.cangdu.org/v1/addimg/shop
|
|
@@ -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.15'
|
|
57
57
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
58
58
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
59
59
|
const { Option } = Select;
|
|
@@ -367,21 +367,20 @@ class Video extends Component {
|
|
|
367
367
|
this.state.imRoomId = result.imRoomId,
|
|
368
368
|
this.state.sessionId = result.sessionId;
|
|
369
369
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
})
|
|
370
|
+
let publish_config = {}
|
|
371
|
+
publish_config.media_type = 1
|
|
372
|
+
publish_config.publish_device = 1
|
|
373
|
+
publish_config.videoSource = this.state.cameraValue
|
|
374
|
+
publish_config.audioSource = this.state.microphoneValue
|
|
375
|
+
publish_config.need_volume_analyser = true
|
|
376
|
+
// publish_config.video_profile_type = 3
|
|
377
|
+
publish_config.video_profile_type = 100
|
|
378
|
+
publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
|
|
379
|
+
publish_config.publish_video_id = 'publish_video1'
|
|
380
|
+
publish_config.publish_streamId_id = 'publish_streamId1'
|
|
381
|
+
publish_config.publish_tag = 'tag1'
|
|
382
|
+
this.test_controller.Publish(publish_config)
|
|
383
|
+
|
|
385
384
|
// this.publishAllScreen();
|
|
386
385
|
// 单独发布录制屏幕设备的流
|
|
387
386
|
this.publishRecorderDevice()
|
|
@@ -522,16 +521,16 @@ class Video extends Component {
|
|
|
522
521
|
publish_streamId_id: 'publish_streamId1',
|
|
523
522
|
publish_tag: 'tag1'
|
|
524
523
|
},
|
|
525
|
-
{
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
},
|
|
530
|
-
{
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
}
|
|
524
|
+
// {
|
|
525
|
+
// publish_video_id: 'publish_video2',
|
|
526
|
+
// publish_streamId_id: 'publish_streamId2',
|
|
527
|
+
// publish_tag: 'tag2'
|
|
528
|
+
// },
|
|
529
|
+
// {
|
|
530
|
+
// publish_video_id: 'publish_video3',
|
|
531
|
+
// publish_streamId_id: 'publish_streamId3',
|
|
532
|
+
// publish_tag: 'tag3'
|
|
533
|
+
// }
|
|
535
534
|
];
|
|
536
535
|
config_param.initSubscribe = [
|
|
537
536
|
{
|
|
@@ -567,6 +566,8 @@ class Video extends Component {
|
|
|
567
566
|
];
|
|
568
567
|
this.test_controller.InitRoomConfig(config_param)
|
|
569
568
|
this.saveLog('mrtc InitRoomConfig start')
|
|
569
|
+
// 预热摄像头
|
|
570
|
+
this.test_controller.PreOpenLocalMedia(config_param)
|
|
570
571
|
};
|
|
571
572
|
rateAll = async () => {
|
|
572
573
|
let data = ''
|
|
@@ -617,42 +618,42 @@ class Video extends Component {
|
|
|
617
618
|
height: 175
|
|
618
619
|
},
|
|
619
620
|
{
|
|
620
|
-
tag: '
|
|
621
|
+
tag: 'customer1',
|
|
621
622
|
xPosition: 213,
|
|
622
623
|
yPosition: 0,
|
|
623
624
|
width: 213,
|
|
624
625
|
height: 175
|
|
625
626
|
},
|
|
626
627
|
{
|
|
627
|
-
tag: '
|
|
628
|
+
tag: 'customer2',
|
|
628
629
|
xPosition: 426,
|
|
629
630
|
yPosition: 0,
|
|
630
631
|
width: 213,
|
|
631
632
|
height: 175
|
|
632
633
|
},
|
|
633
634
|
{
|
|
634
|
-
tag: '
|
|
635
|
+
tag: 'customer3',
|
|
635
636
|
xPosition: 639,
|
|
636
637
|
yPosition: 0,
|
|
637
638
|
width: 213,
|
|
638
639
|
height: 175
|
|
639
640
|
},
|
|
640
641
|
{
|
|
641
|
-
tag: '
|
|
642
|
+
tag: 'customer4',
|
|
642
643
|
xPosition: 852,
|
|
643
644
|
yPosition: 0,
|
|
644
645
|
width: 213,
|
|
645
646
|
height: 175
|
|
646
647
|
},
|
|
647
648
|
{
|
|
648
|
-
tag: '
|
|
649
|
+
tag: 'customer5',
|
|
649
650
|
xPosition: 1065,
|
|
650
651
|
yPosition: 0,
|
|
651
652
|
width: 213,
|
|
652
653
|
height: 175
|
|
653
654
|
},
|
|
654
655
|
{
|
|
655
|
-
tag: '
|
|
656
|
+
tag: 'customer6',
|
|
656
657
|
xPosition: 1278,
|
|
657
658
|
yPosition: 0,
|
|
658
659
|
width: 213,
|
|
@@ -707,7 +708,7 @@ class Video extends Component {
|
|
|
707
708
|
enable: true,
|
|
708
709
|
xPosition: 640, // x 轴位置
|
|
709
710
|
yPosition: 10, // y 轴位置
|
|
710
|
-
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.props.financialOffice || ''}`,
|
|
711
|
+
text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
|
|
711
712
|
fontSize: 16, // 字体⼤⼩
|
|
712
713
|
url: '' // ⽔印图⽚ HTTP 地址
|
|
713
714
|
},
|
|
@@ -1326,10 +1327,12 @@ class Video extends Component {
|
|
|
1326
1327
|
}
|
|
1327
1328
|
|
|
1328
1329
|
}
|
|
1330
|
+
cobj.fillStyle = '#333333';
|
|
1331
|
+
cobj.fillRect(0, 0, 640, baseStartHeight)
|
|
1329
1332
|
// 录制中状态
|
|
1330
1333
|
if (this.state.businessRecordId) {
|
|
1331
1334
|
let str = '· 录制中'
|
|
1332
|
-
cobj.fillStyle = '#F8F2F3';
|
|
1335
|
+
// cobj.fillStyle = '#F8F2F3';
|
|
1333
1336
|
cobj.font = "normal lighter 30px sans-serif";
|
|
1334
1337
|
// cobj.fillRect(0, 0, 640, recordBoxHeight)
|
|
1335
1338
|
cobj.textAlign = 'center';
|
|
@@ -2084,21 +2087,20 @@ class Video extends Component {
|
|
|
2084
2087
|
this.test_controller.OnJoinRoomSucc = () => {
|
|
2085
2088
|
console.log('加入房间成功')
|
|
2086
2089
|
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2094
|
-
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
})
|
|
2090
|
+
let publish_config = {}
|
|
2091
|
+
publish_config.media_type = 1
|
|
2092
|
+
publish_config.publish_device = 1
|
|
2093
|
+
publish_config.videoSource = this.state.cameraValue
|
|
2094
|
+
publish_config.audioSource = this.state.microphoneValue
|
|
2095
|
+
publish_config.need_volume_analyser = true
|
|
2096
|
+
// publish_config.video_profile_type = 3
|
|
2097
|
+
publish_config.video_profile_type = 100
|
|
2098
|
+
publish_config.video_profile_diy = { width: 640, height: 360, frameRate: 15, bitrate: 400 }
|
|
2099
|
+
publish_config.publish_video_id = 'publish_video1'
|
|
2100
|
+
publish_config.publish_streamId_id = 'publish_streamId1'
|
|
2101
|
+
publish_config.publish_tag = 'tag1'
|
|
2102
|
+
this.test_controller.Publish(publish_config)
|
|
2103
|
+
|
|
2102
2104
|
// this.publishAllScreen();
|
|
2103
2105
|
// 单独发布录制屏幕设备的流
|
|
2104
2106
|
this.publishRecorderDevice()
|
|
@@ -2669,7 +2671,7 @@ class Video extends Component {
|
|
|
2669
2671
|
console.log('退出房间者', res)
|
|
2670
2672
|
let data = res ? res.username ? res.username : '客户' : '客户'
|
|
2671
2673
|
console.log(data)
|
|
2672
|
-
this.messageClick((data + '已退出会议'), 'error')
|
|
2674
|
+
// this.messageClick((data + '已退出会议'), 'error')
|
|
2673
2675
|
this.saveLog(data + ' leave room')
|
|
2674
2676
|
if (res.userType == 1) {
|
|
2675
2677
|
// 2--坐席 1--客户
|
|
@@ -2682,12 +2684,14 @@ class Video extends Component {
|
|
|
2682
2684
|
let audio = new Audio(src)
|
|
2683
2685
|
audio.play()
|
|
2684
2686
|
}
|
|
2687
|
+
this.messageClick(('客户已退出会议'), 'error')
|
|
2685
2688
|
} else if (res.userType == 2) {
|
|
2686
2689
|
if (this.props.isOpenSound) {
|
|
2687
2690
|
let src = internalLeft
|
|
2688
2691
|
let audio = new Audio(src)
|
|
2689
2692
|
audio.play()
|
|
2690
2693
|
}
|
|
2694
|
+
this.messageClick(('内部人员已退出会议'), 'error')
|
|
2691
2695
|
}
|
|
2692
2696
|
// console.log('退出房间者',res)
|
|
2693
2697
|
// let data = res? res : '客户'
|
|
@@ -3449,6 +3453,21 @@ class Video extends Component {
|
|
|
3449
3453
|
this.roomCallBack(2, '获取tiken失败', 'SYS-01')
|
|
3450
3454
|
}
|
|
3451
3455
|
}
|
|
3456
|
+
queryBranchName = async () => {
|
|
3457
|
+
try {
|
|
3458
|
+
let result = await API.getBranchName({
|
|
3459
|
+
branchCode: this.props.salesBranchCode
|
|
3460
|
+
})
|
|
3461
|
+
this.setState({
|
|
3462
|
+
branchName: result.branchName || ''
|
|
3463
|
+
})
|
|
3464
|
+
console.log('branchName', this.state.branchName)
|
|
3465
|
+
} catch (err) {
|
|
3466
|
+
console.error(err);
|
|
3467
|
+
|
|
3468
|
+
}
|
|
3469
|
+
}
|
|
3470
|
+
|
|
3452
3471
|
getRoomStatus = async data => {
|
|
3453
3472
|
try {
|
|
3454
3473
|
let result = await API.getRoomStatus({
|
|
@@ -3647,6 +3666,10 @@ class Video extends Component {
|
|
|
3647
3666
|
} else {
|
|
3648
3667
|
this.addToScript()
|
|
3649
3668
|
}
|
|
3669
|
+
|
|
3670
|
+
if (this.props.salesBranchCode) {
|
|
3671
|
+
this.queryBranchName()
|
|
3672
|
+
}
|
|
3650
3673
|
}
|
|
3651
3674
|
|
|
3652
3675
|
voice = () => {
|
|
@@ -5317,6 +5340,16 @@ class Video extends Component {
|
|
|
5317
5340
|
envInfo: envInfo
|
|
5318
5341
|
})
|
|
5319
5342
|
}
|
|
5343
|
+
handleRetryEnvDetection = () => {
|
|
5344
|
+
this.lightDetect();
|
|
5345
|
+
message.success({
|
|
5346
|
+
content: '已更新检测结果',
|
|
5347
|
+
icon: <img src={require("../../assets/img/tooltips1_pass.png").default} alt="" ></img>,
|
|
5348
|
+
className: 'successClassName',
|
|
5349
|
+
top: 200,
|
|
5350
|
+
duration: 3
|
|
5351
|
+
})
|
|
5352
|
+
}
|
|
5320
5353
|
handleOkEnvDetection = () => {
|
|
5321
5354
|
this.setState({
|
|
5322
5355
|
isModalVisibleEnvironment: false,
|
|
@@ -6091,7 +6124,7 @@ class Video extends Component {
|
|
|
6091
6124
|
</div>
|
|
6092
6125
|
|
|
6093
6126
|
</div>
|
|
6094
|
-
{
|
|
6127
|
+
{/* {
|
|
6095
6128
|
this.state.cameraList.map((item, index) => {
|
|
6096
6129
|
if (index > 0)
|
|
6097
6130
|
return <div
|
|
@@ -6124,7 +6157,7 @@ class Video extends Component {
|
|
|
6124
6157
|
</div>
|
|
6125
6158
|
</div>
|
|
6126
6159
|
})
|
|
6127
|
-
}
|
|
6160
|
+
} */}
|
|
6128
6161
|
{/* <div className={`itemed ${this.state.isVideoList? 'videoMinutuListClass': 'videoMinutuClass'}`}
|
|
6129
6162
|
style={{ position: "relative", display: (this.state.videoList[0].videoName) ? '' : 'none' }}
|
|
6130
6163
|
>
|
|
@@ -6606,7 +6639,7 @@ class Video extends Component {
|
|
|
6606
6639
|
</Modal>
|
|
6607
6640
|
<Modal title="环境检测" maskClosable={false} width={650} closable={false} centered={true} visible={this.state.isModalVisibleEnvironment} footer={[
|
|
6608
6641
|
<div key='env'>
|
|
6609
|
-
|
|
6642
|
+
<Button className="modelButtonCancel" onClick={this.handleRetryEnvDetection}>重新检测</Button>
|
|
6610
6643
|
<Button className={isEnvironmentOK ?"modelButtonOk": "modelButtonNo"} type="primary" disabled={!isEnvironmentOK } danger onClick={this.handleOkEnvDetection}>确定</Button>
|
|
6611
6644
|
</div>
|
|
6612
6645
|
]}>
|
|
@@ -6632,7 +6665,7 @@ class Video extends Component {
|
|
|
6632
6665
|
</div>
|
|
6633
6666
|
})
|
|
6634
6667
|
}
|
|
6635
|
-
{this.state.cameraList.length == 0 ? <p className="envClass"
|
|
6668
|
+
{this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的摄像头权限是否开启,并重启浏览器再试</p> : null}
|
|
6636
6669
|
</div>
|
|
6637
6670
|
</Panel>
|
|
6638
6671
|
<Panel header={<span>麦克风设备 - {this.state.envInfo.microResult} {this.state.envInfo.microResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>} key="4" className={this.state.envInfo.microResult=='不合格'? 'panel-error':''}>
|
|
@@ -6644,7 +6677,7 @@ class Video extends Component {
|
|
|
6644
6677
|
</div>
|
|
6645
6678
|
})
|
|
6646
6679
|
}
|
|
6647
|
-
{this.state.cameraList.length == 0 ? <p className="envClass"
|
|
6680
|
+
{this.state.cameraList.length == 0 ? <p className="envClass">获取不到设备,请检查电脑“设置”中的麦克风权限是否开启,并重启浏览器再试</p> : null}
|
|
6648
6681
|
</div>
|
|
6649
6682
|
</Panel>
|
|
6650
6683
|
<Panel header={<span>背光、曝光 - {this.state.envInfo.lightResult} {this.state.envInfo.lightResult=='合格'? <img src={IconSuccess} />: <img src={IconFail} />}</span>} key="6" className={this.state.envInfo.lightResult=='合格'? '':'panel-error'}>
|