|
|
|
@ -17,6 +17,7 @@ |
|
|
|
|
</el-carousel> |
|
|
|
|
<div :class="['block-wrap', { active: hide }]" id="part2"> |
|
|
|
|
<div class="block card-block"> |
|
|
|
|
<div class="card-bg"></div> |
|
|
|
|
<div class="inner"> |
|
|
|
|
<h2 class="b-title">{{ modules[1].form.title }}</h2> |
|
|
|
|
<p class="intro" data-wow-delay="0.5s">{{ modules[1].form.des }}</p> |
|
|
|
@ -300,41 +301,69 @@ export default { |
|
|
|
|
this.modules = json |
|
|
|
|
console.log("🚀 ~ file: index.vue ~ line 138 ~ this.$post ~ this.modules", this.modules) |
|
|
|
|
|
|
|
|
|
const promises = [] |
|
|
|
|
// 获取文章列表 |
|
|
|
|
if (json[5].form.column.length) { |
|
|
|
|
const { column, articleNum } = json[5].form |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
promises.push(new Promise((resolve) => { |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
resolve() |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
})) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (json[6].form.column.length) { |
|
|
|
|
const { column, articleNum } = json[6].form |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles1 = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
if (this.articles1.length) this.curArticle1 = this.articles1[0] |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
promises.push(new Promise((resolve) => { |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles1 = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
if (this.articles1.length) this.curArticle1 = this.articles1[0] |
|
|
|
|
resolve() |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
})) |
|
|
|
|
} |
|
|
|
|
if (json[7].form.column.length) { |
|
|
|
|
const { column, articleNum } = json[7].form |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles2 = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
if (this.articles2.length) this.curArticle2 = this.articles2[0] |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
promises.push(new Promise((resolve) => { |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles2 = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
if (this.articles2.length) this.curArticle2 = this.articles2[0] |
|
|
|
|
resolve() |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
})) |
|
|
|
|
} |
|
|
|
|
if (json[8].form.column.length) { |
|
|
|
|
const { column, articleNum } = json[8].form |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles3 = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
if (this.articles3.length) this.curArticle3 = this.articles3[0] |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
promises.push(new Promise((resolve) => { |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles3 = Util.removeTag(data.slice(0, articleNum || 4)) |
|
|
|
|
if (this.articles3.length) this.curArticle3 = this.articles3[0] |
|
|
|
|
resolve() |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
})) |
|
|
|
|
} |
|
|
|
|
if (json[10].form.column.length) { |
|
|
|
|
const { column, articleNum } = json[10].form |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles4 = Util.removeTag(data.slice(0, articleNum || 3)) |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
promises.push(new Promise((resolve) => { |
|
|
|
|
this.$post(`${this.api.queryArticlesByColumnType}?columnId=${column[column.length - 1]}`).then(({ data }) => { |
|
|
|
|
this.articles4 = Util.removeTag(data.slice(0, articleNum || 3)) |
|
|
|
|
resolve() |
|
|
|
|
}).catch(err => { }) |
|
|
|
|
})) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// 恢复上次从本页面跳转出去时的位置 |
|
|
|
|
Promise.all(promises).then(_ => { |
|
|
|
|
this.$nextTick(() => { |
|
|
|
|
const { scrollTop } = this.$store.state.content |
|
|
|
|
if (scrollTop) { |
|
|
|
|
this.hide = true |
|
|
|
|
$(window).scrollTop(scrollTop) |
|
|
|
|
this.$store.commit('content/setScrollTop', 0) |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
// this.carouselInterval() |
|
|
|
|
} |
|
|
|
|
}).catch(err => { }) |
|
|
|
@ -556,7 +585,17 @@ $bannerMh: 800px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.card-block { |
|
|
|
|
background: url(https://huorantech.com/images/iasf/14.jpg) 0 0 / cover no-repeat; |
|
|
|
|
position: relative; |
|
|
|
|
background: url(https://huorantech.com/images/iasf/15.jpg) 0 0 / cover no-repeat; |
|
|
|
|
|
|
|
|
|
.card-bg { |
|
|
|
|
position: absolute; |
|
|
|
|
top: 0; |
|
|
|
|
right: 0; |
|
|
|
|
bottom: 0; |
|
|
|
|
left: 0; |
|
|
|
|
background-color: rgba(255, 2550, 255, .9); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.card { |
|
|
|
@ -597,7 +636,7 @@ $bannerMh: 800px; |
|
|
|
|
align-items: center; |
|
|
|
|
width: 100%; |
|
|
|
|
height: 100%; |
|
|
|
|
font-size: 24px; |
|
|
|
|
font-size: 29px; |
|
|
|
|
font-family: PingFangSC-Medium, PingFang SC; |
|
|
|
|
color: #fff; |
|
|
|
|
background-color: rgba(0, 0, 0, 0.3); |
|
|
|
@ -1105,6 +1144,7 @@ $bannerMh: 800px; |
|
|
|
|
width: 632px; |
|
|
|
|
height: 558px; |
|
|
|
|
object-fit: cover; |
|
|
|
|
border-top-left-radius: 100px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|