react_hsbc_teller 1.6.1 → 1.6.4
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/config/webpack.config.js +2 -2
- package/config/webpack.prod.js +2 -2
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/api/api.js +19 -0
- package/packages/assets/img/meiyan.png +0 -0
- package/packages/pages/foot/foot.jsx +12 -1
- package/packages/pages/video/video.jsx +212 -46
- package/packages/pages/video/video.less +20 -0
- package/lib/57be580f59e8862a94d62c486df4e83d.mp3 +0 -0
- package/lib/5a8892b3bd09dc784456b3c06de351d6.mp3 +0 -0
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -2,6 +2,25 @@ import Server from './server';
|
|
|
2
2
|
|
|
3
3
|
class API extends Server{
|
|
4
4
|
|
|
5
|
+
async confirmCallback(params = {}){
|
|
6
|
+
// return this.axios('get', '/lang/select/2', params);
|
|
7
|
+
try{
|
|
8
|
+
let result = await this.axios('post', '/hsbc/identify/ocr/confirmCallback', params);
|
|
9
|
+
if(result && (result.data instanceof Object) && result.code === 200){
|
|
10
|
+
return result||[];
|
|
11
|
+
}else{
|
|
12
|
+
let err = {
|
|
13
|
+
tip: '服务异常',
|
|
14
|
+
response: result,
|
|
15
|
+
data: params,
|
|
16
|
+
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
17
|
+
}
|
|
18
|
+
throw err;
|
|
19
|
+
}
|
|
20
|
+
}catch(err){
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
5
24
|
async updateMeetingInfo(params = {}){
|
|
6
25
|
// return this.axios('get', '/lang/select/2', params);
|
|
7
26
|
try{
|
|
Binary file
|
|
@@ -50,8 +50,11 @@ export default class foot extends Component {
|
|
|
50
50
|
switchExternal=()=>{
|
|
51
51
|
this.props.switchExternal()
|
|
52
52
|
}
|
|
53
|
+
beautyClick=()=>{
|
|
54
|
+
this.props.beautyClick()
|
|
55
|
+
}
|
|
53
56
|
render() {
|
|
54
|
-
const {clickedOcr,clickedFacial,img,isWhiteboard,cameraImg,isTranscribing ,screenName,suspendName,customerList,menus,voiceName} = this.props
|
|
57
|
+
const {clickedOcr,clickedFacial,img,isWhiteboard,cameraImg,isTranscribing ,screenName,suspendName,customerList,menus,voiceName,beautyName} = this.props
|
|
55
58
|
const content = (
|
|
56
59
|
<div>
|
|
57
60
|
{customerList.map((item,index)=>{
|
|
@@ -144,6 +147,14 @@ export default class foot extends Component {
|
|
|
144
147
|
开启视频画中画
|
|
145
148
|
</div>
|
|
146
149
|
</div>
|
|
150
|
+
}
|
|
151
|
+
{
|
|
152
|
+
item == 'BEAUTY' && <div className="one" onClick={this.beautyClick.bind(this)}>
|
|
153
|
+
<img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
|
|
154
|
+
<div className="text">
|
|
155
|
+
{beautyName}
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
147
158
|
}
|
|
148
159
|
</div>
|
|
149
160
|
|
|
@@ -39,7 +39,29 @@ let streamShare
|
|
|
39
39
|
let muteJson = new Map()
|
|
40
40
|
let dateTime = 0
|
|
41
41
|
let messageValue = ''
|
|
42
|
+
let beautyNum = 0 // 0-关闭 1--弱 2--中 5---高
|
|
42
43
|
let rateList = []
|
|
44
|
+
let beautyDiv = {};
|
|
45
|
+
function clearStreamRemain() {
|
|
46
|
+
if (!(beautyDiv.beauty_canvas == null || beautyDiv.beauty_canvas == undefined)) {
|
|
47
|
+
beautyDiv.beauty_canvas = null;
|
|
48
|
+
}
|
|
49
|
+
if (!(beautyDiv.beauty_player == null || beautyDiv.beauty_player == undefined)) {
|
|
50
|
+
beautyDiv.beauty_player.destroy();
|
|
51
|
+
beautyDiv.beauty_player = null;
|
|
52
|
+
}
|
|
53
|
+
if (!(beautyDiv.beauty_div == null || beautyDiv.beauty_div == undefined)) {
|
|
54
|
+
document.body.removeChild(beautyDiv.beauty_div);
|
|
55
|
+
beautyDiv.beauty_div = null;
|
|
56
|
+
}
|
|
57
|
+
beautyDiv = {};
|
|
58
|
+
};
|
|
59
|
+
function startBeauty(stream) {
|
|
60
|
+
let newStream = stream;
|
|
61
|
+
beautyDiv = meetingBeautifyStream(newStream, beautyNum);
|
|
62
|
+
newStream = beautyDiv.stream;
|
|
63
|
+
return newStream
|
|
64
|
+
}
|
|
43
65
|
message.config({
|
|
44
66
|
getContainer: ()=>document.getElementById('allHSBC')
|
|
45
67
|
})
|
|
@@ -50,6 +72,7 @@ class Video extends Component {
|
|
|
50
72
|
}
|
|
51
73
|
cancel = axios.CancelToken.source()
|
|
52
74
|
state = {
|
|
75
|
+
beautyName: '开启美颜',
|
|
53
76
|
signNoClick: false,
|
|
54
77
|
listVideoPicture: [],
|
|
55
78
|
isScreenSwitching: false,
|
|
@@ -189,6 +212,8 @@ class Video extends Component {
|
|
|
189
212
|
}
|
|
190
213
|
],
|
|
191
214
|
shareMaskState: false,
|
|
215
|
+
idCardName: '',
|
|
216
|
+
idCardNumber: ''
|
|
192
217
|
};
|
|
193
218
|
// eslint-disable-next-line no-undef
|
|
194
219
|
test_controller = '';
|
|
@@ -564,6 +589,28 @@ class Video extends Component {
|
|
|
564
589
|
})
|
|
565
590
|
}
|
|
566
591
|
};
|
|
592
|
+
// contrastFaceVerify=()=>{
|
|
593
|
+
// axios({
|
|
594
|
+
// method: 'post',
|
|
595
|
+
// url: 'http://182.92.184.31:8868/verify/face',
|
|
596
|
+
// data: { // 这⾥data中的参数为requestBody参数,服务端需要使⽤@RequestBody注解进⾏获取
|
|
597
|
+
// "username":"王明珍",
|
|
598
|
+
// "num":"410425199510201037",
|
|
599
|
+
// "fileBase64":this.state.facialImg.replace(/^data:image\/\w+;base64,/,"")
|
|
600
|
+
// }
|
|
601
|
+
// }).then((response) =>{
|
|
602
|
+
// console.log(response.data);
|
|
603
|
+
// if(response.data.code == 200){
|
|
604
|
+
// this.messageClick('人脸识别成功','success')
|
|
605
|
+
// this.setState({
|
|
606
|
+
// isModalVisibleFacial: false
|
|
607
|
+
// })
|
|
608
|
+
// } else {
|
|
609
|
+
// this.messageClick('人脸识别失败','error')
|
|
610
|
+
// }
|
|
611
|
+
// }).catch(function (error) {
|
|
612
|
+
// })
|
|
613
|
+
// }
|
|
567
614
|
contrastFaceVerify = async () => {
|
|
568
615
|
try {
|
|
569
616
|
let result = await API.contrastFaceVerify({
|
|
@@ -630,10 +677,10 @@ class Video extends Component {
|
|
|
630
677
|
list.push({
|
|
631
678
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
|
|
632
679
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
|
|
633
|
-
name: this.state.videoOneName + '--OCR',
|
|
680
|
+
name: this.state.videoOneName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
634
681
|
tourist: false
|
|
635
682
|
})
|
|
636
|
-
if(this.state.videoOneName.indexOf("客户") == -1) {
|
|
683
|
+
if(this.state.videoOneName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
637
684
|
list.push({
|
|
638
685
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).feedId,
|
|
639
686
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId1").innerText).uid,
|
|
@@ -648,10 +695,10 @@ class Video extends Component {
|
|
|
648
695
|
list.push({
|
|
649
696
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
|
|
650
697
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
|
|
651
|
-
name: this.state.videoTwoName + '--OCR',
|
|
698
|
+
name: this.state.videoTwoName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
652
699
|
tourist: false
|
|
653
700
|
})
|
|
654
|
-
if(this.state.videoTwoName.indexOf("客户") == -1) {
|
|
701
|
+
if(this.state.videoTwoName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
655
702
|
list.push({
|
|
656
703
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).feedId,
|
|
657
704
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId2").innerText).uid,
|
|
@@ -666,10 +713,10 @@ class Video extends Component {
|
|
|
666
713
|
list.push({
|
|
667
714
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
|
|
668
715
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
|
|
669
|
-
name: this.state.videoThreeName + '--OCR',
|
|
716
|
+
name: this.state.videoThreeName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
670
717
|
tourist: false
|
|
671
718
|
})
|
|
672
|
-
if(this.state.videoThreeName.indexOf("客户") == -1) {
|
|
719
|
+
if(this.state.videoThreeName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
673
720
|
list.push({
|
|
674
721
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).feedId,
|
|
675
722
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId3").innerText).uid,
|
|
@@ -684,10 +731,10 @@ class Video extends Component {
|
|
|
684
731
|
list.push({
|
|
685
732
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
|
|
686
733
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
|
|
687
|
-
name: this.state.videoFourName + '--OCR',
|
|
734
|
+
name: this.state.videoFourName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
688
735
|
tourist: false
|
|
689
736
|
})
|
|
690
|
-
if(this.state.videoFourName.indexOf("客户") == -1) {
|
|
737
|
+
if(this.state.videoFourName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
691
738
|
list.push({
|
|
692
739
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).feedId,
|
|
693
740
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId4").innerText).uid,
|
|
@@ -702,10 +749,10 @@ class Video extends Component {
|
|
|
702
749
|
list.push({
|
|
703
750
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
|
|
704
751
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
|
|
705
|
-
name: this.state.videoFiveName + '--OCR',
|
|
752
|
+
name: this.state.videoFiveName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
706
753
|
tourist: false
|
|
707
754
|
})
|
|
708
|
-
if(this.state.videoFiveName.indexOf("客户") == -1) {
|
|
755
|
+
if(this.state.videoFiveName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
709
756
|
list.push({
|
|
710
757
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).feedId,
|
|
711
758
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId5").innerText).uid,
|
|
@@ -719,10 +766,10 @@ class Video extends Component {
|
|
|
719
766
|
list.push({
|
|
720
767
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
|
|
721
768
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
|
|
722
|
-
name: this.state.videoSixName + '--OCR',
|
|
769
|
+
name: this.state.videoSixName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
723
770
|
tourist: false
|
|
724
771
|
})
|
|
725
|
-
if(this.state.videoSixName.indexOf("客户") == -1) {
|
|
772
|
+
if(this.state.videoSixName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
726
773
|
list.push({
|
|
727
774
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).feedId,
|
|
728
775
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId6").innerText).uid,
|
|
@@ -735,10 +782,10 @@ class Video extends Component {
|
|
|
735
782
|
list.push({
|
|
736
783
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).feedId,
|
|
737
784
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid,
|
|
738
|
-
name: this.state.videoSevenName + '--OCR',
|
|
785
|
+
name: this.state.videoSevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
739
786
|
tourist: false
|
|
740
787
|
})
|
|
741
|
-
if(this.state.videoSevenName.indexOf("客户") == -1) {
|
|
788
|
+
if(this.state.videoSevenName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
742
789
|
list.push({
|
|
743
790
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).feedId,
|
|
744
791
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId7").innerText).uid,
|
|
@@ -751,10 +798,10 @@ class Video extends Component {
|
|
|
751
798
|
list.push({
|
|
752
799
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).feedId,
|
|
753
800
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid,
|
|
754
|
-
name: this.state.videoEightName + '--OCR',
|
|
801
|
+
name: this.state.videoEightName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
755
802
|
tourist: false
|
|
756
803
|
})
|
|
757
|
-
if(this.state.videoEightName.indexOf("客户") == -1) {
|
|
804
|
+
if(this.state.videoEightName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
758
805
|
list.push({
|
|
759
806
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).feedId,
|
|
760
807
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId8").innerText).uid,
|
|
@@ -767,10 +814,10 @@ class Video extends Component {
|
|
|
767
814
|
list.push({
|
|
768
815
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).feedId,
|
|
769
816
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid,
|
|
770
|
-
name: this.state.videoNineName + '--OCR',
|
|
817
|
+
name: this.state.videoNineName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
771
818
|
tourist: false
|
|
772
819
|
})
|
|
773
|
-
if(this.state.videoNineName.indexOf("客户") == -1) {
|
|
820
|
+
if(this.state.videoNineName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
774
821
|
list.push({
|
|
775
822
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).feedId,
|
|
776
823
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId9").innerText).uid,
|
|
@@ -783,10 +830,10 @@ class Video extends Component {
|
|
|
783
830
|
list.push({
|
|
784
831
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).feedId,
|
|
785
832
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid,
|
|
786
|
-
name: this.state.videoTenName + '--OCR',
|
|
833
|
+
name: this.state.videoTenName +(this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
787
834
|
tourist: false
|
|
788
835
|
})
|
|
789
|
-
if(this.state.videoTenName.indexOf("客户") == -1) {
|
|
836
|
+
if(this.state.videoTenName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
790
837
|
list.push({
|
|
791
838
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).feedId,
|
|
792
839
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId10").innerText).uid,
|
|
@@ -799,10 +846,10 @@ class Video extends Component {
|
|
|
799
846
|
list.push({
|
|
800
847
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).feedId,
|
|
801
848
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid,
|
|
802
|
-
name: this.state.videoElevenName + '--OCR',
|
|
849
|
+
name: this.state.videoElevenName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
803
850
|
tourist: false
|
|
804
851
|
})
|
|
805
|
-
if(this.state.videoElevenName.indexOf("客户") == -1) {
|
|
852
|
+
if(this.state.videoElevenName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
806
853
|
list.push({
|
|
807
854
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).feedId,
|
|
808
855
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId11").innerText).uid,
|
|
@@ -815,10 +862,10 @@ class Video extends Component {
|
|
|
815
862
|
list.push({
|
|
816
863
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).feedId,
|
|
817
864
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid,
|
|
818
|
-
name: this.state.videoTwelveName + '--OCR',
|
|
865
|
+
name: this.state.videoTwelveName + (this.state.faceCustomerType == 1 ? '--人脸识别' :'--OCR'),
|
|
819
866
|
tourist: false
|
|
820
867
|
})
|
|
821
|
-
if(this.state.videoTwelveName.indexOf("客户") == -1) {
|
|
868
|
+
if(this.state.videoTwelveName.indexOf("客户") == -1 && this.state.faceCustomerType == 2) {
|
|
822
869
|
list.push({
|
|
823
870
|
feedId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).feedId,
|
|
824
871
|
customId: this.seeList(this.state.roomCustomerList, 'feedId', document.getElementById("feedId12").innerText).uid,
|
|
@@ -1984,6 +2031,45 @@ class Video extends Component {
|
|
|
1984
2031
|
this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
|
|
1985
2032
|
console.log('发送失败',msgId,code, msg)
|
|
1986
2033
|
}
|
|
2034
|
+
this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
2035
|
+
console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
2036
|
+
if (stream_type == "subscribe") {
|
|
2037
|
+
return stream
|
|
2038
|
+
}
|
|
2039
|
+
if (media_type == 2 || media_type == 4) {
|
|
2040
|
+
return stream
|
|
2041
|
+
}
|
|
2042
|
+
// if (publish_device != 1) {
|
|
2043
|
+
// return stream
|
|
2044
|
+
// }
|
|
2045
|
+
if(publish_tag == 'tag1') {
|
|
2046
|
+
let newStream = stream;
|
|
2047
|
+
let beauty_strength = beautyNum;
|
|
2048
|
+
if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
|
|
2049
|
+
newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
|
|
2050
|
+
// 清理原始流
|
|
2051
|
+
newStream.oninactive = function () {
|
|
2052
|
+
clearOriginStream(stream);
|
|
2053
|
+
};
|
|
2054
|
+
newStream.getVideoTracks()[0].onended = function () {
|
|
2055
|
+
clearOriginStream(stream);
|
|
2056
|
+
};
|
|
2057
|
+
function clearOriginStream(stream) {
|
|
2058
|
+
stream.getTracks().forEach((track) => {
|
|
2059
|
+
track.stop();
|
|
2060
|
+
});
|
|
2061
|
+
stream = null;
|
|
2062
|
+
}
|
|
2063
|
+
};
|
|
2064
|
+
if (stream.getAudioTracks()[0] && newStream.addTrack) {
|
|
2065
|
+
newStream.addTrack(stream.getAudioTracks()[0])
|
|
2066
|
+
}
|
|
2067
|
+
return newStream
|
|
2068
|
+
} else {
|
|
2069
|
+
return stream
|
|
2070
|
+
}
|
|
2071
|
+
|
|
2072
|
+
}
|
|
1987
2073
|
// 发布媒体流成功
|
|
1988
2074
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
1989
2075
|
console.log('发布媒体流成功', sid)
|
|
@@ -2008,6 +2094,7 @@ class Video extends Component {
|
|
|
2008
2094
|
|
|
2009
2095
|
loading: false,
|
|
2010
2096
|
});
|
|
2097
|
+
|
|
2011
2098
|
this.enterRoom()
|
|
2012
2099
|
this.updateMeetingInfo()
|
|
2013
2100
|
this.timer = setInterval(
|
|
@@ -2427,6 +2514,21 @@ class Video extends Component {
|
|
|
2427
2514
|
}, function (code, message, data) {
|
|
2428
2515
|
console.log(data)
|
|
2429
2516
|
})
|
|
2517
|
+
callNimIM('sendCustomCmdMsg', {
|
|
2518
|
+
customId: this.state.imRoomId,
|
|
2519
|
+
content: JSON.stringify({
|
|
2520
|
+
'typeId': 1014,
|
|
2521
|
+
'sessionId': this.state.sessionId,
|
|
2522
|
+
'meetingInfo': {
|
|
2523
|
+
'title': this.props.meetingInfo.title,
|
|
2524
|
+
'host': this.props.meetingInfo.host,
|
|
2525
|
+
'customers': this.props.meetingInfo.customers,
|
|
2526
|
+
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
2527
|
+
}
|
|
2528
|
+
|
|
2529
|
+
})
|
|
2530
|
+
}, function (code, message, data) {
|
|
2531
|
+
})
|
|
2430
2532
|
this.sendNotification()
|
|
2431
2533
|
let array = this.state.roomCustomerList;
|
|
2432
2534
|
let newArray = [...array];
|
|
@@ -2628,6 +2730,9 @@ class Video extends Component {
|
|
|
2628
2730
|
// }
|
|
2629
2731
|
|
|
2630
2732
|
}
|
|
2733
|
+
if(sid == document.getElementById('publish_video1').name || !document.getElementById('publish_video1').name) {
|
|
2734
|
+
clearStreamRemain()
|
|
2735
|
+
}
|
|
2631
2736
|
};
|
|
2632
2737
|
// 取消订阅媒体流成功
|
|
2633
2738
|
this.test_controller.OnUnSubscribeSucc = (sid) => {
|
|
@@ -3162,21 +3267,6 @@ userType:'1'
|
|
|
3162
3267
|
}
|
|
3163
3268
|
}
|
|
3164
3269
|
// 保存mettingInfo
|
|
3165
|
-
// callNimIM('sendCustomCmdMsg', {
|
|
3166
|
-
// customId: this.state.imRoomId,
|
|
3167
|
-
// content: JSON.stringify({
|
|
3168
|
-
// 'typeId': 1014,
|
|
3169
|
-
// 'sessionId': this.state.sessionId,
|
|
3170
|
-
// 'meetingInfo': {
|
|
3171
|
-
// 'title': this.props.meetingInfo.title,
|
|
3172
|
-
// 'host': this.props.meetingInfo.host,
|
|
3173
|
-
// 'customers': this.props.meetingInfo.customers,
|
|
3174
|
-
// 'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
3175
|
-
// }
|
|
3176
|
-
|
|
3177
|
-
// })
|
|
3178
|
-
// }, function (code, message, data) {
|
|
3179
|
-
// })
|
|
3180
3270
|
updateMeetingInfo= async()=>{
|
|
3181
3271
|
let customers
|
|
3182
3272
|
this.props.meetingInfo.customers.map((item, index) => {
|
|
@@ -3207,6 +3297,21 @@ userType:'1'
|
|
|
3207
3297
|
});
|
|
3208
3298
|
console.log(result);
|
|
3209
3299
|
this.appGetUsername(document.getElementById('publish_video1').name)
|
|
3300
|
+
callNimIM('sendCustomCmdMsg', {
|
|
3301
|
+
customId: this.state.imRoomId,
|
|
3302
|
+
content: JSON.stringify({
|
|
3303
|
+
'typeId': 1014,
|
|
3304
|
+
'sessionId': this.state.sessionId,
|
|
3305
|
+
'meetingInfo': {
|
|
3306
|
+
'title': this.props.meetingInfo.title,
|
|
3307
|
+
'host': this.props.meetingInfo.host,
|
|
3308
|
+
'customers': this.props.meetingInfo.customers,
|
|
3309
|
+
'otherAttendees': this.props.meetingInfo.otherAttendees
|
|
3310
|
+
}
|
|
3311
|
+
|
|
3312
|
+
})
|
|
3313
|
+
}, function (code, message, data) {
|
|
3314
|
+
})
|
|
3210
3315
|
} catch (err) {
|
|
3211
3316
|
console.error(err);
|
|
3212
3317
|
if(err.status == 502 || err.status== 404) {
|
|
@@ -3220,6 +3325,8 @@ userType:'1'
|
|
|
3220
3325
|
this.finishSessionClick()
|
|
3221
3326
|
}
|
|
3222
3327
|
if (this.test_controller&&this.state.sessionType) {
|
|
3328
|
+
clearStreamRemain()
|
|
3329
|
+
beautyNum = 0
|
|
3223
3330
|
this.test_controller.LeaveRoom()
|
|
3224
3331
|
this.test_controller.Disconnect()
|
|
3225
3332
|
}
|
|
@@ -3711,6 +3818,28 @@ userType:'1'
|
|
|
3711
3818
|
isModalVisibleEnd: false
|
|
3712
3819
|
})
|
|
3713
3820
|
};
|
|
3821
|
+
confirmCallback=async()=>{
|
|
3822
|
+
try {
|
|
3823
|
+
let result = await API.ocrCallback({
|
|
3824
|
+
idCardName: this.state.idCardName,
|
|
3825
|
+
staffId: this.props.tellerAccount,
|
|
3826
|
+
activityId: this.props.businessNumber,
|
|
3827
|
+
appAccount: this.state.faceCustomerUid,
|
|
3828
|
+
idCardNumber: this.state.idCardNumber,
|
|
3829
|
+
});
|
|
3830
|
+
if (result.code == 200) {
|
|
3831
|
+
this.setState({
|
|
3832
|
+
isModalVisibleFacial: false,
|
|
3833
|
+
idCardNumber: '',
|
|
3834
|
+
idCardName: ''
|
|
3835
|
+
})
|
|
3836
|
+
} else {
|
|
3837
|
+
this.messageClick('保持信息失败','error')
|
|
3838
|
+
}
|
|
3839
|
+
} catch (err) {
|
|
3840
|
+
this.messageClick('保持信息失败','error')
|
|
3841
|
+
}
|
|
3842
|
+
}
|
|
3714
3843
|
ocrCallback= async () => {
|
|
3715
3844
|
try {
|
|
3716
3845
|
let result = await API.ocrCallback({
|
|
@@ -3722,7 +3851,8 @@ userType:'1'
|
|
|
3722
3851
|
type: 1
|
|
3723
3852
|
});
|
|
3724
3853
|
if (result.code == 200) {
|
|
3725
|
-
this.messageClick('
|
|
3854
|
+
this.messageClick('姓名:' + result.data.idCardName + ',身份证号:' + result.data.idCardNumber,'success')
|
|
3855
|
+
// this.messageClick('识别成功','success')
|
|
3726
3856
|
callNimIM('sendCustomCmdMsg', {
|
|
3727
3857
|
customId: this.state.imRoomId,
|
|
3728
3858
|
content: JSON.stringify({
|
|
@@ -3734,6 +3864,8 @@ userType:'1'
|
|
|
3734
3864
|
});
|
|
3735
3865
|
this.setState({
|
|
3736
3866
|
isModalVisibleFacial: false
|
|
3867
|
+
// idCardNumber: result.data.idCardNumber,
|
|
3868
|
+
// idCardName: result.data.idCardName
|
|
3737
3869
|
})
|
|
3738
3870
|
} else {
|
|
3739
3871
|
this.messageClick('识别失败','error')
|
|
@@ -4182,7 +4314,6 @@ userType:'1'
|
|
|
4182
4314
|
function loop() {
|
|
4183
4315
|
if (!$this.paused && !$this.ended) {
|
|
4184
4316
|
// if(!that.state.tabTitles.find(el=>el.value == 'customerScreen')) {
|
|
4185
|
-
console.log('addEventListener',x, y, width, height)
|
|
4186
4317
|
cobj.drawImage(videoMedia, x, y, width, height, 0, 0,960, 540);
|
|
4187
4318
|
// } else {
|
|
4188
4319
|
// cobj.fillStyle = 'rgb(0 0 0)'
|
|
@@ -4332,6 +4463,21 @@ userType:'1'
|
|
|
4332
4463
|
microphoneValue: event.target.value
|
|
4333
4464
|
})
|
|
4334
4465
|
}
|
|
4466
|
+
beautyClick = () =>{
|
|
4467
|
+
const publish_config = {}
|
|
4468
|
+
publish_config.sid = document.getElementById('publish_video1').name
|
|
4469
|
+
publish_config.media_type = 1
|
|
4470
|
+
publish_config.publish_device = 1
|
|
4471
|
+
publish_config.videoSource = this.state.cameraValue
|
|
4472
|
+
publish_config.audioSource = this.state.microphoneValue
|
|
4473
|
+
publish_config.video_profile_type=100
|
|
4474
|
+
publish_config.video_profile_diy={width:640, height:360, frameRate:15, bitrate:400}
|
|
4475
|
+
this.test_controller.ChangeMediaStream(publish_config)
|
|
4476
|
+
beautyNum = beautyNum == 0 ? 1 : 0
|
|
4477
|
+
this.setState({
|
|
4478
|
+
beautyName: beautyNum == 0 ? '开启美颜' : '关闭美颜'
|
|
4479
|
+
})
|
|
4480
|
+
}
|
|
4335
4481
|
componentDidMount() {
|
|
4336
4482
|
var box=document.getElementById("whiteboardDIV");
|
|
4337
4483
|
if(box){ //此处在加一层判断,更加严密,如果box存在的情况下获取
|
|
@@ -4473,6 +4619,12 @@ userType:'1'
|
|
|
4473
4619
|
},100)
|
|
4474
4620
|
|
|
4475
4621
|
}
|
|
4622
|
+
handleChangeIdCardName = (event) => {
|
|
4623
|
+
this.setState({idCardName: event.target.value});
|
|
4624
|
+
}
|
|
4625
|
+
handleChangeIdCardNumber = (event) => {
|
|
4626
|
+
this.setState({idCardNumber: event.target.value});
|
|
4627
|
+
}
|
|
4476
4628
|
componentDidUpdate(prevProps){
|
|
4477
4629
|
console.log('componentDidUpdate',prevProps,prevProps.shareMask,this.props.shareMask)
|
|
4478
4630
|
if(this.props.shareMask != prevProps.shareMask) {
|
|
@@ -5085,6 +5237,7 @@ userType:'1'
|
|
|
5085
5237
|
</div>
|
|
5086
5238
|
</div>
|
|
5087
5239
|
<Foot
|
|
5240
|
+
beautyName={this.state.beautyName}
|
|
5088
5241
|
voiceName={this.state.voiceName}
|
|
5089
5242
|
img={this.state.voiceImg}
|
|
5090
5243
|
screenName={this.state.screenName}
|
|
@@ -5110,6 +5263,7 @@ userType:'1'
|
|
|
5110
5263
|
ocrClick={this.ocrClick}
|
|
5111
5264
|
switchExternal={this.switchExternal}
|
|
5112
5265
|
inspection={this.inspection}
|
|
5266
|
+
beautyClick={this.beautyClick}
|
|
5113
5267
|
></Foot>
|
|
5114
5268
|
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
5115
5269
|
onCancel={this.handleCancel}>
|
|
@@ -5129,10 +5283,13 @@ userType:'1'
|
|
|
5129
5283
|
<div className='endModal'>是否要结束并退出会议?</div>
|
|
5130
5284
|
</Modal>
|
|
5131
5285
|
<Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
|
|
5132
|
-
<div key='facial'>
|
|
5286
|
+
!this.state.idCardName && <div key='facial'>
|
|
5133
5287
|
<Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
|
|
5134
5288
|
<Button className="modelButtonCancel" onClick={this.sgsinImage}>重新截图</Button>
|
|
5135
5289
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
|
|
5290
|
+
</div>,
|
|
5291
|
+
this.state.idCardName && <div key='facial'>
|
|
5292
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.confirmCallback}>确认</Button>
|
|
5136
5293
|
</div>
|
|
5137
5294
|
]}>
|
|
5138
5295
|
<div className="faceBody">
|
|
@@ -5142,9 +5299,18 @@ userType:'1'
|
|
|
5142
5299
|
<Option value="2">反面</Option>
|
|
5143
5300
|
</Select>
|
|
5144
5301
|
} */}
|
|
5145
|
-
|
|
5146
|
-
|
|
5302
|
+
{
|
|
5303
|
+
!this.state.idCardName &&<div className='faceCardImg'>
|
|
5304
|
+
<img className="faceImg" src={this.state.facialImg} alt=""></img>
|
|
5305
|
+
</div>
|
|
5306
|
+
}
|
|
5307
|
+
{
|
|
5308
|
+
this.state.idCardName &&<div className='resuleCard'>
|
|
5309
|
+
<div><span>客户姓名</span> <input type="text" value={this.state.idCardName} onChange={this.handleChangeIdCardName} /></div>
|
|
5310
|
+
<div><span>身份证号</span> <input type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
|
|
5147
5311
|
</div>
|
|
5312
|
+
}
|
|
5313
|
+
|
|
5148
5314
|
|
|
5149
5315
|
</div>
|
|
5150
5316
|
</Modal>
|
|
@@ -5261,12 +5427,12 @@ sessionId: "",
|
|
|
5261
5427
|
microphoneSize: 25,
|
|
5262
5428
|
fontSize: '14',
|
|
5263
5429
|
fontFamily: 'auto',
|
|
5264
|
-
menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
|
|
5430
|
+
menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY'],
|
|
5265
5431
|
customLeaveRoom: '客户离开房间',
|
|
5266
5432
|
meetingInfo: {
|
|
5267
5433
|
title: '--',
|
|
5268
5434
|
host: '--',
|
|
5269
|
-
customers: ['--'
|
|
5435
|
+
customers: ['--'],
|
|
5270
5436
|
otherAttendees: undefined
|
|
5271
5437
|
},
|
|
5272
5438
|
isTranscribing: false,
|
|
@@ -155,6 +155,26 @@
|
|
|
155
155
|
}
|
|
156
156
|
.faceBody{
|
|
157
157
|
text-align: center;
|
|
158
|
+
height: 200px;
|
|
159
|
+
.faceCardImg{
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
.resuleCard{
|
|
163
|
+
text-align: -webkit-left;
|
|
164
|
+
padding: 25Px 20px;
|
|
165
|
+
div{
|
|
166
|
+
font-size: 16Px;
|
|
167
|
+
color: #646464;
|
|
168
|
+
margin: 20Px;
|
|
169
|
+
input{
|
|
170
|
+
border: #DCDCDC 1px solid;
|
|
171
|
+
width: 15rem;
|
|
172
|
+
height: 2.5rem;
|
|
173
|
+
line-height: 2.5rem;
|
|
174
|
+
margin-left: 15px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
158
178
|
}
|
|
159
179
|
.content{
|
|
160
180
|
height: 200px;
|
|
Binary file
|
|
Binary file
|