This commit is contained in:
dong_bo0602 2020-07-18 19:45:27 +08:00
parent 6ab73a0098
commit aa2b8b5200
4 changed files with 60 additions and 8 deletions

View File

@ -4,7 +4,7 @@
<IndexSwiper :swiperList="swiperList"></IndexSwiper> <IndexSwiper :swiperList="swiperList"></IndexSwiper>
<Dynamic :dynamic="dynamic"></Dynamic> <Dynamic :dynamic="dynamic"></Dynamic>
<IndexService :activityList="activityList"></IndexService> <IndexService :activityList="activityList"></IndexService>
<DigitalResource :literature="literature"></DigitalResource> <DigitalResource></DigitalResource>
<IndexVideo :exhibition="exhibition"></IndexVideo> <IndexVideo :exhibition="exhibition"></IndexVideo>
<Footer></Footer> <Footer></Footer>
</div> </div>
@ -138,7 +138,7 @@ export default {
mounted () { mounted () {
this.getDynamicsList() this.getDynamicsList()
this.getActivityList() this.getActivityList()
this.getLiterature() // this.getLiterature()
this.getExhibition() this.getExhibition()
this.getSwiper() this.getSwiper()
} }

View File

@ -6,7 +6,7 @@
<router-link to="/resource" class="more">MORE>></router-link> <router-link to="/resource" class="more">MORE>></router-link>
</div> </div>
<div class="digital-swiper"> <div class="digital-swiper">
<swiper :options="swiperOption"> <swiper :options="swiperOption" v-if="literature && literature.length > 0">
<swiper-slide class="slide-box" v-for="(list,idx) in literature" :key="idx"> <swiper-slide class="slide-box" v-for="(list,idx) in literature" :key="idx">
<div class="digital-slide-box" @click="goDetail(list.newsContentLink, list.templateRecordUrl)" :title="list.newsContentTitle"> <div class="digital-slide-box" @click="goDetail(list.newsContentLink, list.templateRecordUrl)" :title="list.newsContentTitle">
<img :src="url + 'news/route/file/downloadfile/false/' + list.newsContentCoverList" alt="" class="digital-slide-img"> <img :src="url + 'news/route/file/downloadfile/false/' + list.newsContentCoverList" alt="" class="digital-slide-img">
@ -19,20 +19,37 @@
</template> </template>
<script> <script>
import 'swiper/dist/css/swiper.css'
import { swiper, swiperSlide } from 'vue-awesome-swiper'
import axios from 'axios'
import common from '@/common/components/common.js' import common from '@/common/components/common.js'
export default { export default {
name: 'DigitalResource', name: 'DigitalResource',
props: { components: {
literature: Array swiper,
swiperSlide
}, },
// props: {
// literature: Array
// },
data () { data () {
return { return {
swiperOption: { swiperOption: {
observer: true,
observeParents: true,
autoplay: 3000, autoplay: 3000,
slidesPerView: 5, slidesPerView: 5,
spaceBetween: 30 spaceBetween: 30
}, },
url: common.url url: common.url,
literature: [],
literaturePage: {
page: 1,
rows: 8,
totalPage: 1,
newsDirectoriesId: '',
newsDirectoriesParentId: '98c74389-2088-499b-a046-8611bdc57ea4'
},
} }
}, },
methods: { methods: {
@ -42,7 +59,21 @@ export default {
} else { } else {
window.location.href = this.url + url window.location.href = this.url + url
} }
},
getLiterature: function () {
var self = this
axios.get(self.url + 'news/app/newscontent/listpagenewscontentrelease', {
params: self.literaturePage
}).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.literature = res.data.rows
})
} }
},
mounted: function () {
this.getLiterature()
} }
} }
</script> </script>

View File

@ -1,6 +1,6 @@
<template> <template>
<div class="index-swiper"> <div class="index-swiper">
<swiper ref="mySwiper" :options="swiperOptions" class="swiper-outer"> <swiper ref="mySwiper" :options="swiperOptions" class="swiper-outer" v-if="swiperList && swiperList.length > 0">
<swiper-slide class="swiper-box" v-for="(swiper,idx) in swiperList" :key="idx"> <swiper-slide class="swiper-box" v-for="(swiper,idx) in swiperList" :key="idx">
<img :src="url + 'news/route/file/downloadfile/false/' + swiper.newsContentCoverList" alt="" class="banner-img" @click="goDetail(swiper.templateRecordUrl)"> <img :src="url + 'news/route/file/downloadfile/false/' + swiper.newsContentCoverList" alt="" class="banner-img" @click="goDetail(swiper.templateRecordUrl)">
</swiper-slide> </swiper-slide>
@ -20,6 +20,7 @@ export default {
return { return {
swiperOptions: { swiperOptions: {
pagination: '.swiper-pagination', pagination: '.swiper-pagination',
paginationClickable: true,
// loop: true, // loop: true,
autoplay: 3000 autoplay: 3000
}, },

View File

@ -23,6 +23,15 @@
</tr> </tr>
</table> </table>
<div class="heritage-text" v-html="heritageDetail.librarySummary"></div> <div class="heritage-text" v-html="heritageDetail.librarySummary"></div>
<div class="pic-swiper">
<swiper :options="swiperOption" v-if="heritageDetail.libraryCover && heritageDetail.libraryCover.length > 0">
<swiper-slide class="slide-box" v-for="(list,idx) in heritageDetail.libraryCover" :key="idx">
<div class="digital-slide-box" @click="goDetail(list.newsContentLink, list.templateRecordUrl)" :title="list.newsContentTitle">
<img :src="url + 'library/route/file/downloadfile/false/' + list" alt="" class="digital-slide-img">
</div>
</swiper-slide>
</swiper>
</div>
</div> </div>
<div class="about-people"> <div class="about-people">
<h3>相关传承人</h3> <h3>相关传承人</h3>
@ -70,13 +79,19 @@ export default {
return { return {
heritageDetail: {}, heritageDetail: {},
peopleList: [], peopleList: [],
url: common.url url: common.url,
swiperOption: {
autoplay: 3000,
slidesPerView: 5,
spaceBetween: 30
}
} }
}, },
methods: { methods: {
getHeritageDetail () { getHeritageDetail () {
var self = this var self = this
axios.get(self.url + 'library/app/intangiblelibrary/getintangiblelibrarybyidrelease/' + this.$route.params.id).then(function (res) { axios.get(self.url + 'library/app/intangiblelibrary/getintangiblelibrarybyidrelease/' + this.$route.params.id).then(function (res) {
res.data.libraryCover = res.data.libraryCover.split(',')
self.heritageDetail = res.data self.heritageDetail = res.data
self.getPeopleList() self.getPeopleList()
}) })
@ -180,4 +195,9 @@ export default {
text-overflow ellipsis text-overflow ellipsis
padding 0 5px padding 0 5px
font-family '宋体' font-family '宋体'
.pic-swiper
margin-top 10px
img
width 215px
height 260px
</style> </style>