From d3892b05389cf8f4b990e71bc252d7a09e2cfe1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=BE=89?= <814457906@qq.com> Date: Fri, 10 Nov 2023 10:51:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/Industrialbutler/Industrialbutler.vue | 10 ++++---- pages/Industrialbutler/video.nvue | 3 ++- pages/homepage/homepage.vue | 26 +++++++++++++++++++-- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/pages/Industrialbutler/Industrialbutler.vue b/pages/Industrialbutler/Industrialbutler.vue index 8d7a3db..7d724d0 100644 --- a/pages/Industrialbutler/Industrialbutler.vue +++ b/pages/Industrialbutler/Industrialbutler.vue @@ -1,9 +1,9 @@ @@ -56,9 +56,9 @@ var urlStr = encodeURI( `https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}` ) - // plus.runtime.openURL(urlStr, function(res) { - // console.log(res); - // }); + plus.runtime.openURL(urlStr, function(res) { + console.log(res); + }); // this.src = // `https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}` } else if (resp.code == 500) { diff --git a/pages/Industrialbutler/video.nvue b/pages/Industrialbutler/video.nvue index 42d9511..d9dffbc 100644 --- a/pages/Industrialbutler/video.nvue +++ b/pages/Industrialbutler/video.nvue @@ -5,7 +5,8 @@ - + diff --git a/pages/homepage/homepage.vue b/pages/homepage/homepage.vue index af3a8db..e5e1565 100644 --- a/pages/homepage/homepage.vue +++ b/pages/homepage/homepage.vue @@ -255,8 +255,30 @@ }, // 视频通话 govideo(item) { - uni.navigateTo({ - url: `/pages/Industrialbutler/Industrialbutler?item=${JSON.stringify(item)}` + getUserSig(item.doctorId).then(res => { + // 获取roomId + consultation(item.goodsOrderId).then(resp => { + if (resp.code == 200) { + uni.navigateTo({ + url: `/pages/Industrialbutler/video?roomId=${resp.msg}&userId=${item.doctorId}&userName=${item.doctorName}&userSig=${res.data}&remoteUserId=${item.patientId}` + }) + // var urlStr = encodeURI( + // `https://msg.xinyilu.cn​​​​​?userId=${item.doctorId}&userName=${item.doctorName}&userSig=${res.data}&roomId=${resp.msg}` + // ) + // console.log(urlStr) + // plus.runtime.openURL(urlStr, function(res) { + // console.log(res); + // }); + // this.src = + // `https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}` + } else if (resp.code == 500) { + this.$refs.uToast.show({ + title: resp.msg, + type: 'error', + duration: '1500' + }) + } + }) }) }, info() {