陈剑华

fix: 18476 同一用户登录安卓端和鸿蒙端-我的收藏页面_展示收藏数据不一致

@@ -7,6 +7,7 @@ import { Notes } from './notes'; @@ -7,6 +7,7 @@ import { Notes } from './notes';
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 import { InfomationCardClick } from '../../utils/infomationCardClick' 8 import { InfomationCardClick } from '../../utils/infomationCardClick'
9 import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed'; 9 import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';
  10 +import router from '@ohos.router'
10 11
11 /** 12 /**
12 * 大专题卡--CompStyle: 10 13 * 大专题卡--CompStyle: 10
@@ -23,10 +24,19 @@ export struct Card10Component { @@ -23,10 +24,19 @@ export struct Card10Component {
23 @ObjectLink compDTO: CompDTO 24 @ObjectLink compDTO: CompDTO
24 @State titleMarked: boolean = false; 25 @State titleMarked: boolean = false;
25 @State textArr: textItem[] = [] 26 @State textArr: textItem[] = []
  27 + @State hideDetail: boolean = false;
26 28
27 async aboutToAppear(): Promise<void> { 29 async aboutToAppear(): Promise<void> {
28 this.titleInit(); 30 this.titleInit();
29 this.loadImg = await onlyWifiLoadImg(); 31 this.loadImg = await onlyWifiLoadImg();
  32 + this.initHideDetail();
  33 + }
  34 +
  35 + initHideDetail() {
  36 + const curRouter = router.getState().name;
  37 + if (curRouter === 'MyCollectionListPage') {
  38 + this.hideDetail = true;
  39 + }
30 } 40 }
31 41
32 titleInit() { 42 titleInit() {
@@ -83,6 +93,7 @@ export struct Card10Component { @@ -83,6 +93,7 @@ export struct Card10Component {
83 }.alignContent(Alignment.BottomStart) 93 }.alignContent(Alignment.BottomStart)
84 94
85 // 专题列表--后端返回三个, 95 // 专题列表--后端返回三个,
  96 + if (!this.hideDetail) {
86 Column() { 97 Column() {
87 ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => { 98 ForEach(this.contentDTO.slideShows, (item: slideShows, index: number) => {
88 this.timelineItem(item, index) 99 this.timelineItem(item, index)
@@ -92,10 +103,11 @@ export struct Card10Component { @@ -92,10 +103,11 @@ export struct Card10Component {
92 } 103 }
93 }) 104 })
94 } 105 }
  106 + }
95 107
96 108
97 // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多 109 // 底部-查看更多。根据接口返回的isMore判断是否显示查看更多
98 - if (this.contentDTO.hasMore == 1) { 110 + if (this.contentDTO.hasMore == 1 && !this.hideDetail) {
99 Row() { 111 Row() {
100 Text("查看更多") 112 Text("查看更多")
101 .fontSize($r("app.float.font_size_14")) 113 .fontSize($r("app.float.font_size_14"))