react_hsbc_teller 1.3.5 → 1.3.8
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/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/api/api.js +20 -1
- package/packages/pages/video/video.jsx +25 -2
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
import Server from './server';
|
|
2
2
|
|
|
3
3
|
class API extends Server{
|
|
4
|
-
|
|
4
|
+
async getBase64Image(params = {}){
|
|
5
|
+
// return this.axios('get', '/lang/select/2', params);
|
|
6
|
+
try{
|
|
7
|
+
let result = await this.axios('get', '/hsbc/getBase64Image?fileName=' + params.fileName, params);
|
|
8
|
+
console.log('getBase64Image',result)
|
|
9
|
+
if(result && (result.data instanceof Object) && result.code === 200){
|
|
10
|
+
return result||[];
|
|
11
|
+
}else{
|
|
12
|
+
let err = {
|
|
13
|
+
tip: '服务异常',
|
|
14
|
+
response: result,
|
|
15
|
+
data: params,
|
|
16
|
+
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
17
|
+
}
|
|
18
|
+
throw err;
|
|
19
|
+
}
|
|
20
|
+
}catch(err){
|
|
21
|
+
throw err;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
5
24
|
async videoRecordCallback(params = {}){
|
|
6
25
|
// return this.axios('get', '/lang/select/2', params);
|
|
7
26
|
try{
|
|
@@ -257,6 +257,19 @@ class Video extends Component {
|
|
|
257
257
|
|
|
258
258
|
}
|
|
259
259
|
};
|
|
260
|
+
getBase64Image = async data => {
|
|
261
|
+
try {
|
|
262
|
+
let result = await API.getBase64Image({ fileName: data});
|
|
263
|
+
console.log('getBase64Image',result)
|
|
264
|
+
this.props.imgCallback({
|
|
265
|
+
type: result.data.type,
|
|
266
|
+
file: result.data.fileName}
|
|
267
|
+
)
|
|
268
|
+
} catch (err) {
|
|
269
|
+
console.error(err);
|
|
270
|
+
|
|
271
|
+
}
|
|
272
|
+
};
|
|
260
273
|
/**
|
|
261
274
|
* 初始化获取数据
|
|
262
275
|
* @param {JSON} data 数据类型
|
|
@@ -296,6 +309,7 @@ class Video extends Component {
|
|
|
296
309
|
// initWebSocket('wss://im.uat.dsp.hsbcfts.com.cn:443/wealth/im/ws/')
|
|
297
310
|
// initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + '15603' + '/ws/');
|
|
298
311
|
if(!this.state.imStatus){
|
|
312
|
+
this.state.manualClose = false
|
|
299
313
|
initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
|
|
300
314
|
|
|
301
315
|
}
|
|
@@ -1427,6 +1441,8 @@ class Video extends Component {
|
|
|
1427
1441
|
file: Mival.data.file}
|
|
1428
1442
|
) // 文字抄录和风险抄录,3--风险,,2--文字
|
|
1429
1443
|
}
|
|
1444
|
+
} else if (Mival.typeId == 1321) {
|
|
1445
|
+
this.getBase64Image(Mival.fileName)
|
|
1430
1446
|
} else if (Mival.typeId == 1216) {
|
|
1431
1447
|
// 签字回调
|
|
1432
1448
|
if (Mival.sessionId == this.state.sessionId) {
|
|
@@ -1872,6 +1888,13 @@ class Video extends Component {
|
|
|
1872
1888
|
this.state.rtoken = '',
|
|
1873
1889
|
this.state.sessionId = '',
|
|
1874
1890
|
this.state.imRoomId = ''
|
|
1891
|
+
this.state.imJoinRoom = false
|
|
1892
|
+
if(this.state.imStatus) {
|
|
1893
|
+
console.log('disconnect断开连接')
|
|
1894
|
+
this.state.manualClose = true
|
|
1895
|
+
this.state.imStatus = false
|
|
1896
|
+
disconnect();
|
|
1897
|
+
}
|
|
1875
1898
|
this.test_controller.Disconnect()
|
|
1876
1899
|
let data = {
|
|
1877
1900
|
account: this.props.tellerAccount,
|
|
@@ -3993,7 +4016,7 @@ class Video extends Component {
|
|
|
3993
4016
|
const top = document.getElementById("whiteboardDIV").getBoundingClientRect().top
|
|
3994
4017
|
const bottom = document.getElementById("whiteboardDIV").getBoundingClientRect().bottom
|
|
3995
4018
|
const width = (right - left)* window.screen.width / document.body.clientWidth
|
|
3996
|
-
const height = ((bottom - top)* window.screen.width / document.body.clientWidth)
|
|
4019
|
+
const height = ((bottom - top)* window.screen.width / document.body.clientWidth) - 50
|
|
3997
4020
|
const x = left * window.screen.width / document.body.clientWidth
|
|
3998
4021
|
const y = top* window.screen.width / document.body.clientWidth
|
|
3999
4022
|
canvas.width = 1280;
|
|
@@ -4011,7 +4034,7 @@ class Video extends Component {
|
|
|
4011
4034
|
|
|
4012
4035
|
// console.log('addEventListener',x,y,width,height1,height)
|
|
4013
4036
|
|
|
4014
|
-
cobj.drawImage(videoMedia, x, y, width, height, 0, 0,
|
|
4037
|
+
cobj.drawImage(videoMedia, x, y, width, height, 0, 0,1280, 720);
|
|
4015
4038
|
setTimeout(loop, 1000 / 10); // drawing at 30fps
|
|
4016
4039
|
}
|
|
4017
4040
|
}
|