react_hsbc_teller 1.6.4 → 1.6.5
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 +0 -18
- package/packages/demo/demo.js +4 -7
- package/packages/pages/foot/foot.jsx +2 -2
- package/packages/pages/video/video.jsx +43 -58
package/package.json
CHANGED
package/packages/api/api.js
CHANGED
|
@@ -241,24 +241,6 @@ class API extends Server{
|
|
|
241
241
|
throw err;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
-
async finishSession(params = {}){
|
|
245
|
-
try{
|
|
246
|
-
let result = await this.axios('post', '/teller/finish/session', params);
|
|
247
|
-
if(result){
|
|
248
|
-
return result||[];
|
|
249
|
-
}else{
|
|
250
|
-
let err = {
|
|
251
|
-
tip: '',
|
|
252
|
-
response: result,
|
|
253
|
-
data: params,
|
|
254
|
-
// url: 'https://api.cangdu.org/shopro/data/products',
|
|
255
|
-
}
|
|
256
|
-
throw err;
|
|
257
|
-
}
|
|
258
|
-
}catch(err){
|
|
259
|
-
throw err;
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
244
|
/**
|
|
263
245
|
* 用途:发送客户姓名给行内
|
|
264
246
|
* 返回200表示成功
|
package/packages/demo/demo.js
CHANGED
|
@@ -5,13 +5,10 @@ import Pdf from './pdf.js'
|
|
|
5
5
|
class Demo extends Component {
|
|
6
6
|
state = {
|
|
7
7
|
shareMask: false,
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
imRoomId: "VPP0Ejwae@conference.openfire2.leimondata.cn",
|
|
13
|
-
|
|
14
|
-
sessionId: "VPP0Ejwae",
|
|
8
|
+
imRoomId: "oSqhUSooi@conference.ls-im-xmpp.chinawp.dev.ali.cloud.cn.hsbc",
|
|
9
|
+
sessionId: "oSqhUSooi",
|
|
10
|
+
mtoken: "8af047a2b64b",
|
|
11
|
+
roomId: "654754010601621",
|
|
15
12
|
// roomId: '',
|
|
16
13
|
// mtoken: '',
|
|
17
14
|
// imRoomId: '',
|
|
@@ -148,14 +148,14 @@ export default class foot extends Component {
|
|
|
148
148
|
</div>
|
|
149
149
|
</div>
|
|
150
150
|
}
|
|
151
|
-
{
|
|
151
|
+
{/* {
|
|
152
152
|
item == 'BEAUTY' && <div className="one" onClick={this.beautyClick.bind(this)}>
|
|
153
153
|
<img className="imgClass" src={require("../../assets/img/meiyan.png").default} alt="" />
|
|
154
154
|
<div className="text">
|
|
155
155
|
{beautyName}
|
|
156
156
|
</div>
|
|
157
157
|
</div>
|
|
158
|
-
}
|
|
158
|
+
} */}
|
|
159
159
|
</div>
|
|
160
160
|
|
|
161
161
|
})
|
|
@@ -2031,45 +2031,42 @@ class Video extends Component {
|
|
|
2031
2031
|
this.test_controller.OnSendTextMsgFailed =(msgId, code, msg)=>{
|
|
2032
2032
|
console.log('发送失败',msgId,code, msg)
|
|
2033
2033
|
}
|
|
2034
|
-
this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
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
|
-
|
|
2067
|
-
|
|
2068
|
-
} else {
|
|
2069
|
-
return stream
|
|
2070
|
-
}
|
|
2034
|
+
// this.test_controller.StreamFilterHandler = async function (publish_tag, stream, stream_type, publish_device, media_type) {
|
|
2035
|
+
// console.log(`stream processed by client, publish_device=${publish_device}, media_type=${media_type}, publish_tag=${publish_tag},stream_type=${stream_type}`);
|
|
2036
|
+
// if (stream_type == "subscribe") {
|
|
2037
|
+
// return stream
|
|
2038
|
+
// }
|
|
2039
|
+
// if (media_type == 2 || media_type == 4) {
|
|
2040
|
+
// return stream
|
|
2041
|
+
// }
|
|
2042
|
+
// if(publish_tag == 'tag1') {
|
|
2043
|
+
// let newStream = stream;
|
|
2044
|
+
// let beauty_strength = beautyNum;
|
|
2045
|
+
// if (beauty_strength != 0 && stream.getVideoTracks()[0]) {
|
|
2046
|
+
// newStream = new MediaStream([startBeauty(stream).getVideoTracks()[0]]);
|
|
2047
|
+
// // 清理原始流
|
|
2048
|
+
// newStream.oninactive = function () {
|
|
2049
|
+
// clearOriginStream(stream);
|
|
2050
|
+
// };
|
|
2051
|
+
// newStream.getVideoTracks()[0].onended = function () {
|
|
2052
|
+
// clearOriginStream(stream);
|
|
2053
|
+
// };
|
|
2054
|
+
// function clearOriginStream(stream) {
|
|
2055
|
+
// stream.getTracks().forEach((track) => {
|
|
2056
|
+
// track.stop();
|
|
2057
|
+
// });
|
|
2058
|
+
// stream = null;
|
|
2059
|
+
// }
|
|
2060
|
+
// };
|
|
2061
|
+
// if (stream.getAudioTracks()[0] && newStream.addTrack) {
|
|
2062
|
+
// newStream.addTrack(stream.getAudioTracks()[0])
|
|
2063
|
+
// }
|
|
2064
|
+
// return newStream
|
|
2065
|
+
// } else {
|
|
2066
|
+
// return stream
|
|
2067
|
+
// }
|
|
2071
2068
|
|
|
2072
|
-
}
|
|
2069
|
+
// }
|
|
2073
2070
|
// 发布媒体流成功
|
|
2074
2071
|
this.test_controller.OnPublishSucc = (sid) => {
|
|
2075
2072
|
console.log('发布媒体流成功', sid)
|
|
@@ -2493,9 +2490,9 @@ class Video extends Component {
|
|
|
2493
2490
|
this.test_controller.OnNewJoinerIn = (participant) => {
|
|
2494
2491
|
console.log('新加⼊房间者', participant);
|
|
2495
2492
|
this.state.isCustomer= true
|
|
2496
|
-
let src = autod
|
|
2497
|
-
let audio = new Audio(src)
|
|
2498
|
-
audio.play()
|
|
2493
|
+
// let src = autod
|
|
2494
|
+
// let audio = new Audio(src)
|
|
2495
|
+
// audio.play()
|
|
2499
2496
|
};
|
|
2500
2497
|
// 推送“有新发布”给与会者
|
|
2501
2498
|
this.test_controller.OnNewPublish = (feed) => {
|
|
@@ -2880,9 +2877,9 @@ class Video extends Component {
|
|
|
2880
2877
|
exitType
|
|
2881
2878
|
) => {
|
|
2882
2879
|
console.log('退出房间者', participant, exitType)
|
|
2883
|
-
let src = leftMetting
|
|
2884
|
-
let audio = new Audio(src)
|
|
2885
|
-
audio.play()
|
|
2880
|
+
// let src = leftMetting
|
|
2881
|
+
// let audio = new Audio(src)
|
|
2882
|
+
// audio.play()
|
|
2886
2883
|
this.appGetUsernameClick(participant).then((res)=>{
|
|
2887
2884
|
console.log('退出房间者',res)
|
|
2888
2885
|
let data = res? res.username ? res.username : '客户' : '客户'
|
|
@@ -3320,10 +3317,6 @@ userType:'1'
|
|
|
3320
3317
|
}
|
|
3321
3318
|
}
|
|
3322
3319
|
componentWillUnmount() {
|
|
3323
|
-
|
|
3324
|
-
if (this.state.roomCustomerList.length == 0 && this.state.sessionType) {
|
|
3325
|
-
this.finishSessionClick()
|
|
3326
|
-
}
|
|
3327
3320
|
if (this.test_controller&&this.state.sessionType) {
|
|
3328
3321
|
clearStreamRemain()
|
|
3329
3322
|
beautyNum = 0
|
|
@@ -3337,15 +3330,6 @@ userType:'1'
|
|
|
3337
3330
|
}
|
|
3338
3331
|
message.destroy()
|
|
3339
3332
|
}
|
|
3340
|
-
finishSessionClick= async () => {
|
|
3341
|
-
try {
|
|
3342
|
-
let result = await API.finishSession({
|
|
3343
|
-
sessionId: this.state.sessionId,
|
|
3344
|
-
tellerId: this.props.tellerAccount
|
|
3345
|
-
});
|
|
3346
|
-
} catch (err) {
|
|
3347
|
-
}
|
|
3348
|
-
}
|
|
3349
3333
|
finishSession = () => {
|
|
3350
3334
|
// clearInterval(this.state.OnVolumeAnalyserMap.get(sid))
|
|
3351
3335
|
this.state.OnVolumeAnalyserMap.forEach((value,key,map)=>{
|
|
@@ -3820,12 +3804,13 @@ userType:'1'
|
|
|
3820
3804
|
};
|
|
3821
3805
|
confirmCallback=async()=>{
|
|
3822
3806
|
try {
|
|
3823
|
-
let result = await API.
|
|
3807
|
+
let result = await API.confirmCallback({
|
|
3824
3808
|
idCardName: this.state.idCardName,
|
|
3825
3809
|
staffId: this.props.tellerAccount,
|
|
3826
3810
|
activityId: this.props.businessNumber,
|
|
3827
3811
|
appAccount: this.state.faceCustomerUid,
|
|
3828
3812
|
idCardNumber: this.state.idCardNumber,
|
|
3813
|
+
sessionId: this.state.sessionId,
|
|
3829
3814
|
});
|
|
3830
3815
|
if (result.code == 200) {
|
|
3831
3816
|
this.setState({
|