|
|
|
@ -1,76 +1,68 @@ |
|
|
|
|
<template> |
|
|
|
|
<div class="wrap"> |
|
|
|
|
<div class="single-banner"> |
|
|
|
|
<img class="banner-img" :src="modules[0].form.pic" alt="" /> |
|
|
|
|
<img class="banner-img" |
|
|
|
|
:src="modules[0].form.pic" |
|
|
|
|
alt="" /> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<h6 class="banner-title">{{ modules[0].form.title }}</h6> |
|
|
|
|
<p class="banner-des des">{{ modules[0].form.des }}</p> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="block gray" style="padding: 2rem 0;"> |
|
|
|
|
<div class="block gray" |
|
|
|
|
style="padding: 2rem 0;"> |
|
|
|
|
<div class="inner"> |
|
|
|
|
<Breadcrumb ref="breadcrumb" :data.sync="routes"/> |
|
|
|
|
<Breadcrumb ref="breadcrumb" |
|
|
|
|
:data.sync="routes" /> |
|
|
|
|
<ul class="items"> |
|
|
|
|
<li> |
|
|
|
|
<img class="pic" :src="modules[1].form.pic" alt=""> |
|
|
|
|
<img class="pic" |
|
|
|
|
:src="modules[1].form.pic" |
|
|
|
|
alt=""> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<h6>{{ modules[1].form.title }}</h6> |
|
|
|
|
<div class="text" v-html="modules[1].form.des"></div> |
|
|
|
|
<img src="@/assets/images/arrow.png" alt="" :class="{'arrow': isLink(modules[1].form.link.linkName)}" @click="openLink(modules[1].form)"> |
|
|
|
|
<div class="text" |
|
|
|
|
v-html="modules[1].form.des"></div> |
|
|
|
|
<img src="@/assets/images/arrow.png" |
|
|
|
|
alt="" |
|
|
|
|
:class="{'arrow': isLink(modules[1].form.link.linkName)}" |
|
|
|
|
@click="openLink(modules[1].form)"> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
<li> |
|
|
|
|
<img class="pic" :src="modules[2].form.pic" alt=""> |
|
|
|
|
<img class="pic" |
|
|
|
|
:src="modules[2].form.pic" |
|
|
|
|
alt=""> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<h6>{{ modules[2].form.title }}</h6> |
|
|
|
|
<div class="text" v-html="modules[2].form.des"></div> |
|
|
|
|
<img src="@/assets/images/arrow.png" alt="" :class="{'arrow': isLink(modules[2].form.link.linkName)}" @click="openLink(modules[2].form)"> |
|
|
|
|
<div class="text" |
|
|
|
|
v-html="modules[2].form.des"></div> |
|
|
|
|
<img src="@/assets/images/arrow.png" |
|
|
|
|
alt="" |
|
|
|
|
:class="{'arrow': isLink(modules[2].form.link.linkName)}" |
|
|
|
|
@click="openLink(modules[2].form)"> |
|
|
|
|
</div> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="block program"> |
|
|
|
|
<div class="inner"> |
|
|
|
|
<div class="title wow fadeInUp"> |
|
|
|
|
<h5> |
|
|
|
|
{{ modules[3].form.title }} |
|
|
|
|
<span class="sub">{{ modules[3].form.subTitle }}</span> |
|
|
|
|
</h5> |
|
|
|
|
<span class="more" @click="toAll(modules[4].form)">MORE</span> |
|
|
|
|
</div> |
|
|
|
|
<template v-if="articles.length"> |
|
|
|
|
<div class="slide" @click="toArtice(articles[0], modules[4].form)"> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<h6>{{ articles[0].title }}</h6> |
|
|
|
|
<div class="des">{{ articles[0].mainBody }}</div> |
|
|
|
|
<div class="meta">发表日期:{{ articles[0].releaseTime }}  浏览量:{{ articles[0].totalBrowsing }}</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="img-wrap"> |
|
|
|
|
<img class="pic" :src="articles[0].titleImg" alt=""> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<ul class="list"> |
|
|
|
|
<template v-for="(item, i) in articles"> |
|
|
|
|
<li v-if="i && i < 4" :key="i" class="wow fadeInDown" :data-wow-delay="(0.1 * i).toFixed(1) + 's'" @click="toArtice(item, modules[4].form)"> |
|
|
|
|
<div class="des">{{ item.title }}</div> |
|
|
|
|
<p class="date">{{ item.releaseTime }}</p> |
|
|
|
|
</li> |
|
|
|
|
</template> |
|
|
|
|
</ul> |
|
|
|
|
</template> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="about"> |
|
|
|
|
<div class="inner"> |
|
|
|
|
<div class="texts"> |
|
|
|
|
<div class="title wow fadeInUp" data-wow-delay="0.7s">{{ modules[5].form.title }}</div> |
|
|
|
|
<div class="des wow fadeInDown" data-wow-delay="1s" v-html="modules[5].form.des"></div> |
|
|
|
|
<div class="title wow fadeInUp" |
|
|
|
|
data-wow-delay="0.7s">{{ modules[3].form.title }}</div> |
|
|
|
|
<div class="des wow fadeInDown" |
|
|
|
|
data-wow-delay="1s" |
|
|
|
|
v-html="modules[3].form.des"></div> |
|
|
|
|
<img class="m-t-10" |
|
|
|
|
width="42" |
|
|
|
|
src="@/assets/images/arrow-white.png" |
|
|
|
|
alt="" |
|
|
|
|
:class="{'arrow': isLink(modules[3].form.link.linkName)}" |
|
|
|
|
@click="openLink(modules[3].form)"> |
|
|
|
|
</div> |
|
|
|
|
<img src="@/assets/images/arrow-white.png" alt="" :class="{'arrow': isLink(modules[5].form.link.linkName)}" @click="openLink(modules[5].form)"> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
@ -83,22 +75,21 @@ import Breadcrumb from '@/components/breadcrumb' |
|
|
|
|
import Util from '@/libs/util' |
|
|
|
|
export default { |
|
|
|
|
mixins: [mixins], |
|
|
|
|
data() { |
|
|
|
|
data () { |
|
|
|
|
return { |
|
|
|
|
routes: [], |
|
|
|
|
articles: [] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
components: { |
|
|
|
|
Breadcrumb |
|
|
|
|
}, |
|
|
|
|
mounted() { |
|
|
|
|
mounted () { |
|
|
|
|
new WOW().init(); |
|
|
|
|
this.getColumn() |
|
|
|
|
}, |
|
|
|
|
methods: { |
|
|
|
|
// 获取文章详情 |
|
|
|
|
getInfo() { |
|
|
|
|
getInfo () { |
|
|
|
|
// 预览/详情 |
|
|
|
|
this.$post( |
|
|
|
|
`${this.api[this.preview ? "getRedisCache" : "findPage"]}?columnId=${this.id}` |
|
|
|
@ -115,20 +106,12 @@ export default { |
|
|
|
|
); |
|
|
|
|
this.modules = json; |
|
|
|
|
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json); |
|
|
|
|
|
|
|
|
|
// 获取文章列表 |
|
|
|
|
if (json[4].form.column.length) { |
|
|
|
|
const { column, articleNum } = json[4].form |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles = Util.removeTag(data.slice(0, articleNum || 7)) |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
.catch((err) => {}); |
|
|
|
|
.catch((err) => { }); |
|
|
|
|
}, |
|
|
|
|
// 获取父级所有栏目名称和id |
|
|
|
|
getParent(data, id) { |
|
|
|
|
getParent (data, id) { |
|
|
|
|
for (const e of data) { |
|
|
|
|
if (e.id == id) { |
|
|
|
|
this.routes.push({ |
|
|
|
@ -150,10 +133,10 @@ export default { |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
// 获取上级面包屑 |
|
|
|
|
getColumn() { |
|
|
|
|
getColumn () { |
|
|
|
|
this.$post(`${this.api.oneLevelChecksThemAll}?id=${this.id}&isSort=1&siteId=${this.site}`).then(({ data }) => { |
|
|
|
|
this.getParent(data, this.id) |
|
|
|
|
}).catch(err => {}) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
}; |
|
|
|
@ -161,7 +144,7 @@ export default { |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
@import url(../../plugins/wow/animate.css); |
|
|
|
|
@import "../../styles/page/page.scss"; |
|
|
|
|
@import '../../styles/page/page.scss'; |
|
|
|
|
.items { |
|
|
|
|
margin-top: 2rem; |
|
|
|
|
li { |
|
|
|
@ -185,9 +168,9 @@ export default { |
|
|
|
|
width: 500px; |
|
|
|
|
padding: 30px; |
|
|
|
|
color: #333; |
|
|
|
|
background-color: rgba(255, 255, 255, .85); |
|
|
|
|
background-color: rgba(255, 255, 255, 0.85); |
|
|
|
|
border-radius: 0px 0px 100px 0px; |
|
|
|
|
border-top: 4px solid #0280F1; |
|
|
|
|
border-top: 4px solid #0280f1; |
|
|
|
|
} |
|
|
|
|
h6 { |
|
|
|
|
font-size: 1.2rem; |
|
|
|
@ -221,16 +204,16 @@ export default { |
|
|
|
|
font-weight: 500; |
|
|
|
|
color: #333333; |
|
|
|
|
line-height: 1; |
|
|
|
|
border-left: 6px solid #2B96EF; |
|
|
|
|
border-left: 6px solid #2b96ef; |
|
|
|
|
} |
|
|
|
|
.sub { |
|
|
|
|
font-size: 1.1rem; |
|
|
|
|
font-family: PingFangSC-Medium, PingFang SC; |
|
|
|
|
font-weight: 500; |
|
|
|
|
color: #AFB7BF; |
|
|
|
|
color: #afb7bf; |
|
|
|
|
} |
|
|
|
|
.more { |
|
|
|
|
font-size: .8rem; |
|
|
|
|
font-size: 0.8rem; |
|
|
|
|
color: #666; |
|
|
|
|
cursor: pointer; |
|
|
|
|
} |
|
|
|
@ -243,7 +226,7 @@ export default { |
|
|
|
|
.texts { |
|
|
|
|
width: 51%; |
|
|
|
|
padding: 56px; |
|
|
|
|
background: #FBFBFB; |
|
|
|
|
background: #fbfbfb; |
|
|
|
|
h6 { |
|
|
|
|
font-size: 1.3rem; |
|
|
|
|
font-family: PingFangSC-Medium, PingFang SC; |
|
|
|
@ -257,7 +240,7 @@ export default { |
|
|
|
|
line-height: 32px; |
|
|
|
|
} |
|
|
|
|
.meta { |
|
|
|
|
font-size: .9rem; |
|
|
|
|
font-size: 0.9rem; |
|
|
|
|
color: #666; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -269,7 +252,7 @@ export default { |
|
|
|
|
.pic { |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
transition: .5s; |
|
|
|
|
transition: 0.5s; |
|
|
|
|
} |
|
|
|
|
&:hover { |
|
|
|
|
.pic { |
|
|
|
@ -285,7 +268,7 @@ export default { |
|
|
|
|
margin-right: 14px; |
|
|
|
|
background: url(../../assets/images/sfel/7.png) no-repeat center; |
|
|
|
|
background-size: 100% 100%; |
|
|
|
|
transition: .5s; |
|
|
|
|
transition: 0.5s; |
|
|
|
|
cursor: pointer; |
|
|
|
|
&:nth-child(2) { |
|
|
|
|
background-image: url(../../assets/images/sfel/8.png); |
|
|
|
@ -304,13 +287,13 @@ export default { |
|
|
|
|
font-size: 1rem; |
|
|
|
|
font-family: PingFangSC-Medium, PingFang SC; |
|
|
|
|
font-weight: 500; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
color: #ffffff; |
|
|
|
|
line-height: 30px; |
|
|
|
|
} |
|
|
|
|
.date { |
|
|
|
|
font-size: .9rem; |
|
|
|
|
font-size: 0.9rem; |
|
|
|
|
font-family: LaoSangamMN; |
|
|
|
|
color: #FFFFFF; |
|
|
|
|
color: #ffffff; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -325,11 +308,11 @@ export default { |
|
|
|
|
.texts { |
|
|
|
|
padding: 2.375rem 3.75rem; |
|
|
|
|
color: #fff; |
|
|
|
|
background: rgba(111, 69, 36, .56); |
|
|
|
|
background: rgba(111, 69, 36, 0.56); |
|
|
|
|
border-radius: 17px; |
|
|
|
|
transition: .3s; |
|
|
|
|
transition: 0.3s; |
|
|
|
|
&:hover { |
|
|
|
|
background: rgba(239, 126, 10, .56); |
|
|
|
|
background: rgba(239, 126, 10, 0.56); |
|
|
|
|
transform: translateY(10px); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|