Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-07-23 18:23:31 +0800
Browse Files
Options
Browse Files
Download
Plain Diff
Commit
51cbe326e457230244a43b69fdef8cac1deb353e
51cbe326
2 parents
99a54dbc
041cbaa9
Merge branch 'main' of
http://192.168.1.42/developOne/harmonyPool
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
70 additions
and
21 deletions
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
sight_harmony/products/phone/src/main/ets/pages/MorningEveningPaperPage.ets
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
51cbe32
...
...
@@ -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,
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
View file @
51cbe32
...
...
@@ -12,5 +12,11 @@ export interface commentInfo {
relType: string;
newsType?: string,
objectType?: string,
userType?: number
}
\ No newline at end of file
objectLevel: string,
userType?: number,
leaderArticle?: number,
linkUrl: string,
newsCoverUrl: string,
normalLinkUrl: string,
pageId: string
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/comment/viewmodel/CommentViewModel.ets
View file @
51cbe32
...
...
@@ -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
}
...
...
sight_harmony/products/phone/src/main/ets/pages/MorningEveningPaperPage.ets
View file @
51cbe32
...
...
@@ -20,7 +20,7 @@ struct MorningEveningPaperPage {
pageTransition() {
// 定义页面进入时的效果,从底侧滑入
PageTransitionEnter({ type: RouteType.Push, duration:
3
00 })
PageTransitionEnter({ type: RouteType.Push, duration:
2
00 })
.slide(SlideEffect.Bottom).onEnter((type: RouteType, progress: number) => {
if (progress >= 0.99) {
// WindowModel.shared.setWindowLayoutFullScreen(true)
...
...
sight_harmony/products/phone/src/main/ets/pages/launchPage/LaunchPage.ets
View file @
51cbe32
...
...
@@ -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';
...
...
Please
register
or
login
to post a comment