王士厅
... ... @@ -142,6 +142,25 @@ 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
content.customParamTargetLayout = "comment"
return content
}
/**
* 页面跳转
*/
... ... @@ -241,6 +260,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 +331,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 +359,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 +378,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 +433,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 +456,8 @@ export class ProcessUtils {
extra: {
relType: content?.relType,
relId: content?.relId,
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO
} as Params,
};
... ... @@ -460,7 +498,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 +521,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
}
... ...
... ... @@ -20,7 +20,7 @@ struct MorningEveningPaperPage {
pageTransition() {
// 定义页面进入时的效果,从底侧滑入
PageTransitionEnter({ type: RouteType.Push, duration: 300 })
PageTransitionEnter({ type: RouteType.Push, duration: 200 })
.slide(SlideEffect.Bottom).onEnter((type: RouteType, progress: number) => {
if (progress >= 0.99) {
// WindowModel.shared.setWindowLayoutFullScreen(true)
... ...
... ... @@ -4,7 +4,7 @@ import Router from '@system.router'
import router from '@ohos.router'
import common from '@ohos.app.ability.common'
import CustomDialogComponent from '../view/CustomDialogComponent'
import preferences from '@ohos.data.preferences'
import { preferences } from '@kit.ArkData';
import { GlobalContext } from '../../utils/GlobalContext'
import { WDRouterRule } from 'wdRouter';
import { WDRouterPage } from 'wdRouter';
... ...