视频通话

This commit is contained in:
shidongli 2023-11-06 16:57:05 +08:00
parent adb332d1c7
commit ccdc36c892
3 changed files with 71 additions and 9 deletions

View File

@ -35,4 +35,19 @@ export function consultationInfolist(data) {
method: 'get', method: 'get',
data: data data: data
}) })
} }
// 获取userSig:/nurseApplet/consultation/getUserSig/{userId}
export function getUserSig(userId) {
return request({
url: '/nurseApplet/consultation/getUserSig/'+ userId,
method: 'GET'
})
}
// 获取roomId:/nurseApplet/consultation/start/{consultationInfoId}
export function consultation(goodsOrderId) {
return request({
url: '/nurseApplet/consultation/start/'+ goodsOrderId,
method: 'GET'
})
}

View File

@ -1,26 +1,70 @@
<template> <template>
<view> <view>
<web-view :src="src"></web-view> <web-view :src="src"></web-view>
<u-toast ref="uToast" />
</view> </view>
</template> </template>
<script> <script>
import {
getUserSig,
consultation,
} from '@/api/homepage/index.js'
import {
hospitalPerson
} from '@/api/myinformation/myinformation.js'
import {
nextTick
} from "vue";
export default { export default {
data() { data() {
return { return {
src: '', src: '',
datalist:'', datalist: '',
userSig: '', //获取userSig
roomId: '', //获取roomId
userId: '',
userName:'',//医生Name
}; };
}, },
onLoad(options) { onLoad(options) {
this.datalist=JSON.parse(options.item) this.datalist = JSON.parse(options.item)
// console.log(this.datalist) this.userId = uni.getStorageSync("id")
this.src = hospitalPerson(this.userId).then(res => {
`https://msg.xinyilu.cn​​​​​?userId=xinyilu_mp&userName=123&userSig=eJwtjMEKgkAURf9l1iEq816N0EKiMmoRZgtXETmNL0cbTEOJ-r1Jvbt7DpwPSw4n5y1rFjDfcdls*JTJqqE7DbijqifdXkoz2VdWXI2hjAUeunYoOB*N7AzV0nIA8K0ZaUPln6FAsRAIOFVI2Xj*0LmnzjHc1iuRxDCPeYp7xft0i0mB*rgJw3YXAUbPJfv*AIBJMqE_&roomId=123` this.userName = res.data.personName
this.getUserSig()
})
},
onShow() {
}, },
methods: { methods: {
getUserSig() {
// 获取userSig
getUserSig(this.userId).then(res => {
this.userSig = res.data
// 获取roomId
consultation(this.datalist.goodsOrderId).then(resp => {
if(resp.code==200){
this.roomId = resp.msg
this.src =
`https://msg.xinyilu.cn​​​​​?userId=${this.userId}&userName=${this.userName}&userSig=${this.userSig}&roomId=${this.roomId}`
}else if(resp.code==500){
this.$refs.uToast.show({
title: resp.msg,
type: 'error',
duration: '1500'
})
}
console.log(this.src, '99')
})
})
},
}, },
} }
</script> </script>

View File

@ -128,7 +128,10 @@
getList, getList,
updateStatus, updateStatus,
closeHealthConsultationOrder, closeHealthConsultationOrder,
consultationInfolist consultationInfolist,
getUserSig,
consultation,
} from '@/api/homepage/index.js' } from '@/api/homepage/index.js'
import { import {
getSex getSex