react_hsbc_teller 2.0.11 → 2.0.13

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": "2.0.11",
3
+ "version": "2.0.13",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -205,6 +205,8 @@ userExit =(val)=>{
205
205
  sessionId={this.state.sessionId}
206
206
  imRoomId={this.state.imRoomId}
207
207
  userSide={this.state.userSide}
208
+ whetherDetectFace={true}
209
+ whetherDetectLight={true}
208
210
  prohibitPrompt={this.state.prohibitPrompt}
209
211
  voiceColor={this.state.voiceColor}
210
212
  titleBackground={this.state.titleBackground}
@@ -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.11'
56
+ const SDK_VERISON = '2.0.13'
57
57
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
58
58
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
59
59
  const { Option } = Select;
@@ -349,12 +349,14 @@ class Video extends Component {
349
349
  try {
350
350
  let result = await API.createRoom({
351
351
  staffId: this.props.tellerAccount,
352
+ staffName: this.props.staffName,
352
353
  activityId: this.props.businessNumber,
353
354
  callbackUrl: this.props.callbackUrl,
354
355
  meetingDuration: this.props.meetingDuration,
355
356
  recordMode: this.props.recordMode,
356
357
  defaultBranchCode: this.props.defaultBranchCode,
357
358
  customerId: this.props.customerId,
359
+ customerType: this.props.customerType.toString(),
358
360
  salesBranchCode: this.props.salesBranchCode,
359
361
  financialOffice: this.props.financialOffice,
360
362
  roomId: this.state.channelId,
@@ -1725,8 +1727,12 @@ class Video extends Component {
1725
1727
  this.saveLog('Start business recording')
1726
1728
  this.enableServerRecording( Mival.id)
1727
1729
 
1728
- this.startFaceDetection();
1729
- this.startImageDetection();
1730
+ if (this.props.whetherDetectFace){
1731
+ this.startFaceDetection();
1732
+ }
1733
+ if (this.props.whetherDetectLight){
1734
+ this.startImageDetection();
1735
+ }
1730
1736
  } else if (Mival.status == 2) {
1731
1737
  // 关闭了业务录制
1732
1738
  console.log('业务录制关闭')
@@ -5255,9 +5261,6 @@ class Video extends Component {
5255
5261
  networkStatus: '未知', // 网络状态 (已连接/未连接)
5256
5262
  cameraResult: this.state.cameraList.length>0 ? '合格': '不合格', // 摄像头检测
5257
5263
  microResult: this.state.microphoneList.length>0 ? '合格': '不合格', // 麦克风检测
5258
- jsHeapSizeLimit: '未知', // 上下文内可用堆的最大体积
5259
- totalJSHeapSize: '未知', // 已分配的堆体积
5260
- usedJSHeapSize: '未知', // 当前 JS 堆活跃段(segment)的体积
5261
5264
  lightResult: this.state.envInfo? this.state.envInfo.lightResult : '未知'
5262
5265
  }
5263
5266
 
@@ -5305,28 +5308,7 @@ class Video extends Component {
5305
5308
  }
5306
5309
 
5307
5310
  }
5308
- // 内存检测
5309
- if (performance.memory) {
5310
- const filterSize = (size) => {
5311
- if (!size) return ''
5312
- if (size < pow1024(1)) return size + ' B'
5313
- if (size < pow1024(2)) return (size / pow1024(1)).toFixed(2) + ' KB'
5314
- if (size < pow1024(3)) return (size / pow1024(2)).toFixed(2) + ' MB'
5315
- if (size < pow1024(4)) return (size / pow1024(3)).toFixed(2) + ' GB'
5316
- return (size / pow1024(4)).toFixed(2) + ' TB'
5317
- }
5318
5311
 
5319
- function pow1024(num) {
5320
- return Math.pow(1024, num)
5321
- }
5322
- envInfo.jsHeapSizeLimit = filterSize(performance.memory.jsHeapSizeLimit)
5323
- envInfo.totalJSHeapSize = filterSize(performance.memory.totalJSHeapSize)
5324
- envInfo.usedJSHeapSize = filterSize(performance.memory.usedJSHeapSize)
5325
- // console.log('上下文内可用堆的最大体积', envInfo.jsHeapSizeLimit)
5326
- // console.log('已分配的堆体积', envInfo.totalJSHeapSize)
5327
- // console.log('当前 JS 堆活跃段(segment)的体积', envInfo.usedJSHeapSize)
5328
- envInfo.memoryResult = '合格'
5329
- }
5330
5312
  // 背景曝光环境检测
5331
5313
  this.lightDetect()
5332
5314
 
@@ -5949,7 +5931,6 @@ class Video extends Component {
5949
5931
  const isEnvironmentOK = !this.state.loading &&
5950
5932
  this.state.envInfo.networkResult=='合格' &&
5951
5933
  this.state.envInfo.batteryResult=='合格' &&
5952
- this.state.envInfo.memoryResult=='合格' &&
5953
5934
  this.state.envInfo.cameraResult=='合格' &&
5954
5935
  this.state.envInfo.microResult=='合格' &&
5955
5936
  this.state.envInfo.lightResult=='合格'
@@ -6064,13 +6045,15 @@ class Video extends Component {
6064
6045
 
6065
6046
  </ul>
6066
6047
  </div>
6067
- {!this.state.loading && this.state.sessionId?
6068
- <QRCode
6069
- style={{'position': 'absolute', 'right': '10px', 'top': '-110px'}}
6048
+ {!this.state.loading && this.state.sessionType && this.state.sessionId?
6049
+ <div className='QRCode'>
6050
+ <QRCode
6070
6051
  value={this.state.sessionId} //value参数为生成二维码的链接
6071
- size={100} //二维码的宽高尺寸
6052
+ size={110} //二维码的宽高尺寸
6072
6053
  fgColor="#000000" //二维码的颜色
6073
- /> : null}
6054
+ />
6055
+ <div className='sessionDiv'>{this.state.sessionId.slice(0, 4)}-{this.state.sessionId.slice(4-this.state.sessionId.length)}</div>
6056
+ </div> : null}
6074
6057
  </div>
6075
6058
  }
6076
6059
 
@@ -6638,10 +6621,6 @@ class Video extends Component {
6638
6621
  key="2" className={this.state.envInfo.batteryResult=='不合格'? 'panel-error':''}>
6639
6622
  <p className='envClass'>电量:{this.state.envInfo.batteryLevel}({this.state.envInfo.batteryCharging})</p>
6640
6623
  </Panel>
6641
- <Panel header={<span>内存检测 - {this.state.envInfo.memoryResult} {this.state.envInfo.memoryResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
6642
- key="1" className={this.state.envInfo.memoryResult=='不合格'? 'panel-error':''}>
6643
- <p className='envClass'>最大可用内存:{this.state.envInfo.jsHeapSizeLimit} ;当前已使用:{this.state.envInfo.usedJSHeapSize} </p>
6644
- </Panel>
6645
6624
  <Panel header={<span>摄像头设备 - {this.state.envInfo.cameraResult}{this.state.envInfo.cameraResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
6646
6625
  key="3" className={this.state.envInfo.cameraResult=='不合格'? 'panel-error':''}>
6647
6626
  <div >
@@ -6719,13 +6698,17 @@ Video.defaultProps = {
6719
6698
  shareMask: false,
6720
6699
  isOpenSound: false, // true开启进出音效 false不开启
6721
6700
  isWeakSound: false,
6701
+ whetherDetectFace: false, // 是否在双录时开启人脸检测
6702
+ whetherDetectLight: false, // 是否在双录时开启背光检测
6722
6703
  userSide: 2,
6723
6704
  meetingDuration: null, // 会议时长,单位小时
6724
6705
  recordMode: 1, // 录制模式 1远程录制 2网点录制
6725
6706
  defaultBranchCode: "",// 员工网点缩写
6726
6707
  customerId: "", //客户号
6708
+ customerType: "", // 客户类型
6727
6709
  salesBranchCode: "", //网点编号(分行号)
6728
6710
  financialOffice: "", // 理财室
6711
+ staffName: '', // 坐席名称
6729
6712
  logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track?APIVersion=0.6.0&app=meeting-ui',
6730
6713
  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'
6731
6714
  }
@@ -276,6 +276,7 @@
276
276
  font-size: 22px;
277
277
  color: #222222;
278
278
  font-weight: 600;
279
+ transform: translateX(-100px);
279
280
  ul{
280
281
  li{
281
282
  list-style: none;
@@ -643,4 +644,22 @@ display: inline-flex;
643
644
  .imgDIV{
644
645
  margin: 0 !important;
645
646
  text-align:center;
646
- }
647
+ }
648
+ .QRCode{
649
+ position: absolute;
650
+ right: -200px;
651
+ top: 30px;
652
+ display: flex;
653
+ flex-direction: column;
654
+ align-items: center;
655
+ .sessionDiv{
656
+ background: #DB0011;
657
+ border-radius: 20px;
658
+ padding: 0 15px;
659
+ text-align: center;
660
+ line-height: 40px;
661
+ height: 40px;
662
+ color: white;
663
+ margin-top: 20px;
664
+ }
665
+ }