bding 1 年之前
父节点
当前提交
94fb07d449
共有 1 个文件被更改,包括 37 次插入1 次删除
  1. 37 1
      src/views/hzyb/report/Detail.vue

+ 37 - 1
src/views/hzyb/report/Detail.vue

@@ -1,5 +1,12 @@
 <template>
 <van-pull-refresh v-model="loading" disabled style="min-height:100vh">
+    <div class="content-swipe">
+        <van-swipe class="my-swipe" :autoplay="3000" :show-indicators="false">
+            <van-swipe-item v-for="item in bannerDataList" :key="item.id" @click="bannerSwiperHandler(item)">
+                <img :src="item.IndexImg" />
+            </van-swipe-item>
+        </van-swipe>
+    </div>
     <div class="report-detail-page" @click="closeAttention" v-if="info" :style="{paddingBottom:$store.state.hzyb.audioData.url&&'80px'}">
         <!-- 晨报、周报章节 -->
         <div class="chapter-list-wrap" v-if="['晨报','周报'].includes(info.report_info.classify_name_first)">
@@ -177,7 +184,7 @@ import {addTokenToIframe} from '../utils/common'
 
 import {apiReportDetail,apiRddpShareImg,apiReportPPtImgs} from '@/api/hzyb/report'
 import {apiApplyPermission,apiUserInfo,apiSetCollect,apiCancelCollect} from '@/api/hzyb/user'
-import {Popup,Image as VanImage,PullRefresh,Dialog, Toast} from 'vant'
+import {Popup,Image as VanImage,PullRefresh,Dialog, Toast,Swipe, SwipeItem} from 'vant'
 import AudioBox from './components/AudioBox.vue'
 import SharePoster from '../components/SharePoster.vue'
 import _ from 'lodash';
@@ -191,6 +198,8 @@ export default {
         [Popup.name]:Popup,
         [VanImage.name]:VanImage,
         [PullRefresh.name]:PullRefresh,
+        [Swipe.name]:Swipe,
+        [SwipeItem.name]:SwipeItem,
         [Dialog.name]:Dialog,
         AudioBox,
         SharePoster,
@@ -244,6 +253,9 @@ export default {
 
             showAttention:false,//是否显示配置播放清单提示
             isReportPublishCancel:false,//报告取消发布
+            bannerDataList:[
+                {IndexImg:'https://hzchart.oss-cn-shanghai.aliyuncs.com/yb_xcx/banner.png',id:1},
+            ]
         }
     },
     beforeCreate(){
@@ -278,6 +290,12 @@ export default {
         window.removeEventListener('scroll',this.loadMoreHandle)
     },
     methods: {
+        // banner 点击事件
+        bannerSwiperHandler(item){
+         wx.miniProgram.navigateTo({
+            url:"/pages-report/disseminatePage/disseminatePage?id="+item.id
+        })
+        },
         // 点击开始播放周报的列表中的音频
         handlePlayWeekAudio(e){
             const arr=[]
@@ -1064,4 +1082,22 @@ export default {
         }
     }
 }
+.content-swipe {
+    width: 100%;
+    padding: 30px 35px 0 35px;
+    .my-swipe {
+    width: 100%;
+    .van-swipe-item {
+        width: 100%;
+         height: 120px;
+         border-radius: 12px;
+         overflow: hidden;
+    }
+    img {
+         width: 100%;
+         height: 120px;
+    }
+}
+}
+
 </style>