Bladeren bron

Merge branch 'ch/ht_3.0' of eta_mini/eta_mini_h5 into debug_ht

leichen 3 maanden geleden
bovenliggende
commit
da342100fa
2 gewijzigde bestanden met toevoegingen van 19 en 8 verwijderingen
  1. 13 4
      src/views/report/Detail.vue
  2. 6 4
      src/views/report/PDF.vue

+ 13 - 4
src/views/report/Detail.vue

@@ -223,14 +223,14 @@ function handleGoTestRisk(){
 
 //跳转购买
 function goPrimary(){
-  wx.miniProgram.reLaunch({
+  wx.miniProgram.navigateTo({
     url: `/pages-order/payPage/index?id=${productId}`
   })
 }
 
 // 跳转研究员详情页
 function goDetails(item){
-  wx.miniProgram.reLaunch({
+  wx.miniProgram.navigateTo({
     url:'/pages-user/authordetail/index?id='+item.id
   })
 }
@@ -307,7 +307,7 @@ function goDetails(item){
           <div
             @click="changeFollowState"
             :class="['opt-btn', isFollowed ? 'followed' : '']"
-            v-if="isLogin"
+            v-if="isLogin && authorInfoList?.[0].name"
           >
             {{ isFollowed ? "取消关注" : "关注" }}
           </div>
@@ -460,7 +460,7 @@ function goDetails(item){
       <div class="authorList-box" v-for="(item, index) in authorInfoList" :key="index">
         <div class="img-list-box" @click="goDetails(item)">
           <img
-            :src="authorInfoList?.[0].headImgUrl|| defaultImg"
+            :src="item?.headImgUrl|| defaultImg"
           />
         </div>
         <div class="name-list-box" @click="goDetails(item)">
@@ -562,6 +562,12 @@ function goDetails(item){
     :deep(img) {
       width: 100% !important;
     }
+    :deep(table) {
+      max-width: 100% !important;
+    }
+    :deep(div) {
+      max-width: 100% !important;
+    }
     :deep(span) {
       font-size: 36px !important;
       line-height: 1.8 !important;
@@ -621,6 +627,9 @@ function goDetails(item){
         }
       }
     }
+    :deep(.report-drag-item-wrap_child-wrap) {
+      display: block !important;
+    }
   }
   .right-fix-box {
     position: fixed;

+ 6 - 4
src/views/report/PDF.vue

@@ -27,6 +27,7 @@ const isLogin=ref(true)
 const productId = route.query.productId
 const isSubscribe=ref(true)
 const isFree=ref(true)
+const pdfUrl = ref('')
 const authorInfoList=ref([])
 const visible = ref(false);
 const subscribeStatus = ref('')//expired --过期 unSubscribe--未订阅 subscribed--订阅中
@@ -44,6 +45,7 @@ async function getReportInfo() {
     riskLevelStatus.value=res.data.riskLevelStatus
     isSubscribe.value=res.data.isSubscribe
     isFree.value=res.data.isFree
+    pdfUrl.value = 'https://weapp.htfutures.com/pdf/aggregate/' + reportInfo.value.pdfUrl.split('aggregate/')[1]
     subscribeStatus.value=res.data.subscribeStatus
     authorInfoList.value= res.data.authorInfo
     getAuthorFollowState()
@@ -153,14 +155,14 @@ function handleGoTestRisk(){
 
 //跳转购买
 function goPrimary(){
-  wx.miniProgram.reLaunch({
+  wx.miniProgram.navigateTo({
     url: `/pages-order/payPage/index?id=${productId}`
   })
 }
 
 // 跳转研究员详情页
 function goDetails(item){
-  wx.miniProgram.reLaunch({
+  wx.miniProgram.navigateTo({
     url:'/pages-user/authordetail/index?id='+item.id
   })
 }
@@ -212,7 +214,7 @@ function goDetails(item){
       <div>{{ reportInfo.abstract }}</div>
     </div>
     <div class="report-content">
-      <preview-PDF :url="reportInfo.pdfUrl" v-if="reportInfo.pdfUrl" />
+      <preview-PDF :url="pdfUrl" v-if="pdfUrl" />
     </div>
     <!-- 右侧悬浮操作栏 -->
     <div class="right-fix-box">
@@ -291,7 +293,7 @@ function goDetails(item){
       <div class="authorList-box" v-for="(item, index) in authorInfoList" :key="index">
         <div class="img-list-box" @click="goDetails(item)">
           <img
-            :src="authorInfoList?.[0].headImgUrl|| defaultImg"
+            :src="item?.headImgUrl|| defaultImg"
           />
         </div>
         <div class="name-list-box" @click="goDetails(item)">