一部分接口
This commit is contained in:
parent
9c0e6ffd39
commit
6102fda7de
@ -334,3 +334,41 @@ export async function getlanguages(): Promise<Language[]>{
|
|||||||
export async function putmember(data: unknown): Promise<Liveaddrule>{
|
export async function putmember(data: unknown): Promise<Liveaddrule>{
|
||||||
return (await put<Liveaddrule>(`member/${store.state.userinfo.memberid}`, data) )
|
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}
|
||||||
|
}
|
@ -3,12 +3,11 @@
|
|||||||
<div class="info">
|
<div class="info">
|
||||||
<div class="liveplay">
|
<div class="liveplay">
|
||||||
<liveplay></liveplay>
|
<liveplay></liveplay>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<LiveCount></LiveCount>
|
<LiveCount></LiveCount>
|
||||||
</div>
|
</div>
|
||||||
<VideoReview class="review"></VideoReview>
|
<VideoReview class="review" v-if="liveinfo.livestatus == 2"></VideoReview>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -18,12 +17,11 @@
|
|||||||
.info {
|
.info {
|
||||||
width: 1321px;
|
width: 1321px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content:center;
|
justify-content: center;
|
||||||
.liveplay {
|
.liveplay {
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: 18px;
|
border-radius: 18px;
|
||||||
margin-right: 29px;
|
margin-right: 29px;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.review {
|
.review {
|
||||||
@ -32,11 +30,12 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent } from "vue";
|
import { defineComponent, ref } from "vue";
|
||||||
import liveplay from "@/components/LivePlay.vue"
|
import liveplay from "@/components/LivePlay.vue";
|
||||||
import LiveCount from "@/components/LiveCount.vue";
|
import LiveCount from "@/components/LiveCount.vue";
|
||||||
import VideoReview from "@/components/VideoReview.vue";
|
import VideoReview from "@/components/VideoReview.vue";
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from "vue-router";
|
||||||
|
import { getliveinfo } from "@/api";
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
LiveCount,
|
LiveCount,
|
||||||
@ -45,6 +44,17 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
setup() {
|
setup() {
|
||||||
console.log(useRoute().query.id);
|
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>
|
</script>
|
Loading…
Reference in New Issue
Block a user