智慧保安互联网APP
liuyg
2021-08-12 03e21a8a8ab4c1705d6ebe50c4bf4ffc1f73f9fc
视频11
1 files modified
26 ■■■■■ changed files
pages/videoCall/videoCall.nvue 26 ●●●●● patch | view | raw | blame | history
pages/videoCall/videoCall.nvue
@@ -296,8 +296,9 @@
                    // }
                    if (data.type == 'close') {
                        console.log('对方已挂断');
                        RtcModule.leaveChannel((res) => {});
                        // RtcModule.leaveChannel((res) => {});
                        that.closeAll();
                    }
                });
@@ -651,7 +652,9 @@
            // 离开清空
            async closeAll() {
                // 销毁实例
                await RtcModule.leaveChannel((res) => {})
                await RtcModule.leaveChannel((res) => {
                    uni.navigateBack();
                })
                // await RtcModule.destroyRtc((res) => {});
                this.videoShow = false; //视频展示
                // this.videoShowBg = true; //背景展示
@@ -666,14 +669,19 @@
                // 如果需要跳转其它页面请按下边步骤
                // await uni.redirectTo({
                // url: '..',
                // success: () => {
                // console.log('成功关闭')
                // uni.navigateBack();
                RtcModule.destroyRtc((res) => {
                    console.log("页面销毁", res.code);
                    console.log('成功关闭')
                    uni.navigateBack();
                uni.showToast({
                    title: '正在退出视频',
                    duration: 2000,
                    icon: 'none'
                });
                // success: () => {
                // uni.navigateBack();
                // RtcModule.destroyRtc((res) => {
                //     console.log("页面销毁", res.code);
                //     console.log('成功关闭')
                //     uni.navigateBack();
                // });
                // }
                // });