粒子研究院前台前端
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.
 
 
 
 

240 lines
5.7 KiB

<template>
<div class="wrap">
<!-- 关于IASF-使命愿景价值观 -->
<div class="single-banner">
<img class="banner-img"
:src="modules[0].form.pic"
alt="" />
<div class="texts">
<h6 class="banner-title">{{ modules[0].form.title }}</h6>
</div>
</div>
<div class="block">
<div class="inner">
<div class="item wow bounceInLeft"
data-wow-delay="0.5s"
:class="{ 'cursor-pointer': isLink(modules[1].form.link.linkName) }"
@click="openLink(modules[1].form)">
<img src="http://10.10.11.7/images/mission/2.png"
alt="" />
<div class="texts">
<h6>{{ modules[1].form.title }}</h6>
<div class="des"
v-html="modules[1].form.des"></div>
</div>
</div>
<div class="item wow bounceInRight"
data-wow-delay="0.8s"
:class="{ 'cursor-pointer': isLink(modules[2].form.link.linkName) }"
@click="openLink(modules[2].form)">
<img src="http://10.10.11.7/images/mission/3.png"
alt="" />
<div class="texts rightText">
<h6>{{ modules[2].form.title }}</h6>
<div class="des"
v-html="modules[2].form.des"></div>
</div>
</div>
</div>
</div>
<div class="block mind gray">
<div class="inner">
<h6 class="m-title">{{ modules[3].form.title }}</h6>
<ul class="list">
<template v-for="(item, i) in modules[4].list">
<li v-if="item.isEnable"
:key="i"
:class="[{'cursor-pointer': isLink(item.link.linkName)}]"
@click="openLink(item)">
<img :src="item.pic"
alt=""
class="pic">
<div class="texts">
<h6>{{ item.title }}</h6>
<div class="des"
v-html="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 {
routes: [],
};
},
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';
.inner {
width: 1200px;
}
.item {
position: relative;
margin-bottom: 58px;
&:hover {
.texts {
color: #fff;
transform: scale(1.05);
background: #32b6e9 !important;
}
}
img {
width: 90%;
height: 400px;
}
&:nth-child(2) .texts {
left: auto;
right: 0;
color: #fff;
background: rgba(40, 179, 255, 0.34);
}
.texts {
position: absolute;
top: 79px;
left: -28px;
width: 532px;
padding: 70px 38px;
color: #333;
background: rgba(255, 241, 231, 0.84);
transition: 0.5s;
}
h6 {
margin-bottom: 14px;
font-size: 2rem;
font-family: PingFangSC-Medium, PingFang SC;
font-weight: 500;
}
.des {
font-size: 1rem;
}
}
.mind {
.m-title {
margin-bottom: 30px;
font-size: 2.2rem;
text-align: center;
color: #333;
}
.list {
display: flex;
flex-wrap: wrap;
}
li {
display: inline-flex;
align-items: center;
width: calc((100% - 22px) / 2);
margin: 0 22px 22px 0;
background-color: #fff;
&:nth-child(even) {
margin-right: 0;
}
.pic {
width: 250px;
height: 230px;
}
.texts {
width: calc(100% - 250px);
padding: 0 20px;
}
h6 {
margin-bottom: 1rem;
font-size: 1.3rem;
color: #272727;
@include ellipsis();
}
.des {
font-size: 1rem;
color: #666;
line-height: 1.5;
}
}
}
@media (max-width: 1200px) {
.inner {
width: 98%;
}
.item {
img {
margin-left: 30px;
}
.rightText {
right: 12px !important;
}
.texts {
width: 85%;
box-sizing: border-box;
left: 12px;
.des {
-webkit-line-clamp: inherit;
}
}
}
}
@media (max-width: 980px) {
.mind {
.list {
flex-direction: column;
}
li {
width: 100%;
}
}
}
@media (max-width: 480px) {
.mind {
li {
.pic {
width: 150px;
height: 130px;
}
.texts {
width: calc(100% - 150px);
}
}
}
}
</style>