react_hsbc_teller 2.0.4-6.1 → 2.0.4-6.3

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.46.1",
3
+ "version": "2.0.46.3",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -60,7 +60,7 @@ import MultiModule from '../multiModule/multiModule'//签字、抄录
60
60
  import axios from 'axios';
61
61
  import CryptoJS from "crypto-js";
62
62
 
63
- const SDK_VERISON = '2.0.46.1'
63
+ const SDK_VERISON = '2.0.46.3'
64
64
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
65
65
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
66
66
  const { Option } = Select;
@@ -743,7 +743,7 @@ class Video extends Component {
743
743
  enable: true,
744
744
  xPosition: 16 * SCALE, // x 轴位置
745
745
  yPosition: 8 * SCALE, // y 轴位置
746
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.state.salesBranchCode || ''} ${this.state.branchName || ''} ${this.state.financialOffice || ''}`,
746
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
747
747
  fontSize: 16 * SCALE, // 字体⼤⼩
748
748
  url: '' // ⽔印图⽚ HTTP 地址
749
749
  },
@@ -786,7 +786,7 @@ class Video extends Component {
786
786
  enable: true,
787
787
  xPosition: 16, // x 轴位置
788
788
  yPosition: 8, // y 轴位置
789
- text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.state.salesBranchCode || ''} ${this.state.branchName || ''} ${this.state.financialOffice || ''}`,
789
+ text: `${this.props.recordMode ==1 ?'远程录制' :'网点录制'} ${this.props.salesBranchCode || ''} ${this.state.branchName || ''} ${this.props.financialOffice || ''}`,
790
790
  fontSize: 16, // 字体⼤⼩
791
791
  url: '' // ⽔印图⽚ HTTP 地址
792
792
  },
@@ -1816,12 +1816,12 @@ class Video extends Component {
1816
1816
  }
1817
1817
 
1818
1818
  } else if (Mival.typeId == 1219) {
1819
- // 传入分行信息
1820
- if (Mival.sessionId == this.state.sessionId && this.props.recordMode == 2) {
1821
- this.state.salesBranchCode = Mival.salesBranchCode;
1822
- this.state.financialOffice = Mival.financialOffice;
1823
- this.state.branchName = Mival.salesBranchName;
1824
- }
1819
+ // 旧逻辑废弃。现在无论什么模式均为sdk外部传入
1820
+ // if (Mival.sessionId == this.state.sessionId && this.props.recordMode == 2) {
1821
+ // this.state.salesBranchCode = Mival.salesBranchCode;
1822
+ // this.state.financialOffice = Mival.financialOffice;
1823
+ // this.state.branchName = Mival.salesBranchName;
1824
+ // }
1825
1825
  } else if (Mival.typeId == 3100) {
1826
1826
  if(Mival.data.sessionId == this.state.sessionId) {
1827
1827
  muteJson.set(Mival.data.userId, JSON.stringify(Mival))
@@ -4048,6 +4048,12 @@ class Video extends Component {
4048
4048
  let that = this;
4049
4049
  this.asr_controller.onConnectError = () => {
4050
4050
  this.messageClick('违禁词检测服务连接失败', 'error')
4051
+ this.saveLog('DR_ASR_FAILURE');
4052
+ }
4053
+ this.asr_controller.onAsrError = (info) => {
4054
+ // this.messageClick('违禁词检测服务连接失败', 'error')
4055
+ console.log(`ASR fail event, status=${info.status}, msg=${info.message}, taskId=${info.taskId}`);
4056
+ this.saveLog(`ASR fail event, status=${info.status}, msg=${info.message}, taskId=${info.taskId}`);
4051
4057
  }
4052
4058
 
4053
4059
  this.asr_controller.onConnectOK = () => {
@@ -68,6 +68,9 @@ export default class MyAsrController {
68
68
  onConnectError(data) {
69
69
  console.log('连接错误');
70
70
  }
71
+ onAsrError(data) {
72
+ console.log('服务端返回错误');
73
+ }
71
74
 
72
75
  initWebSocket() {
73
76
  console.log("初始化weosocket");
@@ -196,6 +199,16 @@ export default class MyAsrController {
196
199
  } else if ( ret.header.name === 'TranscriptionCompleted') {
197
200
  console.log('服务端已停止了语音转写', ret);
198
201
  }
202
+
203
+ if (ret.header.status != 20000000) {
204
+ this.onAsrError({
205
+ status: ret.header.status,
206
+ message: ret.header.status_text,
207
+ taskId: ret.header.task_id,
208
+ });
209
+ } else {
210
+ // console.log('status返回正常')
211
+ }
199
212
  }
200
213
 
201
214
  websocketSend(Data) { // 数据发送