2023-11-02 14:37:36 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<view>
|
2023-11-08 09:10:38 +08:00
|
|
|
|
<!-- <web-view :src="src"></web-view> -->
|
|
|
|
|
|
<view class="" @tap='govideo'>
|
|
|
|
|
|
11111111111111111111111111
|
|
|
|
|
|
</view>
|
2023-11-06 16:57:05 +08:00
|
|
|
|
<u-toast ref="uToast" />
|
2023-11-02 14:37:36 +08:00
|
|
|
|
</view>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
2023-11-06 16:57:05 +08:00
|
|
|
|
import {
|
|
|
|
|
|
getUserSig,
|
|
|
|
|
|
consultation,
|
|
|
|
|
|
} from '@/api/homepage/index.js'
|
|
|
|
|
|
import {
|
|
|
|
|
|
hospitalPerson
|
|
|
|
|
|
} from '@/api/myinformation/myinformation.js'
|
|
|
|
|
|
import {
|
|
|
|
|
|
nextTick
|
|
|
|
|
|
} from "vue";
|
2023-11-02 14:37:36 +08:00
|
|
|
|
export default {
|
|
|
|
|
|
data() {
|
|
|
|
|
|
return {
|
|
|
|
|
|
src: '',
|
2023-11-06 16:57:05 +08:00
|
|
|
|
datalist: '',
|
|
|
|
|
|
userId: '',
|
2023-11-07 11:15:42 +08:00
|
|
|
|
userName: '', //医生Name
|
2023-11-08 09:10:38 +08:00
|
|
|
|
roomId: '',
|
|
|
|
|
|
userSig: '',
|
2023-11-02 14:37:36 +08:00
|
|
|
|
};
|
|
|
|
|
|
},
|
|
|
|
|
|
onLoad(options) {
|
2023-11-06 16:57:05 +08:00
|
|
|
|
this.datalist = JSON.parse(options.item)
|
|
|
|
|
|
this.userId = uni.getStorageSync("id")
|
|
|
|
|
|
hospitalPerson(this.userId).then(res => {
|
|
|
|
|
|
this.userName = res.data.personName
|
|
|
|
|
|
this.getUserSig()
|
|
|
|
|
|
})
|
2023-11-02 14:37:36 +08:00
|
|
|
|
},
|
2023-11-08 09:10:38 +08:00
|
|
|
|
onShow() {},
|
2023-11-02 14:37:36 +08:00
|
|
|
|
methods: {
|
2023-11-08 09:10:38 +08:00
|
|
|
|
govideo() {
|
|
|
|
|
|
uni.navigateTo({
|
2023-11-08 16:11:43 +08:00
|
|
|
|
url: `./video?roomId=${this.roomId}&userId=${this.userId}&userName=${this.userName}&userSig=${this.userSig}&remoteUserId=${this.item.patientId}`
|
2023-11-08 09:10:38 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-11-06 16:57:05 +08:00
|
|
|
|
getUserSig() {
|
|
|
|
|
|
// 获取userSig
|
|
|
|
|
|
getUserSig(this.userId).then(res => {
|
|
|
|
|
|
this.userSig = res.data
|
|
|
|
|
|
// 获取roomId
|
2023-11-07 11:15:42 +08:00
|
|
|
|
consultation(this.datalist.goodsOrderId).then(resp => {
|
2023-11-08 09:10:38 +08:00
|
|
|
|
this.roomId = resp.msg
|
2023-11-07 11:15:42 +08:00
|
|
|
|
if (resp.code == 200) {
|
2023-11-08 09:10:38 +08:00
|
|
|
|
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);
|
|
|
|
|
|
// });
|
|
|
|
|
|
// this.src =
|
|
|
|
|
|
// `https://msg.xinyilu.cn?userId=${this.userId}&userName=${this.userName}&userSig=${res.data}&roomId=${resp.msg}`
|
2023-11-07 11:15:42 +08:00
|
|
|
|
} else if (resp.code == 500) {
|
|
|
|
|
|
this.$refs.uToast.show({
|
|
|
|
|
|
title: resp.msg,
|
|
|
|
|
|
type: 'error',
|
|
|
|
|
|
duration: '1500'
|
|
|
|
|
|
})
|
|
|
|
|
|
}
|
|
|
|
|
|
})
|
2023-11-06 16:57:05 +08:00
|
|
|
|
})
|
|
|
|
|
|
},
|
2023-11-02 14:37:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
}
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
|
|
|
|
|
|
|
|
</style>
|