react_hsbc_teller 0.6.7 → 0.7.1
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 -0
- package/packages/pages/foot/foot.jsx +2 -2
- package/packages/pages/video/video.jsx +49 -21
- package/src/index.js +2 -2
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -1,6 +1,26 @@
|
|
|
1
1
|
import Server from './server';
|
|
2
2
|
|
|
3
3
|
class API extends Server{
|
|
4
|
+
async sendEmail(params = {}){
|
|
5
|
+
// return this.axios('get', '/lang/select/2', params);
|
|
6
|
+
try{
|
|
7
|
+
let result = await this.axios('post', '/hsbc/sendEmail', params);
|
|
8
|
+
console.log(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
|
+
}
|
|
4
24
|
async appGetUsername(params = {}){
|
|
5
25
|
// return this.axios('get', '/lang/select/2', params);
|
|
6
26
|
try{
|
|
@@ -51,7 +51,7 @@ export default class foot extends Component {
|
|
|
51
51
|
this.props.inspection()
|
|
52
52
|
}
|
|
53
53
|
render() {
|
|
54
|
-
const {clickedOcr,clickedFacial,isTranscribing,img,cameraImg,screenName,suspendName,customerList,menus} = this.props
|
|
54
|
+
const {clickedOcr,clickedFacial,isTranscribing,img,cameraImg,screenName,suspendName,customerList,menus,voiceName} = this.props
|
|
55
55
|
const content = (
|
|
56
56
|
<div>
|
|
57
57
|
{customerList.map((item,index)=>{
|
|
@@ -137,7 +137,7 @@ export default class foot extends Component {
|
|
|
137
137
|
<div className="one">
|
|
138
138
|
<img className="imgClass" src={img} alt="" />
|
|
139
139
|
<div className="text">
|
|
140
|
-
|
|
140
|
+
{voiceName}
|
|
141
141
|
</div>
|
|
142
142
|
</div>
|
|
143
143
|
|
|
@@ -53,6 +53,7 @@ class Video extends Component {
|
|
|
53
53
|
cameraImg: cameraImgOpen,
|
|
54
54
|
voiceStatue: false,
|
|
55
55
|
voiceImg: voiceImgOpen,
|
|
56
|
+
voiceName: '静音',
|
|
56
57
|
isCustomer: false,
|
|
57
58
|
publishDevic: 1,
|
|
58
59
|
isSharedScreen: false,
|
|
@@ -178,6 +179,12 @@ class Video extends Component {
|
|
|
178
179
|
appId: result.appId,
|
|
179
180
|
bizName: result.bizName
|
|
180
181
|
});
|
|
182
|
+
// const data1={
|
|
183
|
+
// hostname: 'im.uat.dsp.hsbcfts.com.cn',
|
|
184
|
+
// webPort: '443',
|
|
185
|
+
// account: 'web',
|
|
186
|
+
// openfireToken: '123'
|
|
187
|
+
// }
|
|
181
188
|
window.sessionStorage.setItem('sigData', JSON.stringify(result));
|
|
182
189
|
if (data.sigType == 1) {
|
|
183
190
|
this.handleEdit()
|
|
@@ -190,6 +197,9 @@ class Video extends Component {
|
|
|
190
197
|
handleEdit = () => {
|
|
191
198
|
console.log(JSON.parse(window.sessionStorage.getItem('sigData')));
|
|
192
199
|
// eslint-disable-next-line no-undef
|
|
200
|
+
// initWebSocket('wss://im.uat.dsp.hsbcfts.com.cn:443/wealth/im/ws/')
|
|
201
|
+
// initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + '15603' + '/ws/');
|
|
202
|
+
|
|
193
203
|
initWebSocket('wss://' + JSON.parse(window.sessionStorage.getItem('sigData')).hostname + ':' + JSON.parse(window.sessionStorage.getItem('sigData')).webPort + '/ws/');
|
|
194
204
|
const config_param = {};
|
|
195
205
|
config_param.workspaceId = this.state.workSpaceId;
|
|
@@ -2200,7 +2210,8 @@ class Video extends Component {
|
|
|
2200
2210
|
// 静音本地
|
|
2201
2211
|
this.setState({
|
|
2202
2212
|
voiceStatue: true,
|
|
2203
|
-
voiceImg: voiceImgCloe
|
|
2213
|
+
voiceImg: voiceImgCloe,
|
|
2214
|
+
voiceName: '解除静音'
|
|
2204
2215
|
});
|
|
2205
2216
|
let sid = document.getElementById('publish_video1').name;
|
|
2206
2217
|
if (!sid) {
|
|
@@ -2226,7 +2237,8 @@ class Video extends Component {
|
|
|
2226
2237
|
// 打开本地
|
|
2227
2238
|
this.setState({
|
|
2228
2239
|
voiceStatue: false,
|
|
2229
|
-
voiceImg: voiceImgOpen
|
|
2240
|
+
voiceImg: voiceImgOpen,
|
|
2241
|
+
voiceName: '静音'
|
|
2230
2242
|
});
|
|
2231
2243
|
let sid = document.getElementById('publish_video1').name;
|
|
2232
2244
|
if (!sid) {
|
|
@@ -2386,7 +2398,8 @@ class Video extends Component {
|
|
|
2386
2398
|
if (this.state.voiceStatue) {
|
|
2387
2399
|
// 当前是音频
|
|
2388
2400
|
this.setState({
|
|
2389
|
-
voiceImg: voiceImgCloe
|
|
2401
|
+
voiceImg: voiceImgCloe,
|
|
2402
|
+
voiceName: '解除静音'
|
|
2390
2403
|
});
|
|
2391
2404
|
let sid = document.getElementById('publish_video1').name;
|
|
2392
2405
|
if (!sid) {
|
|
@@ -2398,7 +2411,8 @@ class Video extends Component {
|
|
|
2398
2411
|
// 当前是
|
|
2399
2412
|
this.test_controller.SetLocalAudioEnable(1, parseInt(sid, 10));
|
|
2400
2413
|
this.setState({
|
|
2401
|
-
voiceImg: voiceImgOpen
|
|
2414
|
+
voiceImg: voiceImgOpen,
|
|
2415
|
+
voiceName: '静音'
|
|
2402
2416
|
})
|
|
2403
2417
|
}
|
|
2404
2418
|
callNimIM('sendCustomCmdMsg', {
|
|
@@ -2496,7 +2510,10 @@ class Video extends Component {
|
|
|
2496
2510
|
};
|
|
2497
2511
|
invitationClick = () => {
|
|
2498
2512
|
this.setState({
|
|
2499
|
-
isModalVisibleInvitation: true
|
|
2513
|
+
isModalVisibleInvitation: true,
|
|
2514
|
+
employeeNumber: '',
|
|
2515
|
+
employeeName: '',
|
|
2516
|
+
employeeError: ''
|
|
2500
2517
|
})
|
|
2501
2518
|
|
|
2502
2519
|
}
|
|
@@ -2506,9 +2523,9 @@ class Video extends Component {
|
|
|
2506
2523
|
return
|
|
2507
2524
|
}
|
|
2508
2525
|
try {
|
|
2509
|
-
let result = await API.
|
|
2510
|
-
|
|
2511
|
-
|
|
2526
|
+
let result = await API.sendEmail({
|
|
2527
|
+
staffId: this.state.employeeNumber,
|
|
2528
|
+
activityId: this.props.businessNumber
|
|
2512
2529
|
});
|
|
2513
2530
|
if (result.code == 200) {
|
|
2514
2531
|
this.messageClick('发送成功','success')
|
|
@@ -2690,8 +2707,8 @@ class Video extends Component {
|
|
|
2690
2707
|
console.log(result)
|
|
2691
2708
|
if (result.code == 200) {
|
|
2692
2709
|
this.setState({
|
|
2693
|
-
employeeName: result.data.
|
|
2694
|
-
employeeError: '',
|
|
2710
|
+
employeeName: result.data.staffName,
|
|
2711
|
+
employeeError: result.data.staffName ? '' : '查无此人',
|
|
2695
2712
|
})
|
|
2696
2713
|
} else {
|
|
2697
2714
|
this.messageClick('查询失败','error')
|
|
@@ -2699,7 +2716,7 @@ class Video extends Component {
|
|
|
2699
2716
|
} catch (err) {
|
|
2700
2717
|
console.log(err)
|
|
2701
2718
|
this.setState({
|
|
2702
|
-
employeeError: '
|
|
2719
|
+
employeeError: '查无此人'
|
|
2703
2720
|
})
|
|
2704
2721
|
}
|
|
2705
2722
|
}
|
|
@@ -3343,6 +3360,7 @@ class Video extends Component {
|
|
|
3343
3360
|
</div>
|
|
3344
3361
|
</div>
|
|
3345
3362
|
<Foot
|
|
3363
|
+
voiceName={this.state.voiceName}
|
|
3346
3364
|
img={this.state.voiceImg}
|
|
3347
3365
|
screenName={this.state.screenName}
|
|
3348
3366
|
suspendName={this.state.suspendName}
|
|
@@ -3367,7 +3385,7 @@ class Video extends Component {
|
|
|
3367
3385
|
switchExternal={this.switchExternal}
|
|
3368
3386
|
inspection={this.inspection}
|
|
3369
3387
|
></Foot>
|
|
3370
|
-
<Modal
|
|
3388
|
+
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
3371
3389
|
onCancel={this.handleCancel}>
|
|
3372
3390
|
{
|
|
3373
3391
|
this.state.isSuspend && <span>确定是否恢复会话?</span>
|
|
@@ -3376,15 +3394,19 @@ class Video extends Component {
|
|
|
3376
3394
|
!this.state.isSuspend && <span>确定是否暂停会话?</span>
|
|
3377
3395
|
}
|
|
3378
3396
|
</Modal>
|
|
3379
|
-
<Modal
|
|
3380
|
-
<
|
|
3397
|
+
<Modal closable={false} centered={true} visible={this.state.isModalVisibleEnd} footer={[
|
|
3398
|
+
<div key='end'>
|
|
3399
|
+
<Button className="modelButtonCancel" onClick={this.handleCancelEnd}>取消</Button>
|
|
3381
3400
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkEnd}>确定</Button>
|
|
3401
|
+
</div>
|
|
3382
3402
|
]}>
|
|
3383
3403
|
<div className='endModal'>确定是否结束会话?</div>
|
|
3384
3404
|
</Modal>
|
|
3385
|
-
<Modal
|
|
3386
|
-
<
|
|
3405
|
+
<Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
|
|
3406
|
+
<div key='facial'>
|
|
3407
|
+
<Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
|
|
3387
3408
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
|
|
3409
|
+
</div>
|
|
3388
3410
|
]}>
|
|
3389
3411
|
<div className="faceBody">
|
|
3390
3412
|
<img className="faceImg" src={this.state.facialImg} alt=""></img>
|
|
@@ -3397,9 +3419,11 @@ class Video extends Component {
|
|
|
3397
3419
|
</div>
|
|
3398
3420
|
|
|
3399
3421
|
</Modal> */}
|
|
3400
|
-
<Modal
|
|
3401
|
-
|
|
3422
|
+
<Modal className="modelClass" title="新增预约" closable={false} centered={true} visible={this.state.isModalVisibleInvitation} footer={[
|
|
3423
|
+
<div key='invitation'>
|
|
3424
|
+
<Button className="modelButtonCancel" onClick={this.handleCancelInvitation}>取消</Button>
|
|
3402
3425
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkInvitation}>确定</Button>
|
|
3426
|
+
</div>
|
|
3403
3427
|
]}>
|
|
3404
3428
|
<div>
|
|
3405
3429
|
<div className="invitationDiv">
|
|
@@ -3419,9 +3443,11 @@ class Video extends Component {
|
|
|
3419
3443
|
}
|
|
3420
3444
|
|
|
3421
3445
|
</Modal>
|
|
3422
|
-
<Modal
|
|
3446
|
+
<Modal title="签字白板" closable={false} centered={true} visible={this.state.isModalVisibleSign} footer={
|
|
3423
3447
|
[
|
|
3448
|
+
<div key='okSign'>
|
|
3424
3449
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkSign}>确定</Button>
|
|
3450
|
+
</div>
|
|
3425
3451
|
]
|
|
3426
3452
|
}>
|
|
3427
3453
|
<div className="content">
|
|
@@ -3436,9 +3462,11 @@ class Video extends Component {
|
|
|
3436
3462
|
></CanvasDraw>
|
|
3437
3463
|
</div>
|
|
3438
3464
|
</Modal>
|
|
3439
|
-
<Modal
|
|
3440
|
-
|
|
3465
|
+
<Modal title="设备检测" closable={false} centered={true} visible={this.state.isModalVisibleInspection} footer={[
|
|
3466
|
+
<div key='inspection'>
|
|
3467
|
+
<Button className="modelButtonCancel" onClick={this.handleCancelInspection}>取消</Button>
|
|
3441
3468
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkInspection}>确定</Button>
|
|
3469
|
+
</div>
|
|
3442
3470
|
]}>
|
|
3443
3471
|
<div className="inspection">
|
|
3444
3472
|
<div>摄像头设备:</div>
|
package/src/index.js
CHANGED
|
@@ -2,8 +2,8 @@ import React from "react";
|
|
|
2
2
|
import ReactDOM from "react-dom";
|
|
3
3
|
import "./index.less";
|
|
4
4
|
import '@babel/polyfill';
|
|
5
|
-
import { HSBC } from "../lib/hsbc";
|
|
6
|
-
|
|
5
|
+
// import { HSBC } from "../lib/hsbc";
|
|
6
|
+
import {HSBC} from "../packages";
|
|
7
7
|
|
|
8
8
|
ReactDOM.render(
|
|
9
9
|
<div className="hsbc"><HSBC></HSBC></div>,
|