chenqs

fix |> 修复精选评论卡下的评论跳转到对应话题专题页无法显示专题内容

... ... @@ -142,6 +142,24 @@ export class ProcessUtils {
content.traceInfo = compDTO.traceInfo
return content
}
static commentBeanToContentBean(comment:commentInfo){
if(comment == null){
return
}
let content = new ContentDTO()
content.objectType = comment.objectType||'0'
content.objectLevel = comment.objectLevel
content.objectId = comment.newsId
content.pageId = comment.pageId||''
content.newsTitle = comment.newsTitle
content.linkUrl = comment.linkUrl
content.relId = comment.relId
content.relType = comment.relType
content.commentInfo = comment
return content
}
/**
* 页面跳转
*/
... ... @@ -241,6 +259,8 @@ export class ProcessUtils {
extra: {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
... ... @@ -310,7 +330,9 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
channelId: content?.channelId,
pageId: content?.pageId
pageId: content?.pageId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
... ... @@ -336,6 +358,10 @@ export class ProcessUtils {
type: 'JUMP_H5_BY_WEB_VIEW',
params: {
url: content.linkUrl,
extra: {
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
... ... @@ -351,21 +377,28 @@ export class ProcessUtils {
}
static commentGotoWeb(content: commentInfo) {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
params: {
contentID: content?.newsId,
pageID: 'IMAGE_TEXT_DETAIL',
extra: {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentId
} as ExtraDTO
} as Params,
};
WDRouterRule.jumpWithAction(taskAction)
Logger.debug(TAG, `commentGotoWeb, ${content.newsId}`);
let contentBean = ProcessUtils.commentBeanToContentBean(content)
if(contentBean == null){
return
}
ProcessUtils.processPage(contentBean)
// let taskAction: Action = {
// type: 'JUMP_INNER_NEW_PAGE',
// params: {
// contentID: content?.newsId,
// url:content?.linkUrl,
// pageID: 'IMAGE_TEXT_DETAIL',
// extra: {
// relType: content?.relType,
// relId: content?.relId,
// sourcePage: '5',
// commentId: content?.commentId
// } as ExtraDTO
// } as Params,
// };
// WDRouterRule.jumpWithAction(taskAction)
// Logger.debug(TAG, `commentGotoWeb, ${content.newsId}`);
}
public static gotoWeb(content: ContentDTO) {
... ... @@ -399,6 +432,8 @@ export class ProcessUtils {
extra: {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
... ... @@ -420,6 +455,8 @@ export class ProcessUtils {
extra: {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO
} as Params,
};
... ... @@ -460,7 +497,9 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
extra: content?.extra,
title: content?.newsTitle
title: content?.newsTitle,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO
} as Params,
};
... ... @@ -481,6 +520,8 @@ export class ProcessUtils {
extra: {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO,
targetLayout: content.customParamTargetLayout
} as Params,
... ...
... ... @@ -12,5 +12,11 @@ export interface commentInfo {
relType: string;
newsType?: string,
objectType?: string,
userType?: number
objectLevel: string,
userType?: number,
leaderArticle?: number,
linkUrl: string,
newsCoverUrl: string,
normalLinkUrl: string,
pageId: string
}
... ...
... ... @@ -420,6 +420,7 @@ class CommentViewModel {
newModel.fromUserHeader = model.fromUserHeader
newModel.fromUserId = model.fromUserId
newModel.fromUserName = model.fromUserName
newModel.h5Url = model.h5Url
if (model.fromUserType) {
newModel.fromUserType = model.fromUserType
}
... ...