You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
810 lines
16 KiB
810 lines
16 KiB
<template> |
|
<div class="wrap" v-if="modules.length>=1"> |
|
<el-carousel :interval="6000" :arrow="(modules[0] && modules[0].list.filter(e => e.isEnable).length > 1) ? 'hover' : 'never'" :indicator-position="modules[0].list.filter(e => e.isEnable).length > 1 ? '' : 'none'"> |
|
<template v-for="(item, i) in modules[0].list"> |
|
<el-carousel-item v-if="item.pic && item.isEnable" :key="i"> |
|
<div :class="['banner-item', {'cursor-pointer': isLink(item.link.linkName)}]" @click="openLink(item)"> |
|
<img :src="item.pic" alt=""> |
|
<p class="banner-name">{{ item.title }}</p> |
|
</div> |
|
</el-carousel-item> |
|
</template> |
|
</el-carousel> |
|
|
|
<div class="block history gray"> |
|
<div class="inner"> |
|
<h2 class="wow fadeInLeft" style="margin-left: 57px">{{ modules[1].form.title }}</h2> |
|
<div class="texts wow fadeInDown" data-wow-delay="0.5s"> |
|
<div class="left"> |
|
<h2>{{ modules[1].form.subTitle }}</h2> |
|
<div class="line"></div> |
|
<div class="des">{{ modules[1].form.des }}</div> |
|
<img :class="{'arrow': isLink(modules[1].form.link.linkName)}" src="@/assets/images/arrow.png" alt="" @click="openLink(modules[1].form)"> |
|
</div> |
|
<img class="bg" width="562" height="506" :src="modules[1].form.pic" alt=""> |
|
</div> |
|
</div> |
|
</div> |
|
|
|
<div class="block"> |
|
<div class="inner app-inner"> |
|
<h2 class="b-title wow fadeInUp">{{ modules[2].form.title }}</h2> |
|
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[2].form.des }}</p> |
|
<ul class="app"> |
|
<li v-for="(item, i) in modules[3].list" :key="i" class="wow fadeInDown" :data-wow-delay="(0.2 * i).toFixed(1) + 's'" :class="{'cursor-pointer': isLink(item.link.linkName)}" @click="openLink(item)"> |
|
<img class="bg" :src="require('@/assets/images/application/app' + (i + 1) + '.png')" alt=""> |
|
<img class="icon" :src="require('@/assets/images/application/app' + (i + 1) + '-1.png')" alt=""> |
|
<p class="text">{{ item.title }}</p> |
|
</li> |
|
</ul> |
|
</div> |
|
</div> |
|
|
|
<div class="block gray"> |
|
<div class="inner"> |
|
<h2 class="b-title wow fadeInUp">{{ modules[4].form.title }}</h2> |
|
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[4].form.des }}</p> |
|
<ul class="group"> |
|
<li v-for="(item, i) in modules[5].list" :key="i" class="wow fadeInDown" :data-wow-delay="(0.2 * i).toFixed(1) + 's'" :class="{'cursor-pointer': isLink(item.link.linkName)}" @click="openLink(item)"> |
|
<img :src="item.pic" alt=""> |
|
<p class="text">{{ item.title }}</p> |
|
</li> |
|
</ul> |
|
</div> |
|
</div> |
|
|
|
<div class="block news-block"> |
|
<div class="inner"> |
|
<h2 class="b-title wow fadeInUp">{{ modules[6].form.title }}</h2> |
|
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[6].form.des }}</p> |
|
<ul class="news"> |
|
<li v-for="(item, i) in articles" :key="i" class="wow fadeInDown" :data-wow-delay="(0.2 * i).toFixed(1) + 's'" @click="toArtice(item, modules[7].form)"> |
|
<img :src="item.titleImg" alt=""> |
|
<div class="texts"> |
|
<h6>{{ item.title }}</h6> |
|
<div class="des" v-html="item.mainBody"></div> |
|
<span class="meta">{{ item.releaseTime }}</span> |
|
</div> |
|
</li> |
|
</ul> |
|
<div class="all-link" @click="toAll(modules[7].form)"> |
|
<span>{{$t('column.all')}} <img class="icon" src="@/assets/images/arrow.png" alt=""></span> |
|
</div> |
|
</div> |
|
</div> |
|
</div> |
|
</template> |
|
|
|
<script> |
|
import mixins from '@/mixins/page' |
|
import Setting from '@/setting' |
|
import Util from '@/libs/util' |
|
import WOW from 'wow.js' |
|
export default { |
|
mixins: [mixins], |
|
data() { |
|
return { |
|
articles: [] |
|
} |
|
}, |
|
mounted() { |
|
new WOW().init() |
|
}, |
|
methods: { |
|
// 获取文章详情 |
|
getInfo() { |
|
// 预览/详情 |
|
this.$post(`${this.api[this.preview ? 'getRedisCache' : 'findPage']}?columnId=${this.id}`).then(({ data }) => { |
|
if (data.length) { |
|
// state:已发布(1)则取theEditedJson,草稿(0)则取jsonBeforeEditing |
|
const json = JSON.parse(this.preview ? |
|
data : |
|
data[data.length - 1][data[data.length - 1].state ? 'theEditedJson' : 'jsonBeforeEditing']) |
|
this.modules = json |
|
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json) |
|
|
|
// 获取文章列表 |
|
const { column, site, articleNum } = json[7].form |
|
if (column.length) { |
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
this.articles = Util.removeTag(data.slice(0, articleNum || 6)) |
|
}).catch(err => {}) |
|
} |
|
} |
|
}).catch(err => {}) |
|
}, |
|
} |
|
}; |
|
</script> |
|
|
|
<style lang="scss" scoped> |
|
@import url(../../plugins/wow/animate.css); |
|
@import "../../styles/page/page.scss"; |
|
|
|
.wrap{ |
|
/deep/ .el-carousel { |
|
height: 30rem; |
|
.el-carousel__container{ |
|
height: 30rem; |
|
} |
|
img{ |
|
height: 30rem; |
|
} |
|
} |
|
} |
|
.history { |
|
h2 { |
|
font-size: 1.8rem; |
|
color: #333; |
|
} |
|
.texts { |
|
display: flex; |
|
justify-content: space-between; |
|
padding: 82px 57px 30px; |
|
margin-top: 20px; |
|
background-color: #fff; |
|
border-radius: 100px 0px 0px 0px; |
|
transition: .3s; |
|
&:hover { |
|
transform: scale(1.05); |
|
} |
|
} |
|
.left { |
|
width: 695px; |
|
} |
|
.des { |
|
margin: 20px 0; |
|
font-size: 1.2rem; |
|
color: #181818; |
|
line-height: 31px; |
|
} |
|
.bg { |
|
margin: -122px 0 0 0; |
|
} |
|
} |
|
.app-inner { |
|
width: 1558px; |
|
} |
|
.app { |
|
display: flex; |
|
flex-wrap: wrap; |
|
li { |
|
position: relative; |
|
display: flex; |
|
flex-direction: column; |
|
justify-content: center; |
|
align-items: center; |
|
width: 368px; |
|
height: 252px; |
|
margin: 0 14px 14px 0; |
|
transition: .3s; |
|
&:hover { |
|
transform: scale(1.05); |
|
.icon { |
|
transform: rotateY(180deg); |
|
} |
|
} |
|
&:first-child { |
|
width: 750px; |
|
} |
|
&:nth-child(3), &:nth-child(7), &:nth-child(10) { |
|
margin-right: 0; |
|
} |
|
&:nth-child(9) { |
|
width: 563px; |
|
} |
|
&:nth-child(10) { |
|
width: 555px; |
|
} |
|
} |
|
.bg { |
|
position: absolute; |
|
top: 0; |
|
left: 0; |
|
width: 100%; |
|
height: 100%; |
|
} |
|
.icon { |
|
position: relative; |
|
transition: .3s; |
|
} |
|
.text { |
|
position: relative; |
|
margin-top: 20px; |
|
font-size: 2rem; |
|
color: #fff; |
|
} |
|
} |
|
.group { |
|
display: flex; |
|
flex-wrap: wrap; |
|
li { |
|
position: relative; |
|
width: calc((100% - 56px) / 3); |
|
margin: 0 28px 39px 0; |
|
transition: .3s; |
|
&:hover { |
|
transform: scale(1.05); |
|
.text { |
|
color: #fff; |
|
background-color: #394f6d; |
|
} |
|
} |
|
&:nth-child(3n) { |
|
margin-right: 0; |
|
} |
|
} |
|
img { |
|
width: 100%; |
|
height: 353px; |
|
} |
|
.text { |
|
display: flex; |
|
justify-content: center; |
|
align-items: center; |
|
height: 143px; |
|
font-size: 1.8rem; |
|
font-family: SFProDisplay-Bold, SFProDisplay; |
|
font-weight: bold; |
|
line-height: 40px; |
|
text-align: center; |
|
color: #272727; |
|
background-color: #F5F5F5; |
|
transition: .3s; |
|
} |
|
} |
|
.news-block { |
|
background: url(../../assets/images/info-bg.png) 0 0/100% 100% no-repeat; |
|
} |
|
.news { |
|
position: relative; |
|
display: flex; |
|
justify-content: space-between; |
|
flex-wrap: wrap; |
|
li { |
|
display: inline-flex; |
|
width: calc((100% - 28px) / 2); |
|
padding: 34px; |
|
margin-bottom: 28px; |
|
background-color: #fff; |
|
cursor: pointer; |
|
transition: .3s; |
|
&:hover { |
|
transform: scale(1.05); |
|
} |
|
} |
|
img { |
|
width: 237px; |
|
height: 167px; |
|
} |
|
.texts { |
|
margin-left: 34px; |
|
} |
|
h6 { |
|
font-size: 1.1rem; |
|
color: #0648A8; |
|
} |
|
.des { |
|
margin: 14px 0; |
|
font-size: 1rem; |
|
color: #333; |
|
line-height: 22px; |
|
} |
|
.meta { |
|
font-size: 1rem; |
|
color: #999; |
|
} |
|
} |
|
@media (max-width: 1520px) { |
|
.app-inner { |
|
width: 1558px; |
|
} |
|
} |
|
|
|
|
|
@media (min-width: 280px) and (max-width: 1200px) { |
|
.wrap{ |
|
/deep/ .el-carousel { |
|
height: 15rem; |
|
.el-carousel__container{ |
|
height: 15rem; |
|
} |
|
img{ |
|
height: 15rem; |
|
} |
|
} |
|
} |
|
.banner-item .banner-name { |
|
font-size: 1.5rem; |
|
bottom: 2.25rem; |
|
left: 16.125rem |
|
} |
|
.block{ |
|
padding: 50px 0; |
|
.inner{ |
|
width: 95%; |
|
margin: 0 auto; |
|
.texts{ |
|
flex-direction: column; |
|
.left { |
|
width: 100%; |
|
} |
|
.bg{ |
|
margin: 0; |
|
width: 100%; |
|
height: 20rem !important; |
|
} |
|
} |
|
} |
|
.app{ |
|
li { |
|
width: 100%; |
|
} |
|
} |
|
.intro { |
|
margin-bottom: 30px; |
|
} |
|
.group{ |
|
flex-direction: column; |
|
li { |
|
width: 100%; |
|
img { |
|
height: 20rem; |
|
} |
|
} |
|
} |
|
.news{ |
|
flex-direction: column; |
|
li { |
|
width: 95%; |
|
margin: 0 auto; |
|
flex-direction: column; |
|
img{ |
|
width: 100%; |
|
height: 12rem; |
|
} |
|
.texts{ |
|
margin-left: 0; |
|
margin-top: 20px; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (max-width: 1200px) { |
|
.block{ |
|
padding: 50px 0; |
|
.inner{ |
|
width: 95%; |
|
margin: 0 auto; |
|
.texts{ |
|
flex-direction: column; |
|
.left { |
|
width: 100%; |
|
} |
|
.bg{ |
|
margin: 0; |
|
width: 100%; |
|
height: 450px; |
|
} |
|
} |
|
} |
|
.app{ |
|
li { |
|
width: 100%; |
|
} |
|
} |
|
.intro { |
|
margin-bottom: 30px; |
|
} |
|
.group{ |
|
flex-direction: column; |
|
li { |
|
width: 100%; |
|
} |
|
} |
|
.news{ |
|
flex-direction: column; |
|
li { |
|
width: 95%; |
|
margin: 0 auto; |
|
flex-direction: column; |
|
img{ |
|
width: 100%; |
|
height: 200px; |
|
} |
|
.texts{ |
|
margin-left: 0; |
|
margin-top: 20px; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (max-width: 320px) { |
|
.wrap { |
|
/deep/ .el-carousel{ |
|
height: 13rem !important; |
|
} |
|
/deep/ .el-carousel__container{ |
|
height: 13rem !important; |
|
} |
|
/deep/ .el-carousel__item { |
|
height: 13rem !important; |
|
} |
|
} |
|
.banner-item{ |
|
img { |
|
height: 13rem !important; |
|
} |
|
.banner-name { |
|
font-size: 1.5rem; |
|
line-height: 1rem; |
|
left: 5rem; |
|
} |
|
} |
|
.block { |
|
padding: 1.25rem 0 ; |
|
.inner { |
|
.b-title { |
|
font-size: 1.5rem; |
|
} |
|
.texts { |
|
padding: 5rem 1.25rem; |
|
.bg { |
|
height: 15rem !important; |
|
} |
|
} |
|
.group{ |
|
li { |
|
img { |
|
height: 15rem; |
|
} |
|
} |
|
} |
|
.news { |
|
li { |
|
padding: 1.25rem; |
|
img{ |
|
height: 13rem; |
|
} |
|
.texts { |
|
padding: 1.25rem; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (min-width: 320px) and (max-width: 375px) { |
|
.wrap { |
|
/deep/ .el-carousel{ |
|
height: 15rem !important; |
|
} |
|
/deep/ .el-carousel__container{ |
|
height: 15rem !important; |
|
} |
|
/deep/ .el-carousel__item { |
|
height: 15rem !important; |
|
} |
|
} |
|
.banner-item{ |
|
img { |
|
height: 15rem !important; |
|
} |
|
.banner-name { |
|
font-size: 1.5rem; |
|
line-height: 1rem; |
|
left: 5rem; |
|
} |
|
} |
|
.block { |
|
padding: 1.25rem 0 ; |
|
.inner { |
|
.b-title { |
|
font-size: 1.5rem; |
|
} |
|
.texts { |
|
padding: 5rem 1.25rem; |
|
.bg { |
|
height: 15rem !important; |
|
} |
|
} |
|
.group{ |
|
li { |
|
img { |
|
height: 15rem; |
|
} |
|
} |
|
} |
|
.news { |
|
li { |
|
padding: 1.25rem; |
|
img{ |
|
height: 13rem; |
|
} |
|
.texts { |
|
padding: 1.25rem; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (min-width: 375px) and (max-width: 480px) { |
|
.wrap { |
|
/deep/ .el-carousel{ |
|
height: 18rem !important; |
|
} |
|
/deep/ .el-carousel__container{ |
|
height: 18rem !important; |
|
} |
|
/deep/ .el-carousel__item { |
|
height: 18rem !important; |
|
} |
|
} |
|
.banner-item{ |
|
img { |
|
height: 18rem !important; |
|
} |
|
.banner-name { |
|
font-size: 1.5rem; |
|
line-height: 1rem; |
|
left: 5rem; |
|
} |
|
} |
|
.block { |
|
padding: 1.25rem 0 ; |
|
.inner { |
|
.b-title { |
|
font-size: 1.5rem; |
|
} |
|
.texts { |
|
padding: 5rem 1.25rem; |
|
.bg { |
|
height: 18rem !important; |
|
} |
|
} |
|
.group{ |
|
li { |
|
img { |
|
height: 18rem; |
|
} |
|
} |
|
} |
|
.news { |
|
li { |
|
padding: 1.25rem; |
|
img{ |
|
height: 18rem; |
|
} |
|
.texts { |
|
padding: 1.25rem; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (min-width: 480px) and (max-width: 640px) { |
|
.wrap { |
|
/deep/ .el-carousel{ |
|
height: 22rem !important; |
|
} |
|
/deep/ .el-carousel__container{ |
|
height: 22rem !important; |
|
} |
|
/deep/ .el-carousel__item { |
|
height: 22rem !important; |
|
} |
|
} |
|
.banner-item{ |
|
img { |
|
height: 22rem !important; |
|
} |
|
.banner-name { |
|
font-size: 1.5rem; |
|
line-height: 1rem; |
|
left: 5rem; |
|
} |
|
} |
|
.block { |
|
padding: 1.25rem 0 ; |
|
.inner { |
|
.b-title { |
|
font-size: 1.5rem; |
|
} |
|
.texts { |
|
padding: 5rem 1.25rem; |
|
.bg { |
|
height: 22rem !important; |
|
} |
|
} |
|
.group{ |
|
li { |
|
img { |
|
height: 22rem; |
|
} |
|
} |
|
} |
|
.news { |
|
li { |
|
padding: 1.25rem; |
|
img{ |
|
height: 22rem; |
|
} |
|
.texts { |
|
padding: 1.25rem; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (min-width: 640px) and (max-width: 768px) { |
|
.wrap { |
|
/deep/ .el-carousel{ |
|
height: 25rem !important; |
|
} |
|
/deep/ .el-carousel__container{ |
|
height: 25rem !important; |
|
} |
|
/deep/ .el-carousel__item { |
|
height: 25rem !important; |
|
} |
|
} |
|
.banner-item{ |
|
img { |
|
height: 25rem !important; |
|
} |
|
.banner-name { |
|
font-size: 2.5rem; |
|
line-height: 1rem; |
|
left: 5rem; |
|
} |
|
} |
|
.block { |
|
padding: 1.25rem 0 ; |
|
.inner { |
|
.b-title { |
|
font-size: 1.5rem; |
|
} |
|
.texts { |
|
padding: 5rem 1.25rem; |
|
.bg { |
|
height: 25rem !important; |
|
} |
|
} |
|
.group{ |
|
li { |
|
img { |
|
height: 25rem; |
|
} |
|
} |
|
} |
|
.news { |
|
li { |
|
padding: 1.25rem; |
|
img{ |
|
height: 25rem; |
|
} |
|
.texts { |
|
padding: 1.25rem; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (min-width: 768px) and (max-width: 980px) { |
|
.wrap { |
|
/deep/ .el-carousel{ |
|
height: 30rem !important; |
|
} |
|
/deep/ .el-carousel__container{ |
|
height: 30rem !important; |
|
} |
|
/deep/ .el-carousel__item { |
|
height: 30rem !important; |
|
} |
|
} |
|
.banner-item{ |
|
img { |
|
height: 30rem !important; |
|
} |
|
.banner-name { |
|
font-size: 2.3rem !important; |
|
line-height: 1rem; |
|
left: 5rem; |
|
} |
|
} |
|
.block { |
|
padding: 1.25rem 0 ; |
|
.inner { |
|
.b-title { |
|
font-size: 1.5rem; |
|
} |
|
.texts { |
|
padding: 5rem 1.25rem; |
|
.bg { |
|
height: 30rem !important; |
|
} |
|
} |
|
.group{ |
|
li { |
|
img { |
|
height: 30rem; |
|
} |
|
} |
|
} |
|
.news { |
|
li { |
|
padding: 1.25rem; |
|
img{ |
|
height: 30rem; |
|
} |
|
.texts { |
|
padding: 1.25rem; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
@media (min-width: 980px) and (max-width: 1200px) { |
|
.wrap { |
|
/deep/ .el-carousel{ |
|
height: 35rem !important; |
|
} |
|
/deep/ .el-carousel__container{ |
|
height: 35rem !important; |
|
} |
|
/deep/ .el-carousel__item { |
|
height: 35rem !important; |
|
} |
|
} |
|
.banner-item{ |
|
img { |
|
height: 35rem !important; |
|
} |
|
.banner-name { |
|
font-size: 2.5rem !important; |
|
line-height: 1rem; |
|
left: 5rem; |
|
} |
|
} |
|
.block { |
|
.inner { |
|
.b-title { |
|
font-size: 1.5rem; |
|
} |
|
.texts { |
|
padding: 5rem 1.25rem; |
|
.bg { |
|
height: 35rem !important; |
|
} |
|
} |
|
.group{ |
|
li { |
|
img { |
|
height: 35rem; |
|
} |
|
} |
|
} |
|
.news { |
|
li { |
|
padding: 1.25rem; |
|
img{ |
|
height: 35rem; |
|
} |
|
.texts { |
|
padding: 1.25rem; |
|
} |
|
} |
|
} |
|
} |
|
} |
|
} |
|
|
|
|
|
</style> |