张善主

Merge remote-tracking branch 'origin/main'

@@ -11,7 +11,7 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean'; @@ -11,7 +11,7 @@ import { LiveRoomDataBean } from '../live/LiveRoomDataBean';
11 11
12 @Observed 12 @Observed
13 export class ContentDTO implements BaseDTO { 13 export class ContentDTO implements BaseDTO {
14 - seoTags?:string; 14 + seoTags: string = '';
15 liveType?: string; // 直播新闻-直播状态 15 liveType?: string; // 直播新闻-直播状态
16 expIds: string = ''; 16 expIds: string = '';
17 itemId: string = ''; 17 itemId: string = '';
@@ -50,13 +50,19 @@ export struct Card2Component { @@ -50,13 +50,19 @@ export struct Card2Component {
50 Column() { 50 Column() {
51 Column() { 51 Column() {
52 Stack() { 52 Stack() {
53 - //新闻标题  
54 - if (this.contentDTO.newTags) {  
55 - Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)  
56 - //Notes({ newTags: this.contentDTO.newTags })  
57 - } else if (this.contentDTO.objectType == '5') { 53 + if(this.contentDTO.objectType == '5'){
58 Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center) 54 Notes({ objectType: this.contentDTO.objectType }).height(30).align(Alignment.Center)
59 - //Notes({ objectType: this.contentDTO.objectType }) 55 + }else if(this.contentDTO.objectType == '2'){
  56 + if(this.contentDTO.seoTags){
  57 + Notes({ newTags: this.contentDTO.seoTags }).height(30).align(Alignment.Center)
  58 + }else if(this.contentDTO.newTags){
  59 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  60 +
  61 + }
  62 + }else {
  63 + if(this.contentDTO.newTags){
  64 + Notes({ newTags: this.contentDTO.newTags }).height(30).align(Alignment.Center)
  65 + }
60 } 66 }
61 Text() { 67 Text() {
62 if (this.titleMarked) { 68 if (this.titleMarked) {
@@ -76,7 +82,9 @@ export struct Card2Component { @@ -76,7 +82,9 @@ export struct Card2Component {
76 .align(Alignment.Start) 82 .align(Alignment.Start)
77 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 : 83 .textIndent(this.contentDTO.newTags?.length < 5 && this.contentDTO.newTags?.length > 2 ? 58 :
78 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) || 84 (this.contentDTO.newTags?.length != 0 && this.contentDTO.newTags?.length) ||
79 - this.contentDTO.objectType == '5' ? 35 : 0) 85 + this.contentDTO.objectType == '5' ? 35 : 0 || (this.contentDTO.objectType === '2' && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) < 5) ? 58 :
  86 + (this.contentDTO.objectType === '2' && (this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 0 || this.contentDTO.objectType === '5') ? 35 :
  87 + 0 )
80 }.alignContent(Alignment.TopStart) 88 }.alignContent(Alignment.TopStart)
81 89
82 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0) 90 //.textIndent(this.contentDTO.objectType == '5' ? 35 : 0)