智慧保安互联网APP
liuyg
2021-08-12 9385dc6e3958e53acadbb5e2f34c54aab41b213f
视频2
2 files modified
20 ■■■■ changed files
pages/videoCall/videoCall.nvue 18 ●●●● patch | view | raw | blame | history
store/mutations.js 2 ●●● patch | view | raw | blame | history
pages/videoCall/videoCall.nvue
@@ -217,6 +217,7 @@
            this.init();
        },
        onLoad(option) {
            this.toName = option.toname;
            console.log(option)
            if (option.type) {
                this.Otype = option.type;
@@ -247,9 +248,18 @@
                        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();
@@ -273,8 +283,8 @@
                // }, 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;
            }
store/mutations.js
@@ -77,7 +77,7 @@
                // 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);