react_hsbc_teller 2.0.0 → 2.0.2-4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react_hsbc_teller",
3
- "version": "2.0.0",
3
+ "version": "2.0.24.1",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -57,6 +57,80 @@ class API extends Server{
57
57
  throw err;
58
58
  }
59
59
  }
60
+ /**
61
+ * 用途:获取录制状态
62
+ * @url https://api.cangdu.org/shopro/data/products
63
+ * 返回http_code为200表示成功
64
+ * @method post
65
+ * @return {promise}
66
+ */
67
+ async getRecordStatus(params = {}){
68
+ try{
69
+ let result = await this.axios('get', '/hsbc/record/status?roomId=' + params.roomId, params);
70
+ if(result && result.code === 200){
71
+ return result.data||[];
72
+ }else{
73
+ let err = {
74
+ tip: '录制状态获取失败',
75
+ response: result,
76
+ data: params,
77
+ }
78
+ throw err;
79
+ }
80
+ }catch(err){
81
+ throw err;
82
+ }
83
+ }
84
+ /**
85
+ * 用途:人脸检测
86
+ * @url https://api.cangdu.org/shopro/data/products
87
+ * 返回http_code为200表示成功
88
+ * @method post
89
+ * @return {promise}
90
+ */
91
+ async faceDetection(params = {}){
92
+ try{
93
+ let result = await this.axios('post', '/hsbc/faceDetection', params);
94
+ if(result && result.code === 200){
95
+ return result.data||[];
96
+ }else{
97
+ let err = {
98
+ tip: '人脸检测失败',
99
+ response: result,
100
+ data: params,
101
+ // url: 'https://api.cangdu.org/shopro/data/products',
102
+ }
103
+ throw err;
104
+ }
105
+ }catch(err){
106
+ throw err;
107
+ }
108
+ }
109
+ /**
110
+ * 用途:录制过程打点
111
+ * @url https://api.cangdu.org/shopro/data/products
112
+ * 返回http_code为200表示成功
113
+ * @method post
114
+ * @return {promise}
115
+ */
116
+ async saveVideoPoint(params = {}){
117
+ try{
118
+ let result = await this.axios('post', '/hsbc/business/point', params);
119
+ if(result && result.code === 200){
120
+ return result.data||[];
121
+ }else{
122
+ let err = {
123
+ tip: '打点失败',
124
+ response: result,
125
+ data: params,
126
+ // url: 'https://api.cangdu.org/shopro/data/products',
127
+ }
128
+ throw err;
129
+ }
130
+ }catch(err){
131
+ throw err;
132
+ }
133
+ }
60
134
  async confirmCallback(params = {}){
61
135
  // return this.axios('get', '/lang/select/2', params);
62
136
  try{
@@ -154,6 +228,26 @@ class API extends Server{
154
228
  throw err;
155
229
  }
156
230
  }
231
+ async uploadLogCallback(params = {}){
232
+ // return this.axios('get', '/lang/select/2', params);
233
+ try{
234
+ let result = await this.axios('post', '/sessionLog/saveOrUpdate', params);
235
+ // console.log(result)
236
+ if(result && (result.data instanceof Object) && result.code === 200){
237
+ return result||[];
238
+ }else{
239
+ let err = {
240
+ tip: '服务异常',
241
+ response: result,
242
+ data: params,
243
+ // url: 'https://api.cangdu.org/shopro/data/products',
244
+ }
245
+ throw err;
246
+ }
247
+ }catch(err){
248
+ throw err;
249
+ }
250
+ }
157
251
  async retrieveCustomerInfoByActivityId(params = {}){
158
252
  // return this.axios('get', '/lang/select/2', params);
159
253
  try{
@@ -422,7 +516,31 @@ class API extends Server{
422
516
  throw err;
423
517
  }
424
518
  }
425
-
519
+ /**
520
+ * 用途:查询分行名称
521
+ * @url https://api.cangdu.org/shopro/data/products
522
+ * 返回http_code为200表示成功
523
+ * @method post
524
+ * @return {promise}
525
+ */
526
+ async getBranchName(params = {}){
527
+ try{
528
+ let result = await this.axios('get', '/hsbc/getBranchName?branchCode=' + params.branchCode, params);
529
+ if(result && (result.data instanceof Object) && result.code === 200){
530
+ return result.data||[];
531
+ }else{
532
+ let err = {
533
+ tip: '分行名称获取失败',
534
+ response: result,
535
+ data: params,
536
+ // url: 'https://api.cangdu.org/shopro/data/products',
537
+ }
538
+ throw err;
539
+ }
540
+ }catch(err){
541
+ throw err;
542
+ }
543
+ }
426
544
  /**
427
545
  * 用途:人脸识别
428
546
  * @url https://elm.cangdu.org/v1/addimg/shop
@@ -471,7 +589,24 @@ class API extends Server{
471
589
  throw err;
472
590
  }
473
591
  }
474
-
592
+ async addSensitiveRecord(params = {}){
593
+ try{
594
+ let result = await this.axios('post', '/sensitive/add', params);
595
+ if (result && (result.data instanceof Object) && result.code === 200){
596
+ return result.data||[];
597
+ } else{
598
+ let err = {
599
+ tip: '服务异常',
600
+ response: result,
601
+ data: params,
602
+ // url: 'https://api.cangdu.org/shopro/data/products',
603
+ }
604
+ throw err;
605
+ }
606
+ }catch(err){
607
+ throw err;
608
+ }
609
+ }
475
610
  // /**
476
611
  // * 用途:获取记录数据
477
612
  // * @url https://api.cangdu.org/shopro/data/record
Binary file
Binary file
@@ -21,6 +21,7 @@ roomId
21
21
  // mtoken: '',
22
22
  // imRoomId: '',
23
23
  // sessionId: '',
24
+ pdfRendering: false,
24
25
  isVideo: false,
25
26
  tellerAccount: 'wmzTeller',
26
27
  // callbackUrl: 'http://182.92.184.31:8720/hsbc/callback',
@@ -30,6 +31,7 @@ roomId
30
31
  // roomServerUrl: 'wss://mrtc.mpaas.cn-hangzhou.aliyuncs.com/ws',
31
32
  // baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
32
33
  // resourcePath: 'https://counter-web.leimondata.cn:7199',
34
+ // resourcePath:'http://121.196.19.70:8027/',
33
35
  roomServerUrl: 'wss://app.uat.dsp.hsbcfts.com.cn/mpaas/mrtc/ws',
34
36
  baseURL:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/zuul/api/leimon-counter-api',
35
37
  resourcePath:'https://zuul.uat.dsp.hsbcfts.com.cn/wealth/js/',
@@ -40,23 +42,15 @@ roomId
40
42
  fontSize: 14,
41
43
  fontFamily: 'auto',
42
44
  isTranscribing: false,
43
- userSide: 2
45
+ userSide: 2,
46
+ meetingDuration: 1, // 会议时长,单位小时
47
+ recordMode: 1, // 录制模式 1远程录制 2网点录制
48
+ defaultBranchCode: "BranchCode",// 员工网点缩写
49
+ customerId: "testCustomerId", //客户号
50
+ salesBranchCode: 'salesBranchCode', //网点编号(分行号)
51
+ financialOffice: "defaultOfficeId", // 理财室
44
52
  }
45
53
  componentWillMount() {
46
- // if(window.localStorage.getItem('roomId')) {
47
- // this.setState({roomId: window.localStorage.getItem('roomId')});
48
- // }
49
- // if(window.localStorage.getItem('mtoken')) {
50
- // this.setState({mtoken: window.localStorage.getItem('mtoken')});
51
- // }
52
- // if(window.localStorage.getItem('sessionId')) {
53
- // this.setState({sessionId: window.localStorage.getItem('sessionId')});
54
- // }
55
- // if(window.localStorage.getItem('imRoomId')) {
56
- // this.setState({imRoomId: window.localStorage.getItem('imRoomId')});
57
- // this.startVideo()
58
- // }
59
-
60
54
  }
61
55
  handleChangeRoomId = (event) => {
62
56
  this.setState({roomId: event.target.value});
@@ -142,6 +136,17 @@ shareMaskClick=()=>{
142
136
  }
143
137
 
144
138
  }
139
+ pdfRenderingClick=()=>{
140
+ if(this.state.pdfRendering) {
141
+ this.setState({
142
+ pdfRendering: false
143
+ })
144
+ } else {
145
+ this.setState({
146
+ pdfRendering: true
147
+ })
148
+ }
149
+ }
145
150
  createRoomCallback=(data)=>{
146
151
  console.log('createRoomCallback', data)
147
152
  this.setState({roomId: data.data.roomId});
@@ -195,11 +200,14 @@ userExit =(val)=>{
195
200
  <div>
196
201
  <HSBC
197
202
  shareMask={this.state.shareMask}
203
+ pdfRendering={this.state.pdfRendering}
198
204
  roomId={this.state.roomId}
199
205
  mtoken={this.state.mtoken}
200
206
  sessionId={this.state.sessionId}
201
207
  imRoomId={this.state.imRoomId}
202
208
  userSide={this.state.userSide}
209
+ whetherDetectFace={true}
210
+ whetherDetectLight={true}
203
211
  prohibitPrompt={this.state.prohibitPrompt}
204
212
  voiceColor={this.state.voiceColor}
205
213
  titleBackground={this.state.titleBackground}
@@ -211,14 +219,23 @@ userExit =(val)=>{
211
219
  callbackUrl={this.state.callbackUrl}
212
220
  businessNumber={this.state.businessNumber}
213
221
  lang={this.state.lang}
222
+ isWeakSound={true}
214
223
  roomServerUrl={this.state.roomServerUrl}
215
224
  baseURL={this.state.baseURL}
216
225
  resourcePath={this.state.resourcePath}
217
226
  isTranscribing={this.state.isTranscribing}
227
+ meetingDuration={this.state.meetingDuration}
228
+ recordMode={this.state.recordMode}
229
+ defaultBranchCode={this.state.defaultBranchCode}
230
+ customerId={this.state.customerId}
231
+ salesBranchCode={this.state.salesBranchCode}
232
+ financialOffice={this.state.financialOffice}
218
233
  onLeaveRoom={this.onLeaveRoom}
219
234
  createRoomCallback={this.createRoomCallback}
220
235
  joinRoomCallback={this.joinRoomCallback}
221
236
  imgCallback={this.imgCallback}
237
+ sfpCallback={()=>{console.log('sfpCallback success')}}
238
+ OnNetworkWeak={(a, b, c)=>{console.log('OnNetworkWeak', a,b,c)}}
222
239
  userExit={this.userExit}
223
240
  staffPermission={this.staffPermission}
224
241
  >
@@ -226,6 +243,7 @@ userExit =(val)=>{
226
243
  <Pdf></Pdf>
227
244
  </HSBC>
228
245
  <button onClick={this.shareMaskClick.bind(this)}>遮罩层</button>
246
+ <button onClick={this.pdfRenderingClick.bind(this)}>{this.state.pdfRendering?'继续':'暂停'}渲染</button>
229
247
  </div>
230
248
  :
231
249
  <div>
@@ -243,6 +261,12 @@ userExit =(val)=>{
243
261
  <div>imRoomId: <input type="text" value={this.state.imRoomId} onChange={this.handleChangeImRoomId} /></div>
244
262
  <div>isTranscribing: <input type="text" value={this.state.isTranscribing} onChange={this.handleChangeisTranscribing} /></div>
245
263
  <div>userSide: <input type="text" value={this.state.userSide} onChange={this.handleChangeUserSide} /></div>
264
+ <div>meetingDuration: <input type="text" value={this.state.meetingDuration} onChange={(e)=>{this.setState({ meetingDuration: e.target.value })}} /></div>
265
+ <div>recordMode: <input type="text" value={this.state.recordMode} onChange={(e)=>{this.setState({ recordMode: e.target.value })}} /></div>
266
+ <div>defaultBranchCode: <input type="text" value={this.state.defaultBranchCode} onChange={(e)=>{this.setState({ defaultBranchCode: e.target.value })}} /></div>
267
+ <div>customerId: <input type="text" value={this.state.customerId} onChange={(e)=>{this.setState({ customerId: e.target.value })}} /></div>
268
+ <div>salesBranchCode: <input type="text" value={this.state.salesBranchCode} onChange={(e)=>{this.setState({ salesBranchCode: e.target.value })}} /></div>
269
+ <div>financialOffice: <input type="text" value={this.state.financialOffice} onChange={(e)=>{this.setState({ financialOffice: e.target.value })}} /></div>
246
270
 
247
271
  <button className="button" onClick={this.startVideo.bind(this)}>开启视频</button>
248
272
  </div>
@@ -2,6 +2,7 @@ import React, { Component } from "react";
2
2
 
3
3
  class pdf extends Component {
4
4
  state = {
5
+ testTime: '',
5
6
  isVideo: false,
6
7
  tellerAccount: '',
7
8
  callbackUrl: 'http://47.102.126.132:8720/hsbc/callback',
@@ -11,6 +12,12 @@ class pdf extends Component {
11
12
  baseURL:'https://counter-web.leimondata.cn:18082/api/leimon-counter-api',
12
13
  resourcePath:'https://counter-web.leimondata.cn:7199',
13
14
  }
15
+ componentDidMount () {
16
+ this.countTimer()
17
+ }
18
+ componentWillUnmount() {
19
+ clearInterval(this.state.timer)
20
+ }
14
21
  startVideo = () => {
15
22
  this.setState({
16
23
  isVideo: true
@@ -53,9 +60,16 @@ handleResourcePath = (event) => {
53
60
  resourcePath: event.target.value
54
61
  })
55
62
  }
63
+ countTimer = () => {
64
+ this.state.timer = setInterval(() => {
65
+ this.setState({
66
+ testTime: new Date().toString()
67
+ })
68
+ }, 1000);
69
+ }
56
70
 
57
71
  render() {
58
- console.log('22',this.props)
72
+ // console.log('22',this.props)
59
73
  return (
60
74
  <div className="test" style={{width: this.props.width,height:this.props.height}}>
61
75
  {
@@ -68,6 +82,7 @@ handleResourcePath = (event) => {
68
82
  阿里资源服务地址:<input placeholder="请输入阿里资源服务地址" value={this.state.resourcePath} onChange={e => this.handleResourcePath(e)}></input>
69
83
 
70
84
  <button className="button" onClick={this.startVideo.bind(this)}>开启视频</button>
85
+ <div>{this.state.testTime}</div>
71
86
  </div>
72
87
  }
73
88
  </div>
@@ -47,6 +47,12 @@ export default class foot extends Component {
47
47
  inspection = ()=>{
48
48
  this.props.inspection()
49
49
  }
50
+ envDetection = () => {
51
+ this.props.envDetection()
52
+ }
53
+ toggleAsr = ()=>{
54
+ this.props.toggleAsr()
55
+ }
50
56
  switchExternal=()=>{
51
57
  this.props.switchExternal()
52
58
  }
@@ -161,7 +167,7 @@ export default class foot extends Component {
161
167
  item == 'PIP' && <div className="one" onClick={this.pictureInPicture.bind(this)}>
162
168
  <img className="imgClass" src={require("../../assets/img/huazhonghua.png").default} alt="" />
163
169
  <div className="text">
164
- 开启视频画中画
170
+ 开启视频浮窗
165
171
  </div>
166
172
  </div>
167
173
  }
@@ -199,6 +205,22 @@ export default class foot extends Component {
199
205
  </div>
200
206
  </div>
201
207
  </div>
208
+ <div className='footHover' onClick={this.envDetection.bind(this)}>
209
+ <div className="one">
210
+ <img className="imgClass" src={require("../../assets/img/icon_env.png").default} alt="" />
211
+ <div className="text">
212
+ 环境检测
213
+ </div>
214
+ </div>
215
+ </div>
216
+ <div className='footHover' onClick={this.toggleAsr.bind(this)}>
217
+ <div className="one">
218
+ <img className="imgClass" src={require("../../assets/img/icon_asr.png").default} alt="" />
219
+ <div className="text">
220
+ ASR检测
221
+ </div>
222
+ </div>
223
+ </div>
202
224
  </div>
203
225
  {defaultList}
204
226
 
@@ -25,6 +25,7 @@ width: 100%;
25
25
  }
26
26
  .footHover{
27
27
  margin: 0 5px;
28
+ cursor: pointer;
28
29
  }
29
30
  .footHover :hover{
30
31
  background: #F3F3F3;