提交 a6324a59 authored 作者: lihuihui's avatar lihuihui

update

上级 cd9d6716
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
<div class="state"> <div class="state">
<p>活动直播间状态</p> <p>活动直播间状态</p>
<p :class="detailData.live_status == 1 ? 'active1' : detailData.live_status == 2 ? 'active2' : 'active3'" @click="joinActivity(detailData.live_status, detailData)"> <p :class="detailData.live_status == 1 ? 'active1' : detailData.live_status == 2 ? 'active2' : 'active3'" @click="joinActivity(detailData.live_status)">
<span>{{ detailData.live_status == 1 ? '直播未开始' : detailData.live_status == 2 ? '直播进行中' : '直播已结束' }}</span> <span>{{ detailData.live_status == 1 ? '直播未开始' : detailData.live_status == 2 ? '直播进行中' : '直播已结束' }}</span>
<span v-if="detailData.live_status == 2" class="icon"></span> <span v-if="detailData.live_status == 2" class="icon"></span>
</p> </p>
...@@ -71,15 +71,17 @@ export default { ...@@ -71,15 +71,17 @@ export default {
this.getDetailUser() this.getDetailUser()
}, },
methods: { methods: {
joinActivity() { joinActivity(status) {
let url = this.liveData.code.viewUrl if (parseInt(status) === 2) {
action.Login.getUserInfo().then((res) => { let url = this.liveData.code.viewUrl
if (res.code === 0) { action.Login.getUserInfo().then((res) => {
const user = res.data if (res.code === 0) {
url += `&autoLogin=true&viewername=${user.username}&viewertoken=${this.liveData.play_pass}` const user = res.data
window.location.href = url url += `&autoLogin=true&viewername=${user.username}&viewertoken=${this.liveData.play_pass}`
} window.location.href = url
}) }
})
}
}, },
getDetail() { getDetail() {
action.List.getLiveDetail(this.$route.query.id).then((res) => { action.List.getLiveDetail(this.$route.query.id).then((res) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论