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-06-06 10:06:01 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
febb119e037951000d2725613681f57ad8ab6bf2
febb119e
1 parent
046a9657
fix: 18476 同一用户登录安卓端和鸿蒙端-我的收藏页面_展示收藏数据不一致
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
sight_harmony/features/wdComponent/src/main/ets/components/cardview/Card10Component.ets
View file @
febb119
...
...
@@ -7,6 +7,7 @@ import { Notes } from './notes';
import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
import { InfomationCardClick } from '../../utils/infomationCardClick'
import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
import router from '@ohos.router'
/**
* 大专题卡--CompStyle: 10
...
...
@@ -23,10 +24,19 @@ export struct Card10Component {
@ObjectLink compDTO: CompDTO
@State titleMarked: boolean = false;
@State textArr: textItem[] = []
@State hideDetail: boolean = false;
async aboutToAppear(): Promise<void> {
this.titleInit();
this.loadImg = await onlyWifiLoadImg();
this.initHideDetail();
}
initHideDetail() {
const curRouter = router.getState().name;
if (curRouter === 'MyCollectionListPage') {
this.hideDetail = true;
}
}
titleInit() {
...
...
@@ -83,19 +93,21 @@ export struct Card10Component {
}.alignContent(Alignment.BottomStart)
// 专题列表--后端返回三个,
Column() {
ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
this.timelineItem(item, index)
if (index < this.contentDTO.slideShows.length - 1) {
// 在不是最后一个元素的情况下添加分隔符
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
}
})
if (!this.hideDetail) {
Column() {
ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
this.timelineItem(item, index)
if (index < this.contentDTO.slideShows.length - 1) {
// 在不是最后一个元素的情况下添加分隔符
Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 });
}
})
}
}
// 底部-查看更多。根据接口返回的isMore判断是否显示查看更多
if (this.contentDTO.hasMore == 1) {
if (this.contentDTO.hasMore == 1
&& !this.hideDetail
) {
Row() {
Text("查看更多")
.fontSize($r("app.float.font_size_14"))
...
...
Please
register
or
login
to post a comment