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
wangyong_wd
2024-04-16 16:21:55 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
37aafb76c60e9988539e9c3399685636fe341b2e
37aafb76
1 parent
b949600d
contentDTO新增isSearch自定义字段,区分搜索和主页数据
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
11 deletions
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
sight_harmony/features/wdComponent/src/main/ets/components/view/BannerComponent.ets
sight_harmony/features/wdBean/src/main/ets/bean/content/ContentDTO.ets
View file @
37aafb7
...
...
@@ -71,6 +71,6 @@ export interface ContentDTO {
photoNum: number;
corner: string;
rmhPlatform: number;
newTags: string
newTags: string;
isSearch?: boolean; // 是否是搜索的结果,区分搜索和主页的数据
}
\ No newline at end of file
...
...
sight_harmony/features/wdComponent/src/main/ets/components/cardCommon/CardSourceInfo.ets
View file @
37aafb7
...
...
@@ -32,12 +32,19 @@ export struct CardSourceInfo {
.width(16)
.height(16)
}
// TODO 这里还有个判断需要完善,依赖外部,新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.margin({ right: 6 })
.flexShrink(0)
// 新闻tab下的卡片,2天之前的不显示时间。但是如果是搜索情况下展示的卡片,显示时间
if(this.contentDTO.isSearch || !this.contentDTO.isSearch && DateTimeUtils.getCommentTime
(Number
.parseFloat(this
.contentDTO.publishTime))
.indexOf
('-') === -1) {
Text(DateTimeUtils.getCommentTime(Number.parseFloat(this.contentDTO.publishTime)))
.fontSize($r("app.float.font_size_12"))
.fontColor($r("app.color.color_B0B0B0"))
.margin({ right: 6 })
.flexShrink(0)
}
if(this.contentDTO?.interactData?.commentNum) {
Text(`${this.contentDTO.interactData.commentNum}评`)
.fontSize($r("app.float.font_size_12"))
...
...
sight_harmony/features/wdComponent/src/main/ets/components/search/SearchResultContentComponent.ets
View file @
37aafb7
...
...
@@ -111,7 +111,8 @@ export struct SearchResultContentComponent{
interactData: {} as InteractDataDTO,
corner: '',
rmhPlatform: 0,
newTags: ''
newTags: '',
isSearch: true
}
this.data.push(contentDTO)
...
...
sight_harmony/features/wdComponent/src/main/ets/components/view/BannerComponent.ets
View file @
37aafb7
...
...
@@ -52,8 +52,7 @@ export struct BannerComponent {
.borderRadius($r('app.float.image_border_radius'))
.displayCount(this.buildDisplayCount()) // 仅展示1个图片
.cachedCount(2)
.index(1) // The default index of Swiper.
.autoPlay(true)
.index(0) // The default index of Swiper.
.indicator(Indicator.dot()
.right(5)
.itemWidth(4)
...
...
Please
register
or
login
to post a comment