react_hsbc_teller 1.9.2 → 1.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "1.9.2",
3
+ "version": "1.9.4",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -15,23 +15,24 @@ sessionId: "iax56tSCD",
15
15
  // sessionId: '',
16
16
  isVideo: false,
17
17
  tellerAccount: 'wmzTeller',
18
- // callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
19
- callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
18
+ callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
19
+ // callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
20
20
  businessNumber: '123',
21
21
  lang: 'zh',
22
- // roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
23
- // baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
24
- // resourcePath: 'https://counter-web.leimondata.cn:7199',
25
- roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
26
- baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
27
- resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
22
+ roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
23
+ baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
24
+ resourcePath: 'https://counter-web.leimondata.cn:7199',
25
+ // roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
26
+ // baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
27
+ // resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
28
28
  prohibitPrompt: '无客户',
29
29
  titleBackground: '#40a9ff',
30
30
  titleColor: '#faad14',
31
31
  microphoneSize: 50,
32
32
  fontSize: 14,
33
33
  fontFamily: 'auto',
34
- isTranscribing: false
34
+ isTranscribing: false,
35
+ userSide: 2
35
36
  }
36
37
  componentWillMount() {
37
38
  // if(window.localStorage.getItem('roomId')) {
@@ -158,6 +159,11 @@ createRoomCallback=(data)=>{
158
159
  joinRoomCallback=(data)=>{
159
160
  console.log('joinRoomCallback', data)
160
161
  }
162
+ handleChangeUserSide = (event) => {
163
+ this.setState({
164
+ userSide: event.target.value
165
+ })
166
+ }
161
167
  userExit =(val)=>{
162
168
      console.log(val)
163
169
  }
@@ -185,6 +191,7 @@ userExit =(val)=>{
185
191
  mtoken={this.state.mtoken}
186
192
  sessionId={this.state.sessionId}
187
193
  imRoomId={this.state.imRoomId}
194
+ userSide={this.state.userSide}
188
195
  prohibitPrompt={this.state.prohibitPrompt}
189
196
  voiceColor={this.state.voiceColor}
190
197
  titleBackground={this.state.titleBackground}
@@ -227,6 +234,7 @@ userExit =(val)=>{
227
234
  <div>sessionId: <input type="text" value={this.state.sessionId} onChange={this.handleChangeSessionId} /></div>
228
235
  <div>imRoomId: <input type="text" value={this.state.imRoomId} onChange={this.handleChangeImRoomId} /></div>
229
236
  <div>isTranscribing: <input type="text" value={this.state.isTranscribing} onChange={this.handleChangeisTranscribing} /></div>
237
+ <div>userSide: <input type="text" value={this.state.userSide} onChange={this.handleChangeUserSide} /></div>
230
238
 
231
239
  <button className="button" onClick={this.startVideo.bind(this)}>开启视频</button>
232
240
  </div>
@@ -351,7 +351,7 @@ class Video extends Component {
351
351
  saveLog = (val) => {
352
352
  axios({
353
353
  method: 'get',
354
- baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.2&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
354
+ baseURL: this.props.logUrl + '&message=' + encodeURIComponent(val) + '&react_hsbc_teller=1.9.4&logTime=' + Date.now() + '&mtoken=' + encodeURIComponent(this.state.rtoken) + '&roomId=' + encodeURIComponent(this.state.channelId) + '&sessionId=' + encodeURIComponent(this.state.sessionId) + '&appointmentID=' + this.props.businessNumber,
355
355
 
356
356
  }).then(res => {
357
357
 
@@ -799,6 +799,8 @@ class Video extends Component {
799
799
  contrastFaceVerify = async () => {
800
800
  try {
801
801
  let result = await API.contrastFaceVerify({
802
+ idCardNumber: this.state.idCardNumberFace,
803
+ idCardName: this.state.idCardNameFace,
802
804
  staffId: this.props.tellerAccount,
803
805
  activityId: this.props.businessNumber,
804
806
  appAccount: this.state.faceCustomerUid,
@@ -2776,24 +2778,6 @@ class Video extends Component {
2776
2778
  this.test_controller.OnNewJoinerIn = (participant) => {
2777
2779
  console.log('新加⼊房间者', participant);
2778
2780
  this.state.isCustomer = true
2779
-
2780
- if (this.props.isOpenSound) {
2781
- this.appGetUsernameClick(participant).then((res) => {
2782
- if (res.userType == 1) {
2783
- let src = autod
2784
- let audio = new Audio(src)
2785
- audio.play()
2786
- } else if (res.userType == 2) {
2787
- let src = internalJoin
2788
- let audio = new Audio(src)
2789
- audio.play()
2790
- }
2791
- })
2792
- }
2793
-
2794
- // let src = autod
2795
- // let audio = new Audio(src)
2796
- // audio.play()
2797
2781
  };
2798
2782
  // 推送“有新发布”给与会者
2799
2783
  this.test_controller.OnNewPublish = (feed) => {
@@ -3637,6 +3621,7 @@ class Video extends Component {
3637
3621
  appAccount: this.props.tellerAccount,
3638
3622
  sessionId: this.state.sessionId,
3639
3623
  username: this.props.meetingInfo.host == '--' ? '' : this.props.meetingInfo.host,
3624
+ userSide: this.props.userSide,
3640
3625
  type: '2'
3641
3626
  });
3642
3627
  console.log(result);
@@ -3866,7 +3851,7 @@ class Video extends Component {
3866
3851
  }
3867
3852
  }
3868
3853
  componentWillMount() {
3869
- console.log('hsbc_teller_sdk', '1.9.2')
3854
+ console.log('hsbc_teller_sdk', '1.9.4')
3870
3855
  if (this.props.sessionId) {
3871
3856
  this.getRoomStatus({
3872
3857
  sessionId: this.props.sessionId
@@ -4731,19 +4716,32 @@ class Video extends Component {
4731
4716
  console.log(result)
4732
4717
  let data
4733
4718
  let typeIntranet
4719
+ let userSide
4734
4720
  if (result.code == 200) {
4735
4721
  data = result.data.username ? result.data.username : ''
4736
4722
  typeIntranet = result.data.userType ? result.data.userType : ''
4723
+ userSide = result.data.userSide ? result.data.userSide : ''
4737
4724
  } else {
4738
4725
  this.messageClick('查询失败', 'error')
4739
4726
  }
4727
+ if (this.props.isOpenSound && sid != document.getElementById('publish_video1').name) {
4728
+ if (result.data.userType == 1) {
4729
+ let src = autod
4730
+ let audio = new Audio(src)
4731
+ audio.play()
4732
+ } else if (result.data.userType == 2) {
4733
+ let src = internalJoin
4734
+ let audio = new Audio(src)
4735
+ audio.play()
4736
+ }
4737
+ }
4740
4738
  if (document.getElementById('publish_video1').name == sid) {
4741
4739
  this.setState({
4742
4740
  titleNameRm: data
4743
4741
  })
4744
4742
  }
4745
4743
  if (document.getElementById('video1').name == sid) {
4746
- if (typeIntranet && typeIntranet == 2) {
4744
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4747
4745
  this.state.isPIBIntranet[0].type = true
4748
4746
  }
4749
4747
  this.setState({
@@ -4753,7 +4751,7 @@ class Video extends Component {
4753
4751
  })
4754
4752
  }
4755
4753
  if (document.getElementById('video2').name == sid) {
4756
- if (typeIntranet && typeIntranet == 2) {
4754
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4757
4755
  this.state.isPIBIntranet[1].type = true
4758
4756
  }
4759
4757
  this.setState({
@@ -4762,7 +4760,7 @@ class Video extends Component {
4762
4760
  this.videoListClick()
4763
4761
  })
4764
4762
  } if (document.getElementById('video3').name == sid) {
4765
- if (typeIntranet && typeIntranet == 2) {
4763
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4766
4764
  this.state.isPIBIntranet[2].type = true
4767
4765
  }
4768
4766
  this.setState({
@@ -4771,7 +4769,7 @@ class Video extends Component {
4771
4769
  this.videoListClick()
4772
4770
  })
4773
4771
  } if (document.getElementById('video4').name == sid) {
4774
- if (typeIntranet && typeIntranet == 2) {
4772
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4775
4773
  this.state.isPIBIntranet[3].type = true
4776
4774
  }
4777
4775
  this.setState({
@@ -4780,7 +4778,7 @@ class Video extends Component {
4780
4778
  this.videoListClick()
4781
4779
  })
4782
4780
  } if (document.getElementById('video5').name == sid) {
4783
- if (typeIntranet && typeIntranet == 2) {
4781
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4784
4782
  this.state.isPIBIntranet[4].type = true
4785
4783
  }
4786
4784
  this.setState({
@@ -4789,7 +4787,7 @@ class Video extends Component {
4789
4787
  this.videoListClick()
4790
4788
  })
4791
4789
  } if (document.getElementById('video6').name == sid) {
4792
- if (typeIntranet && typeIntranet == 2) {
4790
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4793
4791
  this.state.isPIBIntranet[5].type = true
4794
4792
  }
4795
4793
  this.setState({
@@ -4799,7 +4797,7 @@ class Video extends Component {
4799
4797
  })
4800
4798
  }
4801
4799
  if (document.getElementById('video7').name == sid) {
4802
- if (typeIntranet && typeIntranet == 2) {
4800
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4803
4801
  this.state.isPIBIntranet[6].type = true
4804
4802
  }
4805
4803
  this.setState({
@@ -4808,7 +4806,7 @@ class Video extends Component {
4808
4806
  this.videoListClick()
4809
4807
  })
4810
4808
  } if (document.getElementById('video8').name == sid) {
4811
- if (typeIntranet && typeIntranet == 2) {
4809
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4812
4810
  this.state.isPIBIntranet[7].type = true
4813
4811
  }
4814
4812
  this.setState({
@@ -4817,7 +4815,7 @@ class Video extends Component {
4817
4815
  this.videoListClick()
4818
4816
  })
4819
4817
  } if (document.getElementById('video9').name == sid) {
4820
- if (typeIntranet && typeIntranet == 2) {
4818
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4821
4819
  this.state.isPIBIntranet[8].type = true
4822
4820
  }
4823
4821
  this.setState({
@@ -4826,7 +4824,7 @@ class Video extends Component {
4826
4824
  this.videoListClick()
4827
4825
  })
4828
4826
  } if (document.getElementById('video10').name == sid) {
4829
- if (typeIntranet && typeIntranet == 2) {
4827
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4830
4828
  this.state.isPIBIntranet[9].type = true
4831
4829
  }
4832
4830
  this.setState({
@@ -4835,7 +4833,7 @@ class Video extends Component {
4835
4833
  this.videoListClick()
4836
4834
  })
4837
4835
  } if (document.getElementById('video11').name == sid) {
4838
- if (typeIntranet && typeIntranet == 2) {
4836
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4839
4837
  this.state.isPIBIntranet[10].type = true
4840
4838
  }
4841
4839
  this.setState({
@@ -4844,7 +4842,7 @@ class Video extends Component {
4844
4842
  this.videoListClick()
4845
4843
  })
4846
4844
  } if (document.getElementById('video12').name == sid) {
4847
- if (typeIntranet && typeIntranet == 2) {
4845
+ if ((typeIntranet && typeIntranet == 2) || (userSide && userSide == 2)) {
4848
4846
  this.state.isPIBIntranet[11].type = true
4849
4847
  }
4850
4848
  this.setState({
@@ -6232,13 +6230,14 @@ class Video extends Component {
6232
6230
 
6233
6231
  </div>,
6234
6232
  this.state.cardResuly == '' && this.state.faceResuly != '' &&<div key='facial'>
6233
+ <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>完成</Button>
6235
6234
  {
6236
6235
  this.state.faceResuly == 'fail' && <Button className="modelButtonOk" type="primary" danger onClick={this.ReIdentification}>重新识别</Button>
6237
6236
  }
6238
6237
  {
6239
6238
  this.state.faceResuly == 'success' && <Button className="modelButtonNo" type="primary" danger>重新识别</Button>
6240
6239
  }
6241
- <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>完成</Button>
6240
+
6242
6241
 
6243
6242
  </div>,
6244
6243
  this.state.cardResuly == 'success' && <div key='facial'>
@@ -6246,7 +6245,7 @@ class Video extends Component {
6246
6245
  this.state.disabledIdCard && <Button className="modelButtonFaceOk" danger onClick={(e) => this.updateConfirm('noFace')}>修改</Button>
6247
6246
  }
6248
6247
  {
6249
- this.state.documentType == 'ID_CARD' && <Button className="modelButtonFaceOk" danger onClick={(e) => this.confirmCallback('face')}>完成并发起人脸识别</Button>
6248
+ this.state.documentType == 'ID_CARD' && <Button className="modelButtonFaceOkColor" danger onClick={(e) => this.confirmCallback('face')}>完成并发起人脸识别</Button>
6250
6249
  }
6251
6250
  {
6252
6251
  this.state.documentType != 'ID_CARD' && <Button className="modelButtonOk" type="primary" danger onClick={(e) => this.confirmCallback('noFace')}>完成</Button>
@@ -6255,7 +6254,7 @@ class Video extends Component {
6255
6254
  </div>,
6256
6255
  this.state.cardResuly == 'fail' && <div key='facial'>
6257
6256
  <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
6258
- <Button className="modelButtonOk" type="primary" danger onClick={this.newFaceClick}>返回重试</Button>
6257
+ <Button className="modelButtonOk" type="primary" danger onClick={this.newFaceClick}>返回重拍</Button>
6259
6258
  </div>
6260
6259
  ]}>
6261
6260
  <Spin spinning={this.state.loadingFace} tip="识别中...">
@@ -6302,9 +6301,12 @@ class Video extends Component {
6302
6301
  }
6303
6302
  <div className='imgDIV'>
6304
6303
  <img className="faceImgCard" src={this.state.facialImgFront} alt=""></img>
6305
- <img className="faceImgCard" src={this.state.facialImgBack} alt=""></img>
6304
+ {
6305
+ this.state.documentType != 'PASSPORT_CARD' && <img className="faceImgCard faceImgCardTwo" src={this.state.facialImgBack} alt=""></img>
6306
+ }
6307
+
6306
6308
  </div>
6307
- <div>证件信息确认</div>
6309
+ <div style={{margin: '0 20px'}}>证件信息确认</div>
6308
6310
  <div><span>客户姓名</span> <input disabled={this.state.disabledIdCard} type="text" value={this.state.idCardName} onChange={this.handleChangeIdCardName} /></div>
6309
6311
  <div><span>证件号码</span> <input disabled={this.state.disabledIdCard} type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
6310
6312
  <div><span>有效期</span> <input disabled={this.state.disabledIdCard} type="text" value={this.state.certificateValidity} onChange={this.handleChangeCertificateValidity} /></div>
@@ -6566,6 +6568,7 @@ Video.defaultProps = {
6566
6568
  isTranscribing: false,
6567
6569
  shareMask: false,
6568
6570
  isOpenSound: false, // true开启进出音效 false不开启
6571
+ userSide: 2,
6569
6572
  logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track?APIVersion=0.6.0&app=meeting-ui',
6570
6573
  internalUrl: 'https://wp-staff-gateway.wealth-platform.uat.ali.cloud.cn.hsbc/meeting-ui/OHB/CN/HSBC?chnlID=OHB&locale=zh_CN&chnlCC=CN&chnlGMC=HSBC&targetFunc=supervisorMeeting&sourceFunc=rmMeeting'
6571
6574
  }
@@ -152,6 +152,7 @@
152
152
  }
153
153
  .faceImg{
154
154
  width: 60%;
155
+ margin-bottom: 20Px;
155
156
  }
156
157
  .faceBody{
157
158
  text-align: center;
@@ -163,14 +164,14 @@
163
164
  text-align: -webkit-left;
164
165
  padding: 0Px 2Px;
165
166
  div{
166
- font-size: 16Px;
167
+ font-size: 13Px;
167
168
  color: #646464;
168
169
  margin: 10Px 20Px;
169
170
  input{
170
171
  border: #DCDCDC 1px solid;
171
172
  width: 15rem;
172
- height: 2.5rem;
173
- line-height: 2.5rem;
173
+ height: 2rem;
174
+ line-height: 2rem;
174
175
  margin-left: 15px;
175
176
  }
176
177
  span{
@@ -331,7 +332,7 @@
331
332
  margin: 10px 20px;
332
333
  }
333
334
  .ant-modal-header{
334
- padding: 36px 30px 30px 30px !important;
335
+ // padding: 36px 30px 30px 30px !important;
335
336
  border-bottom: none !important;
336
337
  }
337
338
  .ant-modal-body{
@@ -342,8 +343,8 @@
342
343
  color: #333333 !important;
343
344
  }
344
345
  .ant-modal-footer {
345
- margin-top: 50px!important;
346
- padding: 20px 30px 30px!important;
346
+ margin-top: 0px!important;
347
+ // padding: 0px 0px 0px!important;
347
348
  }
348
349
 
349
350
  .modelButtonCancel{
@@ -403,6 +404,15 @@
403
404
  background: #fff!important;
404
405
  border-spacing: 20px!important;
405
406
  }
407
+ .modelButtonFaceOkColor{
408
+ width: 170px!important;
409
+ height: 40px!important;
410
+ font-size: 16px!important;
411
+ color: #ffffff!important;
412
+ border: 1px #DB0011 solid!important;
413
+ background: #DB0011!important;
414
+ border-spacing: 20px!important;
415
+ }
406
416
  .endModal{
407
417
  font-size: 16px;
408
418
  padding: 56px 30px 0px 30px;
@@ -563,11 +573,15 @@
563
573
  }
564
574
  .selectCustomer{
565
575
  font-size: 16px;
566
- margin: 0 40px;
576
+ margin: 20Px 40px;
567
577
  }
568
578
  .faceImgCard{
569
579
  width: 25rem;
570
580
  margin-bottom: 10px;
581
+ height: 13.5rem;
582
+ }
583
+ .faceImgCardTwo{
584
+ margin-bottom: 0px !important;
571
585
  }
572
586
  .titleDiv{
573
587
  font-size: 1.4rem;