Browse Source

Merge branch 'ch/need_pool277' of Karsa/raiwechat_link_h5 into master

leichen 1 month ago
parent
commit
19d9184e79
2 changed files with 30 additions and 9 deletions
  1. 16 6
      src/views/hzyb/report/ChapterDetail.vue
  2. 14 3
      src/views/hzyb/report/Detail.vue

+ 16 - 6
src/views/hzyb/report/ChapterDetail.vue

@@ -39,16 +39,16 @@
         <div class="flex tips">
           <div style="flex:1">
             <div class="abstract" v-if="info.report_chapter_item.abstract">摘要:{{info.report_chapter_item.abstract}}</div>
-            <div>
+            <div v-if="disclaimer">
               <span>注:请务必阅读</span>
               <span style="color: #e3b377; margin-left: 20px" @click="showDisclaimers = true">免责声明</span>
-              <span 
-                v-if="!info.report_chapter_item.report_video_url&&info.report_chapter_item.video_url&&info.report_chapter_item.video_play_seconds>0" 
-                style="float:right;background:#E3B377;color:#fff;border-radius:30px;padding:0 10px;font-size:0.9em" @click="handlePlayAudioBG"
-              >背景播放</span>
             </div>
           </div>
         </div>
+        <span 
+          v-if="!info.report_chapter_item.report_video_url&&info.report_chapter_item.video_url&&info.report_chapter_item.video_play_seconds>0" 
+          style="float:right;background:#E3B377;color:#fff;border-radius:30px;padding:0 10px;font-size:0.9em" @click="handlePlayAudioBG"
+        >背景播放</span>
         <div id="report-rich-content" class="rich-content" ref="richConBox">
           <div v-if="info.auth_ok">
             <ul>
@@ -185,6 +185,7 @@ import collectIcon from '@/assets/hzyb/collect-icon.png'
 import collectIcons from '@/assets/hzyb/collect-icon-s.png'
 import reportCancel from './components/reportCancel.vue'
 import Disclaimer from '../components/Disclaimer.vue'
+import { apiBaseConfig } from '@/api/hzyb/common'
 export default {
   components:{
     [Popup.name]:Popup,
@@ -262,7 +263,8 @@ export default {
           研报标题:'',
           研报作者:'',
           创建时间:''
-      }
+      },
+      disclaimer:''//免责声明
     };
   },
   beforeCreate(){
@@ -275,6 +277,7 @@ export default {
     this.chapterId=this.$route.query.chapterId
     this.fromPage=this.$route.query.fromPage||''
     this.getDetail()
+    this.getConfig()
     // this.getBannerList()
   },
   mounted(){
@@ -302,6 +305,13 @@ export default {
           if(res.code ==200){
             this.bannerDataList = res.data
           }
+    },
+    getConfig() {
+      apiBaseConfig().then(res => {
+        if (res.code == 200) {
+        this.disclaimer = res.data.disclaimer
+        }
+      })
     },
      // banner 点击事件
     async bannerSwiperHandler(item){

+ 14 - 3
src/views/hzyb/report/Detail.vue

@@ -96,8 +96,8 @@
                         <div v-if="info.road_video_id">点击<span style="color: #e3b377;" @click="goVideoPage">查看视频</span></div>
                         <div class="abstract" v-if="info.report_info.abstract">摘要:{{info.report_info.abstract}}</div>
                         <div>
-                            <span>注:请务必阅读</span>
-                            <span style="color:#E3B377;margin-left:20px" @click="showDisclaimers=true">免责声明</span>
+                            <span v-if="disclaimer">注:请务必阅读</span>
+                            <span v-if="disclaimer" style="color:#E3B377;margin-left:20px" @click="showDisclaimers=true">免责声明</span>
                             <span 
                                 v-if="info.report_info.video_url&&info.report_info.video_play_seconds>0" 
                                 style="float:right;background:#E3B377;color:#fff;border-radius:30px;padding:0 10px;font-size:0.9em" @click="handlePlayAudioBG"
@@ -220,6 +220,7 @@ import moment from 'moment'
 import 'moment/dist/locale/zh-cn'
 moment.locale('zh-cn')
 import {addTokenToIframe} from '../utils/common'
+import { apiBaseConfig } from '@/api/hzyb/common'
 
 import {apiReportDetail,apiRddpShareImg,apiReportPPtImgs,apiPublicBannerMark,apiPublicBannerList} from '@/api/hzyb/report'
 import {apiApplyPermission,apiUserInfo,apiSetCollect,apiCancelCollect} from '@/api/hzyb/user'
@@ -302,7 +303,8 @@ export default {
                 研报标题:'',
                 研报作者:'',
                 创建时间:''
-            }
+            },
+            disclaimer:''//免责声明
         }
     },
     beforeCreate(){
@@ -316,6 +318,7 @@ export default {
         this.fromPage = this.$route.query.fromPage || ''
         this.getDetail()
         this.getUserInfo()
+        this.getConfig()
         // this.getBannerList()
     },
     mounted(){
@@ -345,6 +348,14 @@ export default {
                 this.bannerDataList = res.data
             }
         },
+
+        getConfig() {
+            apiBaseConfig().then(res => {
+                if (res.code == 200) {
+                this.disclaimer = res.data.disclaimer
+                }
+            })
+        },
         // banner 点击事件
        async bannerSwiperHandler(item){
             const res = await apiPublicBannerMark({