wangliang_wd

feat:优化早晚报顶部视图

@@ -32,9 +32,9 @@ export struct topicInfoView { @@ -32,9 +32,9 @@ export struct topicInfoView {
32 }) 32 })
33 .id('img_cover') 33 .id('img_cover')
34 34
35 - if (this.frontLinkObject) { 35 + if (this.frontLinkObject.linkUrl.length > 0) {
36 Row() { 36 Row() {
37 - Text(this.frontLinkObject.linkUrl.length > 0?"查看详情":'') 37 + Text("查看详情")
38 .fontSize(14) 38 .fontSize(14)
39 .fontColor($r('app.color.white')) 39 .fontColor($r('app.color.white'))
40 .maxLines(1) 40 .maxLines(1)
@@ -50,14 +50,14 @@ export struct topicInfoView { @@ -50,14 +50,14 @@ export struct topicInfoView {
50 .margin({ top: 8, left: 16, right: 16, bottom: 16 }) 50 .margin({ top: 8, left: 16, right: 16, bottom: 16 })
51 .borderRadius(2) 51 .borderRadius(2)
52 .onClick(()=>{ 52 .onClick(()=>{
53 - if (this.frontLinkObject.linkUrl.length === 0) return  
54 let contentDTO :ContentDTO = new ContentDTO(); 53 let contentDTO :ContentDTO = new ContentDTO();
55 contentDTO.objectType = this.frontLinkObject?.newsType.toString() 54 contentDTO.objectType = this.frontLinkObject?.newsType.toString()
56 contentDTO.objectId = this.frontLinkObject?.newsId 55 contentDTO.objectId = this.frontLinkObject?.newsId
57 contentDTO.linkUrl = this.frontLinkObject?.linkUrl 56 contentDTO.linkUrl = this.frontLinkObject?.linkUrl
58 ProcessUtils.processPage(contentDTO) 57 ProcessUtils.processPage(contentDTO)
59 58
60 - }).width(80) 59 + })
  60 + .width(80)
61 .alignRules({ 61 .alignRules({
62 left: { anchor: "__container__", align: HorizontalAlign.Start }, 62 left: { anchor: "__container__", align: HorizontalAlign.Start },
63 bottom: { anchor: "__container__", align: VerticalAlign.Bottom } 63 bottom: { anchor: "__container__", align: VerticalAlign.Bottom }
@@ -73,7 +73,7 @@ export struct topicInfoView { @@ -73,7 +73,7 @@ export struct topicInfoView {
73 .textOverflow({ overflow: TextOverflow.Ellipsis }) 73 .textOverflow({ overflow: TextOverflow.Ellipsis })
74 .alignRules({ 74 .alignRules({
75 left: { anchor: "__container__", align: HorizontalAlign.Start }, 75 left: { anchor: "__container__", align: HorizontalAlign.Start },
76 - bottom: { anchor: "row_detail", align: VerticalAlign.Top } 76 + bottom: this.frontLinkObject.linkUrl.length > 0?{ anchor: "row_detail", align: VerticalAlign.Top }:{ anchor: "__container__", align: VerticalAlign.Bottom }
77 }) 77 })
78 .margin({ left: 16, right: 16 }) 78 .margin({ left: 16, right: 16 })
79 .id('txt_summary') 79 .id('txt_summary')