react_hsbc_teller 1.9.4 → 1.9.5

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.4",
3
+ "version": "1.9.5",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -5,26 +5,34 @@ import Pdf from './pdf.js'
5
5
  class Demo extends Component {
6
6
  state = {
7
7
  shareMask: false,
8
- mtoken: "3c1b4badb7d7",
9
- roomId: "661841296389119",
10
- imRoomId: "iax56tSCD@conference.ls-im-xmpp.chinawp.dev.ali.cloud.cn.hsbc",
11
- sessionId: "iax56tSCD",
8
+ imRoomId
9
+ :
10
+ "IZLZMoTxj@conference.ls-im-xmpp.chinawp.dev.ali.cloud.cn.hsbc",
11
+ sessionId
12
+ :
13
+ "IZLZMoTxj",
14
+ mtoken
15
+ :
16
+ "bc084d8a922f",
17
+ roomId
18
+ :
19
+ "663912632731275",
12
20
  // roomId: '',
13
21
  // mtoken: '',
14
22
  // imRoomId: '',
15
23
  // sessionId: '',
16
24
  isVideo: false,
17
25
  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',
26
+ // callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
27
+ callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
20
28
  businessNumber: '123',
21
29
  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/',
30
+ // roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
31
+ // baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
32
+ // resourcePath: 'https://counter-web.leimondata.cn:7199',
33
+ roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
34
+ baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
35
+ resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
28
36
  prohibitPrompt: '无客户',
29
37
  titleBackground: '#40a9ff',
30
38
  titleColor: '#faad14',
@@ -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.4&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.5&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
 
@@ -774,28 +774,11 @@ class Video extends Component {
774
774
  })
775
775
  }
776
776
  };
777
- // contrastFaceVerify=()=>{
778
- // axios({
779
- // method: 'post',
780
- // url: 'http://182.92.184.31:8868/verify/face',
781
- // data: { // 这⾥data中的参数为requestBody参数,服务端需要使⽤@RequestBody注解进⾏获取
782
- // "username":"王明珍",
783
- // "num":"410425199510201037",
784
- // "fileBase64":this.state.facialImg.replace(/^data:image\/\w+;base64,/,"")
785
- // }
786
- // }).then((response) =>{
787
- // console.log(response.data);
788
- // if(response.data.code == 200){
789
- // this.messageClick('人脸识别成功','success')
790
- // this.setState({
791
- // isModalVisibleFacial: false
792
- // })
793
- // } else {
794
- // this.messageClick('人脸识别失败','error')
795
- // }
796
- // }).catch(function (error) {
797
- // })
798
- // }
777
+ errorCodeClick=(type,value)=>{
778
+ if(type == 'ocr'){
779
+
780
+ }
781
+ }
799
782
  contrastFaceVerify = async () => {
800
783
  try {
801
784
  let result = await API.contrastFaceVerify({
@@ -808,7 +791,7 @@ class Video extends Component {
808
791
  fileBase64: this.state.facialImg.replace(/^data:image\/\w+;base64,/, "")
809
792
  });
810
793
  console.log(result);
811
- if (result.code == 200) {
794
+ if (result.code == 200 || result.code == 201) {
812
795
  // this.messageClick('人脸识别成功','success')
813
796
  this.setState({
814
797
  loadingFace: false,
@@ -3851,7 +3834,7 @@ class Video extends Component {
3851
3834
  }
3852
3835
  }
3853
3836
  componentWillMount() {
3854
- console.log('hsbc_teller_sdk', '1.9.4')
3837
+ console.log('hsbc_teller_sdk', '1.9.5')
3855
3838
  if (this.props.sessionId) {
3856
3839
  this.getRoomStatus({
3857
3840
  sessionId: this.props.sessionId
@@ -4232,8 +4215,8 @@ class Video extends Component {
4232
4215
  sessionId: this.state.sessionId,
4233
4216
  certificateType: this.state.certificateType,
4234
4217
  customerName: this.state.customerName,
4235
- startDate: this.state.certificateValidity ? this.state.certificateValidity.split('-')[0] : '',
4236
- endDate: this.state.certificateValidity ? this.state.certificateValidity.split('-')[1] : '',
4218
+ startDate: this.state.documentType == 'PASSPORT_CARD' ? '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[0] : '',
4219
+ endDate: this.state.documentType == 'PASSPORT_CARD' ? this.state.certificateValidity ? this.state.certificateValidity.split('-')[0]: '' : this.state.certificateValidity ? this.state.certificateValidity.split('-')[1] : '',
4237
4220
  });
4238
4221
  console.log('confirmCallback', result)
4239
4222
  if (result.code == 200) {
@@ -4326,11 +4309,40 @@ class Video extends Component {
4326
4309
  })
4327
4310
  }
4328
4311
  }
4312
+ if(this.state.documentType == 'HK_MO_RESIDENCE_CARD' || this.state.documentType == 'TW_RESIDENCE_CARD') {
4313
+ if (result.data.side == 'front') {
4314
+ this.setState({
4315
+ // isModalVisibleFacial: false
4316
+ idCardNumber: result.data.resident.idNum,
4317
+ idCardName: result.data.resident.name
4318
+ })
4319
+ this.ocrCallback(2)
4320
+ } else if (result.data.side == 'back') {
4321
+ console.log(result.data.resident.startDate, result.data.resident.endDate)
4322
+ this.setState({
4323
+ certificateValidity: result.data.resident.startDate + '-' + result.data.resident.endDate,
4324
+ loadingFace: false,
4325
+ cardFailReason: '',
4326
+ cardResuly: 'success',
4327
+ })
4328
+ }
4329
+ }
4329
4330
  if(this.state.documentType == 'PASSPORT_CARD') {
4330
4331
  this.setState({
4331
- idCardNumber: result.data.idCardNumber,
4332
- idCardName: result.data.idCardName,
4333
- certificateValidity: result.data.startDate + '-' + result.data.endDate,
4332
+ idCardNumber: result.data.passport.passportCode,
4333
+ idCardName: result.data.passport.nameEN,
4334
+ certificateValidity: result.data.passport.expiryDate,
4335
+ loadingFace: false,
4336
+ cardFailReason: '',
4337
+ cardResuly: 'success',
4338
+ })
4339
+ }
4340
+
4341
+ if(this.state.documentType == 'TW_PASS_CARD' || this.state.documentType == 'HK_MO_PASS_CARD') {
4342
+ this.setState({
4343
+ idCardNumber: result.data.permission.cardNum,
4344
+ idCardName: result.data.permission.nameEN,
4345
+ certificateValidity: result.data.permission.validDate,
4334
4346
  loadingFace: false,
4335
4347
  cardFailReason: '',
4336
4348
  cardResuly: 'success',
@@ -4351,13 +4363,14 @@ class Video extends Component {
4351
4363
  cardFailReason: err.response.message,
4352
4364
  cardResuly: 'fail',
4353
4365
  })
4366
+
4354
4367
  // this.messageClick('识别失败', 'error')
4355
4368
  }
4356
4369
  }
4357
4370
  handleOkFacial = () => {
4358
4371
  if (this.state.faceCustomerType == 2) {
4359
4372
  if (this.state.IDtypeFrontOrBack == '请截取证件头像面') {
4360
- if(this.state.documentType == 'PASSPORT_CARD') {
4373
+ if(this.state.documentType == 'PASSPORT_CARD' || this.state.documentType == 'TW_PASS_CARD' || this.state.documentType == 'HK_MO_PASS_CARD') {
4361
4374
  this.setState({
4362
4375
  loadingFace: true
4363
4376
  })
@@ -5763,7 +5776,9 @@ class Video extends Component {
5763
5776
  {otherAttendeesList}
5764
5777
  </li>
5765
5778
  }
5766
-
5779
+ <li>
5780
+ 请注意,若会议中需要客户出示证件,请客户使用手机的后置摄像头展示证件,由客户经理拍摄证件照片以完成客户身份核实。客户可点击会议主页面上的”切换摄像头“按钮切换手机摄像头
5781
+ </li>
5767
5782
 
5768
5783
  </ul>
5769
5784
  </div>
@@ -6259,12 +6274,6 @@ class Video extends Component {
6259
6274
  ]}>
6260
6275
  <Spin spinning={this.state.loadingFace} tip="识别中...">
6261
6276
  <div className="faceBody">
6262
- {/* {this.state.faceCustomerType == 2 &&
6263
- <Select defaultValue={this.state.defaultValue} style={{ width: 120,marginBottom: '20px' }} onChange={this.handleChangeOcr}>
6264
- <Option value="1">正面</Option>
6265
- <Option value="2">反面</Option>
6266
- </Select>
6267
- } */}
6268
6277
  {this.state.cardResuly == '' && <div className='faceCardImg'>
6269
6278
 
6270
6279
  {
@@ -6275,10 +6284,12 @@ class Video extends Component {
6275
6284
  this.state.faceResuly == '' && <span>
6276
6285
  <div>
6277
6286
  {
6278
- this.state.videoType == 'error' && <div className='errorClassFace'>
6279
- <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>客户视频异常,请重试</div>
6287
+ this.state.videoType == 'error' && <div className='errorClassFace videoErrorClass'>
6288
+ <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>
6289
+ 请点击“截图”拍摄客户人像的照片。若界面无客户头像显示,请检查网络并保持网络稳定后,点击“截图”重试
6290
+ </div>
6280
6291
  }
6281
- <video className="faceImg" id="publish_video_2" autoPlay muted={true}></video>
6292
+ <video disablePictureInPicture className="faceImg" id="publish_video_2" autoPlay muted={true}></video>
6282
6293
  </div>
6283
6294
  <img className="faceImg" src={this.state.facialImg} alt=""></img>
6284
6295
  </span>
@@ -6302,7 +6313,7 @@ class Video extends Component {
6302
6313
  <div className='imgDIV'>
6303
6314
  <img className="faceImgCard" src={this.state.facialImgFront} alt=""></img>
6304
6315
  {
6305
- this.state.documentType != 'PASSPORT_CARD' && <img className="faceImgCard faceImgCardTwo" src={this.state.facialImgBack} alt=""></img>
6316
+ this.state.documentType != 'PASSPORT_CARD' && this.state.documentType != 'TW_PASS_CARD' && this.state.documentType != 'HK_MO_PASS_CARD' && <img className="faceImgCard faceImgCardTwo" src={this.state.facialImgBack} alt=""></img>
6306
6317
  }
6307
6318
 
6308
6319
  </div>
@@ -6438,7 +6449,7 @@ class Video extends Component {
6438
6449
  <Radio value={'HK_MO_PASS_CARD'}>港澳来往大陆通行证</Radio>
6439
6450
  <Radio value={'HK_MO_RESIDENCE_CARD'}>港澳台居民居住证</Radio>
6440
6451
  <Radio value={'TW_RESIDENCE_CARD'}>台湾居民居住证</Radio>
6441
- <Radio value={'FOREIGNER_RESIDENCE_CARD'}>外国人永久居住证</Radio>
6452
+ {/* <Radio value={'FOREIGNER_RESIDENCE_CARD'}>外国人永久居住证</Radio> */}
6442
6453
  </Space>
6443
6454
  </Radio.Group>
6444
6455
  </div>
@@ -186,6 +186,7 @@
186
186
  border-radius: 4px;
187
187
  border:1px dashed #DDDDDD;
188
188
  margin: 24px;
189
+ margin-bottom: 3rem;
189
190
  flex:1;
190
191
 
191
192
  }
@@ -267,7 +268,7 @@
267
268
  bottom: 0;
268
269
  margin: auto;
269
270
  width: 500px;
270
- height: 150px;
271
+ height: 300px;
271
272
  font-size: 22px;
272
273
  color: #222222;
273
274
  font-weight: 600;
@@ -425,7 +426,7 @@
425
426
  .errorClassName{
426
427
  .ant-message-notice-content{
427
428
  min-width: 500px;
428
- height: 44px;
429
+ min-height: 44px;
429
430
  background: #F9F2F3;
430
431
  border: 1px #E5B2B5 solid;
431
432
  font-size: 16px;
@@ -464,7 +465,7 @@
464
465
  }
465
466
  .errorClassFace{
466
467
  min-width: 350px;
467
- height: 44px;
468
+ min-height: 44px;
468
469
  background: #F9F2F3;
469
470
  border: 1px #E5B2B5 solid;
470
471
  font-size: 16px;
@@ -479,6 +480,10 @@
479
480
  margin-bottom: 3px;
480
481
  }
481
482
  }
483
+ .videoErrorClass{
484
+ height: 60px;
485
+ margin: 15px;
486
+ }
482
487
  .successClassFace{
483
488
  min-width: 350px;
484
489
  height: 44px;