|
@@ -11,12 +11,12 @@ const route = useRoute()
|
|
|
// 获取系统配置
|
|
|
let systemConfig = null
|
|
|
function getSystemConfig() {
|
|
|
- apiCommon.systemConfig().then(res => {
|
|
|
+ /* apiCommon.systemConfig().then(res => {
|
|
|
if (res.Ret === 200) {
|
|
|
systemConfig = res.Data
|
|
|
console.log(res.Data);
|
|
|
}
|
|
|
- })
|
|
|
+ }) */
|
|
|
}
|
|
|
getSystemConfig()
|
|
|
|
|
@@ -35,8 +35,6 @@ const reportId = route.query.reportid
|
|
|
const reportInfo = ref(null)
|
|
|
const reportContent = ref('')
|
|
|
const reportStatus = ref(4)//1已过期,2没有该品种权限,3没有权限,4有权限,5未绑定
|
|
|
-const reportCollected = ref(false)//报告是否收藏
|
|
|
-const isBind=ref(false)
|
|
|
const headImgStyle=ref([])
|
|
|
const endImgStyle=ref([])
|
|
|
const layoutBaseInfo=ref({
|
|
@@ -97,7 +95,7 @@ const mockSmartReportInfo = {
|
|
|
async function getReportInfo() {
|
|
|
//获取研报详情
|
|
|
//根据AuthorId获取研究员详情 及关注状态
|
|
|
- reportInfo.value = mockReportInfo
|
|
|
+ /* reportInfo.value = mockReportInfo
|
|
|
reportInfo.value.IsFollowed = false
|
|
|
headImgStyle.value=[]
|
|
|
endImgStyle.value=[]
|
|
@@ -106,22 +104,32 @@ async function getReportInfo() {
|
|
|
layoutBaseInfo.value['创建时间']=reportInfo.value.PublishTime
|
|
|
reportContent.value = modifyReportContentIframeData(reportInfo.value.Content)
|
|
|
splitReportContent(reportContent.value)
|
|
|
- return
|
|
|
+ return */
|
|
|
|
|
|
if (!reportId) return
|
|
|
const res = await apiReport.getReportDetail({
|
|
|
- ReportId: Number(reportId)
|
|
|
+ reportId: reportId
|
|
|
})
|
|
|
- if (res.Ret === 200) {
|
|
|
- reportInfo.value = res.Data.Report
|
|
|
- reportStatus.value = res.Data.Status
|
|
|
- reportCollected.value = res.Data.IsCollect || false
|
|
|
- isBind.value=res.Data.IsSignIn
|
|
|
- headImgStyle.value=res.Data.Report.HeadResource.Style?JSON.parse(res.Data.Report.HeadResource.Style):[]
|
|
|
- endImgStyle.value=res.Data.Report.EndResource.Style?JSON.parse(res.Data.Report.EndResource.Style):[]
|
|
|
- layoutBaseInfo.value['研报标题']=res.Data.Report.Title
|
|
|
- layoutBaseInfo.value['研报作者']=res.Data.Report.Author
|
|
|
- layoutBaseInfo.value['创建时间']=res.Data.Report.PublishTime
|
|
|
+ if (res.Ret === 200&&res.ErrCode===0) {
|
|
|
+ const {detail} = res.data
|
|
|
+ reportInfo.value = {
|
|
|
+ Author:detail.author,
|
|
|
+ AuthorId:1,
|
|
|
+ AuthorImg:'',
|
|
|
+ IsFollowed:false,
|
|
|
+ PublishTime:detail.publishTime,
|
|
|
+ Abstract:detail.abstract,
|
|
|
+ Title:detail.title,
|
|
|
+ Content:detail.content,
|
|
|
+ HasChapter:Boolean(detail.hasChapter),
|
|
|
+ HeadResource:detail.headResource,
|
|
|
+ EndResource:detail.endResource
|
|
|
+ }
|
|
|
+ headImgStyle.value=reportInfo.value.HeadResource.Style?JSON.parse(reportInfo.value.Style):[]
|
|
|
+ endImgStyle.value=reportInfo.value.EndResource.Style?JSON.parse(reportInfo.value.EndResource.Style):[]
|
|
|
+ layoutBaseInfo.value['研报标题']=reportInfo.value.Title
|
|
|
+ layoutBaseInfo.value['研报作者']=reportInfo.value.Author
|
|
|
+ layoutBaseInfo.value['创建时间']=reportInfo.value.PublishTime
|
|
|
|
|
|
|
|
|
nextTick(() => {
|
|
@@ -132,22 +140,13 @@ async function getReportInfo() {
|
|
|
// 设置分享文案
|
|
|
wx.miniProgram.postMessage({
|
|
|
data: {
|
|
|
- title: res.Data.Report.Title
|
|
|
+ title: reportInfo.value.Title
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- await getUserInfo()
|
|
|
- if (res.Data.Status === 4) {
|
|
|
- if (userInfo.Status === 2 && userInfo.HasPermission === '私有权限') {
|
|
|
- reportInfo.value.Content=modifyReportContentIframeData(reportInfo.value.Content)
|
|
|
- formatIframeData()
|
|
|
- }else{
|
|
|
- reportContent.value = modifyReportContentIframeData(reportInfo.value.Content)
|
|
|
- splitReportContent(reportContent.value)
|
|
|
- }
|
|
|
- } else {//无权限
|
|
|
- reportContent.value = modifyReportContentIframeData(reportInfo.value.ContentSub)
|
|
|
- }
|
|
|
+ //await getUserInfo()
|
|
|
+ reportContent.value = modifyReportContentIframeData(reportInfo.value.Content)
|
|
|
+ splitReportContent(reportContent.value)
|
|
|
}
|
|
|
}
|
|
|
getReportInfo()
|