react_hsbc_teller 2.0.12 → 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.12",
3
+ "version": "2.0.13",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -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.12'
56
+ const SDK_VERISON = '2.0.13'
57
57
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
58
58
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
59
59
  const { Option } = Select;
@@ -356,6 +356,7 @@ class Video extends Component {
356
356
  recordMode: this.props.recordMode,
357
357
  defaultBranchCode: this.props.defaultBranchCode,
358
358
  customerId: this.props.customerId,
359
+ customerType: this.props.customerType.toString(),
359
360
  salesBranchCode: this.props.salesBranchCode,
360
361
  financialOffice: this.props.financialOffice,
361
362
  roomId: this.state.channelId,
@@ -3599,6 +3600,20 @@ class Video extends Component {
3599
3600
  }
3600
3601
  componentWillMount() {
3601
3602
  console.log('hsbc_teller_sdk', SDK_VERISON)
3603
+ // window.document.startRecord = () => {
3604
+ // this.enableServerRecording();
3605
+ // }
3606
+ // window.document.stopRecord = (recordId) => {
3607
+ // this.test_controller.StopRemoteRecord(recordId || this.state.recordId)
3608
+ // }
3609
+ // window.document.detectNetworkWeak = () => {
3610
+ // console.log('detectNetworkWeak')
3611
+ // this.test_controller.detectNetworkWeak()
3612
+ // }
3613
+ // window.document.start = () => {
3614
+ // this.startFaceDetection();
3615
+ // this.startImageDetection();
3616
+ // }
3602
3617
  let arr = []
3603
3618
  for(let i=1;i<=12;i++){
3604
3619
  arr.push({
@@ -5246,9 +5261,6 @@ class Video extends Component {
5246
5261
  networkStatus: '未知', // 网络状态 (已连接/未连接)
5247
5262
  cameraResult: this.state.cameraList.length>0 ? '合格': '不合格', // 摄像头检测
5248
5263
  microResult: this.state.microphoneList.length>0 ? '合格': '不合格', // 麦克风检测
5249
- jsHeapSizeLimit: '未知', // 上下文内可用堆的最大体积
5250
- totalJSHeapSize: '未知', // 已分配的堆体积
5251
- usedJSHeapSize: '未知', // 当前 JS 堆活跃段(segment)的体积
5252
5264
  lightResult: this.state.envInfo? this.state.envInfo.lightResult : '未知'
5253
5265
  }
5254
5266
 
@@ -5296,28 +5308,7 @@ class Video extends Component {
5296
5308
  }
5297
5309
 
5298
5310
  }
5299
- // 内存检测
5300
- if (performance.memory) {
5301
- const filterSize = (size) => {
5302
- if (!size) return ''
5303
- if (size < pow1024(1)) return size + ' B'
5304
- if (size < pow1024(2)) return (size / pow1024(1)).toFixed(2) + ' KB'
5305
- if (size < pow1024(3)) return (size / pow1024(2)).toFixed(2) + ' MB'
5306
- if (size < pow1024(4)) return (size / pow1024(3)).toFixed(2) + ' GB'
5307
- return (size / pow1024(4)).toFixed(2) + ' TB'
5308
- }
5309
5311
 
5310
- function pow1024(num) {
5311
- return Math.pow(1024, num)
5312
- }
5313
- envInfo.jsHeapSizeLimit = filterSize(performance.memory.jsHeapSizeLimit)
5314
- envInfo.totalJSHeapSize = filterSize(performance.memory.totalJSHeapSize)
5315
- envInfo.usedJSHeapSize = filterSize(performance.memory.usedJSHeapSize)
5316
- // console.log('上下文内可用堆的最大体积', envInfo.jsHeapSizeLimit)
5317
- // console.log('已分配的堆体积', envInfo.totalJSHeapSize)
5318
- // console.log('当前 JS 堆活跃段(segment)的体积', envInfo.usedJSHeapSize)
5319
- envInfo.memoryResult = '合格'
5320
- }
5321
5312
  // 背景曝光环境检测
5322
5313
  this.lightDetect()
5323
5314
 
@@ -5940,7 +5931,6 @@ class Video extends Component {
5940
5931
  const isEnvironmentOK = !this.state.loading &&
5941
5932
  this.state.envInfo.networkResult=='合格' &&
5942
5933
  this.state.envInfo.batteryResult=='合格' &&
5943
- this.state.envInfo.memoryResult=='合格' &&
5944
5934
  this.state.envInfo.cameraResult=='合格' &&
5945
5935
  this.state.envInfo.microResult=='合格' &&
5946
5936
  this.state.envInfo.lightResult=='合格'
@@ -6055,13 +6045,15 @@ class Video extends Component {
6055
6045
 
6056
6046
  </ul>
6057
6047
  </div>
6058
- {!this.state.loading && this.state.sessionId?
6059
- <QRCode
6060
- style={{'position': 'absolute', 'right': '10px', 'top': '-110px'}}
6048
+ {!this.state.loading && this.state.sessionType && this.state.sessionId?
6049
+ <div className='QRCode'>
6050
+ <QRCode
6061
6051
  value={this.state.sessionId} //value参数为生成二维码的链接
6062
- size={100} //二维码的宽高尺寸
6052
+ size={110} //二维码的宽高尺寸
6063
6053
  fgColor="#000000" //二维码的颜色
6064
- /> : 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}
6065
6057
  </div>
6066
6058
  }
6067
6059
 
@@ -6629,10 +6621,6 @@ class Video extends Component {
6629
6621
  key="2" className={this.state.envInfo.batteryResult=='不合格'? 'panel-error':''}>
6630
6622
  <p className='envClass'>电量:{this.state.envInfo.batteryLevel}({this.state.envInfo.batteryCharging})</p>
6631
6623
  </Panel>
6632
- <Panel header={<span>内存检测 - {this.state.envInfo.memoryResult} {this.state.envInfo.memoryResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
6633
- key="1" className={this.state.envInfo.memoryResult=='不合格'? 'panel-error':''}>
6634
- <p className='envClass'>最大可用内存:{this.state.envInfo.jsHeapSizeLimit} ;当前已使用:{this.state.envInfo.usedJSHeapSize} </p>
6635
- </Panel>
6636
6624
  <Panel header={<span>摄像头设备 - {this.state.envInfo.cameraResult}{this.state.envInfo.cameraResult=='不合格'? <img src={IconFail} />: <img src={IconSuccess} />}</span>}
6637
6625
  key="3" className={this.state.envInfo.cameraResult=='不合格'? 'panel-error':''}>
6638
6626
  <div >
@@ -6717,6 +6705,7 @@ Video.defaultProps = {
6717
6705
  recordMode: 1, // 录制模式 1远程录制 2网点录制
6718
6706
  defaultBranchCode: "",// 员工网点缩写
6719
6707
  customerId: "", //客户号
6708
+ customerType: "", // 客户类型
6720
6709
  salesBranchCode: "", //网点编号(分行号)
6721
6710
  financialOffice: "", // 理财室
6722
6711
  staffName: '', // 坐席名称
@@ -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
+ }