32 lines
848 B
Vue
32 lines
848 B
Vue
<template>
|
|
<iframe id="iframe" style="width:100%;height: 100%" :src="url" frameborder="0"></iframe>
|
|
</template>
|
|
<style lang="scss" scoped>
|
|
|
|
</style>
|
|
<script lang="ts">
|
|
import { getliveinfo, luzhi } from '@/api';
|
|
import store from '@/store';
|
|
import { defineComponent, onMounted, ref, watch } from 'vue';
|
|
import { useRoute } from 'vue-router';
|
|
|
|
|
|
export default defineComponent({
|
|
setup(){
|
|
const id = useRoute().query.id;
|
|
const url = ref<string>()
|
|
if(id && typeof id == 'string'){
|
|
getliveinfo(parseInt(id)).then((res: any)=>{
|
|
// luzhi(res.roomid)
|
|
url.value = `/zhibo.html?roomid=${res.roomid}&memberid=${res.memberid}&name=${escape(store.state.userinfo.name)}&liveid=${res.liveid}`
|
|
})
|
|
|
|
}
|
|
|
|
return {
|
|
url
|
|
}
|
|
}
|
|
})
|
|
|
|
</script> |