|
@@ -1,5 +1,12 @@
|
|
|
<template>
|
|
|
<van-pull-refresh v-model="loading" disabled style="min-height:100vh">
|
|
|
+ <div class="content-swipe" v-if="bannerDataList.length > 0">
|
|
|
+ <van-swipe class="my-swipe" :autoplay="4000" :show-indicators="false">
|
|
|
+ <van-swipe-item v-for="item in bannerDataList" :key="item.id" @click="bannerSwiperHandler(item)">
|
|
|
+ <img :src="item.image_url_mobile" />
|
|
|
+ </van-swipe-item>
|
|
|
+ </van-swipe>
|
|
|
+ </div>
|
|
|
<div class="chapter-detail-page" v-if="info" :style="{paddingBottom:$store.state.hzyb.audioData.url&&'80px'}">
|
|
|
<div :class="['main-box',!info.auth_ok&&'main-box-noauth']">
|
|
|
<!-- <div class="title">【第{{info.report_chapter_item.stage}}期 | {{info.report_chapter_item.classify_name_first}} | {{info.report_chapter_item.type_name}}】{{info.report_chapter_item.title}}</div> -->
|
|
@@ -146,13 +153,13 @@ import 'moment/dist/locale/zh-cn'
|
|
|
moment.locale('zh-cn')
|
|
|
import {addTokenToIframe} from '../utils/common'
|
|
|
|
|
|
-import {apiChapterDetail,apiChapterTickerValue,apiRddpShareImg,apiReportPPtImgs} from '@/api/hzyb/report'
|
|
|
+import {apiChapterDetail,apiChapterTickerValue,apiRddpShareImg,apiReportPPtImgs,apiPublicBannerMark,apiPublicBannerList} from '@/api/hzyb/report'
|
|
|
import {apiApplyPermission,apiUserInfo,apiSetCollect,apiCancelCollect} from '@/api/hzyb/user'
|
|
|
-import {Popup,Image as VanImage,PullRefresh,Col, Row,Dialog,Toast} from 'vant'
|
|
|
+import {Popup,Image as VanImage,PullRefresh,Col, Row,Dialog,Toast,Swipe, SwipeItem} from 'vant'
|
|
|
import AudioBox from './components/AudioBox.vue'
|
|
|
import SharePoster from '../components/SharePoster.vue'
|
|
|
-import _ from 'lodash';
|
|
|
import LeaveMessage from '../components/leaveMessage/index.vue'
|
|
|
+import _ from 'lodash';
|
|
|
import collectIcon from '@/assets/hzyb/collect-icon.png'
|
|
|
import collectIcons from '@/assets/hzyb/collect-icon-s.png'
|
|
|
import reportCancel from './components/reportCancel.vue'
|
|
@@ -163,6 +170,8 @@ export default {
|
|
|
[PullRefresh.name]:PullRefresh,
|
|
|
[Col.name]:Col,
|
|
|
[Row.name]:Row,
|
|
|
+ [Swipe.name]:Swipe,
|
|
|
+ [SwipeItem.name]:SwipeItem,
|
|
|
[PullRefresh.name]:PullRefresh,
|
|
|
[Dialog.name]:Dialog,
|
|
|
AudioBox,
|
|
@@ -222,6 +231,7 @@ export default {
|
|
|
collectIcons,
|
|
|
|
|
|
isReportPublishCancel:false,//报告取消发布
|
|
|
+ bannerDataList:[]
|
|
|
};
|
|
|
},
|
|
|
beforeCreate(){
|
|
@@ -234,6 +244,7 @@ export default {
|
|
|
this.chapterId=this.$route.query.chapterId
|
|
|
this.fromPage=this.$route.query.fromPage||''
|
|
|
this.getDetail()
|
|
|
+ this.getBannerList()
|
|
|
},
|
|
|
mounted(){
|
|
|
$(document).on('click', '.rich-content img',function(event) {
|
|
@@ -254,6 +265,26 @@ export default {
|
|
|
window.removeEventListener('scroll',this.loadMoreHandle)
|
|
|
},
|
|
|
methods: {
|
|
|
+ // banner 获取列表
|
|
|
+ async getBannerList(){
|
|
|
+ const res = await apiPublicBannerList()
|
|
|
+ if(res.code ==200){
|
|
|
+ this.bannerDataList = res.data
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // banner 点击事件
|
|
|
+ async bannerSwiperHandler(item){
|
|
|
+ const res = await apiPublicBannerMark({
|
|
|
+ first_source: 1, //一级来源 1小程序移动 2小程序pc 3研报官网
|
|
|
+ second_source: 2, //二级来源 1首页 2研报详情页
|
|
|
+ id:item.id
|
|
|
+ })
|
|
|
+ if(res.code===200){
|
|
|
+ wx.miniProgram.navigateTo({
|
|
|
+ url:"/pages-report/disseminatePage/disseminatePage?imgHb="+item.jump_url_mobile
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
//背景音频播放报告音频
|
|
|
handlePlayAudioBG(){
|
|
|
wx.miniProgram.navigateTo({
|
|
@@ -928,4 +959,22 @@ export default {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+.content-swipe {
|
|
|
+ width: 100%;
|
|
|
+ padding: 30px 34px 0 34px;
|
|
|
+ .my-swipe {
|
|
|
+ width: 100%;
|
|
|
+ .van-swipe-item {
|
|
|
+ width: 100%;
|
|
|
+ height: auto;
|
|
|
+ overflow: hidden;
|
|
|
+ }
|
|
|
+ img {
|
|
|
+ object-fit: contain;
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
</style>
|