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

View File

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

View File

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

View File

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

View File

@ -1,162 +1,161 @@
<template>
<div class="liveing">
<a-breadcrumb separator=">">
<a-breadcrumb-item>Home</a-breadcrumb-item>
<a-breadcrumb-item href=""> Application Center </a-breadcrumb-item>
<a-breadcrumb-item href=""> Application List </a-breadcrumb-item>
<a-breadcrumb-item>An Application</a-breadcrumb-item>
</a-breadcrumb>
<div class="top">
<div class="left">直播页面</div>
<div class="right">
<img src="@/static/images/liveshare.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 class="liveing">
<a-breadcrumb separator=">">
<a-breadcrumb-item>Home</a-breadcrumb-item>
<a-breadcrumb-item href=""> Application Center </a-breadcrumb-item>
<a-breadcrumb-item href=""> Application List </a-breadcrumb-item>
<a-breadcrumb-item>An Application</a-breadcrumb-item>
</a-breadcrumb>
<div class="top">
<div class="left">直播页面</div>
<div class="right">
<img src="@/static/images/liveshare.png" alt="" />
<img src="@/static/images/liveend.png" alt="" />
</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 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 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>
</template>
<style lang="scss" scoped>
.liveing ::v-deep(.ant-breadcrumb) > span:last-child {
color: #08ae98;
}
.liveing {
width: 1320px;
height: 563px;
.top {
width: 1321px;
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;
width: 1320px;
height: 563px;
.top {
width: 1321px;
height: 57px;
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 {
margin-top: 23px;
margin-bottom: 29px;
display: flex;
justify-content: space-between;
height: 58px;
color: #121212;
font-size: 13px;
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;
}
margin-left: 40px;
font-weight: bold;
}
.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;
margin-right: 27px;
> img {
margin-right: 10px;
}
}
}
}
}
.others {
width: 252px;
height: 630px;
display: flex;
flex-direction: column;
.othersitem{
.info {
display: flex;
justify-content: space-between;
.LivePlaying {
border-radius: 18px;
margin: 0 35px;
.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;
width: 100%;
height: 132px;
@ -170,23 +169,22 @@
opacity: 0.1;
border-radius: 18px 18px 0px 0px;
top: 0;
}
}
> img {
width: 228px;
height: 132px;
border-radius: 18px;
background: #0f0;
}
.name{
.name {
position: absolute;
top: 9px;
left: 28px;
font-size: 12px;
color: #fff;
}
}
}
}
}
</style>
<script lang="ts">
@ -196,11 +194,11 @@ import LiveingWatcher from "@/components/LiveingWatcher.vue";
export default defineComponent({
components: {
LivePlaying,
LiveingWatcher,
LivePlaying,
LiveingWatcher,
},
setup() {
console.log(1);
console.log(1);
},
});
</script>