react_hsbc_teller 0.1.8 → 0.2.2
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/server.js +1 -1
- package/packages/envconfig/envconfig.js +2 -2
- package/packages/pages/foot/foot.jsx +10 -1
- package/packages/pages/foot/foot.less +1 -0
- package/packages/pages/index.jsx +6 -0
- package/packages/pages/video/video.jsx +76 -80
- package/packages/pages/video/video.less +4 -1
- package/src/index.less +6 -1
package/package.json
CHANGED
package/packages/api/server.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
let baseURL;
|
|
5
5
|
// let imgUrl = '//elm.cangdu.org/img/';
|
|
6
6
|
if(process.env.NODE_ENV === 'development'){
|
|
7
|
-
baseURL = '
|
|
7
|
+
baseURL = 'https://counter-web.leimondata.cn:18082/api/leimon-counter-api';
|
|
8
8
|
}else{
|
|
9
|
-
baseURL = '
|
|
9
|
+
baseURL = 'https://counter-web.leimondata.cn:18082/api/leimon-counter-api';
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
|
|
@@ -50,6 +50,9 @@ export default class foot extends Component {
|
|
|
50
50
|
})
|
|
51
51
|
this.props.customerFaceClick(item)
|
|
52
52
|
}
|
|
53
|
+
switchExternal=()=>{
|
|
54
|
+
this.props.switchExternal()
|
|
55
|
+
}
|
|
53
56
|
render() {
|
|
54
57
|
const {isTranscribing,img,cameraImg,screenName,suspendName,customerList} = this.props
|
|
55
58
|
const content = (
|
|
@@ -86,7 +89,7 @@ export default class foot extends Component {
|
|
|
86
89
|
<div className="one" onClick={this.transcribingClick.bind(this)}>
|
|
87
90
|
<img src={require("../../assets/img/icon_copy.png").default} alt="" />
|
|
88
91
|
<div className="text">
|
|
89
|
-
|
|
92
|
+
签字
|
|
90
93
|
</div>
|
|
91
94
|
</div>
|
|
92
95
|
}
|
|
@@ -132,6 +135,12 @@ export default class foot extends Component {
|
|
|
132
135
|
画中画
|
|
133
136
|
</div>
|
|
134
137
|
</div>
|
|
138
|
+
<div className="one" onClick={this.switchExternal.bind(this)}>
|
|
139
|
+
<img src={require("../../assets/img/huazhonghua.png").default} alt="" />
|
|
140
|
+
<div className="text">
|
|
141
|
+
切换外部
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
135
144
|
</div>
|
|
136
145
|
<div className="total totalThree">
|
|
137
146
|
<button className="buttonClass" onClick={this.endSession.bind(this)}>
|
package/packages/pages/index.jsx
CHANGED
|
@@ -24,6 +24,7 @@ class Main extends Component {
|
|
|
24
24
|
window.localStorage.setItem("langData", JSON.stringify(Object.assign(res)));
|
|
25
25
|
}
|
|
26
26
|
componentWillMount() {
|
|
27
|
+
window.sessionStorage.setItem('baseURL',this.props.baseURL)
|
|
27
28
|
localStorage.setItem("a_lang", this.props.lang)
|
|
28
29
|
if (localStorage.getItem("langData")){
|
|
29
30
|
this.setState({langPackage: JSON.parse(localStorage.getItem("langData"))})
|
|
@@ -34,6 +35,7 @@ class Main extends Component {
|
|
|
34
35
|
|
|
35
36
|
render() {
|
|
36
37
|
const lang = this.props.lang
|
|
38
|
+
|
|
37
39
|
// console.log(this.state.langPackage[lang])
|
|
38
40
|
return (
|
|
39
41
|
<IntlProvider locale={lang} messages={this.state.langPackage[lang]}>
|
|
@@ -42,5 +44,9 @@ class Main extends Component {
|
|
|
42
44
|
);
|
|
43
45
|
}
|
|
44
46
|
}
|
|
47
|
+
Main.defaultProps = {
|
|
48
|
+
lang: 'zh',
|
|
49
|
+
baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
|
|
45
50
|
|
|
51
|
+
}
|
|
46
52
|
export default Main
|
|
@@ -16,6 +16,8 @@ import Modal from "antd/lib/modal";
|
|
|
16
16
|
import 'antd/lib/modal/style'
|
|
17
17
|
import message from "antd/lib/message";
|
|
18
18
|
import 'antd/lib/message/style'
|
|
19
|
+
import Spin from "antd/lib/spin";
|
|
20
|
+
import 'antd/lib/spin/style'
|
|
19
21
|
import { Button } from '../../../node_modules/antd/lib/index';
|
|
20
22
|
import CanvasDraw from "react-canvas-draw";
|
|
21
23
|
import { FormattedMessage, injectIntl } from 'react-intl';
|
|
@@ -27,8 +29,9 @@ const LEAVE_TYPE = {
|
|
|
27
29
|
class Video extends Component {
|
|
28
30
|
signCanvas = React.createRef();
|
|
29
31
|
state = {
|
|
32
|
+
isPDF: false,
|
|
33
|
+
loading: false,
|
|
30
34
|
isModalVisibleSign: false,
|
|
31
|
-
signData: {},
|
|
32
35
|
titleModal: '人脸识别',
|
|
33
36
|
faceCustomerType: 1, // 1无感人脸,2ocr
|
|
34
37
|
faceCustomerUid: '',
|
|
@@ -36,9 +39,6 @@ class Video extends Component {
|
|
|
36
39
|
employeeNumber: '',
|
|
37
40
|
employeeName: '',
|
|
38
41
|
isModalVisibleInvitation: false,
|
|
39
|
-
isTranscribing: false,
|
|
40
|
-
transcribingData: '',
|
|
41
|
-
isPDF: false,
|
|
42
42
|
roomCustomerList: [],
|
|
43
43
|
facialImg: '',
|
|
44
44
|
isModalVisibleFacial: false,
|
|
@@ -61,13 +61,10 @@ class Video extends Component {
|
|
|
61
61
|
workSpaceId: '',
|
|
62
62
|
bizName: '',
|
|
63
63
|
appId: '',
|
|
64
|
-
// room_server_url: 'wss://cn-hangzhou-mrtc.cloud.alipay.com/ws',
|
|
65
|
-
room_server_url: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
|
|
66
64
|
channelId: this.props.roomId,
|
|
67
65
|
rtoken: this.props.mtoken,
|
|
68
66
|
sessionId: this.props.sessionId,
|
|
69
67
|
imRoomId: this.props.imRoomId,
|
|
70
|
-
html_string: '<span style="color:red">123456</span>',
|
|
71
68
|
};
|
|
72
69
|
// eslint-disable-next-line no-undef
|
|
73
70
|
test_controller = '';
|
|
@@ -128,7 +125,7 @@ class Video extends Component {
|
|
|
128
125
|
config_param.biz_name = this.state.bizName; // 'demo'
|
|
129
126
|
config_param.appId = this.state.appId;
|
|
130
127
|
|
|
131
|
-
config_param.room_server_url = this.
|
|
128
|
+
config_param.room_server_url = this.props.roomServerUrl;
|
|
132
129
|
// 允许最大断网时间 (超过未重连, 直接关闭)
|
|
133
130
|
config_param.network_check_timeout = 10000;
|
|
134
131
|
this.test_controller.Connect(config_param)
|
|
@@ -514,20 +511,6 @@ class Video extends Component {
|
|
|
514
511
|
if (Mival.sessionId == this.state.sessionId) {
|
|
515
512
|
this.endSession('customerHangUp')
|
|
516
513
|
}
|
|
517
|
-
} else if (Mival.typeId == 1214) {
|
|
518
|
-
console.log(Mival);
|
|
519
|
-
if (Mival.sessionId == this.state.sessionId) {
|
|
520
|
-
this.setState({
|
|
521
|
-
transcribingData: Mival,
|
|
522
|
-
isTranscribing: true
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
} else if (Mival.typeId == 1216) {
|
|
527
|
-
this.setState({
|
|
528
|
-
signData: Mival.callbackUrl,
|
|
529
|
-
isModalVisibleSign: true
|
|
530
|
-
})
|
|
531
514
|
}
|
|
532
515
|
};
|
|
533
516
|
|
|
@@ -1098,36 +1081,40 @@ class Video extends Component {
|
|
|
1098
1081
|
}
|
|
1099
1082
|
}
|
|
1100
1083
|
addToScript = () => {
|
|
1084
|
+
this.setState({
|
|
1085
|
+
loading: true,
|
|
1086
|
+
})
|
|
1087
|
+
console.log( this.props.resourcePath + "/log4b.js")
|
|
1101
1088
|
const _dependScripts = [
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
"https://
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1089
|
+
// https://counter-web.leimondata.cn:7199
|
|
1090
|
+
this.props.resourcePath + "/log4b.js",
|
|
1091
|
+
this.props.resourcePath + "/meeting_api_util.js",
|
|
1092
|
+
this.props.resourcePath + "/mcu.js",
|
|
1093
|
+
this.props.resourcePath + "/client_record.js",
|
|
1094
|
+
this.props.resourcePath + "/meeting_vod.js",
|
|
1095
|
+
this.props.resourcePath + "/remote_record.js",
|
|
1096
|
+
this.props.resourcePath + "/meeting_invite.js",
|
|
1097
|
+
this.props.resourcePath + "/meeting_im.js",
|
|
1098
|
+
this.props.resourcePath + "/meeting_camera_stream.js",
|
|
1099
|
+
this.props.resourcePath + "/meeting_file_stream.js",
|
|
1100
|
+
this.props.resourcePath + "/meeting_desk_stream.js",
|
|
1101
|
+
this.props.resourcePath + "/meeting_html_stream.js",
|
|
1102
|
+
this.props.resourcePath + "/meeting_beautify_stream.js",
|
|
1103
|
+
this.props.resourcePath + "/stream.js",
|
|
1104
|
+
this.props.resourcePath + "/room.js",
|
|
1105
|
+
this.props.resourcePath + "/backgroundBlur.js",
|
|
1106
|
+
this.props.resourcePath + "/meeting_api.js",
|
|
1107
|
+
this.props.resourcePath + "/html2image.js",
|
|
1108
|
+
this.props.resourcePath + "/reconnecting-websocket.min.js",
|
|
1109
|
+
this.props.resourcePath + "/mtc_api.js",
|
|
1110
|
+
this.props.resourcePath + "/BandwidthHandler.js",
|
|
1111
|
+
this.props.resourcePath + "/RecordRTC.min.js",
|
|
1112
|
+
// "https://gw.alipayobjects.com/os/lib/recordrtc/5.5.9/RecordRTC.min.js",
|
|
1113
|
+
this.props.resourcePath + "/pdf.js",
|
|
1114
|
+
this.props.resourcePath + "/EBML.js",
|
|
1115
|
+
this.props.resourcePath + "/adapter.js",
|
|
1116
|
+
this.props.resourcePath + "/beauty.js",
|
|
1117
|
+
this.props.resourcePath + "/getMediaInfo.js",
|
|
1131
1118
|
]
|
|
1132
1119
|
const that = this
|
|
1133
1120
|
let i = 0
|
|
@@ -1151,6 +1138,9 @@ class Video extends Component {
|
|
|
1151
1138
|
script.onload = () => {
|
|
1152
1139
|
that.test_controller = new McuController();
|
|
1153
1140
|
that.mountClick()
|
|
1141
|
+
that.setState({
|
|
1142
|
+
loading: false,
|
|
1143
|
+
})
|
|
1154
1144
|
}
|
|
1155
1145
|
}
|
|
1156
1146
|
} else {
|
|
@@ -1439,10 +1429,10 @@ class Video extends Component {
|
|
|
1439
1429
|
isModalVisibleFacial: false
|
|
1440
1430
|
})
|
|
1441
1431
|
};
|
|
1432
|
+
// 坐席签字
|
|
1442
1433
|
transcribingClick = () => {
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
content: JSON.stringify(this.state.transcribingData)
|
|
1434
|
+
this.setState({
|
|
1435
|
+
isModalVisibleSign: true,
|
|
1446
1436
|
})
|
|
1447
1437
|
};
|
|
1448
1438
|
invitationClick = () => {
|
|
@@ -1531,7 +1521,6 @@ class Video extends Component {
|
|
|
1531
1521
|
try {
|
|
1532
1522
|
let result = await API.counterSign({
|
|
1533
1523
|
sessionId: this.state.sessionId,
|
|
1534
|
-
callbackUrl: this.state.signData,
|
|
1535
1524
|
file: data.file
|
|
1536
1525
|
});
|
|
1537
1526
|
console.log(result)
|
|
@@ -1539,7 +1528,6 @@ class Video extends Component {
|
|
|
1539
1528
|
message.success('签字成功')
|
|
1540
1529
|
this.setState({
|
|
1541
1530
|
isModalVisibleSign: false,
|
|
1542
|
-
signData: ''
|
|
1543
1531
|
})
|
|
1544
1532
|
} else {
|
|
1545
1533
|
message.success('签字失败')
|
|
@@ -1553,10 +1541,17 @@ class Video extends Component {
|
|
|
1553
1541
|
file: this.signCanvas.current.canvas.drawing.toDataURL('image/png')
|
|
1554
1542
|
})
|
|
1555
1543
|
}
|
|
1544
|
+
switchExternal=()=>{
|
|
1545
|
+
this.setState({
|
|
1546
|
+
isPDF: true
|
|
1547
|
+
})
|
|
1548
|
+
}
|
|
1556
1549
|
render() {
|
|
1557
|
-
|
|
1550
|
+
const pdfChildren = React.cloneElement(this.props.children,{width: 100, height: 100, id: 12})
|
|
1558
1551
|
return (
|
|
1552
|
+
|
|
1559
1553
|
<div className="all">
|
|
1554
|
+
<Spin spinning={this.state.loading} tip="视频初始化中...">
|
|
1560
1555
|
<Header></Header>
|
|
1561
1556
|
<div className="health">
|
|
1562
1557
|
<div className="wrapper">
|
|
@@ -1626,8 +1621,8 @@ class Video extends Component {
|
|
|
1626
1621
|
|
|
1627
1622
|
</div>
|
|
1628
1623
|
<div className={`itemed ${this.state.isBigVideo == 'video2' ? 'item1' : ""}`}>
|
|
1629
|
-
|
|
1630
|
-
|
|
1624
|
+
|
|
1625
|
+
<div onClick={this.enlargeClick.bind(this, 'isLangVideo2')}>
|
|
1631
1626
|
<video
|
|
1632
1627
|
id="video2"
|
|
1633
1628
|
autoPlay
|
|
@@ -1638,12 +1633,6 @@ class Video extends Component {
|
|
|
1638
1633
|
<label style={{ display: 'none' }} id="feedId2" type="text" />
|
|
1639
1634
|
<canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView2" width="70" height="70"></canvas>
|
|
1640
1635
|
</div>
|
|
1641
|
-
:
|
|
1642
|
-
<div className="video" id="touBoxItem">
|
|
1643
|
-
</div>
|
|
1644
|
-
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
1636
|
</div>
|
|
1648
1637
|
<div className={`itemed ${this.state.isBigVideo == 'video3' ? 'item1' : ""}`}
|
|
1649
1638
|
onClick={this.enlargeClick.bind(this, 'isLangVideo3')}>
|
|
@@ -1681,18 +1670,23 @@ class Video extends Component {
|
|
|
1681
1670
|
<label style={{ display: 'none' }} id="feedId5" type="text" />
|
|
1682
1671
|
<canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView5" width="70" height="70"></canvas>
|
|
1683
1672
|
</div>
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1673
|
+
<div onClick={this.enlargeClick.bind(this, 'isLangVideo6')} className={`${this.state.isBigVideo == 'video6' ? (this.state.isPDF ? 'item1' : 'item1 itemed') : "itemed"}`}>
|
|
1674
|
+
<div style={{ display: (this.state.isPDF) ? '' : 'none', }} id="touBoxItem">
|
|
1675
|
+
{pdfChildren}
|
|
1676
|
+
</div>
|
|
1677
|
+
<div style={this.state.isPDF ? {display: 'none'}: {}}>
|
|
1678
|
+
<video
|
|
1679
|
+
id="video6"
|
|
1680
|
+
autoPlay
|
|
1681
|
+
muted={true}
|
|
1682
|
+
className="video"
|
|
1683
|
+
/>
|
|
1684
|
+
<audio id="audio6" autoPlay/>
|
|
1685
|
+
<label style={{display: 'none'}} id="feedId6" type="text"/>
|
|
1686
|
+
<canvas style={{ display: (this.state.isCustomer) ? '' : 'none', }} className="canvasClass" id="subscribe_volumeView6" width="70" height="70"></canvas>
|
|
1687
|
+
</div>
|
|
1688
|
+
|
|
1689
|
+
</div>
|
|
1696
1690
|
</div>
|
|
1697
1691
|
|
|
1698
1692
|
</div>
|
|
@@ -1701,7 +1695,6 @@ class Video extends Component {
|
|
|
1701
1695
|
screenName={this.state.screenName}
|
|
1702
1696
|
suspendName={this.state.suspendName}
|
|
1703
1697
|
cameraImg={this.state.cameraImg}
|
|
1704
|
-
isTranscribing={this.state.isTranscribing}
|
|
1705
1698
|
customerList={this.state.customerList}
|
|
1706
1699
|
suspend={this.suspend}
|
|
1707
1700
|
voice={this.voice}
|
|
@@ -1714,6 +1707,7 @@ class Video extends Component {
|
|
|
1714
1707
|
invitationClick={this.invitationClick}
|
|
1715
1708
|
customerFaceClick={this.customerFaceClick}
|
|
1716
1709
|
ocrClick={this.ocrClick}
|
|
1710
|
+
switchExternal={this.switchExternal}
|
|
1717
1711
|
></Foot>
|
|
1718
1712
|
<Modal cancelText="取消" okText="确定" visible={this.state.isModalVisible} onOk={this.handleOk}
|
|
1719
1713
|
onCancel={this.handleCancel}>
|
|
@@ -1770,8 +1764,9 @@ class Video extends Component {
|
|
|
1770
1764
|
<video className="mixedvideo" id="mixedvideo" autoPlay muted={true} width="0" height="0"
|
|
1771
1765
|
webkit-playsinline="true" playsInline={true} x5-playsinline="x5-playsinline"
|
|
1772
1766
|
x-webkit-airplay="true"></video>
|
|
1773
|
-
|
|
1767
|
+
</Spin>
|
|
1774
1768
|
</div>
|
|
1769
|
+
|
|
1775
1770
|
);
|
|
1776
1771
|
}
|
|
1777
1772
|
}
|
|
@@ -1779,6 +1774,7 @@ Video.defaultProps = {
|
|
|
1779
1774
|
tellerAccount: 't001',
|
|
1780
1775
|
businessNumber: '123',
|
|
1781
1776
|
callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
|
|
1782
|
-
|
|
1777
|
+
roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
|
|
1778
|
+
resourcePath:'https://counter-web.leimondata.cn:7199',
|
|
1783
1779
|
}
|
|
1784
1780
|
export default Video
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
}
|
|
78
78
|
.health{
|
|
79
79
|
margin: 20px;
|
|
80
|
-
height:
|
|
80
|
+
height: ~"calc(100vh - 60px)";
|
|
81
81
|
}
|
|
82
82
|
.all{
|
|
83
83
|
height: 100%;
|
|
@@ -129,4 +129,7 @@
|
|
|
129
129
|
border:1px dashed #DDDDDD;
|
|
130
130
|
margin: 24px;
|
|
131
131
|
flex:1;
|
|
132
|
+
}
|
|
133
|
+
.ant-spin-nested-loading,.ant-spin-container{
|
|
134
|
+
height: 100%;
|
|
132
135
|
}
|