This commit is contained in:
辉 2023-11-10 10:51:29 +08:00
parent 850c05f85c
commit d3892b0538
3 changed files with 31 additions and 8 deletions

View File

@ -1,9 +1,9 @@
<template> <template>
<view> <view>
<!-- <web-view :src="src"></web-view> --> <!-- <web-view :src="src"></web-view> -->
<view class="" @tap='govideo'> <!-- <view class="" @tap='govideo'>
11111111111111111111111111 11111111111111111111111111
</view> </view> -->
<u-toast ref="uToast" /> <u-toast ref="uToast" />
</view> </view>
</template> </template>
@ -56,9 +56,9 @@
var urlStr = encodeURI( var urlStr = encodeURI(
`https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}` `https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}`
) )
// plus.runtime.openURL(urlStr, function(res) { plus.runtime.openURL(urlStr, function(res) {
// console.log(res); console.log(res);
// }); });
// this.src = // this.src =
// `https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}` // `https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}`
} else if (resp.code == 500) { } else if (resp.code == 500) {

View File

@ -5,7 +5,8 @@
<trtc-local-view :viewId="userId"></trtc-local-view> <trtc-local-view :viewId="userId"></trtc-local-view>
</view> </view>
<view class="trtc-video-view2"> <view class="trtc-video-view2">
<trtc-remote-view v-if="remoteUserId" :userId="remoteUserId" :viewId="remoteUserId"> <trtc-remote-view style="height: 70%;width: 100%;" v-if="remoteUserId" :userId="remoteUserId"
:viewId="remoteUserId">
</trtc-remote-view> </trtc-remote-view>
</view> </view>
</view> </view>

View File

@ -255,8 +255,30 @@
}, },
// 视频通话 // 视频通话
govideo(item) { govideo(item) {
uni.navigateTo({ getUserSig(item.doctorId).then(res => {
url: `/pages/Industrialbutler/Industrialbutler?item=${JSON.stringify(item)}` // 获取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() { info() {