Kaynağa Gözat

研报详情修改

jwyu 2 yıl önce
ebeveyn
işleme
a809d5b86d

+ 29 - 9
src/views/hzyb/report/ChapterDetail.vue

@@ -2,16 +2,23 @@
 <van-pull-refresh v-model="loading" disabled style="min-height:100vh">
   <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>
+      <!-- <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> -->
+      <div class="title">{{title}}</div>
       <div class="flex time">
         <span>FICC团队</span>
         <span>{{formatTime(info.report_chapter_item.publish_time)}}</span>
       </div>
       <!-- 音频模块 -->
       <AudioBox :audioData="audioData" v-if="info.report_chapter_item.video_url&&info.report_chapter_item.video_play_seconds>0"></AudioBox>
-      <div class="tips">
-        <span>注:请务必阅读</span>
-        <span style="color: #e3b377; margin-left: 20px" @click="showDisclaimers = true">免责声明</span>
+      <div class="flex tips">
+        <div>
+          <div class="abstract" v-if="info.report_chapter_item.abstract">摘要:{{info.report_chapter_item.abstract}}</div>
+          <div>
+            <span>注:请务必阅读</span>
+            <span style="color: #e3b377; margin-left: 20px" @click="showDisclaimers = true">免责声明</span>
+          </div>
+        </div>
+        
       </div>
       <div class="rich-content">
         <!-- <div v-html="info.report_chapter_item.content" v-if="info.auth_ok"></div> -->
@@ -149,9 +156,11 @@ export default {
       })
     },
     posterParams(){
+      let time=moment(this.info.report_chapter_item.publish_time).format('MMDD')
       return {
         report_type:this.info.report_chapter_item.classify_name_first,
-        report_title:`【第${this.info.report_chapter_item.stage}期 | ${this.info.report_chapter_item.classify_name_first}  | ${this.info.report_chapter_item.type_name}】${this.info.report_chapter_item.title}`,
+        // report_title:`【第${this.info.report_chapter_item.stage}期 | ${this.info.report_chapter_item.classify_name_first} | ${this.info.report_chapter_item.type_name}】${this.info.report_chapter_item.title}(${time})`,
+        report_title:this.title,
         report_abstract:this.info.report_chapter_item.content,
       }
     }
@@ -162,6 +171,7 @@ export default {
       chapterId:0,
       fromPage:'',//如果是从首页(home)来的则隐藏底部切换 message定位到留言板
       info:null,
+      title:'',
       audioData:{},//音频数据
 
       tickerInfo:null,
@@ -259,6 +269,10 @@ export default {
           }
         }
 
+        // 处理标题数据
+        //【第{{info.report_chapter_item.stage}}期 | {{info.report_chapter_item.classify_name_first}}  | {{info.report_chapter_item.type_name}}】{{info.report_chapter_item.title}}({{moment(info.report_chapter_item.publish_time).format('MMDD')}})
+        this.title=`【第${res.data.report_chapter_item.stage}期 | ${res.data.report_chapter_item.classify_name_first} | ${res.data.report_chapter_item.type_name}】${res.data.report_chapter_item.title}(${moment(res.data.report_chapter_item.publish_time).format('MMDD')})`
+
         //向小程序发送分享数据
         wx.miniProgram.postMessage({ 
           data: {
@@ -480,7 +494,7 @@ export default {
         overflow: hidden;
     }
     .title{
-        font-size: 46px;
+        font-size: 40px;
         font-weight: bold;
         margin-bottom: 30px;
         display: inline;
@@ -498,12 +512,18 @@ export default {
         &::before{
             content: '';
             width: 10px;
-            height: 50px;
+            // height: 50px;
             display: inline-block;
             background-color: #E3B377;
             margin-right: 20px;
-            position: relative;
-            top: 10px;
+            // position: relative;
+            // top: 10px;
+        }
+        .abstract{
+            font-size: 34px;
+            font-weight: bold;
+            margin-bottom: 20px;
+            line-height: 1.3;
         }
     }
 

+ 34 - 9
src/views/hzyb/report/Detail.vue

@@ -47,16 +47,22 @@
 
         <!-- 报告详情 -->
         <div :class="['main-box',!info.auth_ok&&'main-box-noauth']" v-else>
-            <div class="title">【第{{info.report_info.stage}}期|{{info.report_info.classify_name_second}}】{{info.report_info.title}}</div>
+            <!-- <div class="title">【第{{info.report_info.stage}}期|{{info.report_info.classify_name_second}}】{{info.report_info.title}}</div> -->
+            <div class="title">{{title}}</div>
             <div class="flex time">
                 <span>FICC团队</span>
                 <span>{{formatTime(info.report_info.publish_time)}}</span>
             </div>
             <!-- 音频模块 -->
             <AudioBox :audioData="audioData" v-if="info.report_info.video_url&&info.report_info.video_play_seconds>0"></AudioBox>
-            <div class="tips">
-                <span>注:请务必阅读</span>
-                <span style="color:#E3B377;margin-left:20px" @click="showDisclaimers=true">免责声明</span>
+            <div class="flex tips">
+                <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>
+                    </div>
+                </div>
             </div>
 
             <div class="rich-content">
@@ -166,7 +172,8 @@ export default {
         posterParams(){
             return {
                 report_type:this.info.report_info.classify_name_first,
-                report_title:`【第${this.info.report_info.stage}期 | ${this.info.report_info.classify_name_second}】${this.info.report_info.title}`,
+                // report_title:`【第${this.info.report_info.stage}期 | ${this.info.report_info.classify_name_second}】${this.info.report_info.title}`,
+                report_title:this.title,
                 report_abstract:this.info.report_info.content
             }
         }
@@ -176,6 +183,7 @@ export default {
             showDisclaimers:false,//显示免责声明
             reportId:0,
             info:null,
+            title:'',//标题数据
             audioData:{},//音频数据
             chapterList:[],
             pupData:{
@@ -268,6 +276,17 @@ export default {
                     }
                 }
 
+                // 处理报告标题数据
+                if(!['晨报','周报'].includes(res.data.report_info.classify_name_first)){
+                    //【第{{info.report_info.stage}}期|{{info.report_info.classify_name_second}}】{{info.report_info.title}}
+                    const  time=moment(res.data.report_info.publish_time).format('MMDD')
+                    if(res.data.report_info.classify_name_second==res.data.report_info.title){
+                        this.title=`【第${res.data.report_info.stage}期】${res.data.report_info.title}(${time})`
+                    }else{
+                        this.title=`【第${res.data.report_info.stage}】期|${res.data.report_info.classify_name_second}】${res.data.report_info.title}(${time})`
+                    }
+                }
+
                 //向小程序发送分享数据
                 wx.miniProgram.postMessage({ 
                     data: {
@@ -473,7 +492,7 @@ export default {
         overflow: hidden;
     }
     .title{
-        font-size: 46px;
+        font-size: 40px;
         font-weight: bold;
         margin-bottom: 30px;
     }
@@ -504,12 +523,18 @@ export default {
         &::before{
             content: '';
             width: 10px;
-            height: 50px;
+            // height: 100%;
             display: inline-block;
             background-color: #E3B377;
             margin-right: 20px;
-            position: relative;
-            top: 10px;
+            // position: relative;
+            // top: 10px;
+        }
+        .abstract{
+            font-size: 34px;
+            font-weight: bold;
+            margin-bottom: 20px;
+            line-height: 1.3;
         }
     }