替换了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)=>{ axios.interceptors.response.use((response)=>{
console.log(response) // console.log(response)
if(response.data.code == 1001){ if(response.data.code == 1001){
router.push("/") router.push("/")
} }

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="video"> <div class="video">
<video src=""></video> <video :controls="true" :src="info.vodurl"></video>
<div class="liveinfo"> <div class="liveinfo">
<div class="left"> <div class="left">
<div> <div>
@ -9,11 +9,11 @@
</div> </div>
<div> <div>
<img src="@/static/images/livewatch.png" alt="" class="icon"> <img src="@/static/images/livewatch.png" alt="" class="icon">
<span>2020-09-11 18:30</span> <span>{{info.dateline}}</span>
</div> </div>
<div> <div>
<img src="@/static/images/livetimetake.png" alt="" class="icon"> <img src="@/static/images/livetimetake.png" alt="" class="icon">
<span>30min</span> <span>{{info.vodduration}}min</span>
</div> </div>
<div> <div>
<img src="@/static/images/shoucang.png" alt="" class="icon"> <img src="@/static/images/shoucang.png" alt="" class="icon">
@ -31,7 +31,6 @@
width: 976px; width: 976px;
height: 563px; height: 563px;
border-radius: 18px; border-radius: 18px;
background-color: #0f0;
overflow: hidden; overflow: hidden;
> video { > video {
width: 100%; width: 100%;
@ -78,11 +77,18 @@
} }
</style> </style>
<script lang="ts"> <script lang="ts">
import { defineComponent } from "vue"; import { defineComponent, ref } from "vue";
export default defineComponent({ export default defineComponent({
setup() { props:{
info: Object
},
setup(props) {
console.log(1); console.log(1);
// const liveinfo = ref(props.liveinfo)
return {
// liveinfo
}
}, },
}); });
</script> </script>

View File

@ -1,36 +1,54 @@
<template> <template>
<div class="video"> <div class="video">
<div class="nav"> <div class="nav">
<div class="tabs"> <div class="tabs">
<div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">全部直播</div> <div :class="tabindex == 1 ? 'on' : ''" @click="tabchange(1)">
<div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">未开始</div> 全部直播
<div :class="tabindex == 3 ? 'on' : ''" @click="tabchange(3)">已结束</div> </div>
</div> <div :class="tabindex == 2 ? 'on' : ''" @click="tabchange(2)">
<div class="sel"> 未开始
<img src="@/static/images/sousuo.png" alt="" class="icon" /> </div>
<input type="text" /> <div :class="tabindex == 3 ? 'on' : ''" @click="tabchange(3)">
</div> 已结束
</div>
</div>
<div class="sel">
<img src="@/static/images/sousuo.png" alt="" class="icon" />
<input type="text" />
</div>
</div> </div>
<div class="list" v-if="tabindex==1"> <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> <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>
<div class="list" v-if="tabindex==2"> <div class="list" v-if="tabindex == 2">
<LiveItem :type="3"></LiveItem> <LiveItem :type="3"></LiveItem>
<LiveItem></LiveItem> <LiveItem></LiveItem>
<LiveItem></LiveItem> <LiveItem></LiveItem>
<LiveItem></LiveItem> <LiveItem></LiveItem>
<LiveItem></LiveItem> <LiveItem></LiveItem>
<LiveItem></LiveItem> <LiveItem></LiveItem>
</div> </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> <LiveItem :type="2"></LiveItem>
<LiveItem :type="2"></LiveItem> <LiveItem :type="2"></LiveItem>
<LiveItem :type="2"></LiveItem> <LiveItem :type="2"></LiveItem>
</div> </div>
<div class="pages"> <div class="pages">
<a-pagination v-model:current="page" :total="500" :showLessItems="true" /> <a-pagination v-model:current="page" :total="500" :showLessItems="true" />
</div> </div>
</div> </div>
</template> </template>
@ -45,100 +63,100 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
.nav { .nav {
display: flex; display: flex;
align-items: center; align-items: center;
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
justify-content: space-between; justify-content: space-between;
width: 100%; width: 100%;
.tabs { .tabs {
display: flex; display: flex;
align-items: center; align-items: center;
font-size: 13px; font-size: 13px;
font-weight: bold; font-weight: bold;
color: #111; color: #111;
padding: 11px 0; padding: 11px 0;
> div { > div {
margin-right: 58px; margin-right: 58px;
cursor: pointer; cursor: pointer;
text-align: center; text-align: center;
width: 54px; width: 54px;
} }
.on { .on {
color: #08ae98; color: #08ae98;
position: relative; position: relative;
&::before { &::before {
content: ""; content: "";
display: block; display: block;
position: absolute; position: absolute;
bottom: -12px; bottom: -12px;
width: 57px; width: 57px;
height: 1px; height: 1px;
background-color: #08ae98; background-color: #08ae98;
}
}
}
.sel {
width: 171px;
height: 26px;
border: 1px solid #999;
display: flex;
align-items: center;
padding: 8px;
border-radius: 4px;
> img {
width: 11px;
height: 11px;
}
> input {
width: 119px;
font-size: 9px;
line-height: 1;
margin-left: 6px;
border: none;
outline: none;
}
} }
}
} }
.sel { .list {
width: 171px; display: flex;
height: 26px; flex-wrap: wrap;
border: 1px solid #999; width: 100%;
display: flex; > div {
align-items: center; margin-top: 28px;
padding: 8px; margin-left: 23px;
border-radius: 4px; &:nth-child(1),
> img { &:nth-child(6) {
width: 11px; margin-left: 0;
height: 11px; }
} }
> input {
width: 119px;
font-size: 9px;
line-height: 1;
margin-left: 6px;
border: none;
outline: none;
}
} }
} .pages {
.list { position: absolute;
display: flex; bottom: 114px;
flex-wrap: wrap; display: flex;
width: 100%; justify-content: center;
> div { ::v-deep(.ant-pagination-next) > .ant-pagination-item-link,
margin-top: 28px; ::v-deep(.ant-pagination-prev) > .ant-pagination-item-link,
margin-left: 23px; ::v-deep(.ant-pagination-item),
&:nth-child(1), ::v-deep(.ant-pagination-jump-next-custom-icon),
&:nth-child(6) { ::v-deep(.ant-pagination-jump-prev-custom-icon) {
margin-left: 0; border: 1px solid #08ae98;
} }
::v-deep(.ant-pagination-item-active) a {
color: #fff;
}
::v-deep(.ant-pagination-item-active) {
background-color: #08ae98;
}
} }
}
.pages {
position: absolute;
bottom: 114px;
display: flex;
justify-content: center;
::v-deep(.ant-pagination-next) > .ant-pagination-item-link,
::v-deep(.ant-pagination-prev) > .ant-pagination-item-link,
::v-deep(.ant-pagination-item),
::v-deep(.ant-pagination-jump-next-custom-icon),
::v-deep(.ant-pagination-jump-prev-custom-icon) {
border: 1px solid #08ae98;
}
::v-deep(.ant-pagination-item-active) a {
color: #fff;
}
::v-deep(.ant-pagination-item-active) {
background-color: #08ae98;
}
}
} }
</style> </style>
<script lang="ts"> <script lang="ts">
import { defineComponent, onMounted, ref } from "vue"; import { defineComponent, onMounted, ref } from "vue";
import LiveItem from "@/components/LiveItem.vue"; import LiveItem from "@/components/LiveItem.vue";
import { getlivelist } from '@/api'; import { getlivelist } from "@/api";
import { LiveList } from '@/types'; import { LiveList } from "@/types";
export default defineComponent({ export default defineComponent({
components: { components: {
LiveItem, LiveItem,
@ -146,18 +164,18 @@ export default defineComponent({
setup() { setup() {
const page = ref(1); const page = ref(1);
const tabindex = ref(1); const tabindex = ref(1);
const livelist=ref<LiveList[]>() const livelist = ref<LiveList[]>();
onMounted(async ()=>{ onMounted(async () => {
livelist.value = await getlivelist(); livelist.value = await getlivelist();
}) });
function tabchange(e: number): void { function tabchange(e: number): void {
tabindex.value=e tabindex.value = e;
} }
return { return {
page, page,
tabindex, tabindex,
tabchange, tabchange,
livelist livelist,
}; };
}, },
}); });

View File

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

View File

@ -1,162 +1,161 @@
<template> <template>
<div class="liveing"> <div class="liveing">
<a-breadcrumb separator=">"> <a-breadcrumb separator=">">
<a-breadcrumb-item>Home</a-breadcrumb-item> <a-breadcrumb-item>Home</a-breadcrumb-item>
<a-breadcrumb-item href=""> Application Center </a-breadcrumb-item> <a-breadcrumb-item href=""> Application Center </a-breadcrumb-item>
<a-breadcrumb-item href=""> Application List </a-breadcrumb-item> <a-breadcrumb-item href=""> Application List </a-breadcrumb-item>
<a-breadcrumb-item>An Application</a-breadcrumb-item> <a-breadcrumb-item>An Application</a-breadcrumb-item>
</a-breadcrumb> </a-breadcrumb>
<div class="top"> <div class="top">
<div class="left">直播页面</div> <div class="left">直播页面</div>
<div class="right"> <div class="right">
<img src="@/static/images/liveshare.png" alt="" /> <img src="@/static/images/liveshare.png" alt="" />
<img src="@/static/images/liveend.png" alt="" /> <img src="@/static/images/liveend.png" alt="" />
</div>
</div>
<div class="info">
<LiveingWatcher></LiveingWatcher>
<div class="LivePlaying">
<LivePlaying></LivePlaying>
<div class="comment">
<div class="commentitem">
<span>13:32:30</span>
<span class="name"> Andy </span>
<span> 老师这个部分可以讲的慢一些吗 </span>
</div>
<div class="commentitem">
<span>13:32:30</span>
<span class="name"> Andy </span>
<span> 老师这个部分可以讲的慢一些吗 </span>
</div>
<div class="commentitem">
<span>13:32:30</span>
<span class="name"> Andy </span>
<span> 老师这个部分可以讲的慢一些吗 </span>
</div>
</div> </div>
</div>
<div class="others">
<div class="othersitem">
<div class="watcher"></div>
<div class="name">asdsada</div>
<img src="" alt="" />
</div> </div>
<div class="othersitem"> <div class="info">
<div class="watcher"></div> <LiveingWatcher></LiveingWatcher>
<div class="name">asdsada</div> <div class="LivePlaying">
<img src="" alt="" /> <LivePlaying></LivePlaying>
</div> <div class="comment">
<div class="othersitem"> <div class="commentitem">
<div class="watcher"></div> <span>13:32:30</span>
<div class="name">asdsada</div> <span class="name"> Andy </span>
<img src="" alt="" /> <span> 老师这个部分可以讲的慢一些吗 </span>
</div> </div>
<div class="othersitem"> <div class="commentitem">
<div class="watcher"></div> <span>13:32:30</span>
<div class="name">asdsada</div> <span class="name"> Andy </span>
<img src="" alt="" /> <span> 老师这个部分可以讲的慢一些吗 </span>
</div>
<div class="commentitem">
<span>13:32:30</span>
<span class="name"> Andy </span>
<span> 老师这个部分可以讲的慢一些吗 </span>
</div>
</div>
</div>
<div class="others">
<div class="othersitem">
<div class="watcher"></div>
<div class="name">asdsada</div>
<img src="" alt="" />
</div>
<div class="othersitem">
<div class="watcher"></div>
<div class="name">asdsada</div>
<img src="" alt="" />
</div>
<div class="othersitem">
<div class="watcher"></div>
<div class="name">asdsada</div>
<img src="" alt="" />
</div>
<div class="othersitem">
<div class="watcher"></div>
<div class="name">asdsada</div>
<img src="" alt="" />
</div>
</div>
</div> </div>
</div> </div>
</div>
</div>
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
.liveing ::v-deep(.ant-breadcrumb) > span:last-child { .liveing ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98; color: #08ae98;
} }
.liveing { .liveing {
width: 1320px; width: 1320px;
height: 563px; height: 563px;
.top { .top {
width: 1321px; width: 1321px;
height: 57px; height: 57px;
background: white;
border-radius: 18px;
margin-top: 23px;
margin-bottom: 29px;
display: flex;
justify-content: space-between;
color: #121212;
font-size: 13px;
align-items: center;
.left {
margin-left: 40px;
font-weight: bold;
}
.right {
margin-right: 27px;
> img {
margin-right: 10px;
}
}
}
.info {
display: flex;
justify-content: space-between;
.LivePlaying {
border-radius: 18px;
margin: 0 35px;
.comment {
width: 797px;
height: 153px;
background: white; background: white;
border-radius: 18px; border-radius: 18px;
margin-top: 29px; margin-top: 23px;
padding: 30px; margin-bottom: 29px;
font-size: 12px;
color: #121212;
.commentitem {
margin-bottom: 17px;
.name {
margin-left: 28px;
color: #08ae98;
font-weight: bold;
}
}
}
.liveinfo {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
height: 58px; color: #121212;
font-size: 13px;
align-items: center; align-items: center;
.left { .left {
display: flex; margin-left: 40px;
color: #121212; font-weight: bold;
font-size: 13px;
margin-left: 29px;
> div {
margin-right: 57px;
}
.icon {
width: 25px;
height: 24px;
margin-right: 6px;
}
} }
.right { .right {
width: 74px; margin-right: 27px;
height: 29px; > img {
border: 1px solid #08ae98; margin-right: 10px;
border-radius: 3px; }
margin-right: 29px;
color: #08ae98;
font-size: 13px;
line-height: 29px;
font-weight: bold;
text-align: center;
} }
}
} }
} .info {
.others { display: flex;
width: 252px; justify-content: space-between;
height: 630px; .LivePlaying {
display: flex; border-radius: 18px;
flex-direction: column; margin: 0 35px;
.othersitem{ .comment {
width: 797px;
height: 153px;
background: white;
border-radius: 18px;
margin-top: 29px;
padding: 30px;
font-size: 12px;
color: #121212;
.commentitem {
margin-bottom: 17px;
.name {
margin-left: 28px;
color: #08ae98;
font-weight: bold;
}
}
}
.liveinfo {
display: flex;
justify-content: space-between;
height: 58px;
align-items: center;
.left {
display: flex;
color: #121212;
font-size: 13px;
margin-left: 29px;
> div {
margin-right: 57px;
}
.icon {
width: 25px;
height: 24px;
margin-right: 6px;
}
}
.right {
width: 74px;
height: 29px;
border: 1px solid #08ae98;
border-radius: 3px;
margin-right: 29px;
color: #08ae98;
font-size: 13px;
line-height: 29px;
font-weight: bold;
text-align: center;
}
}
}
}
.others {
width: 252px;
height: 630px;
display: flex;
flex-direction: column;
.othersitem {
position: relative; position: relative;
width: 100%; width: 100%;
height: 132px; height: 132px;
@ -170,23 +169,22 @@
opacity: 0.1; opacity: 0.1;
border-radius: 18px 18px 0px 0px; border-radius: 18px 18px 0px 0px;
top: 0; top: 0;
} }
> img { > img {
width: 228px; width: 228px;
height: 132px; height: 132px;
border-radius: 18px; border-radius: 18px;
background: #0f0; background: #0f0;
} }
.name{ .name {
position: absolute; position: absolute;
top: 9px; top: 9px;
left: 28px; left: 28px;
font-size: 12px; font-size: 12px;
color: #fff; color: #fff;
} }
}
} }
}
} }
</style> </style>
<script lang="ts"> <script lang="ts">
@ -196,11 +194,11 @@ import LiveingWatcher from "@/components/LiveingWatcher.vue";
export default defineComponent({ export default defineComponent({
components: { components: {
LivePlaying, LivePlaying,
LiveingWatcher, LiveingWatcher,
}, },
setup() { setup() {
console.log(1); console.log(1);
}, },
}); });
</script> </script>