react_hsbc_teller 2.0.15 → 2.0.17

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.15",
3
+ "version": "2.0.17",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -57,6 +57,30 @@ class API extends Server{
57
57
  throw err;
58
58
  }
59
59
  }
60
+ /**
61
+ * 用途:获取录制状态
62
+ * @url https://api.cangdu.org/shopro/data/products
63
+ * 返回http_code为200表示成功
64
+ * @method post
65
+ * @return {promise}
66
+ */
67
+ async getRecordStatus(params = {}){
68
+ try{
69
+ let result = await this.axios('get', '/hsbc/record/status?roomId=' + params.roomId, params);
70
+ if(result && result.code === 200){
71
+ return result.data||[];
72
+ }else{
73
+ let err = {
74
+ tip: '录制状态获取失败',
75
+ response: result,
76
+ data: params,
77
+ }
78
+ throw err;
79
+ }
80
+ }catch(err){
81
+ throw err;
82
+ }
83
+ }
60
84
  /**
61
85
  * 用途:人脸检测
62
86
  * @url https://api.cangdu.org/shopro/data/products
@@ -27,9 +27,6 @@ export default class foot extends Component {
27
27
  ocrClick=()=>{
28
28
  this.props.ocrClick()
29
29
  }
30
- paperOcrClick=()=>{
31
- this.props.paperOcrClick()
32
- }
33
30
  pictureInPicture=()=>{
34
31
  this.props.pictureInPicture()
35
32
  }
@@ -156,15 +153,6 @@ export default class foot extends Component {
156
153
  </div>
157
154
  // </Popover>
158
155
  }
159
- {
160
- item == 'PAPER_OCR' &&
161
- <div className="one" onClick={this.paperOcrClick.bind(this)}>
162
- <img className="imgClass" src={require("../../assets/img/icon_paper.png").default} alt="" />
163
- <div className="text">
164
- 纸质识别
165
- </div>
166
- </div>
167
- }
168
156
  {
169
157
  item == 'INVITE' && <div className="one" onClick={this.invitationClick.bind(this)}>
170
158
  <img className="imgClass" src={require("../../assets/img/icon_invitation.png").default} alt="" />
@@ -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.15'
56
+ const SDK_VERISON = '2.0.17'
57
57
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
58
58
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
59
59
  const { Option } = Select;
@@ -69,7 +69,9 @@ const POINT_TYPE = {
69
69
  pipd: "画中画显示、关闭",
70
70
  pwd: "违禁词检测",
71
71
  wnd: "弱网",
72
- mute: "静音"
72
+ mute: "静音",
73
+ expDark: '曝光、背光',
74
+ fcd: '人脸变化检测'
73
75
  }
74
76
  const RECORD_DEVICE_NAME = 'screen-capture-recorder'
75
77
  // const RECORD_DEVICE_NAME = 'Full HD webcam'
@@ -940,8 +942,8 @@ class Video extends Component {
940
942
  }
941
943
  messageClick = (value, tipType) => {
942
944
  console.log('messageClick', value, tipType)
943
- const intervalSec = 15 // 相同提示触发间隔
944
- const durationSec = 10 // 提示持续时间
945
+ const intervalSec = 5 // 相同提示触发间隔
946
+ const durationSec = 4.5 // 提示持续时间
945
947
  if (messageValueMap.get(value) == undefined) {
946
948
  // map中没有相同消息
947
949
  messageValue = value
@@ -1086,18 +1088,6 @@ class Video extends Component {
1086
1088
  this.selectCustomer('ocr')
1087
1089
  }
1088
1090
  };
1089
- paperOcrClick = () => {
1090
- setTimeout(() => {
1091
- // this.messageClick('系统检测到您已签署2/3个地方,还有1处未签署', 'error')
1092
- message.error({
1093
- content: '系统检测到您已签署2/3个地方,还有1处未签署',
1094
- icon: <img src={require("../../assets/img/tooltips2_fail.png").default} alt="" ></img>,
1095
- className: 'errorClassName',
1096
- top: 200,
1097
- duration: 10
1098
- })
1099
- }, 1500);
1100
- };
1101
1091
  endSessionValue = () => {
1102
1092
  this.saveLog('RM actively exits the meeting')
1103
1093
  if (streamShare) {
@@ -1738,7 +1728,7 @@ class Video extends Component {
1738
1728
  }
1739
1729
  } else if (Mival.status == 2) {
1740
1730
  // 关闭了业务录制
1741
- console.log('业务录制关闭')
1731
+ console.log('业务录制关闭', this.state.businessRecordId)
1742
1732
  this.saveLog('Stop business recording')
1743
1733
  this.test_controller.StopRemoteRecord(this.state.businessRecordId)
1744
1734
  this.state.businessId = '';
@@ -1796,7 +1786,7 @@ class Video extends Component {
1796
1786
  if (res==1 || res== -1){
1797
1787
  // 背景曝光过度
1798
1788
  this.messageClick('检测到当前背光、曝光过度', 'error')
1799
- this.saveVideoPoint('env', 'RM端背光、曝光过度');
1789
+ this.saveVideoPoint('expDark', 'RM端背光、曝光过度');
1800
1790
  }
1801
1791
  origin.delete()
1802
1792
  // let end = new Date().getTime()
@@ -1850,6 +1840,8 @@ class Video extends Component {
1850
1840
  roomId: this.state.channelId + '',
1851
1841
  appId: this.state.appId,
1852
1842
  recordId: this.state.recordId,
1843
+ client: 'rm',
1844
+ customerId: this.props.tellerAccount
1853
1845
  });
1854
1846
  } catch (err) {
1855
1847
  console.error(err);
@@ -3357,6 +3349,7 @@ class Video extends Component {
3357
3349
  type: '2'
3358
3350
  });
3359
3351
  console.log(result);
3352
+ this.queryRecordStatus()
3360
3353
  this.appGetUsername(document.getElementById('publish_video1').name)
3361
3354
  this.sendMessage({
3362
3355
  'typeId': 1014,
@@ -3726,6 +3719,31 @@ class Video extends Component {
3726
3719
  }
3727
3720
  }
3728
3721
  };
3722
+ queryRecordStatus = async()=>{
3723
+ try {
3724
+ let result = await API.getRecordStatus({
3725
+ roomId: this.state.channelId + ''
3726
+ });
3727
+ console.log('RecordStatus', result)
3728
+ if (result.fullRecordStatus == 1) { // 1开启 2未开启
3729
+ // 全局录制
3730
+ this.state.recordId = result.fullRecordId
3731
+ if (result.businessRecordStatus == 1){
3732
+ // 业务录制
3733
+ this.state.businessRecordId = result.businessRecordId;
3734
+ if (this.props.whetherDetectFace) this.startFaceDetection();
3735
+ if (this.props.whetherDetectLight) this.startImageDetection();
3736
+ }
3737
+ } else {
3738
+ this.state.recordId = ''
3739
+ }
3740
+ } catch (err) {
3741
+ console.error(err);
3742
+ if(err.status == 502 || err.status== 404) {
3743
+ this.roomCallBack(2, '连接服务器失败','SYS-02')
3744
+ }
3745
+ }
3746
+ }
3729
3747
  isFileSuccuse = () => {
3730
3748
  if (!this.state.sessionId || !this.state.sessionType || !this.state.imStatus) {
3731
3749
  this.messageClick('当前程序异常请先退出重开', 'error')
@@ -6081,7 +6099,11 @@ class Video extends Component {
6081
6099
  {!this.state.loading && this.state.sessionType && this.state.sessionId?
6082
6100
  <div className='QRCode'>
6083
6101
  <QRCode
6084
- value={this.state.sessionId} //value参数为生成二维码的链接
6102
+ value={JSON.stringify({
6103
+ sessionId:this.state.sessionId,
6104
+ staffId: this.props.tellerAccount,
6105
+ staffName: this.props.staffName
6106
+ })} //value参数为生成二维码的链接
6085
6107
  size={110} //二维码的宽高尺寸
6086
6108
  fgColor="#000000" //二维码的颜色
6087
6109
  />
@@ -6254,7 +6276,6 @@ class Video extends Component {
6254
6276
  invitationClick={this.invitationClick}
6255
6277
  customerFaceClick={this.customerFaceClick}
6256
6278
  ocrClick={this.ocrClick}
6257
- paperOcrClick={this.paperOcrClick}
6258
6279
  switchExternal={this.switchExternal}
6259
6280
  inspection={this.inspection}
6260
6281
  toggleAsr={this.toggleAsr}