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-04-24 14:26:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
c7f66f929fb7679231a11d63232f6a802dc9b1b4
c7f66f92
1 parent
8bb1635f
图片预览,评论跳转
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
27 additions
and
9 deletions
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
sight_harmony/commons/wdRouter/src/main/ets/utils/ProcessUtils.ets
View file @
c7f66f9
...
...
@@ -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,
};
...
...
sight_harmony/features/wdBean/src/main/ets/bean/component/extra/ExtraDTO.ts
View file @
c7f66f9
...
...
@@ -15,4 +15,5 @@ export interface ExtraDTO extends ItemDTO {
relType
:
string
;
liveStreamType
?:
number
;
photoList
:
PhotoListBean
[];
commentId
?:
string
;
}
\ No newline at end of file
...
...
sight_harmony/features/wdBean/src/main/ets/bean/content/commentInfo.ets
View file @
c7f66f9
...
...
@@ -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
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card19Component.ets
View file @
c7f66f9
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)
})
}
}
...
...
sight_harmony/features/wdComponent/src/main/ets/components/compview/ZhSingleRow06.ets
View file @
c7f66f9
...
...
@@ -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)
...
...
Please
register
or
login
to post a comment