Browse Source

汽车资讯

master
我叫MT 1 year ago
parent
commit
daa3cf6e64
1 changed files with 19 additions and 7 deletions
  1. +19
    -7
      src/views/information/index.vue

+ 19
- 7
src/views/information/index.vue View File

@@ -10,7 +10,7 @@
</div>
<div id="hottxt">
<div id="htitle">
<a class="tle">汽车文章</a>
<a class="tle">热点新闻</a>
<el-button type="text" @click="routerTo">MORE+</el-button>
</div>
<div id="hotList">
@@ -31,7 +31,9 @@
<div class="top">
<el-carousel :interval="4000" type="card" height="200px">
<el-carousel-item v-for="(item, index) in carvideoList" :key="index">
<img :src="item.img">
<div class="carvideo">
<video :src="item.video" />
</div>
<a>{{ item.title }}</a>
</el-carousel-item>
</el-carousel>
@@ -44,7 +46,7 @@
<div id="wk">
<div class="content">
<div class="htitle">
<a class="tle">热点新闻</a>
<a class="tle">汽车文章</a>
<el-button type="text" @click="routerTo">MORE+</el-button>
</div>
<div id="hotList">
@@ -153,9 +155,11 @@ export default {
const { data: { message, data } } = await videoList()
if (message === 'success') {
for (const iter of data.list) {
console.log(iter)
this.carvideoList.push({
title: iter.title,
img: iter.image
img: iter.image,
video: iter.link
})
}
}
@@ -376,15 +380,23 @@ export default {
}
:deep .el-carousel__indicators--outside, .el-carousel__indicators--horizontal {
display: none;
}
.el-carousel__mask {
background-color: #00000000 !important;
}
.el-carousel__item {
display: flex;
flex-direction: column;
// justify-content: center;
align-items: center;
img {
width: 800px;
height: 80%;
.carvideo {
width: 700px;
height: 70%;
border-radius: 20px;
video {
width: 100%;
height: 100%;
}
}
a {
font-size: 24px;


Loading…
Cancel
Save