视频通话

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',
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>
<view>
<web-view :src="src"></web-view>
<u-toast ref="uToast" />
</view>
</template>
<script>
import {
getUserSig,
consultation,
} from '@/api/homepage/index.js'
import {
hospitalPerson
} from '@/api/myinformation/myinformation.js'
import {
nextTick
} from "vue";
export default {
data() {
return {
src: '',
datalist:'',
datalist: '',
userSig: '', //userSig
roomId: '', //roomId
userId: '',
userName:'',//Name
};
},
onLoad(options) {
this.datalist=JSON.parse(options.item)
// console.log(this.datalist)
this.src =
`https://msg.xinyilu.cn?userId=xinyilu_mp&userName=123&userSig=eJwtjMEKgkAURf9l1iEq816N0EKiMmoRZgtXETmNL0cbTEOJ-r1Jvbt7DpwPSw4n5y1rFjDfcdls*JTJqqE7DbijqifdXkoz2VdWXI2hjAUeunYoOB*N7AzV0nIA8K0ZaUPln6FAsRAIOFVI2Xj*0LmnzjHc1iuRxDCPeYp7xft0i0mB*rgJw3YXAUbPJfv*AIBJMqE_&roomId=123`
this.datalist = JSON.parse(options.item)
this.userId = uni.getStorageSync("id")
hospitalPerson(this.userId).then(res => {
this.userName = res.data.personName
this.getUserSig()
})
},
onShow() {
},
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>

View File

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