Karsa 10 月之前
父節點
當前提交
8defa4e061
共有 2 個文件被更改,包括 10 次插入7 次删除
  1. 6 3
      src/views/report/reportDetail.vue
  2. 4 4
      src/views/smartReport/detail.vue

+ 6 - 3
src/views/report/reportDetail.vue

@@ -288,9 +288,8 @@ export default {
         this.reportInfo = Data.Report;
         this.Disclaimer = Data.Disclaimer||'';
         this.isshow = true;
-        wxShare(document.location.href,H5ShareName || document.title,wxShareTitle,H5ReportShareImg,0);
 
-        this.splitContentHandle();
+        this.splitContentHandle(document.location.href,H5ShareName || document.title,wxShareTitle,H5ReportShareImg,0);
 
         $(document).on("click", "#resetcss img", function (event) {
           let imgArray = [];
@@ -351,7 +350,7 @@ export default {
 
 
     /*内容分割*/
-    splitContentHandle() {
+    splitContentHandle(shareurl,title,desc,imgurl,hide) {
       let content='';
       if(this.reportInfo.HasChapter===1) {
         this.reportInfo.ChapterList.forEach(item => {
@@ -366,6 +365,10 @@ export default {
       this.realContent = this.totalContent.slice(0, this.pageSize);
       this.total_page = parseInt(this.totalContent.length / this.pageSize) + 1;
       // console.log(this.realContent, this.totalContent);
+
+      this.$nextTick(() => {
+          wxShare(shareurl,title,desc,imgurl,hide);
+      })
     },
 
     /* 加载下一页内容 */

+ 4 - 4
src/views/smartReport/detail.vue

@@ -31,7 +31,7 @@
         </div>
 
         <!-- 章节报告 -->
-        <!-- <div class="chapter-wrap" v-if="reportInfo.HasChapter===1">
+        <div class="chapter-wrap" v-if="reportInfo.HasChapter===1">
           <div class="chapter-item" v-for="item in reportInfo.ChapterList" :key="item.ReportChapterId">
             <div style="margin-bottom:10px">
               <span class="type" v-if="item.TypeName">{{item.TypeName}}</span>
@@ -39,8 +39,8 @@
             </div>
             <div id="resetcss" style="overflow:hidden;" v-html="item.Content"></div>
           </div>
-        </div> -->
-        <div id="resetcss" style="overflow:hidden;" v-html="reportInfo.Content"></div>
+        </div>
+        <div id="resetcss" style="overflow:hidden;" v-html="reportInfo.Content" v-else></div>
 
         <div class="html-end-img-box" v-if="reportInfo && !!reportInfo.NeedSplice && reportInfo.EndImg">
           <img :src="reportInfo.EndImg" alt="" style="display:block;width:100%">
@@ -186,7 +186,7 @@ export default {
 
       wxShare(document.location.href, H5ShareName || document.title, wxShareTitle, H5ReportShareImg, 0);
 
-      this.splitContentHandle();
+      // this.splitContentHandle();
 
       $(document).on("click", "#resetcss img", function (event) {
         let imgArray = [];