xugenyuan

ref |> 解决精选评论列表点击无法进入相应详情页问题

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
@@ -88,6 +88,9 @@ export class ProcessUtils { @@ -88,6 +88,9 @@ export class ProcessUtils {
88 return; 88 return;
89 } 89 }
90 let type = content.objectType; 90 let type = content.objectType;
  91 + if (typeof type == "number") {
  92 + type = `${type}`
  93 + }
91 console.log(TAG, 'objectType', `${JSON.stringify(content)}`); 94 console.log(TAG, 'objectType', `${JSON.stringify(content)}`);
92 switch (type) { 95 switch (type) {
93 case ContentConstants.TYPE_NONE: 96 case ContentConstants.TYPE_NONE:
@@ -105,6 +105,9 @@ export class commentItemModel { @@ -105,6 +105,9 @@ export class commentItemModel {
105 targetRelObjectId: string = ''; 105 targetRelObjectId: string = '';
106 targetRelType: string = ''; 106 targetRelType: string = '';
107 targetType: string = ''; 107 targetType: string = '';
  108 + h5Url: string = '';
  109 + pageId: string = '';
  110 + topicType: string = '';
108 visitorComment: string = ''; 111 visitorComment: string = '';
109 shareInfo: commentItemShareInfoModel = new commentItemShareInfoModel; 112 shareInfo: commentItemShareInfoModel = new commentItemShareInfoModel;
110 api_commentId: string = ''; 113 api_commentId: string = '';
@@ -9,7 +9,8 @@ import { EmptyComponent, WDViewDefaultType } from '../../view/EmptyComponent' @@ -9,7 +9,8 @@ import { EmptyComponent, WDViewDefaultType } from '../../view/EmptyComponent'
9 import NoMoreLayout from '../../page/NoMoreLayout' 9 import NoMoreLayout from '../../page/NoMoreLayout'
10 import { CommentCustomDialog } from './CommentCustomDialog' 10 import { CommentCustomDialog } from './CommentCustomDialog'
11 import { publishCommentModel } from '../model/PublishCommentModel' 11 import { publishCommentModel } from '../model/PublishCommentModel'
12 -import { WDRouterPage, WDRouterRule } from 'wdRouter/Index' 12 +import { ProcessUtils, WDRouterPage, WDRouterRule } from 'wdRouter/Index'
  13 +import { ContentDTO } from 'wdBean/Index'
13 14
14 const TAG = 'QualityCommentsComponent'; 15 const TAG = 'QualityCommentsComponent';
15 16
@@ -355,6 +356,9 @@ struct QualityCommentItem { @@ -355,6 +356,9 @@ struct QualityCommentItem {
355 Image($r('app.media.more')).width(12).height(12) 356 Image($r('app.media.more')).width(12).height(12)
356 357
357 }.width('100%').height(40).justifyContent(FlexAlign.SpaceBetween) 358 }.width('100%').height(40).justifyContent(FlexAlign.SpaceBetween)
  359 + .onClick(() => {
  360 + this.jumpToDetail()
  361 + })
358 362
359 } 363 }
360 .backgroundColor('#F9F9F9') 364 .backgroundColor('#F9F9F9')
@@ -418,6 +422,22 @@ struct QualityCommentItem { @@ -418,6 +422,22 @@ struct QualityCommentItem {
418 } 422 }
419 423
420 } 424 }
  425 +
  426 + jumpToDetail() {
  427 + // programInfoModel.api_isCommentAction = YES;
  428 +
  429 + let program: ContentDTO = {
  430 + objectId: this.item.targetId,
  431 + objectType: this.item.targetType,
  432 + relId: this.item.targetRelId,
  433 + relType: this.item.targetRelType,
  434 + // objectLevel: this.item.topicType,
  435 + pageId: this.item.pageId,
  436 + linkUrl: this.item.h5Url,
  437 + } as ContentDTO
  438 +
  439 + ProcessUtils.processPage(program)
  440 + }
421 } 441 }
422 442
423 function commentLikeChange(item: commentItemModel) { 443 function commentLikeChange(item: commentItemModel) {