Browse Source

兼容智能布局,章节报告

Karsa 8 months ago
parent
commit
381e513787
3 changed files with 23 additions and 16 deletions
  1. 19 13
      pages-report/chapterList.vue
  2. 3 2
      pages-report/reportList.vue
  3. 1 1
      pages/report/report.vue

+ 19 - 13
pages-report/chapterList.vue

@@ -12,20 +12,26 @@
                             <view>{{formatChapterTime(info.report_info.publish_time,'year-month')}}</view>
                         </view>
                     </view>
-                    <view class="flex audio-play-box" @click="handlePlayWeekAudio(null)" v-if="info.report_info.classify_name_first=='周报'&&info.auth_ok">
-                        <image class="icon" :src="curAudioReportId==reportId&&!curAudioPaused?'./static/audio-s.png':'./static/audio.png'" mode="aspectFill"/>
-                        <text>{{curAudioReportId==reportId&&!curAudioPaused?'暂停':'播放'}}</text>
-                    </view>
+						  
+						  <template v-if="!info.report_info.video_url">
+							  <view class="flex audio-play-box" @click="handlePlayWeekAudio(null)" v-if="info.report_info.classify_name_first=='周报'&&info.auth_ok">
+									<image class="icon" :src="curAudioReportId==reportId&&!curAudioPaused?'./static/audio-s.png':'./static/audio.png'" mode="aspectFill"/>
+									<text>{{curAudioReportId==reportId&&!curAudioPaused?'暂停':'播放'}}</text>
+							  </view>
+						  </template>
                 </view>
                 <view :class="[info.report_info.classify_name_first=='晨报'?'stage-num-day':'stage-num-week']">第{{info.report_info.stage}}期</view>
-                <!-- 音频播放设置 -->
-                <view class="audio-play-set-box" v-if="info.report_info.classify_name_first=='周报'&&info.auth_ok">
-                    <image class="btn" @click="handleGoSetAudioList" src="./static/set.png" mode="aspectFill"/>
-                    <view class="attention-box" v-if="showChapterListAttention">
-                        点击<span style="color:#E3B377">设置</span>,打开<span style="color:#E3B377">播放列表</span>,进行<span style="color:#E3B377">关注品种配置</span>
-                        <image class="close-icon" src="./static/close2.png" @click.stop="closeAttention" />
-                    </view>
-                </view>
+               
+					<template v-if="!info.report_info.video_url">
+						 <!-- 音频播放设置 -->
+						 <view class="audio-play-set-box" v-if="info.report_info.classify_name_first=='周报'&&info.auth_ok">
+							  <image class="btn" @click="handleGoSetAudioList" src="./static/set.png" mode="aspectFill"/>
+							  <view class="attention-box" v-if="showChapterListAttention">
+									点击<span style="color:#E3B377">设置</span>,打开<span style="color:#E3B377">播放列表</span>,进行<span style="color:#E3B377">关注品种配置</span>
+									<image class="close-icon" src="./static/close2.png" @click.stop="closeAttention" />
+							  </view>
+						 </view>
+					</template>
             </view>
             <view class="list-box">
                 <view class="flex item" v-for="item in chapterList" :key="item.report_chapter_id" @click="goChapterDetail(item)">
@@ -41,7 +47,7 @@
                         <view class="update-time">更新至:{{formatChapterTime(item.publish_time,'year-month-day')}}</view>
                         <view 
                             class="audio-icon-box" 
-                            v-if="info.report_info.classify_name_first=='周报'&&item.is_close==0"
+                            v-if="!info.report_info.video_url&&info.report_info.classify_name_first=='周报'&&item.is_close==0"
                             @click.stop="handlePlayWeekAudio(item)"
                         >
                             <image 

+ 3 - 2
pages-report/reportList.vue

@@ -282,7 +282,8 @@ export default {
     },
 
     goReportDetail(item){
-      if(['晨报','周报'].includes(item.classify_name_first)){
+      // if(['晨报','周报'].includes(item.classify_name_first)){
+      if(item.has_chapter){
         uni.navigateTo({ url: '/pages-report/chapterList?reportId='+item.report_id })
         return 
       }
@@ -307,7 +308,7 @@ export default {
           this.globalBgMusic.pause()
         }
       }else{
-        this.$store.commit('addAudio', {list:item.video_list,reportId:item.report_id})
+        this.$store.commit('addAudio', {list: item.video_url?[item.video_url]:item.video_list,reportId:item.report_id})
       }
     },
 

+ 1 - 1
pages/report/report.vue

@@ -329,7 +329,7 @@ export default {
 
     //跳转报告详情
     async goDetail(item) {
-      if (["晨报", "周报"].includes(item.classify_name_first)) {
+      if(item.report_chapter_id){
         uni.navigateTo({ url: `/pages-report/chapterDetail?chapterId=${item.report_chapter_id}&fromPage=home` });
       } else {
         uni.navigateTo({ url: "/pages-report/reportDetail?reportId=" + item.report_id });