react_hsbc_teller 2.0.54 → 2.0.56
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/.babelrc +39 -39
- package/README.en.md +36 -36
- package/README.md +329 -323
- package/config/webpack.config.js +119 -119
- package/config/webpack.dev.js +108 -108
- package/config/webpack.prod.js +104 -104
- package/lib/hsbc.js +1 -1
- package/lib/hsbc.js.LICENSE.txt +13 -16
- package/package.json +110 -110
- package/packages/api/api.js +818 -818
- package/packages/api/server.js +50 -50
- package/packages/common/index.esm.js +374 -374
- package/packages/demo/demo.js +306 -306
- package/packages/demo/index.js +3 -3
- package/packages/demo/pdf.js +94 -94
- package/packages/envconfig/envconfig.js +12 -12
- package/packages/index.js +2 -2
- package/packages/pages/components/step/step.jsx +32 -31
- package/packages/pages/foot/foot.jsx +235 -235
- package/packages/pages/foot/foot.less +85 -85
- package/packages/pages/header/header.jsx +15 -15
- package/packages/pages/header/header.less +51 -51
- package/packages/pages/index.jsx +52 -52
- package/packages/pages/multiModule/components/copy/agree.jsx +115 -115
- package/packages/pages/multiModule/components/copy/agree.less +105 -105
- package/packages/pages/multiModule/components/copy/copyTwo.jsx +682 -682
- package/packages/pages/multiModule/components/copy/copyTwo.less +180 -180
- package/packages/pages/multiModule/components/copy/copy_en.jsx +368 -368
- package/packages/pages/multiModule/components/copy/copy_en.less +145 -145
- package/packages/pages/multiModule/components/copy/copylist.jsx +291 -291
- package/packages/pages/multiModule/components/copy/copylist.less +83 -83
- package/packages/pages/multiModule/components/copy/risk.jsx +296 -296
- package/packages/pages/multiModule/components/copy/risk.less +123 -123
- package/packages/pages/multiModule/components/sign/signMy.jsx +308 -308
- package/packages/pages/multiModule/components/sign/signMy.less +127 -127
- package/packages/pages/multiModule/components/subscribe/subscribe.jsx +113 -113
- package/packages/pages/multiModule/components/subscribe/subscribe.less +82 -82
- package/packages/pages/multiModule/multiModule.jsx +26 -26
- package/packages/pages/multiModule/multiModule.less +19 -19
- package/packages/pages/sign/signMy.jsx +223 -223
- package/packages/pages/sign/signMy.less +129 -129
- package/packages/pages/video/video.jsx +7746 -7745
- package/packages/pages/video/video.less +715 -715
- package/packages/style/index.less +1 -1
- package/packages/style/reset.less +345 -345
- package/packages/utils/asrController.js +259 -259
- package/packages/utils/asyncComponent.jsx +26 -26
- package/packages/utils/mixin.js +27 -27
- package/packages/utils/setRem.js +10 -10
- package/packages/utils/utils.js +199 -199
- package/public/index.html +77 -77
- package/src/index.js +11 -11
- package/src/index.less +5 -5
- package/tsconfig.json +11 -11
package/packages/demo/demo.js
CHANGED
|
@@ -1,306 +1,306 @@
|
|
|
1
|
-
import React, { Component } from "react";
|
|
2
|
-
import HSBC from "../pages/index";
|
|
3
|
-
import Pdf from './pdf.js'
|
|
4
|
-
|
|
5
|
-
class Demo extends Component {
|
|
6
|
-
state = {
|
|
7
|
-
shareMask: false,
|
|
8
|
-
imRoomId: "",
|
|
9
|
-
sessionId: "",
|
|
10
|
-
mtoken: "",
|
|
11
|
-
roomId: "",
|
|
12
|
-
// roomId: '',
|
|
13
|
-
// mtoken: '',
|
|
14
|
-
// imRoomId: '',
|
|
15
|
-
// sessionId: '',
|
|
16
|
-
pdfRendering: false,
|
|
17
|
-
isVideo: false,
|
|
18
|
-
tellerAccount: 'wmzTeller',
|
|
19
|
-
// callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
|
|
20
|
-
callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
|
|
21
|
-
businessNumber: '123',
|
|
22
|
-
lang: 'zh',
|
|
23
|
-
// roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
|
|
24
|
-
// baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
|
|
25
|
-
// resourcePath: 'https://counter-web.leimondata.cn:7199',
|
|
26
|
-
// resourcePath:'http://121.196.19.70:8027/',
|
|
27
|
-
roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
|
|
28
|
-
baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
|
|
29
|
-
resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
|
|
30
|
-
prohibitPrompt: '无客户',
|
|
31
|
-
titleBackground: '#40a9ff',
|
|
32
|
-
titleColor: '#faad14',
|
|
33
|
-
microphoneSize: 50,
|
|
34
|
-
fontSize: 14,
|
|
35
|
-
fontFamily: 'auto',
|
|
36
|
-
isTranscribing: false,
|
|
37
|
-
userSide: 2,
|
|
38
|
-
meetingDuration: 1, // 会议时长,单位小时
|
|
39
|
-
recordMode: 1, // 录制模式 1远程录制 2网点录制
|
|
40
|
-
defaultBranchCode: "BranchCode",// 员工网点缩写
|
|
41
|
-
customerId: "testCustomerId", //客户号
|
|
42
|
-
salesBranchCode: 'salesBranchCode', //网点编号(分行号)
|
|
43
|
-
financialOffice: "defaultOfficeId", // 理财室
|
|
44
|
-
}
|
|
45
|
-
componentWillMount() {
|
|
46
|
-
}
|
|
47
|
-
handleChangeRoomId = (event) => {
|
|
48
|
-
this.setState({roomId: event.target.value});
|
|
49
|
-
window.localStorage.setItem('roomId', event.target.value)
|
|
50
|
-
}
|
|
51
|
-
handleChangeRToken = (event) => {
|
|
52
|
-
this.setState({mtoken: event.target.value});
|
|
53
|
-
window.localStorage.setItem('mtoken', event.target.value)
|
|
54
|
-
}
|
|
55
|
-
handleChangeSessionId = (event) => {
|
|
56
|
-
this.setState({sessionId: event.target.value});
|
|
57
|
-
window.localStorage.setItem('sessionId', event.target.value)
|
|
58
|
-
}
|
|
59
|
-
handleChangeImRoomId = (event) => {
|
|
60
|
-
this.setState({imRoomId: event.target.value});
|
|
61
|
-
window.localStorage.setItem('imRoomId', event.target.value)
|
|
62
|
-
}
|
|
63
|
-
startVideo = () => {
|
|
64
|
-
this.setState({
|
|
65
|
-
isVideo: true
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
onLeaveRoom = (val) => {
|
|
69
|
-
console.log(val)
|
|
70
|
-
if (val.code == 1) {
|
|
71
|
-
this.setState({
|
|
72
|
-
isVideo: false
|
|
73
|
-
})
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
handleChangeTeller = (event) => {
|
|
77
|
-
this.setState({
|
|
78
|
-
tellerAccount: event.target.value
|
|
79
|
-
})
|
|
80
|
-
}
|
|
81
|
-
handleChangeCall = (event) => {
|
|
82
|
-
this.setState({
|
|
83
|
-
callbackUrl: event.target.value
|
|
84
|
-
})
|
|
85
|
-
}
|
|
86
|
-
handleChangeBysiness = (event) => {
|
|
87
|
-
this.setState({
|
|
88
|
-
businessNumber: event.target.value
|
|
89
|
-
})
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
handleRoomServerUrl = (event) => {
|
|
93
|
-
this.setState({
|
|
94
|
-
roomServerUrl: event.target.value
|
|
95
|
-
})
|
|
96
|
-
}
|
|
97
|
-
handleBaseURL = (event) => {
|
|
98
|
-
this.setState({
|
|
99
|
-
baseURL: event.target.value
|
|
100
|
-
})
|
|
101
|
-
}
|
|
102
|
-
handleChangeisTranscribing = (event) => {
|
|
103
|
-
this.setState({
|
|
104
|
-
isTranscribing: event.target.value
|
|
105
|
-
})
|
|
106
|
-
}
|
|
107
|
-
handleResourcePath = (event) => {
|
|
108
|
-
this.setState({
|
|
109
|
-
resourcePath: event.target.value
|
|
110
|
-
})
|
|
111
|
-
}
|
|
112
|
-
imgCallback=(file)=>{
|
|
113
|
-
console.log('errorType',file)
|
|
114
|
-
}
|
|
115
|
-
shareMaskClick=()=>{
|
|
116
|
-
console.log(this.state.shareMask)
|
|
117
|
-
|
|
118
|
-
if(this.state.shareMask) {
|
|
119
|
-
this.setState({
|
|
120
|
-
shareMask: false
|
|
121
|
-
}, ()=>{
|
|
122
|
-
console.log(this.state.shareMask)
|
|
123
|
-
})
|
|
124
|
-
} else {
|
|
125
|
-
this.setState({
|
|
126
|
-
shareMask: true
|
|
127
|
-
}, ()=>{
|
|
128
|
-
console.log(this.state.shareMask)
|
|
129
|
-
})
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
}
|
|
133
|
-
pdfRenderingClick=()=>{
|
|
134
|
-
if(this.state.pdfRendering) {
|
|
135
|
-
this.setState({
|
|
136
|
-
pdfRendering: false
|
|
137
|
-
})
|
|
138
|
-
} else {
|
|
139
|
-
this.setState({
|
|
140
|
-
pdfRendering: true
|
|
141
|
-
})
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
createRoomCallback=(data)=>{
|
|
145
|
-
console.log('createRoomCallback', data)
|
|
146
|
-
this.setState({roomId: data.data.roomId});
|
|
147
|
-
window.localStorage.setItem('roomId', data.data.roomId)
|
|
148
|
-
this.setState({mtoken: data.data.mtoken});
|
|
149
|
-
window.localStorage.setItem('mtoken', data.data.mtoken)
|
|
150
|
-
this.setState({sessionId:data.data.sessionId});
|
|
151
|
-
window.localStorage.setItem('sessionId',data.data.sessionId)
|
|
152
|
-
this.setState({imRoomId: data.data.imRoomId});
|
|
153
|
-
window.localStorage.setItem('imRoomId', data.data.imRoomId)
|
|
154
|
-
// setInterval(
|
|
155
|
-
// () => {
|
|
156
|
-
// console.log('isTranscribing',this.state.isTranscribing)
|
|
157
|
-
// this.state.isTranscribing = !this.state.isTranscribing
|
|
158
|
-
// this.setState({
|
|
159
|
-
// isTranscribing: this.state.isTranscribing
|
|
160
|
-
// })
|
|
161
|
-
// console.log('isTranscribing',this.state.isTranscribing)
|
|
162
|
-
// },
|
|
163
|
-
// 5000
|
|
164
|
-
// );
|
|
165
|
-
}
|
|
166
|
-
joinRoomCallback=(data)=>{
|
|
167
|
-
console.log('joinRoomCallback', data)
|
|
168
|
-
}
|
|
169
|
-
handleChangeUserSide = (event) => {
|
|
170
|
-
this.setState({
|
|
171
|
-
userSide: event.target.value
|
|
172
|
-
})
|
|
173
|
-
}
|
|
174
|
-
userExit =(val)=>{
|
|
175
|
-
console.log(val)
|
|
176
|
-
}
|
|
177
|
-
staffPermission=(val)=>{
|
|
178
|
-
return new Promise((resolve, reject) => {
|
|
179
|
-
setTimeout(() => { // 定时器
|
|
180
|
-
if(val.staffId && val.password) {
|
|
181
|
-
resolve('成功')
|
|
182
|
-
} else {
|
|
183
|
-
reject('失败')
|
|
184
|
-
}
|
|
185
|
-
}, 2000)
|
|
186
|
-
|
|
187
|
-
})
|
|
188
|
-
}
|
|
189
|
-
componentDidCatch(error, info) {
|
|
190
|
-
console.log('componentDidCatch')
|
|
191
|
-
console.error(error, info)
|
|
192
|
-
}
|
|
193
|
-
render() {
|
|
194
|
-
return (
|
|
195
|
-
<div className="test">
|
|
196
|
-
{
|
|
197
|
-
this.state.isVideo ?
|
|
198
|
-
<div>
|
|
199
|
-
<HSBC
|
|
200
|
-
isOpenSound={true}
|
|
201
|
-
shareMask={this.state.shareMask}
|
|
202
|
-
pdfRendering={this.state.pdfRendering}
|
|
203
|
-
roomId={this.state.roomId}
|
|
204
|
-
mtoken={this.state.mtoken}
|
|
205
|
-
sessionId={this.state.sessionId}
|
|
206
|
-
imRoomId={this.state.imRoomId}
|
|
207
|
-
userSide={this.state.userSide}
|
|
208
|
-
whetherDetectFace={true}
|
|
209
|
-
whetherDetectLight={true}
|
|
210
|
-
whetherNeedAsr={true}
|
|
211
|
-
screenSharedInterval={6}
|
|
212
|
-
prohibitPrompt={this.state.prohibitPrompt}
|
|
213
|
-
voiceColor={this.state.voiceColor}
|
|
214
|
-
titleBackground={this.state.titleBackground}
|
|
215
|
-
titleColor={this.state.titleColor}
|
|
216
|
-
microphoneSize={this.state.microphoneSize}
|
|
217
|
-
fontSize={this.state.fontSize}
|
|
218
|
-
fontFamily={this.state.fontFamily}
|
|
219
|
-
tellerAccount={this.state.tellerAccount}
|
|
220
|
-
callbackUrl={this.state.callbackUrl}
|
|
221
|
-
businessNumber={this.state.businessNumber}
|
|
222
|
-
lang={this.state.lang}
|
|
223
|
-
isWeakSound={true}
|
|
224
|
-
roomServerUrl={this.state.roomServerUrl}
|
|
225
|
-
baseURL={this.state.baseURL}
|
|
226
|
-
resourcePath={this.state.resourcePath}
|
|
227
|
-
isTranscribing={this.state.isTranscribing}
|
|
228
|
-
meetingDuration={this.state.meetingDuration}
|
|
229
|
-
recordMode={this.state.recordMode}
|
|
230
|
-
defaultBranchCode={this.state.defaultBranchCode}
|
|
231
|
-
customerId={this.state.customerId}
|
|
232
|
-
salesBranchCode={this.state.salesBranchCode}
|
|
233
|
-
financialOffice={this.state.financialOffice}
|
|
234
|
-
onLeaveRoom={this.onLeaveRoom}
|
|
235
|
-
getBusinessData={() => { return { businessList: [], businessType: 'REC' } }}
|
|
236
|
-
createRoomCallback={this.createRoomCallback}
|
|
237
|
-
joinRoomCallback={this.joinRoomCallback}
|
|
238
|
-
imgCallback={this.imgCallback}
|
|
239
|
-
sfpCallback={()=>{console.log('sfpCallback success')}}
|
|
240
|
-
signatureCallback={(msg)=>{console.log('signatureCallback', msg)}}
|
|
241
|
-
OnNetworkWeak={(a, b, c)=>{console.log('OnNetworkWeak', a,b,c)}}
|
|
242
|
-
userExit={this.userExit}
|
|
243
|
-
staffPermission={this.staffPermission}
|
|
244
|
-
>
|
|
245
|
-
|
|
246
|
-
<Pdf></Pdf>
|
|
247
|
-
</HSBC>
|
|
248
|
-
<button onClick={this.shareMaskClick.bind(this)}>遮罩层</button>
|
|
249
|
-
<button onClick={this.pdfRenderingClick.bind(this)}>{this.state.pdfRendering?'继续':'暂停'}渲染</button>
|
|
250
|
-
</div>
|
|
251
|
-
:
|
|
252
|
-
<div>
|
|
253
|
-
坐席账号:<input placeholder="请输入坐席账号" value={this.state.tellerAccount} onChange={e => this.handleChangeTeller(e)}></input>
|
|
254
|
-
回调地址:<input placeholder="请输入回调地址" value={this.state.callbackUrl} onChange={e => this.handleChangeCall(e)}></input>
|
|
255
|
-
全局流水号:<input placeholder="请输入全局流水号" value={this.state.businessNumber} onChange={e => this.handleChangeBysiness(e)}></input>
|
|
256
|
-
阿里服务器地址:<input placeholder="请输入阿里服务器地址" value={this.state.roomServerUrl} onChange={e => this.handleRoomServerUrl(e)}></input>
|
|
257
|
-
接口地址:<input placeholder="请输入接口地址" value={this.state.baseURL} onChange={e => this.handleBaseURL(e)}></input>
|
|
258
|
-
阿里资源服务地址:<input placeholder="请输入阿里资源服务地址" value={this.state.resourcePath} onChange={e => this.handleResourcePath(e)}></input>
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
<div>roomId: <input type="text" value={this.state.roomId} onChange={this.handleChangeRoomId} /></div>
|
|
262
|
-
<div>rtoken: <input type="text" value={this.state.mtoken} onChange={this.handleChangeRToken} /></div>
|
|
263
|
-
<div>sessionId: <input type="text" value={this.state.sessionId} onChange={this.handleChangeSessionId} /></div>
|
|
264
|
-
<div>imRoomId: <input type="text" value={this.state.imRoomId} onChange={this.handleChangeImRoomId} /></div>
|
|
265
|
-
<div>isTranscribing: <input type="text" value={this.state.isTranscribing} onChange={this.handleChangeisTranscribing} /></div>
|
|
266
|
-
<div>userSide: <input type="text" value={this.state.userSide} onChange={this.handleChangeUserSide} /></div>
|
|
267
|
-
<div>meetingDuration: <input type="text" value={this.state.meetingDuration} onChange={(e)=>{this.setState({ meetingDuration: e.target.value })}} /></div>
|
|
268
|
-
<div>recordMode: <input type="text" value={this.state.recordMode} onChange={(e)=>{this.setState({ recordMode: e.target.value })}} /></div>
|
|
269
|
-
<div>defaultBranchCode: <input type="text" value={this.state.defaultBranchCode} onChange={(e)=>{this.setState({ defaultBranchCode: e.target.value })}} /></div>
|
|
270
|
-
<div>customerId: <input type="text" value={this.state.customerId} onChange={(e)=>{this.setState({ customerId: e.target.value })}} /></div>
|
|
271
|
-
<div>salesBranchCode: <input type="text" value={this.state.salesBranchCode} onChange={(e)=>{this.setState({ salesBranchCode: e.target.value })}} /></div>
|
|
272
|
-
<div>financialOffice: <input type="text" value={this.state.financialOffice} onChange={(e)=>{this.setState({ financialOffice: e.target.value })}} /></div>
|
|
273
|
-
|
|
274
|
-
<button className="button" onClick={this.startVideo.bind(this)}>开启视频</button>
|
|
275
|
-
</div>
|
|
276
|
-
}
|
|
277
|
-
</div>
|
|
278
|
-
// <div>
|
|
279
|
-
// { this.state.isPlay?
|
|
280
|
-
// <HSBC
|
|
281
|
-
// tellerAccount={this.state.tellerAccount}
|
|
282
|
-
// roomId={this.state.roomId}
|
|
283
|
-
// mtoken={this.state.mtoken}
|
|
284
|
-
// sessionId={this.state.sessionId}
|
|
285
|
-
// imRoomId={this.state.imRoomId}
|
|
286
|
-
// name={this.state.name}
|
|
287
|
-
// lang={this.state.lang}
|
|
288
|
-
// onLeaveRoom={this.exitRoom}
|
|
289
|
-
// />
|
|
290
|
-
// :
|
|
291
|
-
// <div style={{padding: '20px'}}>
|
|
292
|
-
// <div>账号: <input type="text" value={this.state.tellerAccount} onChange={this.handleChangeAccount} /></div>
|
|
293
|
-
// <div>roomId: <input type="text" value={this.state.roomId} onChange={this.handleChangeRoomId} /></div>
|
|
294
|
-
// <div>rtoken: <input type="text" value={this.state.mtoken} onChange={this.handleChangeRToken} /></div>
|
|
295
|
-
// <div>sessionId: <input type="text" value={this.state.sessionId} onChange={this.handleChangeSessionId} /></div>
|
|
296
|
-
// <div>imRoomId: <input type="text" value={this.state.imRoomId} onChange={this.handleChangeImRoomId} /></div>
|
|
297
|
-
// <div>姓名(非必填): <input type="text" value={this.state.name} onChange={this.handleChangeName} /></div>
|
|
298
|
-
// <div>系统语言: <input type="text" value={this.state.lang} onChange={this.handleChangeLang} /></div>
|
|
299
|
-
// <div><button onClick={this.joinRoom} >加入房间</button></div>
|
|
300
|
-
// </div>}
|
|
301
|
-
// </div>
|
|
302
|
-
);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
export default Demo;
|
|
1
|
+
import React, { Component } from "react";
|
|
2
|
+
import HSBC from "../pages/index";
|
|
3
|
+
import Pdf from './pdf.js'
|
|
4
|
+
|
|
5
|
+
class Demo extends Component {
|
|
6
|
+
state = {
|
|
7
|
+
shareMask: false,
|
|
8
|
+
imRoomId: "",
|
|
9
|
+
sessionId: "",
|
|
10
|
+
mtoken: "",
|
|
11
|
+
roomId: "",
|
|
12
|
+
// roomId: '',
|
|
13
|
+
// mtoken: '',
|
|
14
|
+
// imRoomId: '',
|
|
15
|
+
// sessionId: '',
|
|
16
|
+
pdfRendering: false,
|
|
17
|
+
isVideo: false,
|
|
18
|
+
tellerAccount: 'wmzTeller',
|
|
19
|
+
// callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
|
|
20
|
+
callbackUrl: 'https://aag.wealth-platform.uat.ali.cloud.cn.hsbc/nosaml/api/appointment/wealth/api/v1/appointment/ali/createMeetingRoom',
|
|
21
|
+
businessNumber: '123',
|
|
22
|
+
lang: 'zh',
|
|
23
|
+
// roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
|
|
24
|
+
// baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
|
|
25
|
+
// resourcePath: 'https://counter-web.leimondata.cn:7199',
|
|
26
|
+
// resourcePath:'http://121.196.19.70:8027/',
|
|
27
|
+
roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
|
|
28
|
+
baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
|
|
29
|
+
resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
|
|
30
|
+
prohibitPrompt: '无客户',
|
|
31
|
+
titleBackground: '#40a9ff',
|
|
32
|
+
titleColor: '#faad14',
|
|
33
|
+
microphoneSize: 50,
|
|
34
|
+
fontSize: 14,
|
|
35
|
+
fontFamily: 'auto',
|
|
36
|
+
isTranscribing: false,
|
|
37
|
+
userSide: 2,
|
|
38
|
+
meetingDuration: 1, // 会议时长,单位小时
|
|
39
|
+
recordMode: 1, // 录制模式 1远程录制 2网点录制
|
|
40
|
+
defaultBranchCode: "BranchCode",// 员工网点缩写
|
|
41
|
+
customerId: "testCustomerId", //客户号
|
|
42
|
+
salesBranchCode: 'salesBranchCode', //网点编号(分行号)
|
|
43
|
+
financialOffice: "defaultOfficeId", // 理财室
|
|
44
|
+
}
|
|
45
|
+
componentWillMount() {
|
|
46
|
+
}
|
|
47
|
+
handleChangeRoomId = (event) => {
|
|
48
|
+
this.setState({roomId: event.target.value});
|
|
49
|
+
window.localStorage.setItem('roomId', event.target.value)
|
|
50
|
+
}
|
|
51
|
+
handleChangeRToken = (event) => {
|
|
52
|
+
this.setState({mtoken: event.target.value});
|
|
53
|
+
window.localStorage.setItem('mtoken', event.target.value)
|
|
54
|
+
}
|
|
55
|
+
handleChangeSessionId = (event) => {
|
|
56
|
+
this.setState({sessionId: event.target.value});
|
|
57
|
+
window.localStorage.setItem('sessionId', event.target.value)
|
|
58
|
+
}
|
|
59
|
+
handleChangeImRoomId = (event) => {
|
|
60
|
+
this.setState({imRoomId: event.target.value});
|
|
61
|
+
window.localStorage.setItem('imRoomId', event.target.value)
|
|
62
|
+
}
|
|
63
|
+
startVideo = () => {
|
|
64
|
+
this.setState({
|
|
65
|
+
isVideo: true
|
|
66
|
+
})
|
|
67
|
+
}
|
|
68
|
+
onLeaveRoom = (val) => {
|
|
69
|
+
console.log(val)
|
|
70
|
+
if (val.code == 1) {
|
|
71
|
+
this.setState({
|
|
72
|
+
isVideo: false
|
|
73
|
+
})
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
handleChangeTeller = (event) => {
|
|
77
|
+
this.setState({
|
|
78
|
+
tellerAccount: event.target.value
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
handleChangeCall = (event) => {
|
|
82
|
+
this.setState({
|
|
83
|
+
callbackUrl: event.target.value
|
|
84
|
+
})
|
|
85
|
+
}
|
|
86
|
+
handleChangeBysiness = (event) => {
|
|
87
|
+
this.setState({
|
|
88
|
+
businessNumber: event.target.value
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
handleRoomServerUrl = (event) => {
|
|
93
|
+
this.setState({
|
|
94
|
+
roomServerUrl: event.target.value
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
handleBaseURL = (event) => {
|
|
98
|
+
this.setState({
|
|
99
|
+
baseURL: event.target.value
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
handleChangeisTranscribing = (event) => {
|
|
103
|
+
this.setState({
|
|
104
|
+
isTranscribing: event.target.value
|
|
105
|
+
})
|
|
106
|
+
}
|
|
107
|
+
handleResourcePath = (event) => {
|
|
108
|
+
this.setState({
|
|
109
|
+
resourcePath: event.target.value
|
|
110
|
+
})
|
|
111
|
+
}
|
|
112
|
+
imgCallback=(file)=>{
|
|
113
|
+
console.log('errorType',file)
|
|
114
|
+
}
|
|
115
|
+
shareMaskClick=()=>{
|
|
116
|
+
console.log(this.state.shareMask)
|
|
117
|
+
|
|
118
|
+
if(this.state.shareMask) {
|
|
119
|
+
this.setState({
|
|
120
|
+
shareMask: false
|
|
121
|
+
}, ()=>{
|
|
122
|
+
console.log(this.state.shareMask)
|
|
123
|
+
})
|
|
124
|
+
} else {
|
|
125
|
+
this.setState({
|
|
126
|
+
shareMask: true
|
|
127
|
+
}, ()=>{
|
|
128
|
+
console.log(this.state.shareMask)
|
|
129
|
+
})
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
}
|
|
133
|
+
pdfRenderingClick=()=>{
|
|
134
|
+
if(this.state.pdfRendering) {
|
|
135
|
+
this.setState({
|
|
136
|
+
pdfRendering: false
|
|
137
|
+
})
|
|
138
|
+
} else {
|
|
139
|
+
this.setState({
|
|
140
|
+
pdfRendering: true
|
|
141
|
+
})
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
createRoomCallback=(data)=>{
|
|
145
|
+
console.log('createRoomCallback', data)
|
|
146
|
+
this.setState({roomId: data.data.roomId});
|
|
147
|
+
window.localStorage.setItem('roomId', data.data.roomId)
|
|
148
|
+
this.setState({mtoken: data.data.mtoken});
|
|
149
|
+
window.localStorage.setItem('mtoken', data.data.mtoken)
|
|
150
|
+
this.setState({sessionId:data.data.sessionId});
|
|
151
|
+
window.localStorage.setItem('sessionId',data.data.sessionId)
|
|
152
|
+
this.setState({imRoomId: data.data.imRoomId});
|
|
153
|
+
window.localStorage.setItem('imRoomId', data.data.imRoomId)
|
|
154
|
+
// setInterval(
|
|
155
|
+
// () => {
|
|
156
|
+
// console.log('isTranscribing',this.state.isTranscribing)
|
|
157
|
+
// this.state.isTranscribing = !this.state.isTranscribing
|
|
158
|
+
// this.setState({
|
|
159
|
+
// isTranscribing: this.state.isTranscribing
|
|
160
|
+
// })
|
|
161
|
+
// console.log('isTranscribing',this.state.isTranscribing)
|
|
162
|
+
// },
|
|
163
|
+
// 5000
|
|
164
|
+
// );
|
|
165
|
+
}
|
|
166
|
+
joinRoomCallback=(data)=>{
|
|
167
|
+
console.log('joinRoomCallback', data)
|
|
168
|
+
}
|
|
169
|
+
handleChangeUserSide = (event) => {
|
|
170
|
+
this.setState({
|
|
171
|
+
userSide: event.target.value
|
|
172
|
+
})
|
|
173
|
+
}
|
|
174
|
+
userExit =(val)=>{
|
|
175
|
+
console.log(val)
|
|
176
|
+
}
|
|
177
|
+
staffPermission=(val)=>{
|
|
178
|
+
return new Promise((resolve, reject) => {
|
|
179
|
+
setTimeout(() => { // 定时器
|
|
180
|
+
if(val.staffId && val.password) {
|
|
181
|
+
resolve('成功')
|
|
182
|
+
} else {
|
|
183
|
+
reject('失败')
|
|
184
|
+
}
|
|
185
|
+
}, 2000)
|
|
186
|
+
|
|
187
|
+
})
|
|
188
|
+
}
|
|
189
|
+
componentDidCatch(error, info) {
|
|
190
|
+
console.log('componentDidCatch')
|
|
191
|
+
console.error(error, info)
|
|
192
|
+
}
|
|
193
|
+
render() {
|
|
194
|
+
return (
|
|
195
|
+
<div className="test">
|
|
196
|
+
{
|
|
197
|
+
this.state.isVideo ?
|
|
198
|
+
<div>
|
|
199
|
+
<HSBC
|
|
200
|
+
isOpenSound={true}
|
|
201
|
+
shareMask={this.state.shareMask}
|
|
202
|
+
pdfRendering={this.state.pdfRendering}
|
|
203
|
+
roomId={this.state.roomId}
|
|
204
|
+
mtoken={this.state.mtoken}
|
|
205
|
+
sessionId={this.state.sessionId}
|
|
206
|
+
imRoomId={this.state.imRoomId}
|
|
207
|
+
userSide={this.state.userSide}
|
|
208
|
+
whetherDetectFace={true}
|
|
209
|
+
whetherDetectLight={true}
|
|
210
|
+
whetherNeedAsr={true}
|
|
211
|
+
screenSharedInterval={6}
|
|
212
|
+
prohibitPrompt={this.state.prohibitPrompt}
|
|
213
|
+
voiceColor={this.state.voiceColor}
|
|
214
|
+
titleBackground={this.state.titleBackground}
|
|
215
|
+
titleColor={this.state.titleColor}
|
|
216
|
+
microphoneSize={this.state.microphoneSize}
|
|
217
|
+
fontSize={this.state.fontSize}
|
|
218
|
+
fontFamily={this.state.fontFamily}
|
|
219
|
+
tellerAccount={this.state.tellerAccount}
|
|
220
|
+
callbackUrl={this.state.callbackUrl}
|
|
221
|
+
businessNumber={this.state.businessNumber}
|
|
222
|
+
lang={this.state.lang}
|
|
223
|
+
isWeakSound={true}
|
|
224
|
+
roomServerUrl={this.state.roomServerUrl}
|
|
225
|
+
baseURL={this.state.baseURL}
|
|
226
|
+
resourcePath={this.state.resourcePath}
|
|
227
|
+
isTranscribing={this.state.isTranscribing}
|
|
228
|
+
meetingDuration={this.state.meetingDuration}
|
|
229
|
+
recordMode={this.state.recordMode}
|
|
230
|
+
defaultBranchCode={this.state.defaultBranchCode}
|
|
231
|
+
customerId={this.state.customerId}
|
|
232
|
+
salesBranchCode={this.state.salesBranchCode}
|
|
233
|
+
financialOffice={this.state.financialOffice}
|
|
234
|
+
onLeaveRoom={this.onLeaveRoom}
|
|
235
|
+
getBusinessData={() => { return { businessList: [], businessType: 'REC' } }}
|
|
236
|
+
createRoomCallback={this.createRoomCallback}
|
|
237
|
+
joinRoomCallback={this.joinRoomCallback}
|
|
238
|
+
imgCallback={this.imgCallback}
|
|
239
|
+
sfpCallback={()=>{console.log('sfpCallback success')}}
|
|
240
|
+
signatureCallback={(msg)=>{console.log('signatureCallback', msg)}}
|
|
241
|
+
OnNetworkWeak={(a, b, c)=>{console.log('OnNetworkWeak', a,b,c)}}
|
|
242
|
+
userExit={this.userExit}
|
|
243
|
+
staffPermission={this.staffPermission}
|
|
244
|
+
>
|
|
245
|
+
|
|
246
|
+
<Pdf></Pdf>
|
|
247
|
+
</HSBC>
|
|
248
|
+
<button onClick={this.shareMaskClick.bind(this)}>遮罩层</button>
|
|
249
|
+
<button onClick={this.pdfRenderingClick.bind(this)}>{this.state.pdfRendering?'继续':'暂停'}渲染</button>
|
|
250
|
+
</div>
|
|
251
|
+
:
|
|
252
|
+
<div>
|
|
253
|
+
坐席账号:<input placeholder="请输入坐席账号" value={this.state.tellerAccount} onChange={e => this.handleChangeTeller(e)}></input>
|
|
254
|
+
回调地址:<input placeholder="请输入回调地址" value={this.state.callbackUrl} onChange={e => this.handleChangeCall(e)}></input>
|
|
255
|
+
全局流水号:<input placeholder="请输入全局流水号" value={this.state.businessNumber} onChange={e => this.handleChangeBysiness(e)}></input>
|
|
256
|
+
阿里服务器地址:<input placeholder="请输入阿里服务器地址" value={this.state.roomServerUrl} onChange={e => this.handleRoomServerUrl(e)}></input>
|
|
257
|
+
接口地址:<input placeholder="请输入接口地址" value={this.state.baseURL} onChange={e => this.handleBaseURL(e)}></input>
|
|
258
|
+
阿里资源服务地址:<input placeholder="请输入阿里资源服务地址" value={this.state.resourcePath} onChange={e => this.handleResourcePath(e)}></input>
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
<div>roomId: <input type="text" value={this.state.roomId} onChange={this.handleChangeRoomId} /></div>
|
|
262
|
+
<div>rtoken: <input type="text" value={this.state.mtoken} onChange={this.handleChangeRToken} /></div>
|
|
263
|
+
<div>sessionId: <input type="text" value={this.state.sessionId} onChange={this.handleChangeSessionId} /></div>
|
|
264
|
+
<div>imRoomId: <input type="text" value={this.state.imRoomId} onChange={this.handleChangeImRoomId} /></div>
|
|
265
|
+
<div>isTranscribing: <input type="text" value={this.state.isTranscribing} onChange={this.handleChangeisTranscribing} /></div>
|
|
266
|
+
<div>userSide: <input type="text" value={this.state.userSide} onChange={this.handleChangeUserSide} /></div>
|
|
267
|
+
<div>meetingDuration: <input type="text" value={this.state.meetingDuration} onChange={(e)=>{this.setState({ meetingDuration: e.target.value })}} /></div>
|
|
268
|
+
<div>recordMode: <input type="text" value={this.state.recordMode} onChange={(e)=>{this.setState({ recordMode: e.target.value })}} /></div>
|
|
269
|
+
<div>defaultBranchCode: <input type="text" value={this.state.defaultBranchCode} onChange={(e)=>{this.setState({ defaultBranchCode: e.target.value })}} /></div>
|
|
270
|
+
<div>customerId: <input type="text" value={this.state.customerId} onChange={(e)=>{this.setState({ customerId: e.target.value })}} /></div>
|
|
271
|
+
<div>salesBranchCode: <input type="text" value={this.state.salesBranchCode} onChange={(e)=>{this.setState({ salesBranchCode: e.target.value })}} /></div>
|
|
272
|
+
<div>financialOffice: <input type="text" value={this.state.financialOffice} onChange={(e)=>{this.setState({ financialOffice: e.target.value })}} /></div>
|
|
273
|
+
|
|
274
|
+
<button className="button" onClick={this.startVideo.bind(this)}>开启视频</button>
|
|
275
|
+
</div>
|
|
276
|
+
}
|
|
277
|
+
</div>
|
|
278
|
+
// <div>
|
|
279
|
+
// { this.state.isPlay?
|
|
280
|
+
// <HSBC
|
|
281
|
+
// tellerAccount={this.state.tellerAccount}
|
|
282
|
+
// roomId={this.state.roomId}
|
|
283
|
+
// mtoken={this.state.mtoken}
|
|
284
|
+
// sessionId={this.state.sessionId}
|
|
285
|
+
// imRoomId={this.state.imRoomId}
|
|
286
|
+
// name={this.state.name}
|
|
287
|
+
// lang={this.state.lang}
|
|
288
|
+
// onLeaveRoom={this.exitRoom}
|
|
289
|
+
// />
|
|
290
|
+
// :
|
|
291
|
+
// <div style={{padding: '20px'}}>
|
|
292
|
+
// <div>账号: <input type="text" value={this.state.tellerAccount} onChange={this.handleChangeAccount} /></div>
|
|
293
|
+
// <div>roomId: <input type="text" value={this.state.roomId} onChange={this.handleChangeRoomId} /></div>
|
|
294
|
+
// <div>rtoken: <input type="text" value={this.state.mtoken} onChange={this.handleChangeRToken} /></div>
|
|
295
|
+
// <div>sessionId: <input type="text" value={this.state.sessionId} onChange={this.handleChangeSessionId} /></div>
|
|
296
|
+
// <div>imRoomId: <input type="text" value={this.state.imRoomId} onChange={this.handleChangeImRoomId} /></div>
|
|
297
|
+
// <div>姓名(非必填): <input type="text" value={this.state.name} onChange={this.handleChangeName} /></div>
|
|
298
|
+
// <div>系统语言: <input type="text" value={this.state.lang} onChange={this.handleChangeLang} /></div>
|
|
299
|
+
// <div><button onClick={this.joinRoom} >加入房间</button></div>
|
|
300
|
+
// </div>}
|
|
301
|
+
// </div>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
export default Demo;
|
package/packages/demo/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import Demo from "./demo";
|
|
2
|
-
|
|
3
|
-
export default Demo;
|
|
1
|
+
import Demo from "./demo";
|
|
2
|
+
|
|
3
|
+
export default Demo;
|