Browse Source

研报11.7 线上路演增加跳转报告按钮

cxmo 2 years ago
parent
commit
481cc9e8e4
3 changed files with 20 additions and 1 deletions
  1. 15 0
      components/videoComment/comment.vue
  2. 5 1
      pages-roadShow/video/list.vue
  3. BIN
      static/report-btn.png

+ 15 - 0
components/videoComment/comment.vue

@@ -13,6 +13,9 @@
                 <image :src="comment_img" mode="aspectFill"/>
                 <text>{{info.comment_total>0?info.comment_total:''}}</text>
             </view>
+            <view class="item" v-if="info.report_id" @click="goReport" style="text-align:right" >
+                <image :src="report_img" mode="aspectFill"/>
+            </view>
         </view>
         <view class="list-commnet-box" v-if="info.comment_list.length>0">
             <template class="item" v-for="(item,index) in info.comment_list" >
@@ -88,6 +91,7 @@ export default {
 			like_img: require('@/static/question/like.png'),
 			like_act_img: require('@/static/question/like_act.png'),
 			comment_img: require('@/static/question/comment.png'),
+      report_img:require('@/static/report-btn.png'),
 
             isShowComment: false,
 			comment_cont: '',
@@ -215,6 +219,17 @@ export default {
                 })
             }
         },
+
+        //跳转至报告详情
+        goReport(){
+          if(this.videoInfo.fromPage==='report'){
+            uni.navigateBack()
+          }else{
+            uni.navigateTo({url: `/pages-report/reportDetail?reportId=${this.videoInfo.report_id}&fromPage=video`})
+          }
+          
+          //uni.navigateTo({url:'/pages-report/reportDetail?reportId='+item.report_id})
+        }
     },
 }
 </script>

+ 5 - 1
pages-roadShow/video/list.vue

@@ -158,6 +158,8 @@ export default {
             noShareData:false,//用户从分享进入没有该分享的视频的权限
 
             showDanmu:true,//控制整个模块是否显示弹幕功能(没用了本来后台有个开关功能的 后来不要了 但是还是留着吧)
+
+            fromPage:''
         }
     },
     onLoad(options){
@@ -221,10 +223,12 @@ export default {
             return {
                 source:3,
                 id:item.road_video_id,
-                ...item
+                ...item,
+                fromPage:this.fromPage
             }
         },
         async init(options){
+          this.fromPage=options.fromPage||''
             if(options.scene){
                 const resScene=await apiGetSceneToParams({scene_key:options.scene})
                 if(resScene.code===200){

BIN
static/report-btn.png