douaojie

fix: 添加标签

1 //缩略标题 1 //缩略标题
2 -import { CommonConstants } from 'wdConstant'  
3 -import { ContentDTO } from 'wdBean'  
4 -import { DateTimeUtils } from 'wdKit' 2 +import { CommonConstants } from 'wdConstant';
  3 +import { ContentDTO } from 'wdBean';
5 import { ProcessUtils } from 'wdRouter'; 4 import { ProcessUtils } from 'wdRouter';
6 -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 5 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
  6 +import { Notes } from './notes';
  7 +
7 const TAG = 'Card11Component'; 8 const TAG = 'Card11Component';
8 9
9 /** 10 /**
@@ -16,12 +17,21 @@ export struct Card11Component { @@ -16,12 +17,21 @@ export struct Card11Component {
16 17
17 build() { 18 build() {
18 Column() { 19 Column() {
19 - Text(this.contentDTO.newsTitle)  
20 - .fontSize($r("app.float.font_size_16"))  
21 - .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))  
22 - .maxLines(3)  
23 - .textOverflow({ overflow: TextOverflow.Ellipsis })  
24 - .width(CommonConstants.FULL_WIDTH) 20 + Stack() {
  21 + if (this.contentDTO.objectType == '5') {
  22 + Notes({ objectType: this.contentDTO.objectType })
  23 + }
  24 + Text(this.contentDTO.newsTitle)
  25 + .fontSize($r("app.float.font_size_16"))
  26 + .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
  27 + .maxLines(3)
  28 + .textOverflow({ overflow: TextOverflow.Ellipsis })
  29 + .width(CommonConstants.FULL_WIDTH)
  30 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
  31 +
  32 + }.alignContent(Alignment.TopStart)
  33 +
  34 +
25 // 评论等信息 35 // 评论等信息
26 CardSourceInfo({ contentDTO: this.contentDTO }) 36 CardSourceInfo({ contentDTO: this.contentDTO })
27 }.width(CommonConstants.FULL_WIDTH) 37 }.width(CommonConstants.FULL_WIDTH)
1 import { ContentDTO } from 'wdBean'; 1 import { ContentDTO } from 'wdBean';
2 -import { CommonConstants } from 'wdConstant' 2 +import { CommonConstants } from 'wdConstant';
3 import { ProcessUtils } from 'wdRouter'; 3 import { ProcessUtils } from 'wdRouter';
4 -import { CardSourceInfo } from '../cardCommon/CardSourceInfo' 4 +import { CardSourceInfo } from '../cardCommon/CardSourceInfo';
  5 +import { Notes } from './notes';
5 6
6 /** 7 /**
7 * 卡片样式:"appStyle":"3" 8 * 卡片样式:"appStyle":"3"
@@ -14,10 +15,17 @@ export struct Card3Component { @@ -14,10 +15,17 @@ export struct Card3Component {
14 15
15 build() { 16 build() {
16 Column() { 17 Column() {
17 - Text(this.contentDTO.newsTitle)  
18 - .fontSize($r("app.float.font_size_16"))  
19 - .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))  
20 - .width(CommonConstants.FULL_WIDTH) 18 + Stack() {
  19 + if (this.contentDTO.objectType == '5') {
  20 + Notes({ objectType: this.contentDTO.objectType })
  21 + }
  22 + Text(this.contentDTO.newsTitle)
  23 + .fontSize($r("app.float.font_size_16"))
  24 + .fontColor(this.clicked ? 0x848484 : $r("app.color.color_222222"))
  25 + .width(CommonConstants.FULL_WIDTH)
  26 + .textIndent(this.contentDTO.objectType == '5' ? 35 : 0)
  27 + }.alignContent(Alignment.TopStart)
  28 +
21 // 评论等信息 29 // 评论等信息
22 CardSourceInfo({ contentDTO: this.contentDTO }) 30 CardSourceInfo({ contentDTO: this.contentDTO })
23 } 31 }
@@ -22,13 +22,12 @@ export struct Card5Component { @@ -22,13 +22,12 @@ export struct Card5Component {
22 22
23 build() { 23 build() {
24 Stack() { 24 Stack() {
25 -  
26 Image(this.loadImg ? this.contentDTO.coverUrl : '') 25 Image(this.loadImg ? this.contentDTO.coverUrl : '')
27 .backgroundColor(0xf5f5f5) 26 .backgroundColor(0xf5f5f5)
28 .width(CommonConstants.FULL_WIDTH) 27 .width(CommonConstants.FULL_WIDTH)
29 .autoResize(true) 28 .autoResize(true)
30 .borderRadius($r('app.float.image_border_radius')) 29 .borderRadius($r('app.float.image_border_radius'))
31 - if (this.titleShowPolicy === 1) { 30 + if (this.titleShowPolicy === 1 || this.titleShowPolicy === null) {
32 Row() 31 Row()
33 .width(CommonConstants.FULL_WIDTH) 32 .width(CommonConstants.FULL_WIDTH)
34 .height(59) 33 .height(59)