一部分接口

This commit is contained in:
2020-10-15 19:06:30 +08:00
parent 9c0e6ffd39
commit 6102fda7de
2 changed files with 70 additions and 22 deletions

View File

@@ -1,42 +1,41 @@
<template>
<div class="livedetail">
<div class="info">
<div class="liveplay">
<liveplay></liveplay>
</div>
<div class="liveplay">
<liveplay></liveplay>
</div>
<LiveCount></LiveCount>
<LiveCount></LiveCount>
</div>
<VideoReview class="review"></VideoReview>
<VideoReview class="review" v-if="liveinfo.livestatus == 2"></VideoReview>
</div>
</template>
<style lang="scss" scoped>
.livedetail {
width: 1320px;
height: 563px;
.info {
width: 1321px;
display: flex;
justify-content:center;
.liveplay {
background: white;
border-radius: 18px;
margin-right: 29px;
.info {
width: 1321px;
display: flex;
justify-content: center;
.liveplay {
background: white;
border-radius: 18px;
margin-right: 29px;
}
}
.review {
margin-top: 28px;
}
}
.review {
margin-top: 28px;
}
}
</style>
<script lang="ts">
import { defineComponent } from "vue";
import liveplay from "@/components/LivePlay.vue"
import { defineComponent, ref } from "vue";
import liveplay from "@/components/LivePlay.vue";
import LiveCount from "@/components/LiveCount.vue";
import VideoReview from "@/components/VideoReview.vue";
import { useRoute } from 'vue-router';
import { useRoute } from "vue-router";
import { getliveinfo } from "@/api";
export default defineComponent({
components: {
LiveCount,
@@ -45,6 +44,17 @@ export default defineComponent({
},
setup() {
console.log(useRoute().query.id);
const id = useRoute().query.id;
let liveinfo = ref<any>({})
if (typeof id == "string") {
getliveinfo(parseInt(id)).then((res) => {
liveinfo.value = res;
console.log(res)
});
}
return {
liveinfo
}
},
});
</script>