2020-06-07 10:28:34 +08:00
|
|
|
<template>
|
|
|
|
<div>
|
|
|
|
<Header></Header>
|
2020-07-03 15:52:11 +08:00
|
|
|
<IndexSwiper :swiperList="swiperList"></IndexSwiper>
|
2020-06-07 10:28:34 +08:00
|
|
|
<Dynamic :dynamic="dynamic"></Dynamic>
|
|
|
|
<IndexService :activityList="activityList"></IndexService>
|
2020-07-18 19:45:27 +08:00
|
|
|
<DigitalResource></DigitalResource>
|
2020-06-10 11:19:26 +08:00
|
|
|
<IndexVideo :exhibition="exhibition"></IndexVideo>
|
2020-06-07 10:28:34 +08:00
|
|
|
<Footer></Footer>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import Header from '@/common/components/Header'
|
|
|
|
import IndexSwiper from './components/Swiper'
|
|
|
|
import Dynamic from './components/IndexDynamic'
|
|
|
|
import IndexService from './components/IndexService'
|
|
|
|
import DigitalResource from './components/DigitalResource'
|
|
|
|
import IndexVideo from './components/IndexVideo'
|
|
|
|
import Footer from '@/common/components/Footer'
|
|
|
|
import axios from 'axios'
|
2020-07-11 14:45:34 +08:00
|
|
|
import common from '@/common/components/common.js'
|
2022-11-23 23:32:15 +08:00
|
|
|
|
2020-06-07 10:28:34 +08:00
|
|
|
export default {
|
|
|
|
name: 'Index',
|
|
|
|
components: {
|
|
|
|
Header,
|
|
|
|
IndexSwiper,
|
|
|
|
Dynamic,
|
|
|
|
IndexService,
|
|
|
|
DigitalResource,
|
|
|
|
IndexVideo,
|
|
|
|
Footer
|
|
|
|
},
|
|
|
|
data () {
|
|
|
|
return {
|
|
|
|
bannerList: [],
|
|
|
|
dynamic: {
|
|
|
|
picNews: {},
|
|
|
|
news: []
|
|
|
|
},
|
|
|
|
activityList: [],
|
|
|
|
specialties: [],
|
2020-06-10 11:19:26 +08:00
|
|
|
exhibition: [],
|
2020-06-07 10:28:34 +08:00
|
|
|
literature: [],
|
|
|
|
dynamicsPage: {
|
|
|
|
page: 1,
|
2020-07-14 16:14:54 +08:00
|
|
|
rows: 5,
|
|
|
|
newsDirectoriesParentId: 'f497904b-7727-4832-891c-604c36ae4167'
|
2020-06-07 10:28:34 +08:00
|
|
|
},
|
|
|
|
activityPage: {
|
|
|
|
page: 1,
|
|
|
|
rows: 8
|
2020-06-10 11:19:26 +08:00
|
|
|
},
|
|
|
|
exhibitionPage: {
|
|
|
|
page: 1,
|
|
|
|
rows: 8,
|
|
|
|
totalPage: 1,
|
2020-07-15 11:22:49 +08:00
|
|
|
newsDirectoriesId: '',
|
|
|
|
newsDirectoriesParentId: 'f1d5d313-f728-4dda-9843-1116d97e17b0'
|
2020-07-03 15:52:11 +08:00
|
|
|
},
|
2020-07-16 19:30:11 +08:00
|
|
|
literaturePage: {
|
|
|
|
page: 1,
|
|
|
|
rows: 8,
|
|
|
|
totalPage: 1,
|
|
|
|
newsDirectoriesId: '',
|
|
|
|
newsDirectoriesParentId: '98c74389-2088-499b-a046-8611bdc57ea4'
|
|
|
|
},
|
2020-07-11 14:45:34 +08:00
|
|
|
swiperList: [],
|
|
|
|
url: common.url
|
2020-06-07 10:28:34 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
getDynamicsList: function () {
|
|
|
|
var self = this
|
2022-12-14 11:34:17 +08:00
|
|
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
2020-06-07 10:28:34 +08:00
|
|
|
params: self.dynamicsPage
|
|
|
|
}).then(function (res) {
|
|
|
|
var picNews = res.data.rows.splice(0, 1)[0]
|
|
|
|
picNews.newsContentCoverList = picNews.newsContentCoverList[0].contentCoverId
|
|
|
|
for (var i = 0; i < res.data.rows.length; i++) {
|
|
|
|
var date = res.data.rows[i].newsContentPublishTime.split('-')[2]
|
|
|
|
self.$set(res.data.rows[i], 'date', date)
|
|
|
|
res.data.rows[i].newsContentPublishTime = res.data.rows[i].newsContentPublishTime.split('-')[0] + '-' + res.data.rows[i].newsContentPublishTime.split('-')[1]
|
|
|
|
}
|
|
|
|
var result = {
|
|
|
|
picNews: picNews,
|
|
|
|
news: res.data.rows
|
|
|
|
}
|
|
|
|
self.dynamic = result
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getActivityList: function () {
|
|
|
|
var self = this
|
2022-11-23 23:32:15 +08:00
|
|
|
axios.get(self.url + 'app/activitylibrary/listpageactivitylibraryfornetrelease', {
|
2020-06-07 10:28:34 +08:00
|
|
|
params: self.activityPage
|
|
|
|
}).then(function (res) {
|
|
|
|
self.activityList = res.data.rows
|
|
|
|
})
|
|
|
|
},
|
|
|
|
getLiterature: function () {
|
|
|
|
var self = this
|
2022-12-14 11:34:17 +08:00
|
|
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
2020-07-16 19:30:11 +08:00
|
|
|
params: self.literaturePage
|
2020-06-07 10:28:34 +08:00
|
|
|
}).then(function (res) {
|
2020-07-16 19:30:11 +08:00
|
|
|
for (var i = 0; i < res.data.rows.length; i++) {
|
|
|
|
res.data.rows[i].newsContentCoverList = res.data.rows[i].newsContentCoverList[0].contentCoverId
|
|
|
|
}
|
2020-06-07 10:28:34 +08:00
|
|
|
self.literature = res.data.rows
|
|
|
|
})
|
2020-06-10 11:19:26 +08:00
|
|
|
},
|
|
|
|
getExhibition: function () {
|
|
|
|
var self = this
|
2022-12-14 11:34:17 +08:00
|
|
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
2020-06-10 11:19:26 +08:00
|
|
|
params: self.exhibitionPage
|
|
|
|
}).then(function (res) {
|
|
|
|
for (var i = 0; i < res.data.rows.length; i++) {
|
|
|
|
res.data.rows[i].newsContentCoverList = res.data.rows[i].newsContentCoverList[0].contentCoverId
|
|
|
|
}
|
|
|
|
self.exhibition = res.data.rows
|
|
|
|
})
|
2020-07-03 15:52:11 +08:00
|
|
|
},
|
2022-12-14 11:34:17 +08:00
|
|
|
// 轮播图
|
2020-07-03 15:52:11 +08:00
|
|
|
getSwiper: function () {
|
|
|
|
var self = this
|
2022-12-14 11:34:17 +08:00
|
|
|
axios.get(self.url + 'app/newscontent/listpagenewscontentrelease/' + common.areaCode, {
|
2020-07-03 15:52:11 +08:00
|
|
|
params: {
|
|
|
|
page: 1,
|
|
|
|
rows: 3,
|
2020-07-14 16:14:54 +08:00
|
|
|
newsDirectoriesId: 'eab0ca3c-d35d-4c02-9397-ace2bdd10fc1'
|
2020-07-03 15:52:11 +08:00
|
|
|
}
|
|
|
|
}).then(function (res) {
|
|
|
|
for (var i = 0; i < res.data.rows.length; i++) {
|
|
|
|
res.data.rows[i].newsContentCoverList = res.data.rows[i].newsContentCoverList[0].contentCoverId
|
|
|
|
}
|
|
|
|
self.swiperList = res.data.rows
|
|
|
|
})
|
2020-06-07 10:28:34 +08:00
|
|
|
}
|
|
|
|
},
|
|
|
|
mounted () {
|
|
|
|
this.getDynamicsList()
|
|
|
|
this.getActivityList()
|
2020-07-18 19:45:27 +08:00
|
|
|
// this.getLiterature()
|
2020-06-10 11:19:26 +08:00
|
|
|
this.getExhibition()
|
2020-07-03 15:52:11 +08:00
|
|
|
this.getSwiper()
|
2020-06-07 10:28:34 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" rel="stylesheet/stylus" scoped>
|
|
|
|
|
|
|
|
</style>
|