直播切换
This commit is contained in:
parent
758f85facf
commit
007cf5a9c7
@ -5,10 +5,10 @@
|
|||||||
<div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">
|
<div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">
|
||||||
全部直播
|
全部直播
|
||||||
</div>
|
</div>
|
||||||
<div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">
|
<div :class="tabindex == 0 ? 'on' : ''" @click="tabchange(0)">
|
||||||
未开始
|
未开始
|
||||||
</div>
|
</div>
|
||||||
<div :class="tabindex == 3 ? 'on' : ''" @click="tabchange(3)">
|
<div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">
|
||||||
已结束
|
已结束
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -33,19 +33,35 @@
|
|||||||
></LiveItem>
|
></LiveItem>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="list" v-if="tabindex == 2">
|
<div class="list" v-if="tabindex == 0">
|
||||||
<LiveItem :type="3"></LiveItem>
|
<LiveItem
|
||||||
<LiveItem></LiveItem>
|
:type="2"
|
||||||
<LiveItem></LiveItem>
|
v-for="(i, j) in livelist.data"
|
||||||
<LiveItem></LiveItem>
|
:key="j"
|
||||||
<LiveItem></LiveItem>
|
:img="i.img"
|
||||||
<LiveItem></LiveItem>
|
:title="i.title"
|
||||||
|
:score="i.score"
|
||||||
|
:date="i.starttime"
|
||||||
|
:takehour="i.vodduration"
|
||||||
|
:livenum="i.livenumber"
|
||||||
|
:status="i.livestatus"
|
||||||
|
:zid="i.liveid"
|
||||||
|
></LiveItem>
|
||||||
</div>
|
</div>
|
||||||
<div class="list" v-if="tabindex == 3">
|
<div class="list" v-if="tabindex == 2">
|
||||||
<LiveItem :type="2"></LiveItem>
|
<LiveItem
|
||||||
<LiveItem :type="2"></LiveItem>
|
:type="2"
|
||||||
<LiveItem :type="2"></LiveItem>
|
v-for="(i, j) in livelist.data"
|
||||||
<LiveItem :type="2"></LiveItem>
|
: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>
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
<a-pagination v-model:current="page" :total="livelist.total" :showLessItems="true" />
|
<a-pagination v-model:current="page" :total="livelist.total" :showLessItems="true" />
|
||||||
@ -176,11 +192,18 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
function tabchange(e: number): void {
|
function tabchange(e: number): void {
|
||||||
tabindex.value = e;
|
tabindex.value = e;
|
||||||
|
livelist.value = {data:[], code: 0, msg: "",total: 0};
|
||||||
|
tab();
|
||||||
}
|
}
|
||||||
async function sel(){
|
async function sel(){
|
||||||
console.log(input.value)
|
console.log(input.value);
|
||||||
livelist.value = await getlivelist({title: input.value});
|
livelist.value = await getlivelist({title: input.value});
|
||||||
}
|
}
|
||||||
|
async function tab(){
|
||||||
|
input.value = '';
|
||||||
|
livelist.value = await getlivelist({ status: tabindex.value});
|
||||||
|
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
page,
|
page,
|
||||||
tabindex,
|
tabindex,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user