xugenyuan

fix |> 采集数据稿件详情页,顶部左上角不应展示人民号logo

http://192.168.1.3:8080/zentao/bug-view-20511.html

Signed-off-by: xugenyuan <xugenyuan@wondertek.com.cn>
@@ -139,29 +139,7 @@ export struct DynamicDetailComponent { @@ -139,29 +139,7 @@ export struct DynamicDetailComponent {
139 139
140 build() { 140 build() {
141 Column() { 141 Column() {
142 - //logo、日期  
143 - Row() {  
144 - Image($r('app.media.ic_article_rmh'))  
145 - .width($r('app.float.margin_80'))  
146 - .height($r('app.float.margin_28'))  
147 - .margin({ left: $r('app.float.margin_16') })  
148 - Blank()  
149 - Text(this.publishTime)  
150 - .fontColor($r('app.color.color_B0B0B0'))  
151 - .fontSize($r('app.float.font_size_12'))  
152 - .lineHeight($r('app.float.margin_28'))  
153 - .margin({ right: $r('app.float.margin_16') })  
154 - }  
155 - .height($r('app.float.margin_48'))  
156 - .width('100%')  
157 - .alignItems(VerticalAlign.Bottom)  
158 - .padding({ bottom: 5 })  
159 - .margin({top: `${this.topSafeHeight}px`})  
160 - //分割线  
161 - Image($r('app.media.ic_news_detail_division'))  
162 - .width('100%')  
163 - .height($r('app.float.margin_6'))  
164 - .padding({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') }) 142 + this.topNav()
165 Stack({ alignContent: Alignment.Bottom }) { 143 Stack({ alignContent: Alignment.Bottom }) {
166 if (!this.isNetConnected) { 144 if (!this.isNetConnected) {
167 EmptyComponent({ 145 EmptyComponent({
@@ -704,6 +682,72 @@ export struct DynamicDetailComponent { @@ -704,6 +682,72 @@ export struct DynamicDetailComponent {
704 .height('100%') 682 .height('100%')
705 } 683 }
706 684
  685 + @Builder topNav() {
  686 + //logo、日期
  687 + Row() {
  688 + Image($r('app.media.ic_article_rmh'))
  689 + .width($r('app.float.margin_80'))
  690 + .height($r('app.float.margin_28'))
  691 + .margin({ left: $r('app.float.margin_16') })
  692 + Blank()
  693 + Text(this.publishTime)
  694 + .fontColor($r('app.color.color_B0B0B0'))
  695 + .fontSize($r('app.float.font_size_12'))
  696 + .lineHeight($r('app.float.margin_28'))
  697 + .margin({ right: $r('app.float.margin_16') })
  698 + }
  699 + .height($r('app.float.margin_48'))
  700 + .width('100%')
  701 + .alignItems(VerticalAlign.Bottom)
  702 + .padding({ bottom: 5 })
  703 + .margin({top: `${this.topSafeHeight}px`})
  704 + //分割线
  705 + Image($r('app.media.ic_news_detail_division'))
  706 + .width('100%')
  707 + .height($r('app.float.margin_6'))
  708 + .padding({ left: $r('app.float.margin_16'), right: $r('app.float.margin_16') })
  709 +
  710 + // 发布时间 ,TODO:需要参考文章详情
  711 + // Column() {
  712 + // Row() {
  713 + // if (this.isNetConnected && this.contentDetailData) {
  714 + // if (this.contentDetailData.rmhPlatform == 1) { // 人民号
  715 + // if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
  716 + // Blank().height(1)
  717 + // } else {
  718 + // Image($r('app.media.logo_rmh')).width(80) .height(28)
  719 + // }
  720 + // } else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户
  721 + // Blank().height(1)
  722 + // } else {
  723 + // Image($r('app.media.logo_rmrb')).width(80) .height(28)
  724 + // }
  725 + // Text(this.publishTime)
  726 + // .fontColor($r('app.color.color_B0B0B0'))
  727 + // .fontSize(13)
  728 + // .height(20)
  729 + // }
  730 + // }
  731 + // .width(CommonConstants.FULL_WIDTH)
  732 + // .height($r('app.float.margin_48'))
  733 + // .padding({ left: 15, right: 15, })
  734 + // .justifyContent(FlexAlign.SpaceBetween)
  735 + // .alignItems(VerticalAlign.Bottom)
  736 + //
  737 + // // if (this.isNetConnected && !this.detailContentEmpty) {
  738 + // Row() {
  739 + // Image($r('app.media.ic_news_detail_division'))
  740 + // .width('100%')
  741 + // .height(6)
  742 + // .margin({ top: 10 })
  743 + // .objectFit(ImageFit.Fill)
  744 + // }
  745 + // .padding({ left: 15, right: 15 })
  746 + // .backgroundColor(Color.White)
  747 + // // }
  748 + // }.backgroundColor(Color.White)
  749 + }
  750 +
707 private titleText() { 751 private titleText() {
708 if(!StringUtils.isEmpty(this.contentDetailData.newsContent)){ 752 if(!StringUtils.isEmpty(this.contentDetailData.newsContent)){
709 return this.contentDetailData.newsContent 753 return this.contentDetailData.newsContent
@@ -264,9 +264,17 @@ export struct ImageAndTextPageComponent { @@ -264,9 +264,17 @@ export struct ImageAndTextPageComponent {
264 Column() { 264 Column() {
265 Row() { 265 Row() {
266 if (this.isNetConnected && !this.detailContentEmpty) { 266 if (this.isNetConnected && !this.detailContentEmpty) {
267 - Image(this.contentDetailData?.rmhInfo ? $r('app.media.logo_rmh') : $r('app.media.logo_rmrb'))  
268 - .width(80)  
269 - .height(28) 267 + if (this.contentDetailData.rmhPlatform == 1) { // 人民号
  268 + if (this.contentDetailData?.rmhInfo?.userType == "5") { // 内容源账号
  269 + Blank().height(1)
  270 + } else {
  271 + Image($r('app.media.logo_rmh')).width(80) .height(28)
  272 + }
  273 + } else if (this.contentDetailData.rmhPlatform == 2) { // 普通用户
  274 + Blank().height(1)
  275 + } else {
  276 + Image($r('app.media.logo_rmrb')).width(80) .height(28)
  277 + }
270 Text(this.publishTime) 278 Text(this.publishTime)
271 .fontColor($r('app.color.color_B0B0B0')) 279 .fontColor($r('app.color.color_B0B0B0'))
272 .fontSize(13) 280 .fontSize(13)