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.
679 lines
14 KiB
679 lines
14 KiB
2 years ago
|
<template>
|
||
|
<div class="wrap">
|
||
|
<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 gray">
|
||
|
<div class="inner">
|
||
|
<h2 class="b-title wow fadeInUp">{{ modules[1].form.title }}</h2>
|
||
|
<p class="intro wow fadeInUp" data-wow-delay="0.8s">{{ modules[1].form.des }}</p>
|
||
|
<img class="block-pic br wow fadeInLeft" data-wow-delay="0.8s" :class="{'cursor-pointer': isLink(modules[1].form.link.linkName)}" width="100%" height="536" :src="modules[1].form.pic" alt="" @click="openLink(modules[1].form)">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="block">
|
||
|
<div class="inner">
|
||
|
<h2 class="b-title wow fadeInUp">{{ modules[2].form.title }}</h2>
|
||
|
<p class="intro wow fadeInUp" data-wow-delay="0.8s">{{ modules[2].form.des }}</p>
|
||
|
<img class="block-pic wow fadeInRight" data-wow-delay="0.8s" :class="{'cursor-pointer': isLink(modules[2].form.link.linkName)}" width="100%" height="536" :src="modules[2].form.pic" alt="" @click="openLink(modules[2].form)">
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="block gray">
|
||
|
<div class="inner">
|
||
|
<h2 class="b-title wow fadeInUp">{{ modules[3].form.title }}</h2>
|
||
|
<p class="intro wow fadeInUp" data-wow-delay="0.5s">{{ modules[3].form.des }}</p>
|
||
|
<ul class="list">
|
||
|
<template v-for="(item, i) in modules[4].list">
|
||
|
<li v-if="item.isEnable" :key="i" class="wow fadeInUp" data-wow-delay="0.5s">
|
||
|
<img class="pic" :src="item.pic" alt="" :class="{'cursor-pointer': isLink(item.link.linkName)}" @click="openLink(item)">
|
||
|
<div class="texts">
|
||
|
<h6>{{ item.title }}</h6>
|
||
|
<p class="sub">{{ item.subTitle }}</p>
|
||
|
<div class="des">{{ item.des }}</div>
|
||
|
</div>
|
||
|
</li>
|
||
|
</template>
|
||
|
</ul>
|
||
|
</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 {
|
||
|
|
||
|
}
|
||
|
},
|
||
|
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)
|
||
|
}
|
||
|
}).catch(err => {})
|
||
|
},
|
||
|
}
|
||
|
};
|
||
|
</script>
|
||
|
|
||
|
<style lang="scss" scoped>
|
||
|
@import url(../../plugins/wow/animate.css);
|
||
|
@import "../../styles/page/page.scss";
|
||
|
|
||
|
.wrap{
|
||
|
/deep/ .el-carousel {
|
||
|
height: 21.6rem;
|
||
|
.el-carousel__container{
|
||
|
height: 21.6rem;
|
||
|
}
|
||
|
img{
|
||
|
height: 21.6rem;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.banner-item {
|
||
|
.banner-name {
|
||
|
font-size: 2.16rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 3.15rem 0;
|
||
|
.inner {
|
||
|
.b-title {
|
||
|
font-size: 2.25rem;
|
||
|
margin-bottom: 2.25rem;
|
||
|
}
|
||
|
.intro {
|
||
|
margin-bottom: 2.25rem;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
}
|
||
|
.block-pic {
|
||
|
transition: .3s;
|
||
|
height: auto;
|
||
|
&.br {
|
||
|
border-radius: 270px;
|
||
|
}
|
||
|
&:hover {
|
||
|
transform: scale(1.05);
|
||
|
}
|
||
|
}
|
||
|
.list {
|
||
|
li {
|
||
|
position: relative;
|
||
|
&:nth-child(even) {
|
||
|
text-align: right;
|
||
|
.texts {
|
||
|
left: 0;
|
||
|
text-align: left;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
.pic {
|
||
|
width: 45%;
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
position: absolute;
|
||
|
top: 7.59rem;
|
||
|
left: 40%;
|
||
|
width: 60%;
|
||
|
padding: 2.7rem 1.35rem ;
|
||
|
background-color: #fff;
|
||
|
overflow: hidden;
|
||
|
transition: .3s;
|
||
|
&:hover {
|
||
|
transform: scale(1.05);
|
||
|
}
|
||
|
}
|
||
|
h6 {
|
||
|
font-size: 1.8rem;
|
||
|
color: #3C3C3C;
|
||
|
}
|
||
|
.sub {
|
||
|
margin-top: 1.48rem;
|
||
|
font-size: 1.08rem;
|
||
|
color: #1C1C1C;
|
||
|
line-height: 33px;
|
||
|
}
|
||
|
.des {
|
||
|
margin-top: 1.2rem;
|
||
|
font-size: 1rem;
|
||
|
color: #3C3C3C;
|
||
|
line-height: 32px;
|
||
|
}
|
||
|
}
|
||
|
@media (max-width: 1520px) {
|
||
|
.list {
|
||
|
.pic {
|
||
|
width: 45%;
|
||
|
}
|
||
|
li:nth-child(odd) {
|
||
|
.texts {
|
||
|
width: 50%;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@media (min-width: 280px) and (max-width: 1200px) {
|
||
|
.wrap{
|
||
|
/deep/ .el-carousel {
|
||
|
height: 18rem;
|
||
|
.el-carousel__container{
|
||
|
height: 18rem;
|
||
|
}
|
||
|
img{
|
||
|
height: 18rem;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
.banner-item .banner-name {
|
||
|
font-size: 1.5rem;
|
||
|
bottom: 5.25rem;
|
||
|
left: 14.125rem;
|
||
|
line-height: 2rem
|
||
|
}
|
||
|
.block{
|
||
|
padding: 50px 0;
|
||
|
.inner {
|
||
|
width: 95%;margin: 0 auto;
|
||
|
.b-title{
|
||
|
margin-bottom: 30px;
|
||
|
}
|
||
|
.intro {
|
||
|
margin-bottom: 30px;
|
||
|
}
|
||
|
.block-pic{
|
||
|
height: 15rem;
|
||
|
}
|
||
|
}
|
||
|
.list{
|
||
|
li {
|
||
|
margin-top: 20px;
|
||
|
.pic{
|
||
|
width: 100%;height: 25rem;
|
||
|
}
|
||
|
.texts{
|
||
|
padding: 10px;
|
||
|
width: 70%;
|
||
|
top: 2rem;
|
||
|
height: auto;
|
||
|
left: 24%;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@media (max-width: 320px) {
|
||
|
.wrap {
|
||
|
/deep/ .el-carousel{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__container{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__item {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
}
|
||
|
.banner-item{
|
||
|
img {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
.banner-name {
|
||
|
font-size: 1rem;
|
||
|
line-height: 1.5rem;
|
||
|
left: 2rem;
|
||
|
bottom: 2rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 1.25rem 0;
|
||
|
.inner {
|
||
|
.intro {
|
||
|
margin-bottom: 1rem;
|
||
|
}
|
||
|
.b-title {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.block-pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.list {
|
||
|
.wow {
|
||
|
.pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
h6 {
|
||
|
font-size: 1rem;
|
||
|
}
|
||
|
.sub {
|
||
|
font-size: .85rem;
|
||
|
line-height: .85rem;
|
||
|
margin-top: .5rem;
|
||
|
}
|
||
|
.des {
|
||
|
font-size: .85rem;
|
||
|
line-height: .85rem;
|
||
|
margin-top: .5rem;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@media (min-width: 320px) and (max-width: 375px) {
|
||
|
.wrap {
|
||
|
/deep/ .el-carousel{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__container{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__item {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
}
|
||
|
.banner-item{
|
||
|
img {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
.banner-name {
|
||
|
font-size: 1rem;
|
||
|
line-height: 1.5rem;
|
||
|
left: 2rem;
|
||
|
bottom: 2rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 1.25rem 0;
|
||
|
.inner {
|
||
|
.intro {
|
||
|
margin-bottom: 1rem;
|
||
|
}
|
||
|
.b-title {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.block-pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.list {
|
||
|
.wow {
|
||
|
.pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
top: 5rem;
|
||
|
h6 {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.sub {
|
||
|
font-size: 1.05rem;
|
||
|
line-height: 1.05rem;
|
||
|
margin-top: .5rem;
|
||
|
}
|
||
|
.des {
|
||
|
font-size: 1.05rem;
|
||
|
line-height: 1.05rem;
|
||
|
margin-top: .5rem;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@media (min-width: 375px) and (max-width: 480px) {
|
||
|
.wrap {
|
||
|
/deep/ .el-carousel{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__container{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__item {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
}
|
||
|
.banner-item{
|
||
|
img {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
.banner-name {
|
||
|
font-size: 1rem;
|
||
|
line-height: 1.5rem;
|
||
|
left: 2rem;
|
||
|
bottom: 2rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 1.25rem 0;
|
||
|
.inner {
|
||
|
.intro {
|
||
|
margin-bottom: 1rem;
|
||
|
}
|
||
|
.b-title {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.block-pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.list {
|
||
|
.wow {
|
||
|
.pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
top: 5rem;
|
||
|
h6 {
|
||
|
font-size: 1.8rem;
|
||
|
}
|
||
|
.sub {
|
||
|
font-size: 1.25rem;
|
||
|
line-height: 1.25rem;
|
||
|
margin-top: .5rem;
|
||
|
}
|
||
|
.des {
|
||
|
font-size: 1.25rem;
|
||
|
line-height: 1.25rem;
|
||
|
margin-top: .5rem;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@media (min-width: 480px) and (max-width: 640px) {
|
||
|
.wrap {
|
||
|
/deep/ .el-carousel{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__container{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__item {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
}
|
||
|
.banner-item{
|
||
|
img {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
.banner-name {
|
||
|
font-size: 1rem;
|
||
|
line-height: 1.5rem;
|
||
|
left: 2rem;
|
||
|
bottom: 2rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 1.25rem 0;
|
||
|
.inner {
|
||
|
.intro {
|
||
|
margin-bottom: 1rem;
|
||
|
}
|
||
|
.b-title {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.block-pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.list {
|
||
|
.wow {
|
||
|
.pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
top: 5rem;
|
||
|
padding: 2rem;
|
||
|
h6 {
|
||
|
font-size: 2rem;
|
||
|
}
|
||
|
.sub {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
}
|
||
|
.des {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@media (min-width: 640px) and (max-width: 768px) {
|
||
|
.wrap {
|
||
|
/deep/ .el-carousel{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__container{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__item {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
}
|
||
|
.banner-item{
|
||
|
img {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
.banner-name {
|
||
|
font-size: 1rem;
|
||
|
line-height: 1.5rem;
|
||
|
left: 2rem;
|
||
|
bottom: 2rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 1.25rem 0;
|
||
|
.inner {
|
||
|
.intro {
|
||
|
margin-bottom: 1rem;
|
||
|
}
|
||
|
.b-title {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.block-pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.list {
|
||
|
.wow {
|
||
|
.pic {
|
||
|
width: 50%;
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
top: 2rem;
|
||
|
left: 30%;
|
||
|
padding: 1.5rem;
|
||
|
h6 {
|
||
|
font-size: 2rem;
|
||
|
}
|
||
|
.sub {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
}
|
||
|
.des {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@media (min-width: 768px) and (max-width: 980px) {
|
||
|
.wrap {
|
||
|
/deep/ .el-carousel{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__container{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__item {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
}
|
||
|
.banner-item{
|
||
|
img {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
.banner-name {
|
||
|
font-size: 1rem;
|
||
|
line-height: 1.5rem;
|
||
|
left: 2rem;
|
||
|
bottom: 2rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 1.25rem 0;
|
||
|
.inner {
|
||
|
.intro {
|
||
|
margin-bottom: 1rem;
|
||
|
}
|
||
|
.b-title {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.block-pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.list {
|
||
|
.wow {
|
||
|
.pic {
|
||
|
width: 50%;
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
top: 5rem;
|
||
|
left: 30%;
|
||
|
padding: 1.5rem;
|
||
|
h6 {
|
||
|
font-size: 2rem;
|
||
|
}
|
||
|
.sub {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
}
|
||
|
.des {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
@media (min-width: 980px) and (max-width: 1200px) {
|
||
|
.wrap {
|
||
|
/deep/ .el-carousel{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__container{
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
/deep/ .el-carousel__item {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
}
|
||
|
.banner-item{
|
||
|
img {
|
||
|
height: 12rem !important;
|
||
|
}
|
||
|
.banner-name {
|
||
|
font-size: 1rem;
|
||
|
line-height: 1.5rem;
|
||
|
left: 2rem;
|
||
|
bottom: 2rem;
|
||
|
}
|
||
|
}
|
||
|
.block {
|
||
|
padding: 1.25rem 0;
|
||
|
.inner {
|
||
|
.intro {
|
||
|
margin-bottom: 1rem;
|
||
|
}
|
||
|
.b-title {
|
||
|
font-size: 1.5rem;
|
||
|
}
|
||
|
.block-pic {
|
||
|
height: auto;
|
||
|
}
|
||
|
.list {
|
||
|
.wow {
|
||
|
.pic {
|
||
|
width: 50%;
|
||
|
height: auto;
|
||
|
}
|
||
|
.texts {
|
||
|
top: 5rem;
|
||
|
left: 30%;
|
||
|
padding: 1.5rem;
|
||
|
h6 {
|
||
|
font-size: 2rem;
|
||
|
}
|
||
|
.sub {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
}
|
||
|
.des {
|
||
|
font-size: 1.55rem;
|
||
|
line-height: 1.55rem;
|
||
|
margin-top: .5rem;
|
||
|
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
</style>
|