From 9385dc6e3958e53acadbb5e2f34c54aab41b213f Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Thu, 12 Aug 2021 10:39:22 +0800
Subject: [PATCH] 视频2
---
pages/videoCall/videoCall.nvue | 18 ++++++++++++++----
store/mutations.js | 2 +-
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/pages/videoCall/videoCall.nvue b/pages/videoCall/videoCall.nvue
index 37ddd25..24e176e 100644
--- a/pages/videoCall/videoCall.nvue
+++ b/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;
}
diff --git a/store/mutations.js b/store/mutations.js
index 9665061..f9870da 100644
--- a/store/mutations.js
+++ b/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);
--
Gitblit v1.9.3