react_hsbc_teller 1.6.4 → 1.6.7
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 +0 -18
- package/packages/pages/foot/foot.jsx +2 -2
- package/packages/pages/video/video.jsx +109 -97
- package/packages/pages/video/video.less +9 -0
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -241,24 +241,6 @@ class API extends Server{
|
|
|
241
241
|
throw err;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
async finishSession(params = {}){
|
|
245
|
-
try{
|
|
246
|
-
let result = await this.axios('post', '/teller/finish/session', params);
|
|
247
|
-
if(result){
|
|
248
|
-
return result||[];
|
|
249
|
-
}else{
|
|
250
|
-
let err = {
|
|
251
|
-
tip: '',
|
|
252
|
-
response: result,
|
|
253
|
-
data: params,
|
|
254
|
-
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
255
|
-
}
|
|
256
|
-
throw err;
|
|
257
|
-
}
|
|
258
|
-
}catch(err){
|
|
259
|
-
throw err;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
244
|
/**
|
|
263
245
|
* 用途:发送客户姓名给行内
|
|
264
246
|
* 返回200表示成功
|
|
@@ -148,14 +148,14 @@ export default class foot extends Component {
|
|
|
148
148
|
</div>
|
|
149
149
|
</div>
|
|
150
150
|
}
|
|
151
|
-
{
|
|
151
|
+
{/* {
|
|
152
152
|
item == 'BEAUTY' && <div className="one" onClick={this.beautyClick.bind(this)}>
|
|
153
153
|
<img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
|
|
154
154
|
<div className="text">
|
|
155
155
|
{beautyName}
|
|
156
156
|
</div>
|
|
157
157
|
</div>
|
|
158
|
-
}
|
|
158
|
+
} */}
|
|
159
159
|
</div>
|
|
160
160
|
|
|
161
161
|
})
|
|
@@ -430,9 +430,9 @@ class Video extends Component {
|
|
|
430
430
|
{
|
|
431
431
|
tag: 'projectionWhiteboard',
|
|
432
432
|
xPosition: 0,
|
|
433
|
-
yPosition:
|
|
434
|
-
width:
|
|
435
|
-
height:
|
|
433
|
+
yPosition: 175,
|
|
434
|
+
width: 960,
|
|
435
|
+
height: 540
|
|
436
436
|
},
|
|
437
437
|
// {
|
|
438
438
|
// tag: 'VIDEO_SOURCE_SCREEN_ONE',
|
|
@@ -452,43 +452,43 @@ class Video extends Component {
|
|
|
452
452
|
tag: 'tag1',
|
|
453
453
|
xPosition: 0,
|
|
454
454
|
yPosition: 0,
|
|
455
|
-
width:
|
|
456
|
-
height:
|
|
455
|
+
width: 213,
|
|
456
|
+
height: 175
|
|
457
457
|
},
|
|
458
458
|
{
|
|
459
459
|
tag: 'customer1',
|
|
460
|
-
xPosition:
|
|
460
|
+
xPosition: 213,
|
|
461
461
|
yPosition: 0,
|
|
462
|
-
width:
|
|
463
|
-
height:
|
|
462
|
+
width: 213,
|
|
463
|
+
height: 175
|
|
464
464
|
},
|
|
465
465
|
{
|
|
466
466
|
tag: 'customer2',
|
|
467
|
-
xPosition:
|
|
467
|
+
xPosition: 426,
|
|
468
468
|
yPosition: 0,
|
|
469
|
-
width:
|
|
470
|
-
height:
|
|
469
|
+
width: 213,
|
|
470
|
+
height: 175
|
|
471
471
|
},
|
|
472
472
|
{
|
|
473
473
|
tag: 'customer3',
|
|
474
|
-
xPosition:
|
|
474
|
+
xPosition: 639,
|
|
475
475
|
yPosition: 0,
|
|
476
|
-
width:
|
|
477
|
-
height:
|
|
476
|
+
width: 213,
|
|
477
|
+
height: 175
|
|
478
478
|
},
|
|
479
479
|
{
|
|
480
480
|
tag: 'customer4',
|
|
481
|
-
xPosition:
|
|
481
|
+
xPosition: 852,
|
|
482
482
|
yPosition: 0,
|
|
483
|
-
width:
|
|
484
|
-
height:
|
|
483
|
+
width: 213,
|
|
484
|
+
height: 175
|
|
485
485
|
},
|
|
486
486
|
{
|
|
487
487
|
tag: 'customer5',
|
|
488
|
-
xPosition:
|
|
488
|
+
xPosition: 1065,
|
|
489
489
|
yPosition: 0,
|
|
490
|
-
width:
|
|
491
|
-
height:
|
|
490
|
+
width: 213,
|
|
491
|
+
height: 175
|
|
492
492
|
},
|
|
493
493
|
// {
|
|
494
494
|
// tag: 'customer6',
|
|
@@ -542,17 +542,25 @@ class Video extends Component {
|
|
|
542
542
|
width: item.width,
|
|
543
543
|
height: item.height
|
|
544
544
|
})
|
|
545
|
-
}) :
|
|
545
|
+
}) :
|
|
546
|
+
list.push({
|
|
546
547
|
tag: 'VIDEO_SOURCE_SCREEN',
|
|
547
|
-
xPosition:
|
|
548
|
-
yPosition:
|
|
549
|
-
width:
|
|
550
|
-
height:
|
|
548
|
+
xPosition: 960,
|
|
549
|
+
yPosition: 535,
|
|
550
|
+
width: 320,
|
|
551
|
+
height: 180
|
|
551
552
|
})
|
|
553
|
+
// list.push({
|
|
554
|
+
// tag: 'VIDEO_SOURCE_SCREEN_19_9',
|
|
555
|
+
// xPosition: 960,
|
|
556
|
+
// yPosition: 573,
|
|
557
|
+
// width: 304,
|
|
558
|
+
// height: 144
|
|
559
|
+
// })
|
|
552
560
|
const filePath = 'recordId_' + new Date().valueOf();
|
|
553
561
|
const recordParam = {};
|
|
554
|
-
recordParam.width =
|
|
555
|
-
recordParam.height =
|
|
562
|
+
recordParam.width = 1280;
|
|
563
|
+
recordParam.height = 720;
|
|
556
564
|
recordParam.recordTotalStream = 0;
|
|
557
565
|
recordParam.startTimeout = 10;
|
|
558
566
|
recordParam.splitType = 0;
|
|
@@ -564,7 +572,7 @@ class Video extends Component {
|
|
|
564
572
|
type: 1, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
|
|
565
573
|
id: 1, // ⽔印 ID
|
|
566
574
|
enable: true,
|
|
567
|
-
xPosition:
|
|
575
|
+
xPosition: 1000, // x 轴位置
|
|
568
576
|
yPosition: 10, // y 轴位置
|
|
569
577
|
text: '', // ⽔印⽂字
|
|
570
578
|
fontSize: 16, // 字体⼤⼩
|
|
@@ -614,6 +622,8 @@ class Video extends Component {
|
|
|
614
622
|
contrastFaceVerify = async () => {
|
|
615
623
|
try {
|
|
616
624
|
let result = await API.contrastFaceVerify({
|
|
625
|
+
staffId: this.props.tellerAccount,
|
|
626
|
+
activityId: this.props.businessNumber,
|
|
617
627
|
appAccount: this.state.faceCustomerUid,
|
|
618
628
|
sessionId: this.state.sessionId,
|
|
619
629
|
fileBase64: this.state.facialImg.replace(/^data:image\/\w+;base64,/,"")
|
|
@@ -2031,45 +2041,42 @@ class Video extends Component {
|
|
|
2031
2041
|
this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
|
|
2032
2042
|
console.log('发送失败',msgId,code, msg)
|
|
2033
2043
|
}
|
|
2034
|
-
this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
} else {
|
|
2069
|
-
return stream
|
|
2070
|
-
}
|
|
2044
|
+
// this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
2045
|
+
// console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
2046
|
+
// if (stream_type == "subscribe") {
|
|
2047
|
+
// return stream
|
|
2048
|
+
// }
|
|
2049
|
+
// if (media_type == 2 || media_type == 4) {
|
|
2050
|
+
// return stream
|
|
2051
|
+
// }
|
|
2052
|
+
// if(publish_tag == 'tag1') {
|
|
2053
|
+
// let newStream = stream;
|
|
2054
|
+
// let beauty_strength = beautyNum;
|
|
2055
|
+
// if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
|
|
2056
|
+
// newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
|
|
2057
|
+
// // 清理原始流
|
|
2058
|
+
// newStream.oninactive = function () {
|
|
2059
|
+
// clearOriginStream(stream);
|
|
2060
|
+
// };
|
|
2061
|
+
// newStream.getVideoTracks()[0].onended = function () {
|
|
2062
|
+
// clearOriginStream(stream);
|
|
2063
|
+
// };
|
|
2064
|
+
// function clearOriginStream(stream) {
|
|
2065
|
+
// stream.getTracks().forEach((track) => {
|
|
2066
|
+
// track.stop();
|
|
2067
|
+
// });
|
|
2068
|
+
// stream = null;
|
|
2069
|
+
// }
|
|
2070
|
+
// };
|
|
2071
|
+
// if (stream.getAudioTracks()[0] && newStream.addTrack) {
|
|
2072
|
+
// newStream.addTrack(stream.getAudioTracks()[0])
|
|
2073
|
+
// }
|
|
2074
|
+
// return newStream
|
|
2075
|
+
// } else {
|
|
2076
|
+
// return stream
|
|
2077
|
+
// }
|
|
2071
2078
|
|
|
2072
|
-
}
|
|
2079
|
+
// }
|
|
2073
2080
|
// 发布媒体流成功
|
|
2074
2081
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
2075
2082
|
console.log('发布媒体流成功', sid)
|
|
@@ -2493,9 +2500,9 @@ class Video extends Component {
|
|
|
2493
2500
|
this.test_controller.OnNewJoinerIn = (participant) => {
|
|
2494
2501
|
console.log('新加⼊房间者', participant);
|
|
2495
2502
|
this.state.isCustomer= true
|
|
2496
|
-
let src = autod
|
|
2497
|
-
let audio = new Audio(src)
|
|
2498
|
-
audio.play()
|
|
2503
|
+
// let src = autod
|
|
2504
|
+
// let audio = new Audio(src)
|
|
2505
|
+
// audio.play()
|
|
2499
2506
|
};
|
|
2500
2507
|
// 推送“有新发布”给与会者
|
|
2501
2508
|
this.test_controller.OnNewPublish = (feed) => {
|
|
@@ -2880,9 +2887,9 @@ class Video extends Component {
|
|
|
2880
2887
|
exitType
|
|
2881
2888
|
) => {
|
|
2882
2889
|
console.log('退出房间者', participant, exitType)
|
|
2883
|
-
let src = leftMetting
|
|
2884
|
-
let audio = new Audio(src)
|
|
2885
|
-
audio.play()
|
|
2890
|
+
// let src = leftMetting
|
|
2891
|
+
// let audio = new Audio(src)
|
|
2892
|
+
// audio.play()
|
|
2886
2893
|
this.appGetUsernameClick(participant).then((res)=>{
|
|
2887
2894
|
console.log('退出房间者',res)
|
|
2888
2895
|
let data = res? res.username ? res.username : '客户' : '客户'
|
|
@@ -3208,7 +3215,6 @@ userType:'1'
|
|
|
3208
3215
|
this.state.analyserHeight = this.state.analyserHeight
|
|
3209
3216
|
}
|
|
3210
3217
|
}
|
|
3211
|
-
|
|
3212
3218
|
this.state.OnVolumeAnalyserMap.set(sid,setInterval(
|
|
3213
3219
|
this.test_controller.OnVolumeAnalyser.bind(this, sid, analyser),
|
|
3214
3220
|
300
|
|
@@ -3320,10 +3326,6 @@ userType:'1'
|
|
|
3320
3326
|
}
|
|
3321
3327
|
}
|
|
3322
3328
|
componentWillUnmount() {
|
|
3323
|
-
|
|
3324
|
-
if (this.state.roomCustomerList.length == 0 && this.state.sessionType) {
|
|
3325
|
-
this.finishSessionClick()
|
|
3326
|
-
}
|
|
3327
3329
|
if (this.test_controller&&this.state.sessionType) {
|
|
3328
3330
|
clearStreamRemain()
|
|
3329
3331
|
beautyNum = 0
|
|
@@ -3337,15 +3339,6 @@ userType:'1'
|
|
|
3337
3339
|
}
|
|
3338
3340
|
message.destroy()
|
|
3339
3341
|
}
|
|
3340
|
-
finishSessionClick= async () => {
|
|
3341
|
-
try {
|
|
3342
|
-
let result = await API.finishSession({
|
|
3343
|
-
sessionId: this.state.sessionId,
|
|
3344
|
-
tellerId: this.props.tellerAccount
|
|
3345
|
-
});
|
|
3346
|
-
} catch (err) {
|
|
3347
|
-
}
|
|
3348
|
-
}
|
|
3349
3342
|
finishSession = () => {
|
|
3350
3343
|
// clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
3351
3344
|
this.state.OnVolumeAnalyserMap.forEach((value,key,map)=>{
|
|
@@ -3818,25 +3811,43 @@ userType:'1'
|
|
|
3818
3811
|
isModalVisibleEnd: false
|
|
3819
3812
|
})
|
|
3820
3813
|
};
|
|
3821
|
-
confirmCallback=async()=>{
|
|
3814
|
+
confirmCallback=async(data)=>{
|
|
3822
3815
|
try {
|
|
3823
|
-
let result = await API.
|
|
3816
|
+
let result = await API.confirmCallback({
|
|
3824
3817
|
idCardName: this.state.idCardName,
|
|
3825
3818
|
staffId: this.props.tellerAccount,
|
|
3826
3819
|
activityId: this.props.businessNumber,
|
|
3827
3820
|
appAccount: this.state.faceCustomerUid,
|
|
3828
3821
|
idCardNumber: this.state.idCardNumber,
|
|
3822
|
+
sessionId: this.state.sessionId,
|
|
3829
3823
|
});
|
|
3824
|
+
console.log('confirmCallback',result)
|
|
3830
3825
|
if (result.code == 200) {
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3826
|
+
console.log(data)
|
|
3827
|
+
if(data == 'noFace') {
|
|
3828
|
+
this.setState({
|
|
3829
|
+
isModalVisibleFacial: false,
|
|
3830
|
+
idCardNumber: '',
|
|
3831
|
+
idCardName: ''
|
|
3832
|
+
})
|
|
3833
|
+
} else {
|
|
3834
|
+
console.log('data')
|
|
3835
|
+
this.state.faceCustomerType = 1
|
|
3836
|
+
this.setState({
|
|
3837
|
+
idCardNumber: '',
|
|
3838
|
+
idCardName: '',
|
|
3839
|
+
titleModal: '人脸识别',
|
|
3840
|
+
// clickedFacial: true,
|
|
3841
|
+
facialImg: this.test_controller.TakePicture(1, undefined, undefined, this.state.customOcrSid, 'png')
|
|
3842
|
+
})
|
|
3843
|
+
}
|
|
3844
|
+
|
|
3836
3845
|
} else {
|
|
3846
|
+
console.log('1')
|
|
3837
3847
|
this.messageClick('保持信息失败','error')
|
|
3838
3848
|
}
|
|
3839
3849
|
} catch (err) {
|
|
3850
|
+
console.log('2')
|
|
3840
3851
|
this.messageClick('保持信息失败','error')
|
|
3841
3852
|
}
|
|
3842
3853
|
}
|
|
@@ -3863,9 +3874,9 @@ userType:'1'
|
|
|
3863
3874
|
})
|
|
3864
3875
|
});
|
|
3865
3876
|
this.setState({
|
|
3866
|
-
isModalVisibleFacial: false
|
|
3867
|
-
|
|
3868
|
-
|
|
3877
|
+
// isModalVisibleFacial: false
|
|
3878
|
+
idCardNumber: result.data.idCardNumber,
|
|
3879
|
+
idCardName: result.data.idCardName
|
|
3869
3880
|
})
|
|
3870
3881
|
} else {
|
|
3871
3882
|
this.messageClick('识别失败','error')
|
|
@@ -5289,7 +5300,8 @@ userType:'1'
|
|
|
5289
5300
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
|
|
5290
5301
|
</div>,
|
|
5291
5302
|
this.state.idCardName && <div key='facial'>
|
|
5292
|
-
|
|
5303
|
+
<Button className="modelButtonFaceOk" danger onClick={(e)=>this.confirmCallback('face')}>完成并发起人脸识别</Button>
|
|
5304
|
+
<Button className="modelButtonOk" type="primary" danger onClick={(e)=>this.confirmCallback('noFace')}>完成</Button>
|
|
5293
5305
|
</div>
|
|
5294
5306
|
]}>
|
|
5295
5307
|
<div className="faceBody">
|
|
@@ -378,6 +378,15 @@
|
|
|
378
378
|
background: #DB0011!important;
|
|
379
379
|
border-spacing: 20px!important;
|
|
380
380
|
}
|
|
381
|
+
.modelButtonFaceOk{
|
|
382
|
+
width: 170px!important;
|
|
383
|
+
height: 40px!important;
|
|
384
|
+
font-size: 16px!important;
|
|
385
|
+
color: #333!important;
|
|
386
|
+
border: 1px #333 solid!important;
|
|
387
|
+
background: #fff!important;
|
|
388
|
+
border-spacing: 20px!important;
|
|
389
|
+
}
|
|
381
390
|
.endModal{
|
|
382
391
|
font-size: 16px;
|
|
383
392
|
padding: 56px 30px 0px 30px;
|