react_hsbc_teller 2.0.96 → 2.0.98
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 +4 -0
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/api/api.js +1 -11
- package/packages/demo/demo.js +1 -1
- package/packages/pages/multiModule/components/transcription/transcription.jsx +7 -6
- package/packages/pages/multiModule/components/transcription/transcription.less +3 -2
- package/packages/pages/video/video.jsx +21 -16
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',
|
|
@@ -152,7 +152,7 @@ class Transcription extends Component {
|
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
sendMessage = () => {
|
|
155
|
-
this.props.
|
|
155
|
+
this.props.handleReceiveMsg({
|
|
156
156
|
'typeId': 952702,
|
|
157
157
|
'sessionId': window.imRoom.sessionId,
|
|
158
158
|
})
|
|
@@ -162,15 +162,16 @@ class Transcription extends Component {
|
|
|
162
162
|
let result = await API.oneClickCopy({
|
|
163
163
|
...this.props.data
|
|
164
164
|
});
|
|
165
|
-
console.log(result)
|
|
165
|
+
console.log('oneClickCopy', result)
|
|
166
166
|
|
|
167
|
-
if (result.code ==
|
|
168
|
-
this.sendMessage()
|
|
169
|
-
this.props.finish()
|
|
170
|
-
} else {
|
|
167
|
+
if (result.code == 500) {
|
|
171
168
|
this.setState({
|
|
172
169
|
isModalVisibleSubmitError: true
|
|
173
170
|
})
|
|
171
|
+
|
|
172
|
+
} else {
|
|
173
|
+
this.sendMessage()
|
|
174
|
+
this.props.finish()
|
|
174
175
|
}
|
|
175
176
|
} catch (err) {
|
|
176
177
|
this.setState({
|
|
@@ -61,16 +61,17 @@
|
|
|
61
61
|
display: flex;
|
|
62
62
|
justify-content: space-between;
|
|
63
63
|
align-items: center;
|
|
64
|
+
margin-bottom: 20px;
|
|
64
65
|
}
|
|
65
66
|
.item-content{
|
|
66
67
|
// border: 1px #666666 solid;
|
|
67
68
|
// padding: 14px 24px;
|
|
68
|
-
min-height: 50px;
|
|
69
|
+
// min-height: 50px;
|
|
69
70
|
}
|
|
70
71
|
.item-button{
|
|
71
72
|
display: flex;
|
|
72
73
|
justify-content: flex-end;
|
|
73
|
-
padding-bottom: 14px;
|
|
74
|
+
// padding-bottom: 14px;
|
|
74
75
|
}
|
|
75
76
|
.item-button-title{
|
|
76
77
|
font-size: 1rem;
|
|
@@ -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.98'
|
|
70
70
|
const IDtypeFront = '请客户在其设备后置摄像头下展示证件正面(如:身份证照片页面)'
|
|
71
71
|
const IDtypeBack = '请在后置摄像头下展示证件反面(如:身份证国徽页)'
|
|
72
72
|
const { Option } = Select;
|
|
@@ -1975,10 +1975,10 @@ class Video extends Component {
|
|
|
1975
1975
|
isWhiteboard: false
|
|
1976
1976
|
})
|
|
1977
1977
|
} else {
|
|
1978
|
-
if (document.getElementById('video20').name) {
|
|
1978
|
+
if (document.getElementById('video20').name || this.state.publishScreenSid) {
|
|
1979
1979
|
this.saveLog('unPublish share, reason: receive stop whiteboard message 1218')
|
|
1980
1980
|
console.log('unPublish share, reason: receive stop whiteboard message 1218')
|
|
1981
|
-
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
1981
|
+
this.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
|
|
1982
1982
|
if(this.state.drawCanvasInterval) clearInterval(this.state.drawCanvasInterval)
|
|
1983
1983
|
}
|
|
1984
1984
|
this.setState({
|
|
@@ -3934,6 +3934,7 @@ class Video extends Component {
|
|
|
3934
3934
|
}
|
|
3935
3935
|
if (sid == document.getElementById('video20').name) {
|
|
3936
3936
|
if (this.state.screenName == '切换共享') {
|
|
3937
|
+
this.state.publishScreenSid = sid
|
|
3937
3938
|
this.state.isSharedScreen = true
|
|
3938
3939
|
this.state.isScreenSwitching = false
|
|
3939
3940
|
this.setSharedScreenState(true)
|
|
@@ -3958,7 +3959,7 @@ class Video extends Component {
|
|
|
3958
3959
|
} else if (this.state.screenName == '切换共享') {
|
|
3959
3960
|
this.saveLog('unPublish share, reason: trigger OnChangeMediaStreamFailed')
|
|
3960
3961
|
console.log('unPublish share, reason: trigger OnChangeMediaStreamFailed')
|
|
3961
|
-
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
3962
|
+
this.test_controller.UnPublish(document.getElementById('video20').name || sid)
|
|
3962
3963
|
this.state.isSharedScreen = false
|
|
3963
3964
|
this.state.isScreenSwitching = false
|
|
3964
3965
|
this.setSharedScreenState(false)
|
|
@@ -4008,7 +4009,6 @@ class Video extends Component {
|
|
|
4008
4009
|
if(newanalyser) {
|
|
4009
4010
|
analyser = newanalyser
|
|
4010
4011
|
}
|
|
4011
|
-
this.saveLog('zeroVolAlert: ' + this.props.zeroVolAlert)
|
|
4012
4012
|
if(this.props.zeroVolAlert) {
|
|
4013
4013
|
if (!this.volumeFunctionTimer && this.state.voiceStatue == false && this.state.analyserHeight.get(sid) == 0) {
|
|
4014
4014
|
this.volumeFunctionTimer = setTimeout(this.volumeFunction.bind(this, sid), 15000)
|
|
@@ -4110,14 +4110,18 @@ class Video extends Component {
|
|
|
4110
4110
|
// 停止共享
|
|
4111
4111
|
this.test_controller.OnDesktopDisplayClosed = () => {
|
|
4112
4112
|
console.log('OnDesktopDisplayClosed', this.state.isSharedScreen, this.state.laveRoomSharedScreen, streamShare)
|
|
4113
|
-
|
|
4114
4113
|
if (this.state.isScreenSwitching) {
|
|
4115
4114
|
this.state.isScreenSwitching = false
|
|
4116
4115
|
} else {
|
|
4117
4116
|
if (!streamShare) {
|
|
4117
|
+
let shareSid = (document.getElementById('video20') && document.getElementById('video20').name) ? document.getElementById('video20').name : this.state.publishScreenSid
|
|
4118
4118
|
this.saveLog('unPublish share, reason: trigger OnDesktopDisplayClosed, manually click stop or stream onended')
|
|
4119
|
+
this.saveLog('OnDesktopDisplayClosed: publishScreenSid:' + this.state.publishScreenSid + '---' + document.getElementById('video20') + '---' + document.getElementById('video20').name + '----' + 'shareSid:' + shareSid)
|
|
4119
4120
|
console.log('unPublish share, reason: trigger OnDesktopDisplayClosed, manually click stop or stream onended')
|
|
4120
|
-
|
|
4121
|
+
console.log('OnDesktopDisplayClosed: publishScreenSid:' + this.state.publishScreenSid + '---' + document.getElementById('video20') + '---' + document.getElementById('video20').name + '----' + 'shareSid:' + shareSid)
|
|
4122
|
+
if(shareSid) {
|
|
4123
|
+
this.test_controller.UnPublish(shareSid)
|
|
4124
|
+
}
|
|
4121
4125
|
} else {
|
|
4122
4126
|
console.log('白板')
|
|
4123
4127
|
}
|
|
@@ -4989,7 +4993,7 @@ class Video extends Component {
|
|
|
4989
4993
|
if (this.state.isSharedScreen) {
|
|
4990
4994
|
this.saveLog('unPublish share, reason: change screen content')
|
|
4991
4995
|
console.log('unPublish share, reason: change screen content')
|
|
4992
|
-
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
4996
|
+
this.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
|
|
4993
4997
|
this.state.shareLock = true;
|
|
4994
4998
|
setTimeout(() => {
|
|
4995
4999
|
publish_config.media_type = 1
|
|
@@ -5028,10 +5032,10 @@ class Video extends Component {
|
|
|
5028
5032
|
// this.test_controller.ChangeMediaStream(publish_config)
|
|
5029
5033
|
// this.state.isScreenSwitching = true
|
|
5030
5034
|
} else {
|
|
5031
|
-
if (document.getElementById('video20').name) {
|
|
5035
|
+
if (document.getElementById('video20').name || this.state.publishScreenSid) {
|
|
5032
5036
|
this.saveLog('unPublish share, reason: change screen content')
|
|
5033
5037
|
console.log('unPublish share, reason: change screen content')
|
|
5034
|
-
this.test_controller.UnPublish(document.getElementById('video20').name)
|
|
5038
|
+
this.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
|
|
5035
5039
|
this.state.shareLock = true;
|
|
5036
5040
|
setTimeout(() => {
|
|
5037
5041
|
publish_config.media_type = 1
|
|
@@ -6287,12 +6291,12 @@ class Video extends Component {
|
|
|
6287
6291
|
|
|
6288
6292
|
this.state.drawCanvasInterval = setInterval($this.drawFunction , 1000/ 20);
|
|
6289
6293
|
|
|
6290
|
-
if (document.getElementById('video20').name) {
|
|
6294
|
+
if (document.getElementById('video20').name || this.state.publishScreenSid) {
|
|
6291
6295
|
// 代表已经有了进行切流
|
|
6292
6296
|
publish_config.publish_device = 5
|
|
6293
6297
|
publish_config.media_type = 1
|
|
6294
6298
|
publish_config.degradationType = 2
|
|
6295
|
-
publish_config.sid = document.getElementById('video20').name
|
|
6299
|
+
publish_config.sid = document.getElementById('video20').name || this.state.publishScreenSid
|
|
6296
6300
|
publish_config.stream = canvas.captureStream(10)
|
|
6297
6301
|
publish_config.video_profile_type = 1
|
|
6298
6302
|
this.test_controller.ChangeMediaStream(publish_config);
|
|
@@ -6339,18 +6343,18 @@ class Video extends Component {
|
|
|
6339
6343
|
stream.getVideoTracks()[0].onended = async () => {
|
|
6340
6344
|
//单击停止共享按钮后,触发这个事件
|
|
6341
6345
|
streamShare = ''
|
|
6342
|
-
if (document.getElementById('video20').name && !this.state.isSharedScreen) {
|
|
6346
|
+
if ((document.getElementById('video20').name || this.state.publishScreenSid) && !this.state.isSharedScreen) {
|
|
6343
6347
|
console.log('unPublish share, reason: click stop sharing whiteboard or stream onended')
|
|
6344
6348
|
that.saveLog('unPublish share, reason: click stop sharing whiteboard or stream onended')
|
|
6345
|
-
that.test_controller.UnPublish(document.getElementById('video20').name)
|
|
6349
|
+
that.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
|
|
6346
6350
|
}
|
|
6347
6351
|
}
|
|
6348
6352
|
|
|
6349
6353
|
// 关闭当前共享屏幕
|
|
6350
|
-
if (document.getElementById('video20') && document.getElementById('video20').name) {
|
|
6354
|
+
if ((document.getElementById('video20') && document.getElementById('video20').name) || this.state.publishScreenSid) {
|
|
6351
6355
|
console.log('unPublish share, reason: going to share whiteboard, shared screen needs to be stopped')
|
|
6352
6356
|
that.saveLog('unPublish share, reason: going to share whiteboard, shared screen needs to be stopped')
|
|
6353
|
-
that.test_controller.UnPublish(document.getElementById('video20').name)
|
|
6357
|
+
that.test_controller.UnPublish(document.getElementById('video20').name || this.state.publishScreenSid)
|
|
6354
6358
|
}
|
|
6355
6359
|
that.state.isSharedScreen = false
|
|
6356
6360
|
that.state.isScreenSwitching = false
|
|
@@ -7327,6 +7331,7 @@ class Video extends Component {
|
|
|
7327
7331
|
})
|
|
7328
7332
|
clearTimeout(this.volumePlayTimer)
|
|
7329
7333
|
this.volumePlay = () => {
|
|
7334
|
+
this.saveLog('zeroVolAlert: ' + this.props.zeroVolAlert)
|
|
7330
7335
|
if (this.state.isModalVisibleVolume) {
|
|
7331
7336
|
if (this.volumeAudio) this.volumeAudio.pause()
|
|
7332
7337
|
this.volumeAudio = new Audio(volumeError)
|