Browse Source

fix:修复显示pdf

chenlei 1 month ago
parent
commit
cdb968eb8d
3 changed files with 17 additions and 15 deletions
  1. 1 1
      src/api/modules/report.js
  2. 0 1
      src/views/report/Detail.vue
  3. 16 13
      src/views/report/PDF.vue

+ 1 - 1
src/api/modules/report.js

@@ -7,6 +7,6 @@ export default{
   },
   // 获取PDF报告详情
   getPdfReportDetail:params=>{
-    return get('/report/pdf/detail',params)
+    return get('/h5/report/outside_detail',params)
   },
 }

+ 0 - 1
src/views/report/Detail.vue

@@ -237,7 +237,6 @@ function handleGoLogin(){
       </div>
     </div>
     <div class="time-box" style="text-align:right;" v-if="reportInfo.HeadResource?.ImgUrl">
-      <span>如有内容疑问 请查看 &nbsp;</span>
       <span class="btn" @click="isShowMZSM = true">免责声明</span>
     </div>
 

+ 16 - 13
src/views/report/PDF.vue

@@ -33,8 +33,8 @@ async function getUserInfo() {
   const res = await apiUser.userInfo()
   if (res.Ret === 200) {
     userInfo.value = res.Data
-    isLogin.value = userInfo.LoginStatus === 0
-    TrialExpired.value = userInfo.User.TrialExpired
+    isLogin.value = userInfo.value.LoginStatus === 0
+    TrialExpired.value = userInfo.value.User.TrialExpired
   }
 }
 
@@ -46,16 +46,16 @@ const isBind=ref(false)
 async function getReportInfo() {
   if (!reportId) return
   const res = await apiReport.getPdfReportDetail({
-    ReportPdfId: Number(reportId)
+    ReportId: Number(reportId)
   })
   if (res.Ret === 200) {
-    reportInfo.value = res.Data.Report
+    reportInfo.value = res.Data
     isBind.value=res.Data.IsSignIn
 
     // 设置分享文案
     wx.miniProgram.postMessage({
       data: {
-        title: res.Data.Report.Title
+        title: res.Data.Title
       }
     });
     await getUserInfo()
@@ -119,18 +119,21 @@ function handleGoLogin(){
 <template>
   <div :class="['report-detail-page', isLogin || TrialExpired ? 'report-detail_hidden' : '']" v-if="reportInfo">
     <div class="title-box">{{ reportInfo.Title }}</div>
-    <div class="author-box">{{ reportInfo.Author }}</div>
-    <div class="time-box">
-      <span>{{ reportInfo.PublishTime }}</span>
+    <div class="author-box">
+      <span>{{ reportInfo.Author }}</span>
       <span class="btn" @click="isShowMZSM = true">免责声明</span>
     </div>
+    <!-- <div class="time-box">
+      <span>{{ reportInfo.PublishTime }}</span>
+      <span class="btn" @click="isShowMZSM = true">免责声明</span>
+    </div> -->
     <div class="des-box" v-if="reportInfo.Abstract">
       <!-- <svg-icon name="icon01"></svg-icon> -->
       <span class="des-title">摘要:</span>
       <span>{{ reportInfo.Abstract}}</span>
     </div>
     <div class="report-content-box rich-content">
-      <preview-PDF :url="reportInfo.PdfUrl"/>
+      <preview-PDF :url="reportInfo.ReportFile"/>
     </div>
     <!-- 右侧悬浮操作栏 -->
     <div class="right-fix-box">
@@ -189,13 +192,13 @@ function handleGoLogin(){
     line-height: 44px;
     margin-bottom: 20px;
   }
-  .time-box {
+  .author-box{
     margin-top: 10px;
-    font-size: var(--font-size-small);
-    color: var(--text-color-grey);
+    font-size: 36px;
     .btn {
+      font-size: var(--font-size-small);
       float: right;
-      color: var(--primary-color);
+      color: #D49633;
     }
   }
   .des-box {