react_hsbc_teller 2.0.30 → 2.0.32

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.30",
3
+ "version": "2.0.32",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -105,6 +105,22 @@ class API extends Server{
105
105
  throw err;
106
106
  }
107
107
  }
108
+ /**
109
+ * 用途:开启业务录制
110
+ * @url https://api.cangdu.org/shopro/data/products
111
+ * 返回http_code为200表示成功
112
+ * @method post
113
+ * @return {promise}
114
+ */
115
+ async startBusinessRecord(params = {}){
116
+ // return this.axios('get', '/lang/select/2', params);
117
+ try{
118
+ let result = await this.axios('post', '/hsbc/business/record', params);
119
+ return result
120
+ }catch(err){
121
+ throw err;
122
+ }
123
+ }
108
124
  /**
109
125
  * 用途:人脸检测
110
126
  * @url https://api.cangdu.org/shopro/data/products
@@ -236,6 +236,7 @@ userExit =(val)=>{
236
236
  salesBranchCode={this.state.salesBranchCode}
237
237
  financialOffice={this.state.financialOffice}
238
238
  onLeaveRoom={this.onLeaveRoom}
239
+ getBusinessData={() => { return { businessList: [], businessType: 'REC' } }}
239
240
  createRoomCallback={this.createRoomCallback}
240
241
  joinRoomCallback={this.joinRoomCallback}
241
242
  imgCallback={this.imgCallback}
@@ -58,7 +58,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
58
58
  import axios from 'axios';
59
59
  import CryptoJS from "crypto-js";
60
60
 
61
- const SDK_VERISON = '2.0.30'
61
+ const SDK_VERISON = '2.0.32'
62
62
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
63
63
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
64
64
  const { Option } = Select;
@@ -591,10 +591,11 @@ class Video extends Component {
591
591
  ];
592
592
  this.test_controller.InitRoomConfig(config_param)
593
593
  this.saveLog('mrtc InitRoomConfig start')
594
- // 预热摄像头
595
- config_param.videoSource = this.state.cameraValue
596
- config_param.audioSource = this.state.microphoneValue
597
- this.test_controller.PreOpenLocalMedia(config_param)
594
+
595
+ // 预热摄像头 (可能导致录屏插件发布时变成摄像头 以及重音问题,先注释掉)
596
+ // config_param.videoSource = this.state.cameraValue
597
+ // config_param.audioSource = this.state.microphoneValue
598
+ // this.test_controller.PreOpenLocalMedia(config_param)
598
599
  };
599
600
  rateAll = async () => {
600
601
  let data = ''
@@ -615,7 +616,7 @@ class Video extends Component {
615
616
  const that = this
616
617
  const SCALE = 1.5
617
618
  this.rateAll().then((res) => {
618
- console.log('退出房间者', res)
619
+ console.log('开启录制', res)
619
620
  let list = [
620
621
  {
621
622
  tag: 'projectionWhiteboard',
@@ -734,9 +735,9 @@ class Video extends Component {
734
735
  type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
735
736
  id: 2, // ⽔印 ID
736
737
  enable: true,
737
- xPosition: 640 * SCALE, // x 轴位置
738
- yPosition: 10 * SCALE, // y 轴位置
739
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
738
+ xPosition: 16 * SCALE, // x 轴位置
739
+ yPosition: 8 * SCALE, // y 轴位置
740
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.state.salesBranchCode || ''} ${this.state.branchName || ''} ${this.state.financialOffice || ''}`,
740
741
  fontSize: 16 * SCALE, // 字体⼤⼩
741
742
  url: '' // ⽔印图⽚ HTTP 地址
742
743
  },
@@ -777,9 +778,9 @@ class Video extends Component {
777
778
  type: 2, // 1 为时间戳⽔印;2 为⽂字⽔印;3 为图⽚⽔印
778
779
  id: 2, // ⽔印 ID
779
780
  enable: true,
780
- xPosition: 640, // x 轴位置
781
- yPosition: 10, // y 轴位置
782
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
781
+ xPosition: 16, // x 轴位置
782
+ yPosition: 8, // y 轴位置
783
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.state.salesBranchCode || ''} ${this.state.branchName || ''} ${this.state.financialOffice || ''}`,
783
784
  fontSize: 16, // 字体⼤⼩
784
785
  url: '' // ⽔印图⽚ HTTP 地址
785
786
  },
@@ -1771,6 +1772,13 @@ class Video extends Component {
1771
1772
 
1772
1773
  }
1773
1774
 
1775
+ } else if (Mival.typeId == 1219) {
1776
+ // 传入分行信息
1777
+ if (Mival.sessionId == this.state.sessionId && this.props.recordMode == 2) {
1778
+ this.state.salesBranchCode = Mival.salesBranchCode;
1779
+ this.state.financialOffice = Mival.financialOffice;
1780
+ this.state.branchName = Mival.salesBranchName;
1781
+ }
1774
1782
  } else if (Mival.typeId == 3100) {
1775
1783
  if(Mival.data.sessionId == this.state.sessionId) {
1776
1784
  muteJson.set(Mival.data.userId, JSON.stringify(Mival))
@@ -3033,6 +3041,7 @@ class Video extends Component {
3033
3041
  if (!record_third_id && third_id_Map.get(recordId)) {
3034
3042
  record_third_id = third_id_Map.get(recordId)
3035
3043
  }
3044
+ console.log('record_third_id=', record_third_id)
3036
3045
  if (!record_third_id) {
3037
3046
  this.videoRecordCallback('2', true)
3038
3047
  this.saveLog('mrtc OnStopRemoteRecordSucc, recordId='+recordId)
@@ -4047,7 +4056,8 @@ class Video extends Component {
4047
4056
  this.state.businessId = result.businessId;
4048
4057
  this.state.ipadRecordId = result.businessIpadRecordId;
4049
4058
  third_id_Map.set(result.businessRecordId, result.businessId);
4050
- console.log(third_id_Map)
4059
+ third_id_Map.set(result.businessIpadRecordId, result.businessId+'_ipad');
4060
+ console.log("third_id_map", third_id_Map)
4051
4061
  if (this.props.whetherDetectFace && this.props.recordMode != 2) this.startFaceDetection();
4052
4062
  if (this.props.whetherDetectLight && this.props.recordMode != 2) this.startImageDetection();
4053
4063
  if (this.props.whetherNeedAsr) this.startASR();
@@ -5729,13 +5739,41 @@ class Video extends Component {
5729
5739
  duration: 3
5730
5740
  })
5731
5741
  }
5732
- handleOkEnvDetection = () => {
5742
+ handleOkEnvDetection = async () => {
5733
5743
  this.setState({
5734
5744
  isModalVisibleEnvironment: false,
5735
5745
  })
5736
5746
  if (!this.state.isPictureInPicture) {
5737
5747
  this.pictureInPicture()
5738
5748
  }
5749
+ // 分行模式,需要自动开启业务录制
5750
+ if (this.props.recordMode == 2) {
5751
+ this.startBusinessRecord()
5752
+ }
5753
+ }
5754
+
5755
+ async startBusinessRecord() {
5756
+ const busData = this.props.getBusinessData()
5757
+ if (busData) {
5758
+ try {
5759
+ let result = await API.startBusinessRecord({
5760
+ sessionId: this.state.sessionId,
5761
+ roomId: this.state.channelId,
5762
+ type: 1,
5763
+ ...busData
5764
+ });
5765
+ console.log(result)
5766
+ if (result.code == 200) {
5767
+ console.log('成功')
5768
+ } else if (result.code == 500) {
5769
+ this.messageClick('服务异常,业务录制开启失败','error')
5770
+ } else {
5771
+ console.warn('业务录制开启失败', result.code, result.message)
5772
+ }
5773
+ } catch (err) {
5774
+ console.log(err)
5775
+ }
5776
+ }
5739
5777
  }
5740
5778
  // handleCancelEnvDetection = () => {
5741
5779
  // this.setState({