chengen02

-fix 进入文章专题页面_评论框及评论组件元素未展现

... ... @@ -203,6 +203,7 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
channelId: content?.channelId,
pageId: content?.pageId
} as ExtraDTO
} as Params,
};
... ...
... ... @@ -10,6 +10,7 @@ export interface ExtraDTO extends ItemDTO {
topicId: string;
channelId: string;
compId: string;
pageId: string;
sourcePage: string;
relId: string;
relType: string;
... ...
... ... @@ -25,5 +25,6 @@ export interface Params {
creatorId?: string; //号主id
videoUrl?: string;
videoCoverUrl?: string;
pageId?: string;
backVisibility?: boolean; //展示顶部返回栏
}
... ...
... ... @@ -12,6 +12,7 @@ import { EmptyComponent } from '../components/view/EmptyComponent';
import { NetworkUtil, WindowModel } from 'wdKit';
import { viewBlogItemInsightIntentShare } from '../utils/InsightIntentShare'
import { common } from '@kit.AbilityKit';
import { PageRepository } from '../repository/PageRepository';
const TAG: string = 'SpacialTopicPageComponent'
... ... @@ -59,7 +60,6 @@ export struct SpacialTopicPageComponent {
private async getDetail() {
this.isNetConnected = NetworkUtil.isNetConnected()
let contentId: string = ''
let relId: string = ''
let relType: string = ''
... ... @@ -74,11 +74,14 @@ export struct SpacialTopicPageComponent {
if (this.action.params.extra.relType) {
relType = this.action.params.extra.relType
}
}
let pageId = this.action.params.extra?.pageId
console.log('pageIdpageId',pageId)
if(pageId){
let pageInfoMsg = await PageRepository.fetchMorningEveningPageInfo(pageId)
let detailBeans = await DetailViewModel.getDetailPageData(relId, contentId, relType)
if (detailBeans && detailBeans.length > 0) {
this.contentDetailData = detailBeans[0];
if (detailBeans?.length > 0) {
this.contentDetailData = JSON.parse(JSON.stringify(detailBeans[0]));
this.viewBlogInsightIntentShare()
// if (this.contentDetailData[0]?.openComment) {
this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '')
... ... @@ -92,6 +95,11 @@ export struct SpacialTopicPageComponent {
// }
this.trySendData2H5()
}
if(pageInfoMsg && pageInfoMsg.data){
this.contentDetailData.openComment = Number(pageInfoMsg.data.topicInfo.commentFlag)
this.contentDetailData.commentDisplay = Number(pageInfoMsg.data.topicInfo.commentShowFlag)
}
}
}
}
... ...