chenjun1_wd

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

1、标题行高改为 25
2、间距偏大改为8
3、4、专题标签与卡片间距改为 8
5、6、分割线没有通到两侧
7、间距偏大改为 14
import { ContentDTO, slideShows, VideoInfoDTO, CompDTO, InteractDataDTO } from 'wdBean';
import { CompDTO, ContentDTO, slideShows, VideoInfoDTO } from 'wdBean';
import { CommonConstants, CompStyle } from 'wdConstant';
import { ProcessUtils } from 'wdRouter';
import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
import { CardMediaInfo } from '../cardCommon/CardMediaInfo';
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'
import { InfomationCardClick } from '../../utils/infomationCardClick';
import { SearchShowRed, textItem, titleInitRes } from '../../utils/searchShowRed';
import router from '@ohos.router';
import { BasePageHelp } from '../page/template/BasePageHelp';
import { Logger } from 'wdKit/Index';
import { hasClicked, persistentStorage } from '../../utils/persistentStorage';
/**
... ... @@ -100,9 +99,10 @@ export struct Card10Component {
.width(CommonConstants.FULL_WIDTH)
.fontSize($r('app.float.font_size_18'))
.fontWeight(FontWeight.Normal)
.maxLines(this.contentDTO.appStyle === CompStyle.Card_09?2:1)
.lineHeight(25)
.maxLines(this.contentDTO.appStyle === CompStyle.Card_09 ? 2 : 1)
.textOverflow({ overflow: TextOverflow.Ellipsis })
.margin({ bottom: 19 })
.margin({ bottom: 8 })
.onClick((event: ClickEvent) => {
InfomationCardClick.track(this.compDTO, this.contentDTO, this.pageId, this.pageName)
ProcessUtils.processPage(this.contentDTO)
... ... @@ -122,7 +122,7 @@ export struct Card10Component {
ProcessUtils.processPage(this.contentDTO)
})
if (this.contentDTO.objectType == '5') {
Notes({ objectType: 5,objectLevel:this.contentDTO.objectLevel }).margin({ left: 5, bottom: 5 })
Notes({ objectType: 5, objectLevel: this.contentDTO.objectLevel }).margin({ left: 8, bottom: 8 })
}
}.alignContent(Alignment.BottomStart)
... ... @@ -165,7 +165,7 @@ export struct Card10Component {
left: $r('app.float.card_comp_pagePadding_lf'),
right: $r('app.float.card_comp_pagePadding_lf'),
top: $r('app.float.card_comp_pagePadding_tb'),
bottom: $r('app.float.card_comp_pagePadding_tb')
bottom: 14
})
.backgroundColor($r("app.color.white"))
.margin({ bottom: 8 })
... ... @@ -188,10 +188,10 @@ export struct Card10Component {
@Builder
timelineItem(item: slideShows, index: number) {
Card10ComponentTimelineItem({
compDTO:this.compDTO,
slideItem:item,
contentDTO:this.contentDTO,
loadImg:this.loadImg
compDTO: this.compDTO,
slideItem: item,
contentDTO: this.contentDTO,
loadImg: this.loadImg
})
}
}
... ... @@ -202,17 +202,18 @@ export struct Card10ComponentTimelineItem {
@State contentDTO: ContentDTO = new ContentDTO();
@ObjectLink compDTO: CompDTO
@State loadImg: boolean = false;
@State isRead: boolean = false;//已读状态
@State isRead: boolean = false; //已读状态
build() {
Row() {
// 有图片资源的
if (this.slideItem.fullColumnImgUrls && this.slideItem.fullColumnImgUrls[0] && this.slideItem.fullColumnImgUrls[0].url) {
if (this.slideItem.fullColumnImgUrls && this.slideItem.fullColumnImgUrls[0] &&
this.slideItem.fullColumnImgUrls[0].url) {
Column() {
Stack() {
if (this.slideItem.objectType == '5') {
Notes({ objectType: 5,objectLevel:this.slideItem.objectLevel })
Notes({ objectType: 5, objectLevel: this.slideItem.objectLevel })
}
Text(this.slideItem.newsTitle)
.fontSize($r('app.float.font_size_17'))
... ... @@ -251,11 +252,11 @@ export struct Card10ComponentTimelineItem {
}
.alignContent(Alignment.BottomEnd)
.height(78)
}else{
} else {
Column() {
Stack() {
if (this.slideItem.objectType == '5') {
Notes({ objectType: 5,objectLevel:this.slideItem.objectLevel })
Notes({ objectType: 5, objectLevel: this.slideItem.objectLevel })
}
Text(this.slideItem.newsTitle)
.fontSize($r('app.float.font_size_17'))
... ... @@ -299,7 +300,6 @@ export struct Card10ComponentTimelineItem {
this.isRead = hasClicked(this.slideItem.newsId, '')
}
private createContent(item: slideShows): ContentDTO {
let contentDTO = new ContentDTO()
contentDTO.publishTime = item.publishTime?.toString() || '';
... ...