Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
5 changed files
with
70 additions
and
21 deletions
| @@ -142,6 +142,25 @@ export class ProcessUtils { | @@ -142,6 +142,25 @@ export class ProcessUtils { | ||
| 142 | content.traceInfo = compDTO.traceInfo | 142 | content.traceInfo = compDTO.traceInfo |
| 143 | return content | 143 | return content |
| 144 | } | 144 | } |
| 145 | + | ||
| 146 | + static commentBeanToContentBean(comment:commentInfo){ | ||
| 147 | + if(comment == null){ | ||
| 148 | + return | ||
| 149 | + } | ||
| 150 | + let content = new ContentDTO() | ||
| 151 | + content.objectType = comment.objectType||'0' | ||
| 152 | + content.objectLevel = comment.objectLevel | ||
| 153 | + content.objectId = comment.newsId | ||
| 154 | + content.pageId = comment.pageId||'' | ||
| 155 | + content.newsTitle = comment.newsTitle | ||
| 156 | + content.linkUrl = comment.linkUrl | ||
| 157 | + content.relId = comment.relId | ||
| 158 | + content.relType = comment.relType | ||
| 159 | + content.commentInfo = comment | ||
| 160 | + content.customParamTargetLayout = "comment" | ||
| 161 | + return content | ||
| 162 | + } | ||
| 163 | + | ||
| 145 | /** | 164 | /** |
| 146 | * 页面跳转 | 165 | * 页面跳转 |
| 147 | */ | 166 | */ |
| @@ -241,6 +260,8 @@ export class ProcessUtils { | @@ -241,6 +260,8 @@ export class ProcessUtils { | ||
| 241 | extra: { | 260 | extra: { |
| 242 | relType: content?.relType, | 261 | relType: content?.relType, |
| 243 | relId: content?.relId, | 262 | relId: content?.relId, |
| 263 | + sourcePage: '5', | ||
| 264 | + commentId: content?.commentInfo?.commentId | ||
| 244 | } as ExtraDTO, | 265 | } as ExtraDTO, |
| 245 | targetLayout: content.customParamTargetLayout | 266 | targetLayout: content.customParamTargetLayout |
| 246 | } as Params, | 267 | } as Params, |
| @@ -310,7 +331,9 @@ export class ProcessUtils { | @@ -310,7 +331,9 @@ export class ProcessUtils { | ||
| 310 | relType: content?.relType, | 331 | relType: content?.relType, |
| 311 | relId: content?.relId, | 332 | relId: content?.relId, |
| 312 | channelId: content?.channelId, | 333 | channelId: content?.channelId, |
| 313 | - pageId: content?.pageId | 334 | + pageId: content?.pageId, |
| 335 | + sourcePage: '5', | ||
| 336 | + commentId: content?.commentInfo?.commentId | ||
| 314 | } as ExtraDTO, | 337 | } as ExtraDTO, |
| 315 | targetLayout: content.customParamTargetLayout | 338 | targetLayout: content.customParamTargetLayout |
| 316 | } as Params, | 339 | } as Params, |
| @@ -336,6 +359,10 @@ export class ProcessUtils { | @@ -336,6 +359,10 @@ export class ProcessUtils { | ||
| 336 | type: 'JUMP_H5_BY_WEB_VIEW', | 359 | type: 'JUMP_H5_BY_WEB_VIEW', |
| 337 | params: { | 360 | params: { |
| 338 | url: content.linkUrl, | 361 | url: content.linkUrl, |
| 362 | + extra: { | ||
| 363 | + sourcePage: '5', | ||
| 364 | + commentId: content?.commentInfo?.commentId | ||
| 365 | + } as ExtraDTO | ||
| 339 | } as Params, | 366 | } as Params, |
| 340 | }; | 367 | }; |
| 341 | WDRouterRule.jumpWithAction(taskAction) | 368 | WDRouterRule.jumpWithAction(taskAction) |
| @@ -351,21 +378,28 @@ export class ProcessUtils { | @@ -351,21 +378,28 @@ export class ProcessUtils { | ||
| 351 | } | 378 | } |
| 352 | 379 | ||
| 353 | static commentGotoWeb(content: commentInfo) { | 380 | static commentGotoWeb(content: commentInfo) { |
| 354 | - let taskAction: Action = { | ||
| 355 | - type: 'JUMP_INNER_NEW_PAGE', | ||
| 356 | - params: { | ||
| 357 | - contentID: content?.newsId, | ||
| 358 | - pageID: 'IMAGE_TEXT_DETAIL', | ||
| 359 | - extra: { | ||
| 360 | - relType: content?.relType, | ||
| 361 | - relId: content?.relId, | ||
| 362 | - sourcePage: '5', | ||
| 363 | - commentId: content?.commentId | ||
| 364 | - } as ExtraDTO | ||
| 365 | - } as Params, | ||
| 366 | - }; | ||
| 367 | - WDRouterRule.jumpWithAction(taskAction) | ||
| 368 | - Logger.debug(TAG, `commentGotoWeb, ${content.newsId}`); | 381 | + |
| 382 | + let contentBean = ProcessUtils.commentBeanToContentBean(content) | ||
| 383 | + if(contentBean == null){ | ||
| 384 | + return | ||
| 385 | + } | ||
| 386 | + ProcessUtils.processPage(contentBean) | ||
| 387 | + // let taskAction: Action = { | ||
| 388 | + // type: 'JUMP_INNER_NEW_PAGE', | ||
| 389 | + // params: { | ||
| 390 | + // contentID: content?.newsId, | ||
| 391 | + // url:content?.linkUrl, | ||
| 392 | + // pageID: 'IMAGE_TEXT_DETAIL', | ||
| 393 | + // extra: { | ||
| 394 | + // relType: content?.relType, | ||
| 395 | + // relId: content?.relId, | ||
| 396 | + // sourcePage: '5', | ||
| 397 | + // commentId: content?.commentId | ||
| 398 | + // } as ExtraDTO | ||
| 399 | + // } as Params, | ||
| 400 | + // }; | ||
| 401 | + // WDRouterRule.jumpWithAction(taskAction) | ||
| 402 | + // Logger.debug(TAG, `commentGotoWeb, ${content.newsId}`); | ||
| 369 | } | 403 | } |
| 370 | 404 | ||
| 371 | public static gotoWeb(content: ContentDTO) { | 405 | public static gotoWeb(content: ContentDTO) { |
| @@ -399,6 +433,8 @@ export class ProcessUtils { | @@ -399,6 +433,8 @@ export class ProcessUtils { | ||
| 399 | extra: { | 433 | extra: { |
| 400 | relType: content?.relType, | 434 | relType: content?.relType, |
| 401 | relId: content?.relId, | 435 | relId: content?.relId, |
| 436 | + sourcePage: '5', | ||
| 437 | + commentId: content?.commentInfo?.commentId | ||
| 402 | } as ExtraDTO, | 438 | } as ExtraDTO, |
| 403 | targetLayout: content.customParamTargetLayout | 439 | targetLayout: content.customParamTargetLayout |
| 404 | } as Params, | 440 | } as Params, |
| @@ -420,6 +456,8 @@ export class ProcessUtils { | @@ -420,6 +456,8 @@ export class ProcessUtils { | ||
| 420 | extra: { | 456 | extra: { |
| 421 | relType: content?.relType, | 457 | relType: content?.relType, |
| 422 | relId: content?.relId, | 458 | relId: content?.relId, |
| 459 | + sourcePage: '5', | ||
| 460 | + commentId: content?.commentInfo?.commentId | ||
| 423 | } as ExtraDTO | 461 | } as ExtraDTO |
| 424 | } as Params, | 462 | } as Params, |
| 425 | }; | 463 | }; |
| @@ -460,7 +498,9 @@ export class ProcessUtils { | @@ -460,7 +498,9 @@ export class ProcessUtils { | ||
| 460 | relType: content?.relType, | 498 | relType: content?.relType, |
| 461 | relId: content?.relId, | 499 | relId: content?.relId, |
| 462 | extra: content?.extra, | 500 | extra: content?.extra, |
| 463 | - title: content?.newsTitle | 501 | + title: content?.newsTitle, |
| 502 | + sourcePage: '5', | ||
| 503 | + commentId: content?.commentInfo?.commentId | ||
| 464 | } as ExtraDTO | 504 | } as ExtraDTO |
| 465 | } as Params, | 505 | } as Params, |
| 466 | }; | 506 | }; |
| @@ -481,6 +521,8 @@ export class ProcessUtils { | @@ -481,6 +521,8 @@ export class ProcessUtils { | ||
| 481 | extra: { | 521 | extra: { |
| 482 | relType: content?.relType, | 522 | relType: content?.relType, |
| 483 | relId: content?.relId, | 523 | relId: content?.relId, |
| 524 | + sourcePage: '5', | ||
| 525 | + commentId: content?.commentInfo?.commentId | ||
| 484 | } as ExtraDTO, | 526 | } as ExtraDTO, |
| 485 | targetLayout: content.customParamTargetLayout | 527 | targetLayout: content.customParamTargetLayout |
| 486 | } as Params, | 528 | } as Params, |
| @@ -12,5 +12,11 @@ export interface commentInfo { | @@ -12,5 +12,11 @@ export interface commentInfo { | ||
| 12 | relType: string; | 12 | relType: string; |
| 13 | newsType?: string, | 13 | newsType?: string, |
| 14 | objectType?: string, | 14 | objectType?: string, |
| 15 | - userType?: number | ||
| 16 | -} | ||
| 15 | + objectLevel: string, | ||
| 16 | + userType?: number, | ||
| 17 | + leaderArticle?: number, | ||
| 18 | + linkUrl: string, | ||
| 19 | + newsCoverUrl: string, | ||
| 20 | + normalLinkUrl: string, | ||
| 21 | + pageId: string | ||
| 22 | +} |
| @@ -420,6 +420,7 @@ class CommentViewModel { | @@ -420,6 +420,7 @@ class CommentViewModel { | ||
| 420 | newModel.fromUserHeader = model.fromUserHeader | 420 | newModel.fromUserHeader = model.fromUserHeader |
| 421 | newModel.fromUserId = model.fromUserId | 421 | newModel.fromUserId = model.fromUserId |
| 422 | newModel.fromUserName = model.fromUserName | 422 | newModel.fromUserName = model.fromUserName |
| 423 | + newModel.h5Url = model.h5Url | ||
| 423 | if (model.fromUserType) { | 424 | if (model.fromUserType) { |
| 424 | newModel.fromUserType = model.fromUserType | 425 | newModel.fromUserType = model.fromUserType |
| 425 | } | 426 | } |
| @@ -20,7 +20,7 @@ struct MorningEveningPaperPage { | @@ -20,7 +20,7 @@ struct MorningEveningPaperPage { | ||
| 20 | 20 | ||
| 21 | pageTransition() { | 21 | pageTransition() { |
| 22 | // 定义页面进入时的效果,从底侧滑入 | 22 | // 定义页面进入时的效果,从底侧滑入 |
| 23 | - PageTransitionEnter({ type: RouteType.Push, duration: 300 }) | 23 | + PageTransitionEnter({ type: RouteType.Push, duration: 200 }) |
| 24 | .slide(SlideEffect.Bottom).onEnter((type: RouteType, progress: number) => { | 24 | .slide(SlideEffect.Bottom).onEnter((type: RouteType, progress: number) => { |
| 25 | if (progress >= 0.99) { | 25 | if (progress >= 0.99) { |
| 26 | // WindowModel.shared.setWindowLayoutFullScreen(true) | 26 | // WindowModel.shared.setWindowLayoutFullScreen(true) |
| @@ -4,7 +4,7 @@ import Router from '@system.router' | @@ -4,7 +4,7 @@ import Router from '@system.router' | ||
| 4 | import router from '@ohos.router' | 4 | import router from '@ohos.router' |
| 5 | import common from '@ohos.app.ability.common' | 5 | import common from '@ohos.app.ability.common' |
| 6 | import CustomDialogComponent from '../view/CustomDialogComponent' | 6 | import CustomDialogComponent from '../view/CustomDialogComponent' |
| 7 | -import preferences from '@ohos.data.preferences' | 7 | +import { preferences } from '@kit.ArkData'; |
| 8 | import { GlobalContext } from '../../utils/GlobalContext' | 8 | import { GlobalContext } from '../../utils/GlobalContext' |
| 9 | import { WDRouterRule } from 'wdRouter'; | 9 | import { WDRouterRule } from 'wdRouter'; |
| 10 | import { WDRouterPage } from 'wdRouter'; | 10 | import { WDRouterPage } from 'wdRouter'; |
-
Please register or login to post a comment