智慧保安互联网APP
liuyg
2021-08-12 664c62a94cc877407d9c974278ed0437a8d7e894
视频4
1 files modified
14 ■■■■■ changed files
pages/videoCall/videoCall.nvue 14 ●●●●● patch | view | raw | blame | history
pages/videoCall/videoCall.nvue
@@ -214,7 +214,7 @@
        onReady() {
            // 初始化
            // this.channel = 2554;
            this.init();
            // this.init();
        },
        onLoad(option) {
            var that = this;
@@ -227,14 +227,16 @@
            }
            console.log(option.state);
            if (option.state == "Mains") {
                that.isMain = true;
                var call = false;
                this.userName = that.$store.state.puserName;
                this.userName = that.$store.state.puserID + '-faqiren';
                this.init();
                // setTimeout(res => {
                //发起请求  给后端双方姓名
                //得到返回值   开始视频  或者拒绝视频
                // this.join();
                // console.log(that.$store.state);
                uni.request({
                    url: that.$store.state.api + '/pushMsg/inviteVideoCall',
                    data: {
@@ -266,7 +268,8 @@
                            setTimeout(res => {
                                // uni.navigateBack();
                                // console.log(111)
                            that.join();
                            // that.join();
                            console.log('成功进入')
                            }, 2000)
                        }
                    }
@@ -288,9 +291,10 @@
                // }, 5000)
            } else if (option.state == "Receiver") {
                that.userName = that.$store.state.puserName;
                that.userName = that.$store.state.puserID  + '-jieshouren';
                // that.formName = 'wo';
                that.channel = option.room;
                that.init();
                that.isMain = false;
            }
        },