直播管理

This commit is contained in:
asd
2020-10-14 08:57:57 +08:00
parent 8709d8ffb7
commit 3d7070b8d7
5 changed files with 628 additions and 414 deletions

View File

@@ -12,16 +12,7 @@
</div>
</div>
<div class="list" v-if="tabindex==1">
<LiveItem :type="2"></LiveItem>
<LiveItem :type="2"></LiveItem>
<LiveItem :type="2"></LiveItem>
<LiveItem></LiveItem>
<LiveItem></LiveItem>
<LiveItem></LiveItem>
<LiveItem></LiveItem>
<LiveItem></LiveItem>
<LiveItem></LiveItem>
<LiveItem></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"></LiveItem>
</div>
<div class="list" v-if="tabindex==2">
@@ -144,24 +135,29 @@
}
</style>
<script lang="ts">
import { defineComponent, ref } from "vue";
import { defineComponent, onMounted, ref } from "vue";
import LiveItem from "@/components/LiveItem.vue";
import { getlivelist } from '@/api';
import { LiveList } from '@/types';
export default defineComponent({
components: {
LiveItem,
},
setup() {
const page = ref(6);
const page = ref(1);
const tabindex = ref(1);
getlivelist()
const livelist=ref<Array<LiveList>>()
onMounted(async ()=>{
livelist.value= await getlivelist()
})
function tabchange(e: number): void {
tabindex.value=e
}
return {
page,
tabindex,
tabchange
tabchange,
livelist
};
},
});