一部分接口
This commit is contained in:
parent
9c0e6ffd39
commit
6102fda7de
@ -333,4 +333,42 @@ export async function getlanguages(): Promise<Language[]>{
|
||||
|
||||
export async function putmember(data: unknown): Promise<Liveaddrule>{
|
||||
return (await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, data) )
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 直播详情
|
||||
*
|
||||
*/
|
||||
|
||||
interface LiveInfo {
|
||||
liveid: number;
|
||||
title: string;
|
||||
img: string;
|
||||
fileid: string;
|
||||
fileurl: string;
|
||||
fileduration: string;
|
||||
vodid: string;
|
||||
vodurl: string;
|
||||
vodduration: string;
|
||||
dateline: string;
|
||||
livetime: number;
|
||||
livenumber: number;
|
||||
status: number;
|
||||
desc: string;
|
||||
deleted_at: null;
|
||||
created_at: string;
|
||||
updated_at: string;
|
||||
}
|
||||
|
||||
interface StudentList {
|
||||
memberid: number;
|
||||
name: string;
|
||||
img: string;
|
||||
}
|
||||
|
||||
export async function getliveinfo(id: number){
|
||||
const liveinfo = (await get<LiveInfo>(`live/${id}`)).data;
|
||||
const studentlist = (await get<StudentList[]>("studentLive",{id})).data;
|
||||
return {...liveinfo,studentlist}
|
||||
}
|
@ -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>
|
Loading…
Reference in New Issue
Block a user