chutingting 1 vuosi sitten
vanhempi
commit
6fe42abf40
3 muutettua tiedostoa jossa 27 lisäystä ja 15 poistoa
  1. +1
    -1
      src/api/request.js
  2. +25
    -14
      src/views/home/index.vue
  3. +1
    -0
      vue.config.js

+ 1
- 1
src/api/request.js Näytä tiedosto

@@ -2,7 +2,7 @@ import axios from 'axios'
// create an axios instance
const service = axios.create({
baseURL: 'https://www.meta-autotv.com/homeC', // /api
baseURL: '/api', // /api
timeout: 1000 * 30 // request timeout
})


+ 25
- 14
src/views/home/index.vue Näytä tiedosto

@@ -2,10 +2,12 @@
<div>
<el-carousel >
<el-carousel-item class="lunbo" v-for="(item, index) in carouselList" :key="index" :style="{ backgroundImage: `url(${item.src})` }">
<div id="txt">
<a class="title">{{ item.title }}</a>
<a class="subtitle">{{ item.subtitle }}</a>
</div>
<a :href="item.link">
<div id="txt">
<a class="title">{{ item.title }}</a>
<a class="subtitle">{{ item.subtitle }}</a>
</div>
</a>
</el-carousel-item>
</el-carousel>
<div id="hot">
@@ -109,8 +111,9 @@ export default {
for (const iter of data.list) {
this.carouselList.push({
src: iter.image,
title: iter.link,
subtitle: iter.link
title: iter.title,
subtitle: iter.subtitle,
link: iter.link
})
}
}
@@ -191,6 +194,10 @@ export default {
.lunbo {
background-size: auto;
background-position: center;
a{
width: 100%;
height: 100%;
}
}
#hot, #daliay {
width: 100%;
@@ -198,10 +205,10 @@ export default {
display: flex;
align-items: center;
justify-content: center;
padding: 30px 0;
padding: 25px 0;
.content {
width: 1200px;
height: 90%;
// height: 90%;
display: flex;
flex-direction: column;
justify-content: space-between;
@@ -212,7 +219,7 @@ export default {
// min-height: 470px;
// background: black;
display: flex;
padding-bottom: 30px;
// padding-bottom: 30px;
.lr {
width: 50%;
height: 100%;
@@ -292,17 +299,21 @@ export default {
}
#daliay {
background: #F2F4F8;
padding-top: 60px;
.top {
justify-content: space-between;
position: relative;
.yyzrbtxt, .yyzrbimg{
height: 100%;
width: 47%;
.txtcontent {
width: 100%;
height: 80% !important;
text-align: left;
margin-right: 50px;
margin-right: 50px;
.logo {
margin-bottom: 30px;
margin-bottom: 50px;
margin-top: -18px;
}
.title {
border-left: 7px solid #07CAAF;
@@ -310,7 +321,6 @@ export default {
font-weight: bold;
color: #0D1114;
width: 90%;
height: 79px;
text-align: left;
padding-left:30px;
@@ -322,12 +332,13 @@ export default {
line-height: 30px;
width: 100%;
text-align: left;
margin-top: 40px;
}
}
.btn {
height: 20%;
width:100%;
position: relative;
position: absolute;
bottom: 55px;
.more {
position: absolute;
left: 0px;


+ 1
- 0
vue.config.js Näytä tiedosto

@@ -6,6 +6,7 @@ function resolve (dir) {
module.exports = {
configureWebpack: {
devtool: 'source map',
resolve: {
alias: {
'@': resolve('src')


Ladataan…
Peruuta
Tallenna