wangliang_wd

feat:优化早晚报顶部视图

... ... @@ -32,9 +32,9 @@ export struct topicInfoView {
})
.id('img_cover')
if (this.frontLinkObject) {
if (this.frontLinkObject.linkUrl.length > 0) {
Row() {
Text(this.frontLinkObject.linkUrl.length > 0?"查看详情":'')
Text("查看详情")
.fontSize(14)
.fontColor($r('app.color.white'))
.maxLines(1)
... ... @@ -50,14 +50,14 @@ export struct topicInfoView {
.margin({ top: 8, left: 16, right: 16, bottom: 16 })
.borderRadius(2)
.onClick(()=>{
if (this.frontLinkObject.linkUrl.length === 0) return
let contentDTO :ContentDTO = new ContentDTO();
contentDTO.objectType = this.frontLinkObject?.newsType.toString()
contentDTO.objectId = this.frontLinkObject?.newsId
contentDTO.linkUrl = this.frontLinkObject?.linkUrl
ProcessUtils.processPage(contentDTO)
}).width(80)
})
.width(80)
.alignRules({
left: { anchor: "__container__", align: HorizontalAlign.Start },
bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
... ... @@ -73,7 +73,7 @@ export struct topicInfoView {
.textOverflow({ overflow: TextOverflow.Ellipsis })
.alignRules({
left: { anchor: "__container__", align: HorizontalAlign.Start },
bottom: { anchor: "row_detail", align: VerticalAlign.Top }
bottom: this.frontLinkObject.linkUrl.length > 0?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom }
})
.margin({ left: 16, right: 16 })
.id('txt_summary')
... ...