react_hsbc_teller 1.6.0 → 1.6.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": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "React",
5
5
  "private": false,
6
6
  "main": "lib/hsbc.js",
@@ -2,6 +2,25 @@ import Server from './server';
2
2
 
3
3
  class API extends Server{
4
4
 
5
+ async updateMeetingInfo(params = {}){
6
+ // return this.axios('get', '/lang/select/2', params);
7
+ try{
8
+ let result = await this.axios('post', '/hsbc/updateMeetingInfo', 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 rateAll(params = {}){
6
25
  // return this.axios('get', '/lang/select/2', params);
7
26
  try{
@@ -11,6 +11,8 @@ import voiceImgOpen from '../../assets/img/icon_Mute.png'
11
11
  import voiceImgCloe from '../../assets/img/icon_MuteOne.png'
12
12
  import cameraImgOpen from '../../assets/img/icon_camera.png'
13
13
  import cameraImgCloe from '../../assets/img/icon_cameraOne.png'
14
+ import autod from '../../assets/mp3/joinmeeting.mp3'
15
+ import leftMetting from '../../assets/mp3/leftmeeting.mp3'
14
16
  import errorPng from '../../assets/img/tooltips2_fail.png'
15
17
  import { callNimIM } from '../../utils/cell.js'
16
18
  import Modal from "antd/lib/modal";
@@ -2007,6 +2009,7 @@ class Video extends Component {
2007
2009
  loading: false,
2008
2010
  });
2009
2011
  this.enterRoom()
2012
+ this.updateMeetingInfo()
2010
2013
  this.timer = setInterval(
2011
2014
  () => {
2012
2015
  if(!this.state.voiceStatue && this.state.analyserHeight.get(sid).toFixed(2) > 0.1) {
@@ -2403,29 +2406,14 @@ class Video extends Component {
2403
2406
  this.test_controller.OnNewJoinerIn = (participant) => {
2404
2407
  console.log('新加⼊房间者', participant);
2405
2408
  this.state.isCustomer= true
2406
- // let audio = document.createElement('audio') //生成一个audio元素
2407
- // audio.src = 'http://mp3.9ku.com/hot/2005/05-19/65937.mp3' //音乐的路径
2408
- // audio.play()
2409
+ let src = autod
2410
+ let audio = new Audio(src)
2411
+ audio.play()
2409
2412
  };
2410
2413
  // 推送“有新发布”给与会者
2411
2414
  this.test_controller.OnNewPublish = (feed) => {
2412
2415
  console.log('有新发布者', feed);
2413
2416
  console.log(new Date())
2414
- callNimIM('sendCustomCmdMsg', {
2415
- customId: this.state.imRoomId,
2416
- content: JSON.stringify({
2417
- 'typeId': 1014,
2418
- 'sessionId': this.state.sessionId,
2419
- 'meetingInfo': {
2420
- 'title': this.props.meetingInfo.title,
2421
- 'host': this.props.meetingInfo.host,
2422
- 'customers': this.props.meetingInfo.customers,
2423
- 'otherAttendees': this.props.meetingInfo.otherAttendees
2424
- }
2425
-
2426
- })
2427
- }, function (code, message, data) {
2428
- })
2429
2417
  callNimIM('sendCustomCmdMsg', {
2430
2418
  customId: this.state.imRoomId,
2431
2419
  content: JSON.stringify({
@@ -2619,7 +2607,7 @@ class Video extends Component {
2619
2607
  // 取消发布成功
2620
2608
  this.test_controller.OnUnPublishSucc = (sid) => {
2621
2609
  console.log('取消发布成功', sid, document.getElementById('publish_video1').name)
2622
- if (sid != document.getElementById('publish_video1').name) {
2610
+ if (document.getElementById('publish_video1').name && sid != document.getElementById('publish_video1').name) {
2623
2611
  callNimIM('sendCustomCmdMsg', {
2624
2612
  customId: this.state.imRoomId,
2625
2613
  content: JSON.stringify({
@@ -2787,6 +2775,9 @@ class Video extends Component {
2787
2775
  exitType
2788
2776
  ) => {
2789
2777
  console.log('退出房间者', participant, exitType)
2778
+ let src = leftMetting
2779
+ let audio = new Audio(src)
2780
+ audio.play()
2790
2781
  this.appGetUsernameClick(participant).then((res)=>{
2791
2782
  console.log('退出房间者',res)
2792
2783
  let data = res? res.username ? res.username : '客户' : '客户'
@@ -3170,6 +3161,42 @@ userType:'1'
3170
3161
  }
3171
3162
  }
3172
3163
  }
3164
+ // 保存mettingInfo
3165
+ // callNimIM('sendCustomCmdMsg', {
3166
+ // customId: this.state.imRoomId,
3167
+ // content: JSON.stringify({
3168
+ // 'typeId': 1014,
3169
+ // 'sessionId': this.state.sessionId,
3170
+ // 'meetingInfo': {
3171
+ // 'title': this.props.meetingInfo.title,
3172
+ // 'host': this.props.meetingInfo.host,
3173
+ // 'customers': this.props.meetingInfo.customers,
3174
+ // 'otherAttendees': this.props.meetingInfo.otherAttendees
3175
+ // }
3176
+
3177
+ // })
3178
+ // }, function (code, message, data) {
3179
+ // })
3180
+ updateMeetingInfo= async()=>{
3181
+ let customers
3182
+ this.props.meetingInfo.customers.map((item, index) => {
3183
+ customers = customers ? customers + ',' + item : item
3184
+ })
3185
+ try{
3186
+ let result = await API.updateMeetingInfo({
3187
+ title:this.props.meetingInfo.title,
3188
+ host:this.props.meetingInfo.host,
3189
+ customers:customers,
3190
+ otherAttendees: this.props.meetingInfo.otherAttendees ? this.props.meetingInfo.otherAttendees : '',
3191
+ sessionId:this.state.sessionId
3192
+ })
3193
+ } catch (err) {
3194
+ console.error(err);
3195
+ if(err.status == 502 || err.status== 404) {
3196
+ this.roomCallBack(2, '连接服务器失败','SYS-02')
3197
+ }
3198
+ }
3199
+ }
3173
3200
  enterRoom = async () =>{
3174
3201
  try {
3175
3202
  let result = await API.enterRoom({
@@ -3696,6 +3723,15 @@ userType:'1'
3696
3723
  });
3697
3724
  if (result.code == 200) {
3698
3725
  this.messageClick('识别成功','success')
3726
+ callNimIM('sendCustomCmdMsg', {
3727
+ customId: this.state.imRoomId,
3728
+ content: JSON.stringify({
3729
+ 'typeId': 1020,
3730
+ 'sessionId': this.state.sessionId,
3731
+ 'cameraState': 1, // 1--打开前置 2--打开后置
3732
+ "userId": this.state.faceCustomerUid
3733
+ })
3734
+ });
3699
3735
  this.setState({
3700
3736
  isModalVisibleFacial: false
3701
3737
  })
@@ -3722,6 +3758,15 @@ userType:'1'
3722
3758
 
3723
3759
  };
3724
3760
  handleCancelFacial = () => {
3761
+ callNimIM('sendCustomCmdMsg', {
3762
+ customId: this.state.imRoomId,
3763
+ content: JSON.stringify({
3764
+ 'typeId': 1020,
3765
+ 'sessionId': this.state.sessionId,
3766
+ 'cameraState': 1, // 1--打开前置 2--打开后置
3767
+ "userId": this.state.faceCustomerUid
3768
+ })
3769
+ });
3725
3770
  this.setState({
3726
3771
  isModalVisibleFacial: false
3727
3772
  })
@@ -3803,6 +3848,18 @@ userType:'1'
3803
3848
  if(item.tourist) {
3804
3849
  this.retrieveCustomerInfoByActivityId(item.customId)
3805
3850
  } else {
3851
+ if(this.state.faceCustomerType == 2) {
3852
+ // ocr
3853
+ callNimIM('sendCustomCmdMsg', {
3854
+ customId: this.state.imRoomId,
3855
+ content: JSON.stringify({
3856
+ 'typeId': 1020,
3857
+ 'sessionId': this.state.sessionId,
3858
+ 'cameraState': 2, // 1--打开前置 2--打开后置
3859
+ "userId": item.customId
3860
+ })
3861
+ });
3862
+ }
3806
3863
  var sid
3807
3864
  if (item.feedId == document.getElementById("feedId1").innerText) {
3808
3865
  sid = document.getElementById('video1').name;
@@ -3835,11 +3892,20 @@ userType:'1'
3835
3892
  this.setState({
3836
3893
  clickedFacial: false,
3837
3894
  clickedOcr: false,
3838
-
3839
3895
  isModalVisibleFacial: true,
3840
3896
  facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
3841
3897
  })
3898
+ setTimeout(() => {
3899
+ this.setState({
3900
+ facialImg: this.test_controller.TakePicture(1, undefined, undefined, sid, 'png')
3901
+ })
3902
+ },1000)
3903
+ }
3842
3904
  }
3905
+ sgsinImage=()=>{
3906
+ this.setState({
3907
+ facialImg: this.test_controller.TakePicture(1, undefined, undefined, this.state.customOcrSid, 'png')
3908
+ })
3843
3909
  }
3844
3910
  handleChangeOcr =(val)=> {
3845
3911
  console.log(val)
@@ -5065,6 +5131,7 @@ userType:'1'
5065
5131
  <Modal title={this.state.titleModal} closable={false} centered={true} visible={this.state.isModalVisibleFacial} footer={[
5066
5132
  <div key='facial'>
5067
5133
  <Button className="modelButtonCancel" onClick={this.handleCancelFacial}>取消</Button>
5134
+ <Button className="modelButtonCancel" onClick={this.sgsinImage}>重新截图</Button>
5068
5135
  <Button className="modelButtonOk" type="primary" danger onClick={this.handleOkFacial}>确定</Button>
5069
5136
  </div>
5070
5137
  ]}>
@@ -5199,7 +5266,7 @@ sessionId: "",
5199
5266
  meetingInfo: {
5200
5267
  title: '--',
5201
5268
  host: '--',
5202
- customers: ['--'],
5269
+ customers: ['--','1','2'],
5203
5270
  otherAttendees: undefined
5204
5271
  },
5205
5272
  isTranscribing: false,