替换了4个空格缩进

This commit is contained in:
luyuan 2020-10-15 19:23:34 +08:00
parent 6102fda7de
commit 79a5882601
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
5 changed files with 294 additions and 272 deletions

View File

@ -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("/")
}

View File

@ -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>

View File

@ -2,20 +2,38 @@
<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" />
<input type="text" />
</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>
<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>
</div>
<div class="list" v-if="tabindex==2">
<div class="list" v-if="tabindex == 2">
<LiveItem :type="3"></LiveItem>
<LiveItem></LiveItem>
<LiveItem></LiveItem>
@ -23,7 +41,7 @@
<LiveItem></LiveItem>
<LiveItem></LiveItem>
</div>
<div class="list" v-if="tabindex==3">
<div class="list" v-if="tabindex == 3">
<LiveItem :type="2"></LiveItem>
<LiveItem :type="2"></LiveItem>
<LiveItem :type="2"></LiveItem>
@ -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[]>()
onMounted(async ()=>{
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,
};
},
});

View File

@ -2,7 +2,7 @@
<div class="livedetail">
<div class="info">
<div class="liveplay">
<liveplay></liveplay>
<liveplay :info="liveinfo"></liveplay>
</div>
<LiveCount></LiveCount>

View File

@ -57,7 +57,6 @@
<img src="" alt="" />
</div>
</div>
</div>
</div>
</template>
@ -156,7 +155,7 @@
height: 630px;
display: flex;
flex-direction: column;
.othersitem{
.othersitem {
position: relative;
width: 100%;
height: 132px;
@ -177,7 +176,7 @@
border-radius: 18px;
background: #0f0;
}
.name{
.name {
position: absolute;
top: 9px;
left: 28px;
@ -185,7 +184,6 @@
color: #fff;
}
}
}
}
</style>