陈剑华

图片预览,评论跳转

... ... @@ -133,7 +133,7 @@ export class ProcessUtils {
Logger.debug(TAG, `gotoWeb, ${content.objectId}`);
}
private static gotoWeb(content: ContentDTO) {
static gotoWeb(content: ContentDTO) {
let taskAction: Action = {
type: 'JUMP_INNER_NEW_PAGE',
params: {
... ... @@ -143,7 +143,8 @@ export class ProcessUtils {
relType: content?.relType,
relId: content?.relId,
channelId: content?.channelId,
sourcePage: '5'
sourcePage: '5',
commentId: content?.commentInfo?.commentId
} as ExtraDTO
} as Params,
};
... ...
... ... @@ -15,4 +15,5 @@ export interface ExtraDTO extends ItemDTO {
relType: string;
liveStreamType?: number;
photoList: PhotoListBean[];
commentId?: string;
}
\ No newline at end of file
... ...
... ... @@ -3,5 +3,6 @@ export interface commentInfo {
newsTitle: string,
userName: string,
userHeaderUrl: string,
publishTime: number
publishTime: number,
commentId: string
}
\ No newline at end of file
... ...
import { ContentDTO, FullColumnImgUrlDTO } from 'wdBean';
import { ContentDTO, FullColumnImgUrlDTO, PhotoListBean } from 'wdBean';
import { RmhTitle } from '../cardCommon/RmhTitle'
import { ProcessUtils } from 'wdRouter';
import { CommonConstants } from 'wdConstant/Index';
... ... @@ -92,8 +92,17 @@ export struct Card19Component {
}
// 图片-从无图到9图展示
createImg({ fullColumnImgUrls: this.contentDTO.fullColumnImgUrls })
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.contentDTO)
.onClick(() => {
const photoList: PhotoListBean[] = this.contentDTO.fullColumnImgUrls.map(item => {
const photo: PhotoListBean = {
width: item.weight,
height: item.height,
picPath: item.fullUrl,
picDesc: ''
}
return photo
})
ProcessUtils.gotoMultiPictureListPage(photoList)
})
//TODO 底部的:分享、评论、点赞 功能;需要引用一个公共组件
}
... ... @@ -103,6 +112,9 @@ export struct Card19Component {
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
})
.onClick((event: ClickEvent) => {
ProcessUtils.processPage(this.contentDTO)
})
}
}
... ...
... ... @@ -68,6 +68,9 @@ export struct ZhSingleRow06 {
.backgroundColor(0xf9f9f9)
.borderRadius(4)
.margin({bottom: 12})
.onClick(() => {
ProcessUtils.gotoWeb(this.compDTO.operDataList[0])
})
Row() {
Text(DateTimeUtils.getCommentTime(this.compDTO.operDataList[0]?.commentInfo?.publishTime))
... ... @@ -97,9 +100,6 @@ export struct ZhSingleRow06 {
.backgroundColor($r('app.color.white'))
.margin({ bottom: 8 })
.height(251)
.onClick(() => {
WDRouterRule.jumpWithPage(WDRouterPage.QualityCommentsPage)
})
}
@Builder
... ... @@ -128,6 +128,9 @@ export struct ZhSingleRow06 {
.width(14)
.height(14)
}
.onClick(() => {
WDRouterRule.jumpWithPage(WDRouterPage.QualityCommentsPage)
})
}
.margin({bottom: 10})
.justifyContent(FlexAlign.SpaceBetween)
... ...