瀏覽代碼

fix:章节拼接展示加iframetoken

Karsa 6 月之前
父節點
當前提交
08b7927652
共有 1 個文件被更改,包括 11 次插入1 次删除
  1. 11 1
      src/views/report/Detail.vue

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

@@ -83,8 +83,18 @@ const getReportDetail=async ()=>{
         layoutBaseInfo.value['研报作者']=res.data.report_info.author
         // 已发布已通过的报告才显示发布时间
         layoutBaseInfo.value['创建时间']=moment(res.data.report_info.publish_time).format('YYYY.MM.DD HH:mm')
+        
+        if(!res.data.report_info.has_chapter) {
+            info.value.report_info.content=addTokenToIframe(res.data.report_info.content,res.data.report_info.report_id,0)
+        }
+
+        //章节拼接报告拼接iframe token
+        if(res.data.report_info.has_chapter&&res.data.report_detail_show_type===1) {
+            res.data.report_chapter_list.forEach(chapter => {
+                chapter.content = addTokenToIframe(chapter.content,reportId.value,chapter.report_chapter_id)
+            })
+        }
 
-        info.value.report_info.content=addTokenToIframe(res.data.report_info.content,res.data.report_info.report_id,0)
         audioData.value={
             auth_ok:res.data.auth_ok,
             video_name:res.data.report_info.video_name||`${res.data.report_info.title}(${moment(res.data.report_info.publish_time).format('MMDD')})`,