xinelu-doctor-app/pages/Industrialbutler/Industrialbutler.vue
2023-11-08 16:11:43 +08:00

80 lines
1.9 KiB
Vue
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<view>
<!-- <web-view :src="src"></web-view> -->
<view class="" @tap='govideo'>
11111111111111111111111111
</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: '',
userId: '',
userName: '', //医生Name
roomId: '',
userSig: '',
};
},
onLoad(options) {
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: {
govideo() {
uni.navigateTo({
url: `./video?roomId=${this.roomId}&userId=${this.userId}&userName=${this.userName}&userSig=${this.userSig}&remoteUserId=${this.item.patientId}`
})
},
getUserSig() {
// 获取userSig
getUserSig(this.userId).then(res => {
this.userSig = res.data
// 获取roomId
consultation(this.datalist.goodsOrderId).then(resp => {
this.roomId = resp.msg
if (resp.code == 200) {
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}`
} else if (resp.code == 500) {
this.$refs.uToast.show({
title: resp.msg,
type: 'error',
duration: '1500'
})
}
})
})
},
},
}
</script>
<style lang="scss">
</style>