Browse Source

接口提交

master
我叫MT 1 year ago
parent
commit
8f7aeb7018
5 changed files with 89 additions and 101 deletions
  1. +2
    -2
      src/api/metadaily.js
  2. +3
    -12
      src/views/about/index.vue
  3. +15
    -20
      src/views/home/index.vue
  4. +3
    -0
      src/views/information/index.vue
  5. +66
    -67
      src/views/metadaily/index.vue

+ 2
- 2
src/api/metadaily.js View File

@@ -12,7 +12,7 @@ export const guanggao = (index) => {
} }
/** /**
* 首页轮播
* 轮播
* @returns request * @returns request
*/ */
export const lunboList = (num = 1, size = 10) => { export const lunboList = (num = 1, size = 10) => {
@@ -40,7 +40,7 @@ export const hotNewsConfig = () => {
export const hotnews = (num = 1, size = 10) => { export const hotnews = (num = 1, size = 10) => {
return request({ return request({
method: 'GET', method: 'GET',
url: `/news/list?type=1?pageNum=${num}&pageSize=${size}`
url: `/news/list?type=1&pageNum=${num}&pageSize=${size}`
}) })
} }


+ 3
- 12
src/views/about/index.vue View File

@@ -43,18 +43,6 @@
<img src="../../assets/aboutbottom.png"> <img src="../../assets/aboutbottom.png">
</div> </div>
</div> </div>
<!-- <div id="wk">
<div class="content">
<div class="callme">
<a class="title">商务合作</a>
<div>
<a>联系方式: 458233656411</a>
<a>联系邮箱: 458233656411@Gmail.com</a>
</div>
</div>
<img src="../../assets/aboutbottom.png">
</div>
</div> -->
</div> </div>
</template> </template>
<script> <script>
@@ -227,6 +215,9 @@ export default {
} }
#daliay { #daliay {
background: #F2F4F8; background: #F2F4F8;
.content {
align-items: center;
}
.top { .top {
min-height: 470px; min-height: 470px;
margin-bottom: 40px; margin-bottom: 40px;


+ 15
- 20
src/views/home/index.vue View File

@@ -47,27 +47,22 @@
<div class="content"> <div class="content">
<div class="top"> <div class="top">
<div class="yyzrbtxt lr"> <div class="yyzrbtxt lr">
<div class="txtcontent">
<img src="@/assets/rblogo.png" class="logo">
<img src="@/assets/rblogo.png" class="logo">
<el-carousel :interval="5000" arrow="always" height="470px"> <el-carousel :interval="5000" arrow="always" height="470px">
<template v-for="(item, index) in daliay.left" > <template v-for="(item, index) in daliay.left" >
<el-carousel-item :key="index"> <el-carousel-item :key="index">
<!-- <img :src="item.img" alt=""> -->
<div class="title">
{{ item.title }}
<div class="txtcontent">
<div class="title">
{{ item.title }}
</div>
<p class="content" v-html="item.content" />
</div>
<div class="btn">
<el-button plain class="more" size="small">MORE</el-button>
</div> </div>
<p class="content">
<!-- <template ></template> -->
<!-- {{ item.content }} -->
</p>
</el-carousel-item> </el-carousel-item>
</template> </template>
</el-carousel> </el-carousel>
</div>
<div class="btn">
<el-button plain class="more" size="small">MORE</el-button>
</div>
</div> </div>
<div class="yyzrbimg lr" > <div class="yyzrbimg lr" >
<el-carousel :interval="5000" arrow="always" height="470px"> <el-carousel :interval="5000" arrow="always" height="470px">
@@ -352,6 +347,10 @@ export default {
#daliay { #daliay {
background: #F2F4F8; background: #F2F4F8;
padding-top: 60px; padding-top: 60px;
.logo {
position: absolute;
left: 0;
}
.top { .top {
justify-content: space-between; justify-content: space-between;
position: relative; position: relative;
@@ -362,11 +361,7 @@ export default {
height: 80% !important; height: 80% !important;
text-align: left; text-align: left;
margin-right: 50px; margin-right: 50px;
margin-right: 50px;
.logo {
margin-bottom: 50px;
margin-top: -18px;
}
width: 90%;
.title { .title {
border-left: 7px solid #07CAAF; border-left: 7px solid #07CAAF;
font-size: 36px; font-size: 36px;
@@ -390,7 +385,7 @@ export default {
.btn { .btn {
width:100%; width:100%;
position: absolute; position: absolute;
// bottom: 55px;
bottom: 55px;
.more { .more {
position: absolute; position: absolute;
left: 0px; left: 0px;


+ 3
- 0
src/views/information/index.vue View File

@@ -432,6 +432,9 @@ export default {
:deep.el-carousel__mask { :deep.el-carousel__mask {
background-color: #00000000 !important; background-color: #00000000 !important;
}
:deep .el-carousel__indicators--outside, .el-carousel__indicators--horizontal {
display: none;
} }
.el-carousel__item { .el-carousel__item {
display: flex; display: flex;


+ 66
- 67
src/views/metadaily/index.vue View File

@@ -35,8 +35,9 @@
</div> </div>
<div id="daliay"> <div id="daliay">
<div class="content"> <div class="content">
<div class="top">
<div class="htitle">
<!-- <div class="top">
</div> -->
<div class="htitle">
<a class="tle">资讯</a> <a class="tle">资讯</a>
<div class="item"> <div class="item">
<a v-for="item in information" :key="item" @click="changenews(item)" :class="{ clk: informationitem === item }">{{ item }}</a> <a v-for="item in information" :key="item" @click="changenews(item)" :class="{ clk: informationitem === item }">{{ item }}</a>
@@ -44,16 +45,14 @@
<el-button type="text">MORE+</el-button> <el-button type="text">MORE+</el-button>
</div> </div>
<div id="hotList"> <div id="hotList">
<div class="list" v-for="(item, index) in carList" :key="index">
<div class="list" v-for="(item, index) in zixun" :key="index">
<img :src="item.img"> <img :src="item.img">
<div class="txt"> <div class="txt">
<a class="title">{{ item.title }}</a> <a class="title">{{ item.title }}</a>
<a class="subtitle">{{ item.subtitle }}</a> <a class="subtitle">{{ item.subtitle }}</a>
</div> </div>
<!-- <a>{{ item.title }}</a> -->
</div> </div>
</div> </div>
</div>
</div> </div>
</div> </div>
<div class="gg"> <div class="gg">
@@ -69,7 +68,7 @@
<el-button type="text">MORE+</el-button> <el-button type="text">MORE+</el-button>
</div> </div>
<div id="hotList"> <div id="hotList">
<div class="list" v-for="(item, index) in carList" :key="index">
<div class="list" v-for="(item, index) in shendu" :key="index">
<img :src="item.img"> <img :src="item.img">
<div class="txt"> <div class="txt">
<a class="title">{{ item.title }}</a> <a class="title">{{ item.title }}</a>
@@ -84,8 +83,8 @@
</div> </div>
</template> </template>
<script> <script>
// hotnews
import { guanggao, lunboList, hotNewsConfig, shendu, zixun } from '@/api/metadaily.js'
// zixun
import { guanggao, lunboList, hotNewsConfig, shendu, hotnews } from '@/api/metadaily.js'
export default { export default {
name: 'metadaily', name: 'metadaily',
data () { data () {
@@ -98,55 +97,29 @@ export default {
// { src: '/car1.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' }, // { src: '/car1.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' },
// { src: '/car2.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' } // { src: '/car2.png', title: '吉利11月销量再刷新纪录,新能源转型成效凸显', subtitle: '国际汽车企业如果现在一旦脱离了中国市场,再想回来就不可能了。必须了解这个发展的趋势,只有参与才有机会。' }
], ],
hotnews: {
title: '这两款产品也将采用“CHN”的模式进行研发',
img: '/aigc.png'
},
hotnewsList: [
{
title: '广汽本田插混旗舰双子',
img: '/aigclist.png'
},
{
title: '强不强?吉利银河E8全景',
img: '/aigclist.png'
},
{
title: '智己汽车正式获准L3级',
img: '/aigclist.png'
},
{
title: '广汽本田插混旗舰双子',
img: '/aigclist.png'
},
{
title: '强不强?吉利银河E8全景',
img: '/aigclist.png'
},
{
title: '智己汽车正式获准L3级',
img: '/aigclist.png'
}
],
carList: [
{
img: '/cattxt.png',
title: '广汽本田插混旗舰双子',
subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
}, {
img: '/cattxt.png',
title: '首款高端纯电MPV翼真Xspace',
subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
}, {
img: '/cattxt.png',
title: '广汽本田插混旗舰双子',
subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
}, {
img: '/cattxt.png',
title: '首款高端纯电MPV翼真Xspace',
subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
}
],
hotnews: {},
hotnewsList: [],
// carList: [
// {
// img: '/cattxt.png',
// title: '广汽本田插混旗舰双子',
// subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
// }, {
// img: '/cattxt.png',
// title: '首款高端纯电MPV翼真Xspace',
// subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
// }, {
// img: '/cattxt.png',
// title: '广汽本田插混旗舰双子',
// subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
// }, {
// img: '/cattxt.png',
// title: '首款高端纯电MPV翼真Xspace',
// subtitle: '阿维塔科技计划三年推出四款新车,明年则将陆续推出第三款和第四款车型。目前,有2款新车在研发中,代号分别是“15”、“16”,这'
// }
// ],
shendu: [],
zixun: [],
gg1: '', gg1: '',
gg2: '', gg2: '',
display: 1 display: 1
@@ -165,9 +138,11 @@ export default {
methods: { methods: {
changenews (item) { changenews (item) {
this.informationitem = item this.informationitem = item
this.getzixun()
}, },
changedepth (item) { changedepth (item) {
this.depthitem = item this.depthitem = item
this.getshendu()
}, },
async getguanggao () { async getguanggao () {
const { data: { message: ggm1, data: gg1 } } = await guanggao(1) const { data: { message: ggm1, data: gg1 } } = await guanggao(1)
@@ -197,22 +172,46 @@ export default {
this.display = display this.display = display
} }
}, },
// async gethotnews () {
// const { data: { message, data } } = await hotnews()
// if (message === 'success') {
// console.log(data)
// }
// },
async gethotnews () {
this.hotnewsList = []
const { data: { message, data } } = await hotnews()
if (message === 'success') {
this.hotnews = {
title: data.list[0].title,
img: data.list[0].image
}
for (let index = 1; index < data.list.length; index++) {
this.hotnewsList.push({
title: data.list[index].title,
img: data.list[index].image
})
}
}
},
async getshendu () { async getshendu () {
const { data: { message, data } } = await shendu()
this.shendu = []
const { data: { message, data } } = await shendu(1, 10, this.depthitem)
if (message === 'success') { if (message === 'success') {
console.log(data)
for (const iter of data.list) {
this.shendu.push({
title: iter.title,
img: iter.image,
subtitle: iter.subTitle
})
}
} }
}, },
async getzixun () { async getzixun () {
const { data: { message, data } } = await zixun()
this.zixun = []
const { data: { message, data } } = await shendu(1, 10, this.informationitem)
if (message === 'success') { if (message === 'success') {
console.log(data)
for (const iter of data.list) {
this.zixun.push({
title: iter.title,
img: iter.image,
subtitle: iter.subTitle
})
}
} }
} }
} }


Loading…
Cancel
Save