|
|
|
@ -1,5 +1,5 @@
|
|
|
|
|
<template> |
|
|
|
|
<div v-wechat-title="'正在直播:' +play_title"></div> |
|
|
|
|
<div v-wechat-title="play_title + ' - ' + $route.meta.title"></div> |
|
|
|
|
<appHeader /> |
|
|
|
|
|
|
|
|
|
<div v-if="!com_user_token"> |
|
|
|
@ -10,97 +10,96 @@
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div v-else-if="!isAuth"> |
|
|
|
|
<el-empty :image-size="200" description=" ">{{msg}}</el-empty> |
|
|
|
|
<el-empty :image-size="200" description=" ">{{ msg }}</el-empty> |
|
|
|
|
<div style="text-align: center"> |
|
|
|
|
<router-link :to="'/live/'+liveid" class="el-btn medium ff18">马上报名</router-link> |
|
|
|
|
<router-link :to="'/live/' + liveid" class="el-btn medium ff18">马上报名</router-link> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="playbox" v-else> |
|
|
|
|
<iframe scrolling="no" border="0" frameborder='0' allowfullscreen='true' |
|
|
|
|
:src="'https://live.vhall.com/webinar/inituser/'+live.webinar_id+'?email='+live.uid+'@vhall.com&name='+live.liveUserName+'&k='+live.livekey" |
|
|
|
|
width="100%" height="100%"> |
|
|
|
|
</iframe> |
|
|
|
|
<!-- <iframe scrolling="no" border="0" frameborder="0" allowfullscreen="true" :src="'https://live.vhall.com/webinar/inituser/' + live.webinar_id + '?email=' + live.uid + '@vhall.com&name=' + live.liveUserName + '&k=' + live.livekey" width="100%" height="100%"> </iframe> --> |
|
|
|
|
<iframe id="iframe_live" border="0" frameborder="0" allowfullscreen="true" :src="'https://live.polyv.cn/watch/' + live.webinar_id + '?userid=' + live.uid + '&ts=' + live.ts + '&sign=' + live.sign" width="100%" height="100%"> </iframe> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script> |
|
|
|
|
import appHeader from "@/components/Header"; |
|
|
|
|
import { useRoute } from 'vue-router' |
|
|
|
|
import { livePlay } from "@/api/live"; |
|
|
|
|
import { toRefs, reactive, getCurrentInstance } from 'vue'; |
|
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
name: 'live_play', |
|
|
|
|
components: { |
|
|
|
|
appHeader, |
|
|
|
|
}, |
|
|
|
|
setup() { |
|
|
|
|
const { proxy } = getCurrentInstance() |
|
|
|
|
const route = useRoute() |
|
|
|
|
const liveid = route.params.liveid; |
|
|
|
|
const state = reactive({ |
|
|
|
|
isAuth: 1, |
|
|
|
|
msg: 0, |
|
|
|
|
empty: false, |
|
|
|
|
live: {}, |
|
|
|
|
playcur: 0, |
|
|
|
|
logid: 0, |
|
|
|
|
videoid: 0, |
|
|
|
|
play_title: '', |
|
|
|
|
}) |
|
|
|
|
import appHeader from "@/components/Header"; |
|
|
|
|
import { useRoute } from "vue-router"; |
|
|
|
|
import { livePlay } from "@/api/live"; |
|
|
|
|
import { toRefs, reactive, getCurrentInstance } from "vue"; |
|
|
|
|
|
|
|
|
|
const reslivePlay = async () => { |
|
|
|
|
const res = await livePlay(liveid); |
|
|
|
|
if(res.status==-1){ |
|
|
|
|
state.isAuth=0; |
|
|
|
|
state.msg=res.message; |
|
|
|
|
} |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
state.live = res.data; |
|
|
|
|
state.play_title = res.data.title; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
export default { |
|
|
|
|
name: "live_play", |
|
|
|
|
components: { |
|
|
|
|
appHeader, |
|
|
|
|
}, |
|
|
|
|
setup() { |
|
|
|
|
const { proxy } = getCurrentInstance(); |
|
|
|
|
const route = useRoute(); |
|
|
|
|
const liveid = route.params.liveid; |
|
|
|
|
const state = reactive({ |
|
|
|
|
isAuth: 1, |
|
|
|
|
msg: 0, |
|
|
|
|
empty: false, |
|
|
|
|
live: {}, |
|
|
|
|
playcur: 0, |
|
|
|
|
logid: 0, |
|
|
|
|
videoid: 0, |
|
|
|
|
play_title: "", |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
if (proxy.$root.com_user_token) { |
|
|
|
|
reslivePlay(); |
|
|
|
|
const reslivePlay = async () => { |
|
|
|
|
const res = await livePlay(liveid); |
|
|
|
|
if (res.status == -1) { |
|
|
|
|
state.isAuth = 0; |
|
|
|
|
state.msg = res.message; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
...toRefs(state), |
|
|
|
|
liveid, |
|
|
|
|
if (res.code === 200) { |
|
|
|
|
state.live = res.data; |
|
|
|
|
state.play_title = res.data.title; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
if (proxy.$root.com_user_token) { |
|
|
|
|
reslivePlay(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.playbox { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 118px; |
|
|
|
|
left: 0; |
|
|
|
|
bottom: 0; |
|
|
|
|
right: 0; |
|
|
|
|
background-color: #000; |
|
|
|
|
overflow: hidden; |
|
|
|
|
} |
|
|
|
|
// setTimeout(function() { |
|
|
|
|
// let iframeDocument = document.getElementById("iframe_live").contentWindow; |
|
|
|
|
// console.log("iframeDocument=====", iframeDocument); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// iframeDocument.body.style.backgroundColor = "blue"; |
|
|
|
|
// }, 500); |
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
...toRefs(state), |
|
|
|
|
liveid, |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.playbox { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 118px; |
|
|
|
|
left: 0; |
|
|
|
|
bottom: 0; |
|
|
|
|
right: 0; |
|
|
|
|
background-color: #000; |
|
|
|
|
overflow: hidden; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
<style lang="scss"> |
|
|
|
|
/*响应式-移动端*/ |
|
|
|
|
@media screen and (max-width: 800px) { |
|
|
|
|
|
|
|
|
|
.header, |
|
|
|
|
.edu-nav-box { |
|
|
|
|
display: none; |
|
|
|
|
} |
|
|
|
|
/*响应式-移动端*/ |
|
|
|
|
@media screen and (max-width: 800px) { |
|
|
|
|
.header, |
|
|
|
|
.edu-nav-box { |
|
|
|
|
display: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.playbox { |
|
|
|
|
top: 0 !important; |
|
|
|
|
} |
|
|
|
|
.playbox { |
|
|
|
|
top: 0 !important; |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|
} |
|
|
|
|
</style> |
|
|
|
|