|
@@ -81,7 +81,7 @@
|
|
<div style="padding: 0.6rem; box-sizing: border-box; overflow: hidden">
|
|
<div style="padding: 0.6rem; box-sizing: border-box; overflow: hidden">
|
|
|
|
|
|
<!-- 章节报告 -->
|
|
<!-- 章节报告 -->
|
|
- <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 class="chapter-item" v-for="item in reportInfo.ChapterList" :key="item.ReportChapterId">
|
|
<div style="margin-bottom:10px">
|
|
<div style="margin-bottom:10px">
|
|
<span class="type" v-if="item.TypeName">{{item.TypeName}}</span>
|
|
<span class="type" v-if="item.TypeName">{{item.TypeName}}</span>
|
|
@@ -89,9 +89,9 @@
|
|
</div>
|
|
</div>
|
|
<div id="resetcss" style="overflow:hidden;" v-html="item.Content"></div>
|
|
<div id="resetcss" style="overflow:hidden;" v-html="item.Content"></div>
|
|
</div>
|
|
</div>
|
|
- </div>
|
|
|
|
|
|
+ </div> -->
|
|
|
|
|
|
- <div id="resetcss" style="overflow:hidden;" v-else>
|
|
|
|
|
|
+ <div id="resetcss" style="overflow:hidden;">
|
|
<ul>
|
|
<ul>
|
|
<li v-for="(html,index) in realContent" :key="index" v-html="html"></li>
|
|
<li v-for="(html,index) in realContent" :key="index" v-html="html"></li>
|
|
</ul>
|
|
</ul>
|
|
@@ -165,9 +165,10 @@
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
reportDetail,
|
|
reportDetail,
|
|
|
|
+ getShareInfo
|
|
} from "@/api/api.js";
|
|
} from "@/api/api.js";
|
|
import _ from 'lodash';
|
|
import _ from 'lodash';
|
|
-import wxShare from '../utils/wxShare.js';
|
|
|
|
|
|
+import {wxShare,injectSdk} from '../utils/wxShare.js';
|
|
|
|
|
|
import AudioPlay from './audioPlay.vue';
|
|
import AudioPlay from './audioPlay.vue';
|
|
import { Watermark,BlindWatermark } from 'watermark-js-plus'
|
|
import { Watermark,BlindWatermark } from 'watermark-js-plus'
|
|
@@ -189,11 +190,15 @@ export default {
|
|
Disclaimer:''
|
|
Disclaimer:''
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- mounted() {
|
|
|
|
|
|
+ created() {
|
|
wx.ready(function(){
|
|
wx.ready(function(){
|
|
- wx.hideOptionMenu();
|
|
|
|
|
|
+ wx.hideOptionMenu();
|
|
});
|
|
});
|
|
- this.getreportdetail();
|
|
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+ // injectSdk().then(res => {
|
|
|
|
+ this.getShareData()
|
|
|
|
+ // })
|
|
window.addEventListener('scroll', this.loadMoreHandle);
|
|
window.addEventListener('scroll', this.loadMoreHandle);
|
|
},
|
|
},
|
|
|
|
|
|
@@ -241,6 +246,13 @@ export default {
|
|
.css({ display: "block", whiteSpace: "pre-wrap" });
|
|
.css({ display: "block", whiteSpace: "pre-wrap" });
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ async getShareData() {
|
|
|
|
+ let res = await getShareInfo({ ReportCode: this.id })
|
|
|
|
+ if(res.Ret !== 200) return
|
|
|
|
+
|
|
|
|
+ wxShare(document.location.href,res.Data.H5ShareName||document.title,res.Data.H5ShareTitle,res.Data.H5ReportShareImg,0);
|
|
|
|
+ this.getreportdetail()
|
|
|
|
+ },
|
|
showTips() {
|
|
showTips() {
|
|
//免责声明显示
|
|
//免责声明显示
|
|
$("#tipsAlert").animate({ top: 0 });
|
|
$("#tipsAlert").animate({ top: 0 });
|
|
@@ -280,16 +292,16 @@ export default {
|
|
document.title=(Data && Data.H5ShareName) || "研报"
|
|
document.title=(Data && Data.H5ShareName) || "研报"
|
|
if (Ret !== 200) return
|
|
if (Ret !== 200) return
|
|
// console.log('data',Data)
|
|
// console.log('data',Data)
|
|
- let H5ShareName = Data.H5ShareName
|
|
|
|
- let H5ReportShareImg = Data.H5ReportShareImg
|
|
|
|
- let wxShareTitle=!!Data.Hz?
|
|
|
|
- '【第'+Data.Report.Stage+'期|FICC'+'】'+Data.Report.Title+'('+Data.Report.CreateTime.substring(5,7)+Data.Report.CreateTime.substring(8,10)+')':
|
|
|
|
- Data.Report.Title+'('+Data.Report.CreateTime.substring(5,7)+Data.Report.CreateTime.substring(8,10)+')'
|
|
|
|
|
|
+ // let H5ShareName = Data.H5ShareName
|
|
|
|
+ // let H5ReportShareImg = Data.H5ReportShareImg
|
|
|
|
+ // let wxShareTitle=!!Data.Hz?
|
|
|
|
+ // '【第'+Data.Report.Stage+'期|FICC'+'】'+Data.Report.Title+'('+Data.Report.CreateTime.substring(5,7)+Data.Report.CreateTime.substring(8,10)+')':
|
|
|
|
+ // Data.Report.Title+'('+Data.Report.CreateTime.substring(5,7)+Data.Report.CreateTime.substring(8,10)+')'
|
|
this.reportInfo = Data.Report;
|
|
this.reportInfo = Data.Report;
|
|
this.Disclaimer = Data.Disclaimer||'';
|
|
this.Disclaimer = Data.Disclaimer||'';
|
|
this.isshow = true;
|
|
this.isshow = true;
|
|
|
|
|
|
- this.splitContentHandle(this.reportInfo.Content);
|
|
|
|
|
|
+ this.splitContentHandle();
|
|
|
|
|
|
$(document).on("click", "#resetcss img", function (event) {
|
|
$(document).on("click", "#resetcss img", function (event) {
|
|
let imgArray = [];
|
|
let imgArray = [];
|
|
@@ -303,7 +315,7 @@ export default {
|
|
wx.previewImage({ current: curImageSrc, urls: imgArray });
|
|
wx.previewImage({ current: curImageSrc, urls: imgArray });
|
|
}
|
|
}
|
|
});
|
|
});
|
|
- wxShare(document.location.href,H5ShareName || document.title,wxShareTitle,H5ReportShareImg,0);
|
|
|
|
|
|
+
|
|
//水印
|
|
//水印
|
|
localStorage.setItem('waterMarkStr',this.$route.query.flag||'')
|
|
localStorage.setItem('waterMarkStr',this.$route.query.flag||'')
|
|
const temwaterMarkStr=this.$route.query.flag||localStorage.getItem('waterMarkStr')
|
|
const temwaterMarkStr=this.$route.query.flag||localStorage.getItem('waterMarkStr')
|
|
@@ -350,12 +362,22 @@ export default {
|
|
|
|
|
|
|
|
|
|
/*内容分割*/
|
|
/*内容分割*/
|
|
- splitContentHandle(content) {
|
|
|
|
|
|
+ splitContentHandle() {
|
|
|
|
+ let content='';
|
|
|
|
+ if(this.reportInfo.HasChapter===1) {
|
|
|
|
+ this.reportInfo.ChapterList.forEach(item => {
|
|
|
|
+ content+=item.Content
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ content = this.reportInfo.Content;
|
|
|
|
+ }
|
|
|
|
+
|
|
const arr = content.split("</p>");
|
|
const arr = content.split("</p>");
|
|
this.totalContent = arr.map((_) => _ + "</p>");
|
|
this.totalContent = arr.map((_) => _ + "</p>");
|
|
this.realContent = this.totalContent.slice(0, this.pageSize);
|
|
this.realContent = this.totalContent.slice(0, this.pageSize);
|
|
this.total_page = parseInt(this.totalContent.length / this.pageSize) + 1;
|
|
this.total_page = parseInt(this.totalContent.length / this.pageSize) + 1;
|
|
// console.log(this.realContent, this.totalContent);
|
|
// console.log(this.realContent, this.totalContent);
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
/* 加载下一页内容 */
|
|
/* 加载下一页内容 */
|