| | |
| | | this.init(); |
| | | }, |
| | | onLoad(option) { |
| | | this.toName = option.toname; |
| | | console.log(option) |
| | | if (option.type) { |
| | | this.Otype = option.type; |
| | |
| | | var d = res.data.data; |
| | | if (d.res == 0) { |
| | | console.log('对方不在线--退出'); |
| | | call = false; |
| | | uni.navigateBack(); |
| | | uni.showToast({ |
| | | title: '对方不在线', |
| | | duration: 2000, |
| | | icon: 'none' |
| | | }); |
| | | setTimeout(res => { |
| | | uni.navigateBack(); |
| | | // console.log(111) |
| | | }, 2000) |
| | | |
| | | } else if (d.res == 1) { |
| | | this.channel = d.roomId; |
| | | console.log('对方在线-- 等待对方接受'); |
| | | // call = true; |
| | | this.join(); |
| | |
| | | |
| | | // }, 5000) |
| | | } else if (option.state == "Receiver") { |
| | | this.userName = 'jieshouren'; |
| | | this.formName = 'wo'; |
| | | this.userName = option.name; |
| | | // this.formName = 'wo'; |
| | | this.channel = option.room; |
| | | this.isMain = false; |
| | | } |
| | |
| | | // this.receiveVideo('Receiver', ); |
| | | console.log('进入接受 跳转',data.type) |
| | | uni.navigateTo({ |
| | | url: '../videoCall/videoCall?state=Receiver&type=' + data.type +'&room=' + data.roomId |
| | | url: '../videoCall/videoCall?state=Receiver&type=' + data.type +'&room=' + data.roomId + '&name=' + data.name |
| | | }); |
| | | } |
| | | // console.log('收到服务器内容:' + res.data); |