react_hsbc_teller 2.0.95 → 2.0.97
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/README.md +6 -1
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/api/api.js +1 -11
- package/packages/demo/demo.js +4 -2
- package/packages/pages/multiModule/components/transcription/transcription.jsx +48 -15
- package/packages/pages/multiModule/components/transcription/transcription.less +14 -6
- package/packages/pages/video/video.jsx +21 -13
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -740,17 +740,7 @@ class API extends Server{
|
|
|
740
740
|
async oneClickCopy(params = {}){
|
|
741
741
|
try{
|
|
742
742
|
let result = await this.axios('post', '/hsbc/oneClickCopy/callback', params);
|
|
743
|
-
|
|
744
|
-
return result.data||[];
|
|
745
|
-
} else{
|
|
746
|
-
let err = {
|
|
747
|
-
tip: '服务异常',
|
|
748
|
-
response: result,
|
|
749
|
-
data: params,
|
|
750
|
-
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
751
|
-
}
|
|
752
|
-
throw err;
|
|
753
|
-
}
|
|
743
|
+
return result
|
|
754
744
|
}catch(err){
|
|
755
745
|
throw err;
|
|
756
746
|
}
|
package/packages/demo/demo.js
CHANGED
|
@@ -23,7 +23,7 @@ sessionId
|
|
|
23
23
|
zeroVolAlert: false,
|
|
24
24
|
isVideo: false,
|
|
25
25
|
tellerAccount: '20250528',
|
|
26
|
-
// callbackUrl: '
|
|
26
|
+
// callbackUrl: 'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
|
|
27
27
|
callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
|
|
28
28
|
businessNumber: '123',
|
|
29
29
|
lang: 'zh',
|
|
@@ -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.
|
|
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,
|
|
@@ -125,7 +152,7 @@ class Transcription extends Component {
|
|
|
125
152
|
}
|
|
126
153
|
}
|
|
127
154
|
sendMessage = () => {
|
|
128
|
-
this.props.
|
|
155
|
+
this.props.handleReceiveMsg({
|
|
129
156
|
'typeId': 952702,
|
|
130
157
|
'sessionId': window.imRoom.sessionId,
|
|
131
158
|
})
|
|
@@ -135,15 +162,16 @@ class Transcription extends Component {
|
|
|
135
162
|
let result = await API.oneClickCopy({
|
|
136
163
|
...this.props.data
|
|
137
164
|
});
|
|
138
|
-
console.log(result)
|
|
165
|
+
console.log('oneClickCopy', result)
|
|
139
166
|
|
|
140
|
-
if (result.code ==
|
|
141
|
-
this.sendMessage()
|
|
142
|
-
this.props.finish()
|
|
143
|
-
} else {
|
|
167
|
+
if (result.code == 500) {
|
|
144
168
|
this.setState({
|
|
145
169
|
isModalVisibleSubmitError: true
|
|
146
170
|
})
|
|
171
|
+
|
|
172
|
+
} else {
|
|
173
|
+
this.sendMessage()
|
|
174
|
+
this.props.finish()
|
|
147
175
|
}
|
|
148
176
|
} catch (err) {
|
|
149
177
|
this.setState({
|
|
@@ -194,16 +222,19 @@ class Transcription extends Component {
|
|
|
194
222
|
<div className="prompt">
|
|
195
223
|
交易流水号:{this.state.formData.transactionNumber}
|
|
196
224
|
</div>
|
|
197
|
-
<div className="prompt"
|
|
225
|
+
<div className="prompt">产品代码:{this.state.formData.productCode}</div>
|
|
226
|
+
<div className="prompt">{this.state.formData.reminderContent}</div>
|
|
198
227
|
{
|
|
199
228
|
this.state.formData.file && this.state.formData.file.map((item, index) => {
|
|
200
229
|
return (
|
|
201
230
|
<div className="item" key={index}>
|
|
202
|
-
<div className="item-
|
|
203
|
-
|
|
204
|
-
<div className="item-button
|
|
205
|
-
|
|
231
|
+
<div className="item-value">
|
|
232
|
+
<div className="item-content">{this.highlightMatch(item.previewContent, item.copyContent)}</div>
|
|
233
|
+
<div className="item-button">
|
|
234
|
+
<button className="item-button-copy" onClick={() => this.copy(index, item.copyContent)}>一键输入</button>
|
|
235
|
+
</div>
|
|
206
236
|
</div>
|
|
237
|
+
|
|
207
238
|
<div >
|
|
208
239
|
<div className="item-input">{item.copy}</div>
|
|
209
240
|
</div>
|
|
@@ -215,14 +246,16 @@ class Transcription extends Component {
|
|
|
215
246
|
<button
|
|
216
247
|
className="item-button-copy"
|
|
217
248
|
onClick={() => this.next()}
|
|
218
|
-
disabled={!this.isAllCopied()}
|
|
219
|
-
style={!this.isAllCopied() ? {
|
|
249
|
+
disabled={!this.isAllCopied() || this.state.isLoading}
|
|
250
|
+
style={!this.isAllCopied() || this.state.isLoading ? {
|
|
220
251
|
background: '#CCCCCC',
|
|
221
252
|
borderColor: '#CCCCCC',
|
|
222
253
|
color: '#999999',
|
|
223
254
|
cursor: 'not-allowed'
|
|
224
255
|
} : {}}
|
|
225
|
-
|
|
256
|
+
>
|
|
257
|
+
{this.state.isLoading ? '提交中...' : '确认'}
|
|
258
|
+
</button>
|
|
226
259
|
|
|
227
260
|
</div>
|
|
228
261
|
<Modal transitionName="" maskTransitionName="" getContainer={document.getElementById('multiModule')} destroyOnClose={true} closable={false} centered={true} visible={this.state.isModalVisibleEnd} footer={[<div key='end'>
|
|
@@ -52,20 +52,26 @@
|
|
|
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
|
+
margin-bottom: 20px;
|
|
65
|
+
}
|
|
60
66
|
.item-content{
|
|
61
|
-
border: 1px #666666 solid;
|
|
62
|
-
padding: 14px 24px;
|
|
63
|
-
min-height: 50px;
|
|
67
|
+
// border: 1px #666666 solid;
|
|
68
|
+
// padding: 14px 24px;
|
|
69
|
+
// min-height: 50px;
|
|
64
70
|
}
|
|
65
71
|
.item-button{
|
|
66
72
|
display: flex;
|
|
67
|
-
justify-content:
|
|
68
|
-
padding: 14px
|
|
73
|
+
justify-content: flex-end;
|
|
74
|
+
// padding-bottom: 14px;
|
|
69
75
|
}
|
|
70
76
|
.item-button-title{
|
|
71
77
|
font-size: 1rem;
|
|
@@ -78,6 +84,8 @@
|
|
|
78
84
|
border: 1px #666666 solid;
|
|
79
85
|
padding: 14px 24px;
|
|
80
86
|
min-height: 50px;
|
|
87
|
+
color: #000000;
|
|
88
|
+
font-weight: bolder;
|
|
81
89
|
}
|
|
82
90
|
}
|
|
83
91
|
.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.
|
|
69
|
+
const SDK_VERISON = '2.0.97'
|
|
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
|
-
//
|
|
3290
|
-
if (
|
|
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
|
})
|
|
@@ -4001,7 +4008,6 @@ class Video extends Component {
|
|
|
4001
4008
|
if(newanalyser) {
|
|
4002
4009
|
analyser = newanalyser
|
|
4003
4010
|
}
|
|
4004
|
-
this.saveLog('zeroVolAlert: ' + this.props.zeroVolAlert)
|
|
4005
4011
|
if(this.props.zeroVolAlert) {
|
|
4006
4012
|
if (!this.volumeFunctionTimer && this.state.voiceStatue == false && this.state.analyserHeight.get(sid) == 0) {
|
|
4007
4013
|
this.volumeFunctionTimer = setTimeout(this.volumeFunction.bind(this, sid), 15000)
|
|
@@ -7320,6 +7326,7 @@ class Video extends Component {
|
|
|
7320
7326
|
})
|
|
7321
7327
|
clearTimeout(this.volumePlayTimer)
|
|
7322
7328
|
this.volumePlay = () => {
|
|
7329
|
+
this.saveLog('zeroVolAlert: ' + this.props.zeroVolAlert)
|
|
7323
7330
|
if (this.state.isModalVisibleVolume) {
|
|
7324
7331
|
if (this.volumeAudio) this.volumeAudio.pause()
|
|
7325
7332
|
this.volumeAudio = new Audio(volumeError)
|
|
@@ -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.
|
|
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
|
}
|