| | |
| | | setTimeout(res => { |
| | | // uni.navigateBack(); |
| | | // console.log(111) |
| | | that.join(); |
| | | // that.join(); |
| | | console.log('成功进入') |
| | | }, 2000) |
| | | } |
| | |
| | | // if (call && ) { |
| | | |
| | | // } |
| | | // console.log(that,1111111111111) |
| | | if (data.type == 'close') { |
| | | |
| | | console.log('对方已挂断'); |
| | |
| | | // 离开清空 |
| | | async closeAll() { |
| | | // 销毁实例 |
| | | uni.navigateBack(); |
| | | await RtcModule.leaveChannel((res) => { |
| | | uni.navigateBack(); |
| | | // uni.navigateBack(); |
| | | }) |
| | | // await RtcModule.destroyRtc((res) => {}); |
| | | this.videoShow = false; //视频展示 |
| | |
| | | |
| | | }, |
| | | destroyed() { |
| | | console.log('this.closeAll();'); |
| | | this.closeAll(); |
| | | // console.log('this.closeAll();'); |
| | | // this.closeAll(); |
| | | var that = this; |
| | | uni.hideLoading(); |
| | | uni.onSocketMessage(function(res) { |
| | | console.log(res.data); |
| | | var data = JSON.parse(res.data) |
| | | // if (call && ) { |
| | | |
| | | // } |
| | | if (data.type == 'close') { |
| | | |
| | | console.log('对方已挂断'); |
| | | // RtcModule.leaveChannel((res) => {}); |
| | | that.closeAll(); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |