陈剑华

feat: 20748 搜索-“钱江视频”,搜索结果切换到人民号tab,动态和单图卡视频未展示文本信息

@@ -22,6 +22,8 @@ export class ContentShareInfoDTO { @@ -22,6 +22,8 @@ export class ContentShareInfoDTO {
22 22
23 @Observed 23 @Observed
24 export class ContentDTO implements BaseDTO { 24 export class ContentDTO implements BaseDTO {
  25 + introduction: string = '';
  26 + zhDescription: string = '';
25 seoTags: string = ''; 27 seoTags: string = '';
26 cornerMark:string = ''; 28 cornerMark:string = '';
27 liveType?: string; // 直播新闻-直播状态 29 liveType?: string; // 直播新闻-直播状态
@@ -153,6 +155,7 @@ export class ContentDTO implements BaseDTO { @@ -153,6 +155,7 @@ export class ContentDTO implements BaseDTO {
153 155
154 static clone(old: ContentDTO): ContentDTO { 156 static clone(old: ContentDTO): ContentDTO {
155 let content = new ContentDTO(); 157 let content = new ContentDTO();
  158 + content.zhDescription = old.zhDescription;
156 content.liveType = old.liveType; 159 content.liveType = old.liveType;
157 content.seoTags = old.seoTags; 160 content.seoTags = old.seoTags;
158 content.appStyle = old.appStyle; 161 content.appStyle = old.appStyle;
@@ -81,7 +81,7 @@ export struct CardParser { @@ -81,7 +81,7 @@ export struct CardParser {
81 @Builder 81 @Builder
82 contentBuilder(contentDTO: ContentDTO) { 82 contentBuilder(contentDTO: ContentDTO) {
83 // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO }) 83 // Card6Component({ compDTO: this.compDTO, contentDTO: this.contentDTO })
84 - if (!!contentDTO.contentText) { 84 + if (!!contentDTO.contentText || !!contentDTO.zhDescription || !!contentDTO.introduction) {
85 SearchContentComponent({ 85 SearchContentComponent({
86 contentDTO, 86 contentDTO,
87 compDTO: this.compDTO, 87 compDTO: this.compDTO,
@@ -33,7 +33,7 @@ export struct Card11Component { @@ -33,7 +33,7 @@ export struct Card11Component {
33 } 33 }
34 34
35 titleInit() { 35 titleInit() {
36 - const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title); 36 + const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title || this.contentDTO.newsTitle);
37 this.titleMarked = titleInitRes.titleMarked; 37 this.titleMarked = titleInitRes.titleMarked;
38 this.textArr = titleInitRes.textArr; 38 this.textArr = titleInitRes.textArr;
39 } 39 }
@@ -36,7 +36,7 @@ export struct Card20Component { @@ -36,7 +36,7 @@ export struct Card20Component {
36 } 36 }
37 37
38 titleInit() { 38 titleInit() {
39 - const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title); 39 + const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title || this.contentDTO.newsTitle);
40 this.titleMarked = titleInitRes.titleMarked; 40 this.titleMarked = titleInitRes.titleMarked;
41 this.textArr = titleInitRes.textArr; 41 this.textArr = titleInitRes.textArr;
42 } 42 }
@@ -55,7 +55,7 @@ export struct Card20Component { @@ -55,7 +55,7 @@ export struct Card20Component {
55 isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg 55 isPeopleShipHome:this.isPeopleShipHome, loadImg: this.loadImg
56 } 56 }
57 ) // 标题 57 ) // 标题
58 - if (this.contentDTO.newsTitle) { 58 + if (this.contentDTO.title || this.contentDTO.newsTitle) {
59 Stack() { 59 Stack() {
60 if(this.contentDTO.objectType == '5'){ 60 if(this.contentDTO.objectType == '5'){
61 Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(29).align(Alignment.Center) 61 Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(29).align(Alignment.Center)
@@ -36,7 +36,7 @@ export struct Card6Component { @@ -36,7 +36,7 @@ export struct Card6Component {
36 } 36 }
37 37
38 titleInit() { 38 titleInit() {
39 - const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title); 39 + const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.title || this.contentDTO.newsTitle);
40 this.titleMarked = titleInitRes.titleMarked; 40 this.titleMarked = titleInitRes.titleMarked;
41 this.textArr = titleInitRes.textArr; 41 this.textArr = titleInitRes.textArr;
42 } 42 }
@@ -80,7 +80,7 @@ export struct Card6Component { @@ -80,7 +80,7 @@ export struct Card6Component {
80 } 80 }
81 }) 81 })
82 } else { 82 } else {
83 - Span(this.contentDTO.newsTitle) 83 + Span(this.contentDTO.newsTitle || this.contentDTO.title)
84 } 84 }
85 } 85 }
86 .fontColor(this.clicked ? 0x848484 : 0x222222) 86 .fontColor(this.clicked ? 0x848484 : 0x222222)
@@ -34,7 +34,7 @@ export struct SearchContentComponent { @@ -34,7 +34,7 @@ export struct SearchContentComponent {
34 } 34 }
35 35
36 titleInit() { 36 titleInit() {
37 - const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.contentText || ''); 37 + const titleInitRes:titleInitRes = SearchShowRed.titleInit(this.contentDTO.contentText || this.contentDTO.zhDescription || this.contentDTO.introduction);
38 // this.titleMarked = titleInitRes.titleMarked; 38 // this.titleMarked = titleInitRes.titleMarked;
39 this.textArr = titleInitRes.textArr; 39 this.textArr = titleInitRes.textArr;
40 } 40 }
@@ -457,6 +457,8 @@ export struct SearchResultContentComponent { @@ -457,6 +457,8 @@ export struct SearchResultContentComponent {
457 let seoTags = value.data?.seoTags 457 let seoTags = value.data?.seoTags
458 let cornerMark = value.data?.cornerMark 458 let cornerMark = value.data?.cornerMark
459 let contentDTO = new ContentDTO(); 459 let contentDTO = new ContentDTO();
  460 + contentDTO.introduction = value.data.introduction
  461 + contentDTO.zhDescription = value.data.zhDescription
460 contentDTO.liveType = liveType ? liveType : "" 462 contentDTO.liveType = liveType ? liveType : ""
461 contentDTO.seoTags = seoTags ? seoTags : "" 463 contentDTO.seoTags = seoTags ? seoTags : ""
462 contentDTO.cornerMark = cornerMark ? cornerMark : "" 464 contentDTO.cornerMark = cornerMark ? cornerMark : ""
@@ -6,6 +6,8 @@ export class SearchResultContentItem{ @@ -6,6 +6,8 @@ export class SearchResultContentItem{
6 } 6 }
7 7
8 export class SearchDescription{ 8 export class SearchDescription{
  9 + introduction: string = ''
  10 + zhDescription: string = ''
9 likeEnable: string = "" 11 likeEnable: string = ""
10 previewUri: string = "" 12 previewUri: string = ""
11 firstFrameImageBucket: string = "" 13 firstFrameImageBucket: string = ""
@@ -151,7 +153,6 @@ export class SearchDescription{ @@ -151,7 +153,6 @@ export class SearchDescription{
151 liveEndTime: string = "" 153 liveEndTime: string = ""
152 topicTemplate: string = "" 154 topicTemplate: string = ""
153 barrageEnable: string = "" 155 barrageEnable: string = ""
154 - introduction: string = ""  
155 notice: string = "" 156 notice: string = ""
156 shareTitleLiteral: string = "" 157 shareTitleLiteral: string = ""
157 coverHImageUri: string = "" 158 coverHImageUri: string = ""