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

440 lines
11 KiB

2 years ago
<template>
<div class="wrap">
<div class="single-banner">
2 years ago
<img class="banner-img"
:src="modules[0].form.pic"
alt="" />
2 years ago
<div class="texts">
<h6 class="banner-title">{{ modules[0].form.title }}</h6>
</div>
</div>
<div class="block history gray">
2 years ago
<div class="inner"
:class="{'cursor-pointer': isLink(modules[1].form.link.linkName)}"
@click="openLink(modules[1].form)">
<h2 class="wow fadeInLeft"
style="margin-left: 57px">{{ modules[1].form.title }}</h2>
<div class="texts wow fadeInDown"
data-wow-delay="0.5s">
2 years ago
<div class="left">
<h2>{{ modules[1].form.subTitle }}</h2>
2 years ago
<div class="text"
v-html="modules[1].form.des"></div>
2 years ago
</div>
2 years ago
<img class="bg"
:src="modules[1].form.pic"
alt="">
2 years ago
</div>
</div>
</div>
2 years ago
2 years ago
<div class="block land">
<div class="inner">
2 years ago
<img class="pic"
:src="modules[2].form.pic"
alt="">
<div class="right">
<h6>{{ modules[2].form.title }}</h6>
<div class="text"
v-html="modules[2].form.des"></div>
2 years ago
</div>
</div>
</div>
<div class="block gray">
<div class="inner">
<h2 class="b-title wow fadeInUp">{{ modules[3].form.title }}</h2>
2 years ago
<p class="intro wow fadeInUp"
data-wow-delay="0.5s">{{ modules[3].form.des }}</p>
2 years ago
<ul class="plan">
<li>
<div class="left">
<h6>{{ modules[4].form.title }}</h6>
2 years ago
<div class="text"
v-html="modules[4].form.des"></div>
<a v-if="isLink(modules[4].form.link.linkName)"
class="survey"
@click="openLink(modules[4].form)">需求调研 ></a>
2 years ago
</div>
2 years ago
<img class="pic"
:src="modules[4].form.pic"
alt="">
2 years ago
</li>
<li>
<div class="left">
<h6>{{ modules[5].form.title }}</h6>
2 years ago
<div class="text"
v-html="modules[5].form.des"></div>
<a v-if="isLink(modules[5].form.link.linkName)"
class="survey"
@click="openLink(modules[5].form)">需求调研 ></a>
2 years ago
</div>
2 years ago
<img class="pic"
:src="modules[5].form.pic"
alt="">
2 years ago
</li>
</ul>
</div>
</div>
2 years ago
<div class="block">
2 years ago
<div class="inner">
2 years ago
<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="app">
<li v-for="(item, i) in modules[7].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/industrial/app' + (i + 1) + '.png')"
alt="">
<img class="icon"
:src="require('@/assets/images/industrial/app' + (i + 1) + '-1.png')"
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[8].form.title }}</h2>
<p class="intro wow fadeInUp"
data-wow-delay="0.5s">{{ modules[8].form.des }}</p>
<ul class="news">
<li class="wow fadeInDown"
:data-wow-delay="(0.2 * i).toFixed(1) + 's'"
v-for="(item, i) in articles"
:key="i"
@click="toArtice(item, modules[9].form)">
<img :src="item.titleImg"
alt="">
<div class="texts">
<span class="meta">{{ item.releaseTime }}</span>
<h6>{{ item.title }}</h6>
</div>
</li>
</ul>
<div class="all-link"
@click="toAll(modules[9 ].form)">
<span>{{$t('column.all')}} <img class="icon"
src="@/assets/images/arrow.png"
alt=""></span>
</div>
</div>
</div>
2 years ago
</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],
2 years ago
data () {
2 years ago
return {
2 years ago
articles: [],
2 years ago
};
},
2 years ago
mounted () {
2 years ago
new WOW().init();
},
methods: {
// 获取文章详情
2 years ago
getInfo () {
2 years ago
// 预览/详情
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][
2 years ago
data[data.length - 1].state ? "theEditedJson" : "jsonBeforeEditing"
]
2 years ago
);
this.modules = json;
console.log("🚀 ~ file: index.vue ~ line 180 ~ this.$post ~ json", json);
2 years ago
// 获取文章列表
const { column, articleNum } = json[9].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 => { })
}
2 years ago
}
})
2 years ago
.catch((err) => { });
2 years ago
},
},
};
</script>
<style lang="scss" scoped>
@import url(../../plugins/wow/animate.css);
2 years ago
@import '../../styles/page/page.scss';
2 years ago
.history {
2 years ago
h2 {
2 years ago
margin-bottom: 20px;
2 years ago
font-size: 1.8rem;
color: #333;
}
.texts {
display: flex;
justify-content: space-between;
2 years ago
padding: 30px 57px;
2 years ago
background-color: #fff;
border-radius: 100px 0px 0px 0px;
transition: 0.3s;
&:hover {
transform: scale(1.05);
}
}
.left {
width: 500px;
padding-right: 30px;
}
.text {
margin: 20px 0;
font-size: 1.2rem;
color: #181818;
line-height: 31px;
@include mul-ellipsis(10);
}
.bg {
width: 560px;
height: 500px;
margin: -122px -83px 0 0;
}
2 years ago
}
.land {
2 years ago
.inner {
display: flex;
2 years ago
}
2 years ago
.pic {
width: 50%;
height: 450px;
}
.right {
width: 50%;
2 years ago
}
h6 {
2 years ago
margin-left: 50px;
font-size: 1.3rem;
font-family: PingFangSC-Semibold, PingFang SC;
color: #333;
@include ellipsis();
2 years ago
}
.text {
2 years ago
height: 405px;
padding: 50px;
margin-top: 1rem;
background: rgba(242, 246, 248, 0.45);
border-radius: 0px 100px 0px 0px;
2 years ago
}
2 years ago
}
.plan {
li {
display: flex;
justify-content: space-between;
2 years ago
height: 433px;
2 years ago
margin-bottom: 60px;
color: #333;
background-color: #fff;
border-radius: 100px 0px 0px 0px;
&:nth-child(even) {
flex-direction: row-reverse;
.pic {
margin: -20px 0 0 -20px;
border-radius: 0 100px 0 0;
}
}
.left {
width: 50%;
padding: 50px;
}
h6 {
font-size: 1.4rem;
font-family: PingFangSC-Medium, PingFang SC;
}
.text {
2 years ago
margin: 14px 0 40px;
2 years ago
font-size: 1rem;
line-height: 1.6;
}
.survey {
padding: 8px 15px;
font-size: 0.9rem;
color: #fff;
background-color: #1150ac;
cursor: pointer;
border-radius: 4px;
}
.pic {
width: 48%;
2 years ago
height: 423px;
2 years ago
margin: -20px -20px 0 0;
border-radius: 100px 0 0 0;
}
2 years ago
}
}
2 years ago
.app {
display: flex;
flex-wrap: wrap;
li {
position: relative;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
2 years ago
width: calc((100% - 30px) / 4);
height: 200px;
margin: 0 10px 10px 0;
2 years ago
transition: 0.3s;
&:hover {
transform: scale(1.05);
.icon {
transform: rotateY(180deg);
}
}
&:nth-child(4n) {
margin-right: 0;
}
2 years ago
}
.bg {
2 years ago
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.icon {
position: relative;
2 years ago
width: 62px;
2 years ago
transition: 0.5s;
}
.text {
position: relative;
margin-top: 20px;
font-size: 32px;
color: #fff;
2 years ago
}
}
2 years ago
.news {
position: relative;
display: flex;
flex-wrap: wrap;
li {
width: calc((100% - 34px) / 3);
margin: 0 17px 20px 0;
background-color: #fff;
cursor: pointer;
&:nth-child(3n) {
margin-right: 0;
}
2 years ago
}
2 years ago
img {
width: 100%;
height: 220px;
2 years ago
}
2 years ago
.texts {
padding: 20px 24px;
background-color: #fff;
2 years ago
}
2 years ago
h6 {
margin-top: 8px;
font-size: 1rem;
color: #333;
text-shadow: 0px 0px 20px rgba(176, 176, 176, 0.21);
2 years ago
}
2 years ago
.meta {
font-size: 0.9rem;
color: #666;
text-shadow: 0px 0px 20px rgba(176, 176, 176, 0.21);
2 years ago
}
2 years ago
}
@media (max-width: 1200px) {
.history {
.texts {
flex-direction: column;
}
.left {
width: 100%;
}
.bg {
width: 100%;
height: auto;
margin-top: 1rem;
}
2 years ago
}
2 years ago
.land {
.inner {
flex-direction: column;
}
.pic,
.right {
width: 100%;
}
2 years ago
h6 {
margin-left: 0;
}
2 years ago
.right {
margin-top: 1rem;
}
.text {
height: auto;
}
2 years ago
}
2 years ago
.plan {
li {
flex-direction: column !important;
height: auto;
.left,
.pic {
width: 100%;
}
.pic {
margin: 1rem 0 0 !important;
}
}
2 years ago
}
2 years ago
.app {
li {
width: calc((100% - 10px) / 2);
height: 267px;
&:nth-child(2n) {
margin-right: 0;
}
}
}
.news {
flex-direction: column;
li {
width: 100%;
margin: 0 0 20px 0;
}
}
}
@media (max-width: 780px) {
.app {
li {
width: 100%;
margin-right: 0;
}
}
2 years ago
}
2 years ago
</style>