wangliang_wd

feat:优化早晚报

... ... @@ -258,7 +258,7 @@ export struct MorningEveningPaperComponent {
})
}
}
.height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`)
.height(`calc(100% - ${this.bottomSafeHeight + this.topSafeHeight + 'vp'})`).scrollBar(BarState.Off)
PaperTitleComponent()
}
... ...
... ... @@ -412,7 +412,7 @@ export struct PaperSingleColumn999CardView {
} else if (hours < 24) {
result = `${hours}小时前`;
} else {
result = `${days}天前`;
result = '';
}
console.log(result);
... ... @@ -422,12 +422,13 @@ export struct PaperSingleColumn999CardView {
build() {
Column() {
Text(this.item?.newsTitle)
.fontColor('#222222')
.fontSize(16)
.fontWeight(FontWeight.Bold)
.alignSelf(ItemAlign.Start)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.margin({ left: 22, right: 22, top: 28 })
.margin({ left: 16, right: 16, top: 16 })
if (this.item?.coverUrl) {
Stack({ alignContent: Alignment.BottomEnd }) {
Image(this.item?.coverUrl)
... ... @@ -462,35 +463,36 @@ export struct PaperSingleColumn999CardView {
.width(CommonConstants.FULL_PARENT)
.justifyContent(FlexAlign.End)
}
}.margin({ left: 22, right: 22 })
}.margin({ left: 16, right: 16 })
}
if (this.item?.newsSummary) {
Text(this.item?.newsSummary)
.fontColor('#6666666')
.fontSize(14)
.padding({ top: 10 })
.alignSelf(ItemAlign.Start)
.maxLines(3)
.textOverflow({ overflow: TextOverflow.Ellipsis })// 超出的部分显示省略号。
.margin({ left: 22, right: 22 })
.margin({ left: 16, right: 16 })
}
if (this.item) {
Row() {
Row() {
Text(this.item?.source)
.fontSize(12)
.fontColor(Color.Gray)
.margin({ left: 22 })
.fontColor('#B0B0B0')
.margin({ left: 16 })
Image($r('app.media.point'))
.width(16)
.height(16)
.margin({ top: 10, bottom: 10 })
Text(this.getPublishTime())
.fontSize(12)
.fontColor(Color.Gray)
if (this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
.fontColor('#B0B0B0')
if (this.item.objectType != '2' && this.interactData && this.interactData.commentNum && Number(this.interactData.collectNum) > 0) {
Text(this.interactData.commentNum + "评")
.fontSize(12)
.fontColor(Color.Gray)
.fontColor('#B0B0B0')
.margin({ left: 6 })
}
}
... ...