chenjun1_wd

大专题卡(已修复5,6安卓也是如此)

1、标题行高改为 25
2、间距偏大改为8
3、4、专题标签与卡片间距改为 8
5、6、分割线没有通到两侧
7、间距偏大改为 14
1 -import { ContentDTO, slideShows, VideoInfoDTO, CompDTO, InteractDataDTO } from 'wdBean'; 1 +import { CompDTO, ContentDTO, slideShows, VideoInfoDTO } from 'wdBean';
2 import { CommonConstants, CompStyle } from 'wdConstant'; 2 import { CommonConstants, CompStyle } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo'; 4 import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo'; 5 import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
6 import { Notes } from './notes'; 6 import { Notes } from './notes';
7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg'; 7 import { onlyWifiLoadImg } from '../../utils/lazyloadImg';
8 -import { InfomationCardClick } from '../../utils/infomationCardClick'  
9 -import { SearchShowRed, titleInitRes, textItem } from '../../utils/searchShowRed';  
10 -import router from '@ohos.router' 8 +import { InfomationCardClick } from '../../utils/infomationCardClick';
  9 +import { SearchShowRed, textItem, titleInitRes } from '../../utils/searchShowRed';
  10 +import router from '@ohos.router';
11 import { BasePageHelp } from '../page/template/BasePageHelp'; 11 import { BasePageHelp } from '../page/template/BasePageHelp';
12 -import { Logger } from 'wdKit/Index';  
13 import { hasClicked, persistentStorage } from '../../utils/persistentStorage'; 12 import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
14 13
15 /** 14 /**
@@ -100,9 +99,10 @@ export struct Card10Component { @@ -100,9 +99,10 @@ export struct Card10Component {
100 .width(CommonConstants.FULL_WIDTH) 99 .width(CommonConstants.FULL_WIDTH)
101 .fontSize($r('app.float.font_size_18')) 100 .fontSize($r('app.float.font_size_18'))
102 .fontWeight(FontWeight.Normal) 101 .fontWeight(FontWeight.Normal)
103 - .maxLines(this.contentDTO.appStyle === CompStyle.Card_09?2:1) 102 + .lineHeight(25)
  103 + .maxLines(this.contentDTO.appStyle === CompStyle.Card_09 ? 2 : 1)
104 .textOverflow({ overflow: TextOverflow.Ellipsis }) 104 .textOverflow({ overflow: TextOverflow.Ellipsis })
105 - .margin({ bottom: 19 }) 105 + .margin({ bottom: 8 })
106 .onClick((event: ClickEvent) => { 106 .onClick((event: ClickEvent) => {
107 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName) 107 InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
108 ProcessUtils.processPage(this.contentDTO) 108 ProcessUtils.processPage(this.contentDTO)
@@ -122,7 +122,7 @@ export struct Card10Component { @@ -122,7 +122,7 @@ export struct Card10Component {
122 ProcessUtils.processPage(this.contentDTO) 122 ProcessUtils.processPage(this.contentDTO)
123 }) 123 })
124 if (this.contentDTO.objectType == '5') { 124 if (this.contentDTO.objectType == '5') {
125 - Notes({ objectType: 5,objectLevel:this.contentDTO.objectLevel }).margin({ left: 5, bottom: 5 }) 125 + Notes({ objectType: 5, objectLevel: this.contentDTO.objectLevel }).margin({ left: 8, bottom: 8 })
126 } 126 }
127 }.alignContent(Alignment.BottomStart) 127 }.alignContent(Alignment.BottomStart)
128 128
@@ -165,7 +165,7 @@ export struct Card10Component { @@ -165,7 +165,7 @@ export struct Card10Component {
165 left: $r('app.float.card_comp_pagePadding_lf'), 165 left: $r('app.float.card_comp_pagePadding_lf'),
166 right: $r('app.float.card_comp_pagePadding_lf'), 166 right: $r('app.float.card_comp_pagePadding_lf'),
167 top: $r('app.float.card_comp_pagePadding_tb'), 167 top: $r('app.float.card_comp_pagePadding_tb'),
168 - bottom: $r('app.float.card_comp_pagePadding_tb') 168 + bottom: 14
169 }) 169 })
170 .backgroundColor($r("app.color.white")) 170 .backgroundColor($r("app.color.white"))
171 .margin({ bottom: 8 }) 171 .margin({ bottom: 8 })
@@ -188,10 +188,10 @@ export struct Card10Component { @@ -188,10 +188,10 @@ export struct Card10Component {
188 @Builder 188 @Builder
189 timelineItem(item: slideShows, index: number) { 189 timelineItem(item: slideShows, index: number) {
190 Card10ComponentTimelineItem({ 190 Card10ComponentTimelineItem({
191 - compDTO:this.compDTO,  
192 - slideItem:item,  
193 - contentDTO:this.contentDTO,  
194 - loadImg:this.loadImg 191 + compDTO: this.compDTO,
  192 + slideItem: item,
  193 + contentDTO: this.contentDTO,
  194 + loadImg: this.loadImg
195 }) 195 })
196 } 196 }
197 } 197 }
@@ -202,17 +202,18 @@ export struct Card10ComponentTimelineItem { @@ -202,17 +202,18 @@ export struct Card10ComponentTimelineItem {
202 @State contentDTO: ContentDTO = new ContentDTO(); 202 @State contentDTO: ContentDTO = new ContentDTO();
203 @ObjectLink compDTO: CompDTO 203 @ObjectLink compDTO: CompDTO
204 @State loadImg: boolean = false; 204 @State loadImg: boolean = false;
205 - @State isRead: boolean = false;//已读状态 205 + @State isRead: boolean = false; //已读状态
206 206
207 build() { 207 build() {
208 Row() { 208 Row() {
209 // 有图片资源的 209 // 有图片资源的
210 - if (this.slideItem.fullColumnImgUrls && this.slideItem.fullColumnImgUrls[0] && this.slideItem.fullColumnImgUrls[0].url) { 210 + if (this.slideItem.fullColumnImgUrls && this.slideItem.fullColumnImgUrls[0] &&
  211 + this.slideItem.fullColumnImgUrls[0].url) {
211 212
212 Column() { 213 Column() {
213 Stack() { 214 Stack() {
214 if (this.slideItem.objectType == '5') { 215 if (this.slideItem.objectType == '5') {
215 - Notes({ objectType: 5,objectLevel:this.slideItem.objectLevel }) 216 + Notes({ objectType: 5, objectLevel: this.slideItem.objectLevel })
216 } 217 }
217 Text(this.slideItem.newsTitle) 218 Text(this.slideItem.newsTitle)
218 .fontSize($r('app.float.font_size_17')) 219 .fontSize($r('app.float.font_size_17'))
@@ -251,11 +252,11 @@ export struct Card10ComponentTimelineItem { @@ -251,11 +252,11 @@ export struct Card10ComponentTimelineItem {
251 } 252 }
252 .alignContent(Alignment.BottomEnd) 253 .alignContent(Alignment.BottomEnd)
253 .height(78) 254 .height(78)
254 - }else{ 255 + } else {
255 Column() { 256 Column() {
256 Stack() { 257 Stack() {
257 if (this.slideItem.objectType == '5') { 258 if (this.slideItem.objectType == '5') {
258 - Notes({ objectType: 5,objectLevel:this.slideItem.objectLevel }) 259 + Notes({ objectType: 5, objectLevel: this.slideItem.objectLevel })
259 } 260 }
260 Text(this.slideItem.newsTitle) 261 Text(this.slideItem.newsTitle)
261 .fontSize($r('app.float.font_size_17')) 262 .fontSize($r('app.float.font_size_17'))
@@ -299,7 +300,6 @@ export struct Card10ComponentTimelineItem { @@ -299,7 +300,6 @@ export struct Card10ComponentTimelineItem {
299 this.isRead = hasClicked(this.slideItem.newsId, '') 300 this.isRead = hasClicked(this.slideItem.newsId, '')
300 } 301 }
301 302
302 -  
303 private createContent(item: slideShows): ContentDTO { 303 private createContent(item: slideShows): ContentDTO {
304 let contentDTO = new ContentDTO() 304 let contentDTO = new ContentDTO()
305 contentDTO.publishTime = item.publishTime?.toString() || ''; 305 contentDTO.publishTime = item.publishTime?.toString() || '';