liyubing

Merge remote-tracking branch 'origin/main'

@@ -45,7 +45,9 @@ export struct CompParser { @@ -45,7 +45,9 @@ export struct CompParser {
45 45
46 aboutToAppear(): void { 46 aboutToAppear(): void {
47 47
48 - console.log('CompParser-compDTO', JSON.stringify(this.compDTO)) 48 +
  49 +
  50 + console.log('CompParser', JSON.stringify(this.compDTO))
49 this.pageName = this.pageModel.pageInfo.name 51 this.pageName = this.pageModel.pageInfo.name
50 // 轮播图屏蔽音频类型稿件 52 // 轮播图屏蔽音频类型稿件
51 if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 53 if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
@@ -79,11 +81,13 @@ export struct CompParser { @@ -79,11 +81,13 @@ export struct CompParser {
79 @Builder 81 @Builder
80 componentBuilder() { 82 componentBuilder() {
81 83
  84 + //CardParser({ contentDTO: this.compDTO.operDataList[0], compDTO:this.compDTO })
  85 +
82 if (this.compDTO.operDataList[0]?.objectType !== '3' && 86 if (this.compDTO.operDataList[0]?.objectType !== '3' &&
83 this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口 87 this.compDTO.operDataList[0]?.objectType !== '13') { //暂时屏蔽活动和音频详情入口
84 if (this.compDTO.compStyle === CompStyle.Label_03) { 88 if (this.compDTO.compStyle === CompStyle.Label_03) {
85 LabelComponent({ compDTO: this.compDTO }) 89 LabelComponent({ compDTO: this.compDTO })
86 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) 90 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
87 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) { 91 } else if (this.compDTO.compStyle === CompStyle.Zh_Carousel_Layout_01) {
88 if (this.compDTO.operDataList.length > this.audioItems.length) { 92 if (this.compDTO.operDataList.length > this.audioItems.length) {
89 ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 93 ZhCarouselLayout01({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
@@ -100,7 +104,7 @@ export struct CompParser { @@ -100,7 +104,7 @@ export struct CompParser {
100 } else { 104 } else {
101 HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 105 HorizontalStrokeCardThreeTwoRadioForOneComponent({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
102 } 106 }
103 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) 107 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
104 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) { 108 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_02) {
105 ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 109 ZhSingleRow02({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
106 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 110 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
@@ -117,27 +121,38 @@ export struct CompParser { @@ -117,27 +121,38 @@ export struct CompParser {
117 121
118 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) { 122 } else if (this.compDTO.compStyle === CompStyle.Zh_Grid_Layout_03) {
119 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 123 ZhGridLayout03({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
120 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) 124 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
121 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) { 125 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_04) {
122 ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 126 ZhSingleRow04({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
123 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) 127 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
124 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) { 128 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_05) {
125 // ZhSingleRow05({ compDTO }) 129 // ZhSingleRow05({ compDTO })
126 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 130 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
127 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) { 131 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Row_06) {
128 ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 132 ZhSingleRow06({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
129 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) 133 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
130 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) { 134 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_02) {
131 //头图卡 和comStyle 2相同, 135 //头图卡 和comStyle 2相同,
132 - Card5Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], titleShowPolicy: this.compDTO.titleShowPolicy, pageId: this.pageId, pageName: this.pageName })  
133 - Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 0, right: 0 }) 136 + Card5Component({
  137 + compDTO: this.compDTO,
  138 + contentDTO: this.compDTO.operDataList[0],
  139 + titleShowPolicy: this.compDTO.titleShowPolicy,
  140 + pageId: this.pageId,
  141 + pageName: this.pageName
  142 + })
  143 + Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
134 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) { 144 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_03) {
135 // 大图卡 145 // 大图卡
136 Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) 146 Card2Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
137 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 147 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
138 } else if (this.compDTO.compStyle === CompStyle.Card_09) { 148 } else if (this.compDTO.compStyle === CompStyle.Card_09) {
139 //时间链卡 149 //时间链卡
140 - Card9Component({ compDTO: this.compDTO, contentDTO:this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) 150 + Card9Component({
  151 + compDTO: this.compDTO,
  152 + contentDTO:this.compDTO.operDataList[0],
  153 + pageId: this.pageId,
  154 + pageName: this.pageName
  155 + })
141 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 156 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
142 } else if(this.compDTO.compStyle === CompStyle.Card_13){ 157 } else if(this.compDTO.compStyle === CompStyle.Card_13){
143 Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName }) 158 Card6Component({ compDTO: this.compDTO, contentDTO: this.compDTO.operDataList[0], pageId: this.pageId, pageName: this.pageName })
@@ -152,8 +167,6 @@ export struct CompParser { @@ -152,8 +167,6 @@ export struct CompParser {
152 // ZhSingleColumn05({ compDTO: compDTO }) 167 // ZhSingleColumn05({ compDTO: compDTO })
153 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 }) 168 // Divider().strokeWidth(5).color('#f5f5f5').padding({ left: 0, right: 0 })
154 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) { 169 } else if (this.compDTO.compStyle === CompStyle.Zh_Single_Column_09) {
155 - // Divider().strokeWidth(3).color('#ffffff').padding({ left: 0, right: 0 }).margin({ top: -3 })  
156 - // Divider().strokeWidth(6).color('#f5f5f5')  
157 ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName }) 170 ZhSingleColumn09({ compDTO: this.compDTO, pageId: this.pageId, pageName: this.pageName })
158 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 }) 171 Divider().strokeWidth(1).color('#f5f5f5').padding({ left: 16, right: 16 })
159 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告 172 } else if (this.compDTO.compStyle === CompStyle.Card_Comp_Adv) { // 广告
@@ -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"))