Showing
3 changed files
with
67 additions
and
19 deletions
| @@ -142,6 +142,24 @@ export class ProcessUtils { | @@ -142,6 +142,24 @@ 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 | + return content | ||
| 161 | + } | ||
| 162 | + | ||
| 145 | /** | 163 | /** |
| 146 | * 页面跳转 | 164 | * 页面跳转 |
| 147 | */ | 165 | */ |
| @@ -241,6 +259,8 @@ export class ProcessUtils { | @@ -241,6 +259,8 @@ export class ProcessUtils { | ||
| 241 | extra: { | 259 | extra: { |
| 242 | relType: content?.relType, | 260 | relType: content?.relType, |
| 243 | relId: content?.relId, | 261 | relId: content?.relId, |
| 262 | + sourcePage: '5', | ||
| 263 | + commentId: content?.commentInfo?.commentId | ||
| 244 | } as ExtraDTO, | 264 | } as ExtraDTO, |
| 245 | targetLayout: content.customParamTargetLayout | 265 | targetLayout: content.customParamTargetLayout |
| 246 | } as Params, | 266 | } as Params, |
| @@ -310,7 +330,9 @@ export class ProcessUtils { | @@ -310,7 +330,9 @@ export class ProcessUtils { | ||
| 310 | relType: content?.relType, | 330 | relType: content?.relType, |
| 311 | relId: content?.relId, | 331 | relId: content?.relId, |
| 312 | channelId: content?.channelId, | 332 | channelId: content?.channelId, |
| 313 | - pageId: content?.pageId | 333 | + pageId: content?.pageId, |
| 334 | + sourcePage: '5', | ||
| 335 | + commentId: content?.commentInfo?.commentId | ||
| 314 | } as ExtraDTO, | 336 | } as ExtraDTO, |
| 315 | targetLayout: content.customParamTargetLayout | 337 | targetLayout: content.customParamTargetLayout |
| 316 | } as Params, | 338 | } as Params, |
| @@ -336,6 +358,10 @@ export class ProcessUtils { | @@ -336,6 +358,10 @@ export class ProcessUtils { | ||
| 336 | type: 'JUMP_H5_BY_WEB_VIEW', | 358 | type: 'JUMP_H5_BY_WEB_VIEW', |
| 337 | params: { | 359 | params: { |
| 338 | url: content.linkUrl, | 360 | url: content.linkUrl, |
| 361 | + extra: { | ||
| 362 | + sourcePage: '5', | ||
| 363 | + commentId: content?.commentInfo?.commentId | ||
| 364 | + } as ExtraDTO | ||
| 339 | } as Params, | 365 | } as Params, |
| 340 | }; | 366 | }; |
| 341 | WDRouterRule.jumpWithAction(taskAction) | 367 | WDRouterRule.jumpWithAction(taskAction) |
| @@ -351,21 +377,28 @@ export class ProcessUtils { | @@ -351,21 +377,28 @@ export class ProcessUtils { | ||
| 351 | } | 377 | } |
| 352 | 378 | ||
| 353 | static commentGotoWeb(content: commentInfo) { | 379 | 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}`); | 380 | + |
| 381 | + let contentBean = ProcessUtils.commentBeanToContentBean(content) | ||
| 382 | + if(contentBean == null){ | ||
| 383 | + return | ||
| 384 | + } | ||
| 385 | + ProcessUtils.processPage(contentBean) | ||
| 386 | + // let taskAction: Action = { | ||
| 387 | + // type: 'JUMP_INNER_NEW_PAGE', | ||
| 388 | + // params: { | ||
| 389 | + // contentID: content?.newsId, | ||
| 390 | + // url:content?.linkUrl, | ||
| 391 | + // pageID: 'IMAGE_TEXT_DETAIL', | ||
| 392 | + // extra: { | ||
| 393 | + // relType: content?.relType, | ||
| 394 | + // relId: content?.relId, | ||
| 395 | + // sourcePage: '5', | ||
| 396 | + // commentId: content?.commentId | ||
| 397 | + // } as ExtraDTO | ||
| 398 | + // } as Params, | ||
| 399 | + // }; | ||
| 400 | + // WDRouterRule.jumpWithAction(taskAction) | ||
| 401 | + // Logger.debug(TAG, `commentGotoWeb, ${content.newsId}`); | ||
| 369 | } | 402 | } |
| 370 | 403 | ||
| 371 | public static gotoWeb(content: ContentDTO) { | 404 | public static gotoWeb(content: ContentDTO) { |
| @@ -399,6 +432,8 @@ export class ProcessUtils { | @@ -399,6 +432,8 @@ export class ProcessUtils { | ||
| 399 | extra: { | 432 | extra: { |
| 400 | relType: content?.relType, | 433 | relType: content?.relType, |
| 401 | relId: content?.relId, | 434 | relId: content?.relId, |
| 435 | + sourcePage: '5', | ||
| 436 | + commentId: content?.commentInfo?.commentId | ||
| 402 | } as ExtraDTO, | 437 | } as ExtraDTO, |
| 403 | targetLayout: content.customParamTargetLayout | 438 | targetLayout: content.customParamTargetLayout |
| 404 | } as Params, | 439 | } as Params, |
| @@ -420,6 +455,8 @@ export class ProcessUtils { | @@ -420,6 +455,8 @@ export class ProcessUtils { | ||
| 420 | extra: { | 455 | extra: { |
| 421 | relType: content?.relType, | 456 | relType: content?.relType, |
| 422 | relId: content?.relId, | 457 | relId: content?.relId, |
| 458 | + sourcePage: '5', | ||
| 459 | + commentId: content?.commentInfo?.commentId | ||
| 423 | } as ExtraDTO | 460 | } as ExtraDTO |
| 424 | } as Params, | 461 | } as Params, |
| 425 | }; | 462 | }; |
| @@ -460,7 +497,9 @@ export class ProcessUtils { | @@ -460,7 +497,9 @@ export class ProcessUtils { | ||
| 460 | relType: content?.relType, | 497 | relType: content?.relType, |
| 461 | relId: content?.relId, | 498 | relId: content?.relId, |
| 462 | extra: content?.extra, | 499 | extra: content?.extra, |
| 463 | - title: content?.newsTitle | 500 | + title: content?.newsTitle, |
| 501 | + sourcePage: '5', | ||
| 502 | + commentId: content?.commentInfo?.commentId | ||
| 464 | } as ExtraDTO | 503 | } as ExtraDTO |
| 465 | } as Params, | 504 | } as Params, |
| 466 | }; | 505 | }; |
| @@ -481,6 +520,8 @@ export class ProcessUtils { | @@ -481,6 +520,8 @@ export class ProcessUtils { | ||
| 481 | extra: { | 520 | extra: { |
| 482 | relType: content?.relType, | 521 | relType: content?.relType, |
| 483 | relId: content?.relId, | 522 | relId: content?.relId, |
| 523 | + sourcePage: '5', | ||
| 524 | + commentId: content?.commentInfo?.commentId | ||
| 484 | } as ExtraDTO, | 525 | } as ExtraDTO, |
| 485 | targetLayout: content.customParamTargetLayout | 526 | targetLayout: content.customParamTargetLayout |
| 486 | } as Params, | 527 | } 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 | } |
-
Please register or login to post a comment