替换了4个空格缩进
This commit is contained in:
parent
6102fda7de
commit
79a5882601
@ -11,7 +11,7 @@ export interface Get {
|
||||
}
|
||||
|
||||
axios.interceptors.response.use((response)=>{
|
||||
console.log(response)
|
||||
// console.log(response)
|
||||
if(response.data.code == 1001){
|
||||
router.push("/")
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="video">
|
||||
<video src=""></video>
|
||||
<video :controls="true" :src="info.vodurl"></video>
|
||||
<div class="liveinfo">
|
||||
<div class="left">
|
||||
<div>
|
||||
@ -9,11 +9,11 @@
|
||||
</div>
|
||||
<div>
|
||||
<img src="@/static/images/livewatch.png" alt="" class="icon">
|
||||
<span>2020-09-11 18:30</span>
|
||||
<span>{{info.dateline}}</span>
|
||||
</div>
|
||||
<div>
|
||||
<img src="@/static/images/livetimetake.png" alt="" class="icon">
|
||||
<span>30min</span>
|
||||
<span>{{info.vodduration}}min</span>
|
||||
</div>
|
||||
<div>
|
||||
<img src="@/static/images/shoucang.png" alt="" class="icon">
|
||||
@ -31,7 +31,6 @@
|
||||
width: 976px;
|
||||
height: 563px;
|
||||
border-radius: 18px;
|
||||
background-color: #0f0;
|
||||
overflow: hidden;
|
||||
> video {
|
||||
width: 100%;
|
||||
@ -78,11 +77,18 @@
|
||||
}
|
||||
</style>
|
||||
<script lang="ts">
|
||||
import { defineComponent } from "vue";
|
||||
import { defineComponent, ref } from "vue";
|
||||
|
||||
export default defineComponent({
|
||||
setup() {
|
||||
props:{
|
||||
info: Object
|
||||
},
|
||||
setup(props) {
|
||||
console.log(1);
|
||||
// const liveinfo = ref(props.liveinfo)
|
||||
return {
|
||||
// liveinfo
|
||||
}
|
||||
},
|
||||
});
|
||||
</script>
|
@ -2,9 +2,15 @@
|
||||
<div class="video">
|
||||
<div class="nav">
|
||||
<div class="tabs">
|
||||
<div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">全部直播</div>
|
||||
<div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">未开始</div>
|
||||
<div :class="tabindex == 3 ? 'on' : ''" @click="tabchange(3)">已结束</div>
|
||||
<div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">
|
||||
全部直播
|
||||
</div>
|
||||
<div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">
|
||||
未开始
|
||||
</div>
|
||||
<div :class="tabindex == 3 ? 'on' : ''" @click="tabchange(3)">
|
||||
已结束
|
||||
</div>
|
||||
</div>
|
||||
<div class="sel">
|
||||
<img src="@/static/images/sousuo.png" alt="" class="icon" />
|
||||
@ -12,7 +18,19 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="list" v-if="tabindex == 1">
|
||||
<LiveItem :type="2" v-for="(i,j) in livelist" :key="j" :img="i.img" :title="i.title" :score="i.score" :date="i.starttime" :takehour="i.vodduration" :livenum="i.livenumber" :status="i.livestatus" :zid="i.liveid"></LiveItem>
|
||||
<LiveItem
|
||||
:type="2"
|
||||
v-for="(i, j) in livelist"
|
||||
:key="j"
|
||||
:img="i.img"
|
||||
:title="i.title"
|
||||
:score="i.score"
|
||||
:date="i.starttime"
|
||||
:takehour="i.vodduration"
|
||||
:livenum="i.livenumber"
|
||||
:status="i.livestatus"
|
||||
:zid="i.liveid"
|
||||
></LiveItem>
|
||||
</div>
|
||||
|
||||
<div class="list" v-if="tabindex == 2">
|
||||
@ -137,8 +155,8 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent, onMounted, ref } from "vue";
|
||||
import LiveItem from "@/components/LiveItem.vue";
|
||||
import { getlivelist } from '@/api';
|
||||
import { LiveList } from '@/types';
|
||||
import { getlivelist } from "@/api";
|
||||
import { LiveList } from "@/types";
|
||||
export default defineComponent({
|
||||
components: {
|
||||
LiveItem,
|
||||
@ -146,18 +164,18 @@ export default defineComponent({
|
||||
setup() {
|
||||
const page = ref(1);
|
||||
const tabindex = ref(1);
|
||||
const livelist=ref<LiveList[]>()
|
||||
const livelist = ref<LiveList[]>();
|
||||
onMounted(async () => {
|
||||
livelist.value = await getlivelist();
|
||||
})
|
||||
});
|
||||
function tabchange(e: number): void {
|
||||
tabindex.value=e
|
||||
tabindex.value = e;
|
||||
}
|
||||
return {
|
||||
page,
|
||||
tabindex,
|
||||
tabchange,
|
||||
livelist
|
||||
livelist,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="livedetail">
|
||||
<div class="info">
|
||||
<div class="liveplay">
|
||||
<liveplay></liveplay>
|
||||
<liveplay :info="liveinfo"></liveplay>
|
||||
</div>
|
||||
|
||||
<LiveCount></LiveCount>
|
||||
|
@ -57,7 +57,6 @@
|
||||
<img src="" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -185,7 +184,6 @@
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
Loading…
x
Reference in New Issue
Block a user