Browse Source

研报作者为单人时,有头像显示头像

cxmo 7 tháng trước cách đây
mục cha
commit
6067b32fac
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 2 2
      src/views/report/Detail.vue
  2. 2 2
      src/views/report/HT_PDF.vue

+ 2 - 2
src/views/report/Detail.vue

@@ -53,11 +53,11 @@ async function getReportInfo() {
     reportId: reportId
   })
   if (res.Ret === 200&&res.ErrCode===0) {
-    const {detail} = res.data
+    const {detail,authorInfo} = res.data
     reportInfo.value = {
         Author:detail.author,
         AuthorId:1,
-        AuthorImg:'',
+        AuthorImg:authorInfo?.length>1?'':authorInfo[0].headImgUrl,
         IsFollowed:false,
         PublishTime:detail.publishTime,
         Abstract:detail.abstract,

+ 2 - 2
src/views/report/HT_PDF.vue

@@ -29,10 +29,10 @@ async function getReportInfo() {
     reportId: reportId
   })
   if (res.Ret === 200&&res.ErrCode===0) {
-    const {author,publishedTime,pdfUrl,title,abstract} = res.data
+    const {author,publishedTime,pdfUrl,title,abstract,authorInfo} = res.data
     reportInfo.value = {
         Author:author,
-        AuthorImg:'',
+        AuthorImg:authorInfo?.length>1?'':authorInfo[0].headImgUrl,
         IsFollowed:false,
         PublishTime:publishedTime,
         Abstract:abstract,