react_hsbc_teller 1.6.3 → 1.6.6
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/config/webpack.config.js +2 -2
- package/config/webpack.prod.js +2 -2
- package/lib/hsbc.js +1 -1
- package/package.json +1 -1
- package/packages/api/api.js +19 -18
- package/packages/pages/foot/foot.jsx +8 -8
- package/packages/pages/video/video.jsx +93 -63
- package/packages/pages/video/video.less +20 -0
- package/lib/57be580f59e8862a94d62c486df4e83d.mp3 +0 -0
- package/lib/5a8892b3bd09dc784456b3c06de351d6.mp3 +0 -0
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -2,6 +2,25 @@ import Server from './server';
|
|
|
2
2
|
|
|
3
3
|
class API extends Server{
|
|
4
4
|
|
|
5
|
+
async confirmCallback(params = {}){
|
|
6
|
+
// return this.axios('get', '/lang/select/2', params);
|
|
7
|
+
try{
|
|
8
|
+
let result = await this.axios('post', '/hsbc/identify/ocr/confirmCallback', params);
|
|
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 updateMeetingInfo(params = {}){
|
|
6
25
|
// return this.axios('get', '/lang/select/2', params);
|
|
7
26
|
try{
|
|
@@ -222,24 +241,6 @@ class API extends Server{
|
|
|
222
241
|
throw err;
|
|
223
242
|
}
|
|
224
243
|
}
|
|
225
|
-
async finishSession(params = {}){
|
|
226
|
-
try{
|
|
227
|
-
let result = await this.axios('post', '/teller/finish/session', params);
|
|
228
|
-
if(result){
|
|
229
|
-
return result||[];
|
|
230
|
-
}else{
|
|
231
|
-
let err = {
|
|
232
|
-
tip: '',
|
|
233
|
-
response: result,
|
|
234
|
-
data: params,
|
|
235
|
-
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
236
|
-
}
|
|
237
|
-
throw err;
|
|
238
|
-
}
|
|
239
|
-
}catch(err){
|
|
240
|
-
throw err;
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
244
|
/**
|
|
244
245
|
* 用途:发送客户姓名给行内
|
|
245
246
|
* 返回200表示成功
|
|
@@ -148,18 +148,18 @@ export default class foot extends Component {
|
|
|
148
148
|
</div>
|
|
149
149
|
</div>
|
|
150
150
|
}
|
|
151
|
+
{/* {
|
|
152
|
+
item == 'BEAUTY' && <div className="one" onClick={this.beautyClick.bind(this)}>
|
|
153
|
+
<img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
|
|
154
|
+
<div className="text">
|
|
155
|
+
{beautyName}
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
} */}
|
|
151
159
|
</div>
|
|
152
160
|
|
|
153
161
|
})
|
|
154
162
|
}
|
|
155
|
-
{
|
|
156
|
-
<div className="one" onClick={this.beautyClick.bind(this)}>
|
|
157
|
-
<img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
|
|
158
|
-
<div className="text">
|
|
159
|
-
{beautyName}
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
}
|
|
163
163
|
</div>
|
|
164
164
|
);
|
|
165
165
|
return (
|
|
@@ -212,6 +212,8 @@ class Video extends Component {
|
|
|
212
212
|
}
|
|
213
213
|
],
|
|
214
214
|
shareMaskState: false,
|
|
215
|
+
idCardName: '',
|
|
216
|
+
idCardNumber: ''
|
|
215
217
|
};
|
|
216
218
|
// eslint-disable-next-line no-undef
|
|
217
219
|
test_controller = '';
|
|
@@ -612,6 +614,8 @@ class Video extends Component {
|
|
|
612
614
|
contrastFaceVerify = async () => {
|
|
613
615
|
try {
|
|
614
616
|
let result = await API.contrastFaceVerify({
|
|
617
|
+
staffId: this.props.tellerAccount,
|
|
618
|
+
activityId: this.props.businessNumber,
|
|
615
619
|
appAccount: this.state.faceCustomerUid,
|
|
616
620
|
sessionId: this.state.sessionId,
|
|
617
621
|
fileBase64: this.state.facialImg.replace(/^data:image\/\w+;base64,/,"")
|
|
@@ -2029,45 +2033,42 @@ class Video extends Component {
|
|
|
2029
2033
|
this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
|
|
2030
2034
|
console.log('发送失败',msgId,code, msg)
|
|
2031
2035
|
}
|
|
2032
|
-
this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
} else {
|
|
2067
|
-
return stream
|
|
2068
|
-
}
|
|
2036
|
+
// this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
2037
|
+
// console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
2038
|
+
// if (stream_type == "subscribe") {
|
|
2039
|
+
// return stream
|
|
2040
|
+
// }
|
|
2041
|
+
// if (media_type == 2 || media_type == 4) {
|
|
2042
|
+
// return stream
|
|
2043
|
+
// }
|
|
2044
|
+
// if(publish_tag == 'tag1') {
|
|
2045
|
+
// let newStream = stream;
|
|
2046
|
+
// let beauty_strength = beautyNum;
|
|
2047
|
+
// if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
|
|
2048
|
+
// newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
|
|
2049
|
+
// // 清理原始流
|
|
2050
|
+
// newStream.oninactive = function () {
|
|
2051
|
+
// clearOriginStream(stream);
|
|
2052
|
+
// };
|
|
2053
|
+
// newStream.getVideoTracks()[0].onended = function () {
|
|
2054
|
+
// clearOriginStream(stream);
|
|
2055
|
+
// };
|
|
2056
|
+
// function clearOriginStream(stream) {
|
|
2057
|
+
// stream.getTracks().forEach((track) => {
|
|
2058
|
+
// track.stop();
|
|
2059
|
+
// });
|
|
2060
|
+
// stream = null;
|
|
2061
|
+
// }
|
|
2062
|
+
// };
|
|
2063
|
+
// if (stream.getAudioTracks()[0] && newStream.addTrack) {
|
|
2064
|
+
// newStream.addTrack(stream.getAudioTracks()[0])
|
|
2065
|
+
// }
|
|
2066
|
+
// return newStream
|
|
2067
|
+
// } else {
|
|
2068
|
+
// return stream
|
|
2069
|
+
// }
|
|
2069
2070
|
|
|
2070
|
-
}
|
|
2071
|
+
// }
|
|
2071
2072
|
// 发布媒体流成功
|
|
2072
2073
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
2073
2074
|
console.log('发布媒体流成功', sid)
|
|
@@ -2491,9 +2492,9 @@ class Video extends Component {
|
|
|
2491
2492
|
this.test_controller.OnNewJoinerIn = (participant) => {
|
|
2492
2493
|
console.log('新加⼊房间者', participant);
|
|
2493
2494
|
this.state.isCustomer= true
|
|
2494
|
-
let src = autod
|
|
2495
|
-
let audio = new Audio(src)
|
|
2496
|
-
audio.play()
|
|
2495
|
+
// let src = autod
|
|
2496
|
+
// let audio = new Audio(src)
|
|
2497
|
+
// audio.play()
|
|
2497
2498
|
};
|
|
2498
2499
|
// 推送“有新发布”给与会者
|
|
2499
2500
|
this.test_controller.OnNewPublish = (feed) => {
|
|
@@ -2878,9 +2879,9 @@ class Video extends Component {
|
|
|
2878
2879
|
exitType
|
|
2879
2880
|
) => {
|
|
2880
2881
|
console.log('退出房间者', participant, exitType)
|
|
2881
|
-
let src = leftMetting
|
|
2882
|
-
let audio = new Audio(src)
|
|
2883
|
-
audio.play()
|
|
2882
|
+
// let src = leftMetting
|
|
2883
|
+
// let audio = new Audio(src)
|
|
2884
|
+
// audio.play()
|
|
2884
2885
|
this.appGetUsernameClick(participant).then((res)=>{
|
|
2885
2886
|
console.log('退出房间者',res)
|
|
2886
2887
|
let data = res? res.username ? res.username : '客户' : '客户'
|
|
@@ -3318,10 +3319,6 @@ userType:'1'
|
|
|
3318
3319
|
}
|
|
3319
3320
|
}
|
|
3320
3321
|
componentWillUnmount() {
|
|
3321
|
-
|
|
3322
|
-
if (this.state.roomCustomerList.length == 0 && this.state.sessionType) {
|
|
3323
|
-
this.finishSessionClick()
|
|
3324
|
-
}
|
|
3325
3322
|
if (this.test_controller&&this.state.sessionType) {
|
|
3326
3323
|
clearStreamRemain()
|
|
3327
3324
|
beautyNum = 0
|
|
@@ -3335,15 +3332,6 @@ userType:'1'
|
|
|
3335
3332
|
}
|
|
3336
3333
|
message.destroy()
|
|
3337
3334
|
}
|
|
3338
|
-
finishSessionClick= async () => {
|
|
3339
|
-
try {
|
|
3340
|
-
let result = await API.finishSession({
|
|
3341
|
-
sessionId: this.state.sessionId,
|
|
3342
|
-
tellerId: this.props.tellerAccount
|
|
3343
|
-
});
|
|
3344
|
-
} catch (err) {
|
|
3345
|
-
}
|
|
3346
|
-
}
|
|
3347
3335
|
finishSession = () => {
|
|
3348
3336
|
// clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
3349
3337
|
this.state.OnVolumeAnalyserMap.forEach((value,key,map)=>{
|
|
@@ -3816,6 +3804,29 @@ userType:'1'
|
|
|
3816
3804
|
isModalVisibleEnd: false
|
|
3817
3805
|
})
|
|
3818
3806
|
};
|
|
3807
|
+
confirmCallback=async()=>{
|
|
3808
|
+
try {
|
|
3809
|
+
let result = await API.confirmCallback({
|
|
3810
|
+
idCardName: this.state.idCardName,
|
|
3811
|
+
staffId: this.props.tellerAccount,
|
|
3812
|
+
activityId: this.props.businessNumber,
|
|
3813
|
+
appAccount: this.state.faceCustomerUid,
|
|
3814
|
+
idCardNumber: this.state.idCardNumber,
|
|
3815
|
+
sessionId: this.state.sessionId,
|
|
3816
|
+
});
|
|
3817
|
+
if (result.code == 200) {
|
|
3818
|
+
this.setState({
|
|
3819
|
+
isModalVisibleFacial: false,
|
|
3820
|
+
idCardNumber: '',
|
|
3821
|
+
idCardName: ''
|
|
3822
|
+
})
|
|
3823
|
+
} else {
|
|
3824
|
+
this.messageClick('保持信息失败','error')
|
|
3825
|
+
}
|
|
3826
|
+
} catch (err) {
|
|
3827
|
+
this.messageClick('保持信息失败','error')
|
|
3828
|
+
}
|
|
3829
|
+
}
|
|
3819
3830
|
ocrCallback= async () => {
|
|
3820
3831
|
try {
|
|
3821
3832
|
let result = await API.ocrCallback({
|
|
@@ -3839,7 +3850,9 @@ userType:'1'
|
|
|
3839
3850
|
})
|
|
3840
3851
|
});
|
|
3841
3852
|
this.setState({
|
|
3842
|
-
isModalVisibleFacial: false
|
|
3853
|
+
// isModalVisibleFacial: false
|
|
3854
|
+
idCardNumber: result.data.idCardNumber,
|
|
3855
|
+
idCardName: result.data.idCardName
|
|
3843
3856
|
})
|
|
3844
3857
|
} else {
|
|
3845
3858
|
this.messageClick('识别失败','error')
|
|
@@ -4288,7 +4301,6 @@ userType:'1'
|
|
|
4288
4301
|
function loop() {
|
|
4289
4302
|
if (!$this.paused && !$this.ended) {
|
|
4290
4303
|
// if(!that.state.tabTitles.find(el=>el.value == 'customerScreen')) {
|
|
4291
|
-
console.log('addEventListener',x, y, width, height)
|
|
4292
4304
|
cobj.drawImage(videoMedia, x, y, width, height, 0, 0,960, 540);
|
|
4293
4305
|
// } else {
|
|
4294
4306
|
// cobj.fillStyle = 'rgb(0 0 0)'
|
|
@@ -4594,6 +4606,12 @@ userType:'1'
|
|
|
4594
4606
|
},100)
|
|
4595
4607
|
|
|
4596
4608
|
}
|
|
4609
|
+
handleChangeIdCardName = (event) => {
|
|
4610
|
+
this.setState({idCardName: event.target.value});
|
|
4611
|
+
}
|
|
4612
|
+
handleChangeIdCardNumber = (event) => {
|
|
4613
|
+
this.setState({idCardNumber: event.target.value});
|
|
4614
|
+
}
|
|
4597
4615
|
componentDidUpdate(prevProps){
|
|
4598
4616
|
console.log('componentDidUpdate',prevProps,prevProps.shareMask,this.props.shareMask)
|
|
4599
4617
|
if(this.props.shareMask != prevProps.shareMask) {
|
|
@@ -5252,10 +5270,13 @@ userType:'1'
|
|
|
5252
5270
|
<div className='endModal'>是否要结束并退出会议?</div>
|
|
5253
5271
|
</Modal>
|
|
5254
5272
|
<Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
|
|
5255
|
-
<div key='facial'>
|
|
5273
|
+
!this.state.idCardName && <div key='facial'>
|
|
5256
5274
|
<Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
|
|
5257
5275
|
<Button className="modelButtonCancel" onClick={this.sgsinImage}>重新截图</Button>
|
|
5258
5276
|
<Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
|
|
5277
|
+
</div>,
|
|
5278
|
+
this.state.idCardName && <div key='facial'>
|
|
5279
|
+
<Button className="modelButtonOk" type="primary" danger onClick={this.confirmCallback}>确认</Button>
|
|
5259
5280
|
</div>
|
|
5260
5281
|
]}>
|
|
5261
5282
|
<div className="faceBody">
|
|
@@ -5265,9 +5286,18 @@ userType:'1'
|
|
|
5265
5286
|
<Option value="2">反面</Option>
|
|
5266
5287
|
</Select>
|
|
5267
5288
|
} */}
|
|
5268
|
-
|
|
5269
|
-
|
|
5289
|
+
{
|
|
5290
|
+
!this.state.idCardName &&<div className='faceCardImg'>
|
|
5291
|
+
<img className="faceImg" src={this.state.facialImg} alt=""></img>
|
|
5270
5292
|
</div>
|
|
5293
|
+
}
|
|
5294
|
+
{
|
|
5295
|
+
this.state.idCardName &&<div className='resuleCard'>
|
|
5296
|
+
<div><span>客户姓名</span> <input type="text" value={this.state.idCardName} onChange={this.handleChangeIdCardName} /></div>
|
|
5297
|
+
<div><span>身份证号</span> <input type="text" value={this.state.idCardNumber} onChange={this.handleChangeIdCardNumber} /></div>
|
|
5298
|
+
</div>
|
|
5299
|
+
}
|
|
5300
|
+
|
|
5271
5301
|
|
|
5272
5302
|
</div>
|
|
5273
5303
|
</Modal>
|
|
@@ -5384,7 +5414,7 @@ sessionId: "",
|
|
|
5384
5414
|
microphoneSize: 25,
|
|
5385
5415
|
fontSize: '14',
|
|
5386
5416
|
fontFamily: 'auto',
|
|
5387
|
-
menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP'],
|
|
5417
|
+
menus: ['BOARD','SHARE', 'FRIES', 'OCR', 'INVITE', 'PIP', 'BEAUTY'],
|
|
5388
5418
|
customLeaveRoom: '客户离开房间',
|
|
5389
5419
|
meetingInfo: {
|
|
5390
5420
|
title: '--',
|
|
@@ -155,6 +155,26 @@
|
|
|
155
155
|
}
|
|
156
156
|
.faceBody{
|
|
157
157
|
text-align: center;
|
|
158
|
+
height: 200px;
|
|
159
|
+
.faceCardImg{
|
|
160
|
+
height: 100%;
|
|
161
|
+
}
|
|
162
|
+
.resuleCard{
|
|
163
|
+
text-align: -webkit-left;
|
|
164
|
+
padding: 25Px 20px;
|
|
165
|
+
div{
|
|
166
|
+
font-size: 16Px;
|
|
167
|
+
color: #646464;
|
|
168
|
+
margin: 20Px;
|
|
169
|
+
input{
|
|
170
|
+
border: #DCDCDC 1px solid;
|
|
171
|
+
width: 15rem;
|
|
172
|
+
height: 2.5rem;
|
|
173
|
+
line-height: 2.5rem;
|
|
174
|
+
margin-left: 15px;
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
158
178
|
}
|
|
159
179
|
.content{
|
|
160
180
|
height: 200px;
|
|
Binary file
|
|
Binary file
|