react_hsbc_teller 2.0.95 → 2.0.96

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.95",
3
+ "version": "2.0.96",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -50,7 +50,8 @@ sessionId
50
50
  salesBranchCode: 'salesBranchCode', //网点编号(分行号)
51
51
  financialOffice: "defaultOfficeId", // 理财室
52
52
  audioinputNameList: ['默认值 - 外部麦克风 (Realtek(R) Audio)'],
53
- needPreSale: true
53
+ needPreSale: true,
54
+ needIpad: false,
54
55
  }
55
56
  componentWillMount() {
56
57
  // if(window.localStorage.getItem('sessionId') && window.localStorage.getItem('sessionId') != 'null' && window.localStorage.getItem('sessionId') != 'undefined') {
@@ -226,6 +227,7 @@ userExit =(val)=>{
226
227
  this.state.isVideo ?
227
228
  <div>
228
229
  <HSBC
230
+ needIpad={this.state.needIpad}
229
231
  needPreSale={this.state.needPreSale}
230
232
  isOpenSound={true}
231
233
  shareMask={this.state.shareMask}
@@ -90,6 +90,7 @@ class Transcription extends Component {
90
90
  index: 0,
91
91
  isModalVisibleEnd: false,
92
92
  isModalVisibleSubmitError: false,
93
+ isLoading: false,
93
94
  }
94
95
  componentWillMount() {
95
96
  // 初始化数据
@@ -113,10 +114,36 @@ class Transcription extends Component {
113
114
  }
114
115
  return this.state.formData.file.every(item => item.copy && item.copy.trim() !== '');
115
116
  }
117
+ // 高亮匹配文本的方法
118
+ highlightMatch(text, searchText) {
119
+ if (!searchText || !text) {
120
+ return text;
121
+ }
122
+
123
+ const parts = text.split(searchText);
124
+ if (parts.length === 1) {
125
+ return text;
126
+ }
127
+
128
+ return parts.map((part, index) => (
129
+ <span key={index}>
130
+ {part}
131
+ {index < parts.length - 1 && <strong style={{ color: '#000000' }}>{searchText}</strong>}
132
+ </span>
133
+ ));
134
+ }
116
135
  next() {
136
+ // 防止重复点击
137
+ if (this.state.isLoading) {
138
+ return;
139
+ }
140
+
117
141
  if (this.state.index == this.state.data.list.length - 1) {
118
142
  console.log('完成')
119
- this.finishClick()
143
+ this.setState({ isLoading: true });
144
+ this.finishClick().finally(() => {
145
+ this.setState({ isLoading: false });
146
+ });
120
147
  } else {
121
148
  this.setState({
122
149
  index: this.state.index + 1,
@@ -194,16 +221,19 @@ class Transcription extends Component {
194
221
  <div className="prompt">
195
222
  交易流水号:{this.state.formData.transactionNumber}
196
223
  </div>
197
- <div className="prompt">产品:{this.state.formData.productCode}</div>
224
+ <div className="prompt">产品代码:{this.state.formData.productCode}</div>
225
+ <div className="prompt">{this.state.formData.reminderContent}</div>
198
226
  {
199
227
  this.state.formData.file && this.state.formData.file.map((item, index) => {
200
228
  return (
201
229
  <div className="item" key={index}>
202
- <div className="item-content">{item.previewContent}</div>
203
- <div className="item-button">
204
- <div className="item-button-title">请输入抄写内容</div>
205
- <button className="item-button-copy" onClick={() => this.copy(index, item.copyContent)}>一键抄录</button>
230
+ <div className="item-value">
231
+ <div className="item-content">{this.highlightMatch(item.previewContent, item.copyContent)}</div>
232
+ <div className="item-button">
233
+ <button className="item-button-copy" onClick={() => this.copy(index, item.copyContent)}>一键输入</button>
234
+ </div>
206
235
  </div>
236
+
207
237
  <div >
208
238
  <div className="item-input">{item.copy}</div>
209
239
  </div>
@@ -215,14 +245,16 @@ class Transcription extends Component {
215
245
  <button
216
246
  className="item-button-copy"
217
247
  onClick={() => this.next()}
218
- disabled={!this.isAllCopied()}
219
- style={!this.isAllCopied() ? {
248
+ disabled={!this.isAllCopied() || this.state.isLoading}
249
+ style={!this.isAllCopied() || this.state.isLoading ? {
220
250
  background: '#CCCCCC',
221
251
  borderColor: '#CCCCCC',
222
252
  color: '#999999',
223
253
  cursor: 'not-allowed'
224
254
  } : {}}
225
- >确认</button>
255
+ >
256
+ {this.state.isLoading ? '提交中...' : '确认'}
257
+ </button>
226
258
 
227
259
  </div>
228
260
  <Modal transitionName="" maskTransitionName="" getContainer={document.getElementById('multiModule')} destroyOnClose={true} closable={false} centered={true} visible={this.state.isModalVisibleEnd} footer={[<div key='end'>
@@ -52,20 +52,25 @@
52
52
  }
53
53
  }
54
54
  .prompt{
55
- padding: 14px 24px ;
55
+ padding: 14px 24px 0;
56
56
  font-size: 1rem;
57
57
  }
58
58
  .item{
59
59
  padding: 14px 24px ;
60
+ .item-value{
61
+ display: flex;
62
+ justify-content: space-between;
63
+ align-items: center;
64
+ }
60
65
  .item-content{
61
- border: 1px #666666 solid;
62
- padding: 14px 24px;
66
+ // border: 1px #666666 solid;
67
+ // padding: 14px 24px;
63
68
  min-height: 50px;
64
69
  }
65
70
  .item-button{
66
71
  display: flex;
67
- justify-content: space-between;
68
- padding: 14px 0;
72
+ justify-content: flex-end;
73
+ padding-bottom: 14px;
69
74
  }
70
75
  .item-button-title{
71
76
  font-size: 1rem;
@@ -78,6 +83,8 @@
78
83
  border: 1px #666666 solid;
79
84
  padding: 14px 24px;
80
85
  min-height: 50px;
86
+ color: #000000;
87
+ font-weight: bolder;
81
88
  }
82
89
  }
83
90
  .submit {
@@ -66,7 +66,7 @@ import axios from 'axios';
66
66
  import CryptoJS from "crypto-js";
67
67
 
68
68
 
69
- const SDK_VERISON = '2.0.95'
69
+ const SDK_VERISON = '2.0.96'
70
70
  const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
71
71
  const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
72
72
  const { Option } = Select;
@@ -3172,8 +3172,9 @@ class Video extends Component {
3172
3172
  console.log('新加⼊房间者', participant);
3173
3173
  this.saveLog('mrtc someone joined room, userId=' + participant)
3174
3174
  this.state.isCustomer = true
3175
-
3176
- if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
3175
+ // 改为根据this.props.needIpad判断是否需要ipad
3176
+ // if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
3177
+ if (participant.includes(IPAD_SUFFIX) && this.props.needIpad){
3177
3178
  this.saveVideoPoint('padConnected', 'ipad已连接');
3178
3179
  }
3179
3180
  if (participant.includes(H5_SUFFIX)){
@@ -3283,11 +3284,12 @@ class Video extends Component {
3283
3284
 
3284
3285
  }
3285
3286
 
3286
- // 记录ipad摄像头流,需要单独开启录制
3287
- if (feed.mediaSource == 'VIDEO_SOURCE_CAMERA' && feed.uid.includes(IPAD_SUFFIX)) {
3287
+ // 记录ipad摄像头流,需要单独开启录制 额外需要判断是否要求ipad加入 this.props.needIpad
3288
+ if (feed.mediaSource == 'VIDEO_SOURCE_CAMERA' && feed.uid.includes(IPAD_SUFFIX) && this.props.needIpad) {
3288
3289
  this.state.ipadTag = feed.tag;
3289
- // 如果已经开启了业务录制且ipad未在录制,立即开启ipad录制(ipad后加入)
3290
- if (this.state.businessId && !this.state.ipadRecordId) {
3290
+ // ipad未在录制,立即开启ipad录制(ipad后加入)---不需要根据是否业务了,上面根据this.props.needIpad判断是否需要ipad
3291
+ if (!this.state.ipadRecordId) {
3292
+ // if (this.state.businessId && !this.state.ipadRecordId) {
3291
3293
  this.enableIpadRecording(this.state.businessId)
3292
3294
  }
3293
3295
  }
@@ -3371,7 +3373,9 @@ class Video extends Component {
3371
3373
  console.log('取消发布者', feed)
3372
3374
 
3373
3375
  // ipad取消发布提醒
3374
- if (feed.uid.includes(IPAD_SUFFIX) && this.state.businessId){
3376
+ // if (feed.uid.includes(IPAD_SUFFIX) && this.state.businessId){
3377
+ // 现在不根据是否双录来判断,根据外部传入的this.props.needIpad
3378
+ if (feed.uid.includes(IPAD_SUFFIX) && this.props.needIpad){
3375
3379
  // ipad单独处理,双录过程中ipad如果取消发布,要提示+循环播报直到ipad重新入会
3376
3380
  this.setState({
3377
3381
  IpadLeaveErrorModalVisible: true,
@@ -3392,7 +3396,7 @@ class Video extends Component {
3392
3396
  }
3393
3397
  setTimeout(this.ipadMediaClosePlay, 0);
3394
3398
  } else if (feed.uid.includes(IPAD_SUFFIX)) {
3395
- // 非双录下ipad离开提示iPad已断开
3399
+ // 非双录下ipad离开提示iPad已断开-----this.props.needIpad为false
3396
3400
  this.setState({
3397
3401
  ipadTag: '',
3398
3402
  })
@@ -3456,7 +3460,10 @@ class Video extends Component {
3456
3460
  return
3457
3461
  }
3458
3462
 
3459
- if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
3463
+ // if (participant.includes(IPAD_SUFFIX) && this.state.businessId){
3464
+ //判断条件从之前的是否双录过程中,改成--根据this.props.needIpad来判断,true是需要ipad,false是不需要ipad
3465
+ if (participant.includes(IPAD_SUFFIX) && this.props.needIpad){
3466
+
3460
3467
  // ipad单独处理,双录过程中ipad如果离开,要提示+循环播报直到ipad重新入会
3461
3468
  this.setState({
3462
3469
  IpadLeaveErrorModalVisible: true,
@@ -3477,7 +3484,7 @@ class Video extends Component {
3477
3484
  this.saveLog('iPad leave room during recording')
3478
3485
  return
3479
3486
  } else if (participant.includes(IPAD_SUFFIX)) {
3480
- // 非双录下ipad离开提示iPad已断开
3487
+ // 非双录下ipad离开提示iPad已断开 --this.props.needIpad为false
3481
3488
  this.setState({
3482
3489
  ipadTag: '',
3483
3490
  })
@@ -7442,7 +7449,7 @@ class Video extends Component {
7442
7449
  this.state.envInfo.microResult=='合格' &&
7443
7450
  this.state.envInfo.speakerResult=='合格' &&
7444
7451
  (this.state.envInfo.lightResult=='合格' || this.props.recordMode == 2 ) &&
7445
- (this.state.ipadTag || this.props.recordMode != 2)
7452
+ (this.state.ipadTag || !this.props.needIpad)
7446
7453
 
7447
7454
  const sectionStyle = this.state.tabTitles.length > 0 ? {
7448
7455
  zIndex: '-1',
@@ -8398,6 +8405,7 @@ Video.defaultProps = {
8398
8405
  signalDisconnectedTime: 20, // 网络异常断开多久后异常弹窗提示
8399
8406
  zeroVolAlert: true, // true 开启音量持续提示,,false不开启
8400
8407
  isTagFilter: true, // 默认true 的时候是开启只录制标签是tag的(剔除掉小蜜的声音的),false是关闭录制全部的
8408
+ needIpad: true,// 默认true 控制是否开启iPad(断连提示,弹窗关闭,录制判断),false不需要
8401
8409
  logUrl: 'http://hsbc.cn-shanghai.log.aliyuncs.com/logstores/hsbc/track?APIVersion=0.6.0&app=meeting-ui',
8402
8410
  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'
8403
8411
  }