Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool
Showing
13 changed files
with
31 additions
and
22 deletions
| @@ -69,9 +69,9 @@ export class ContentDTO implements BaseDTO { | @@ -69,9 +69,9 @@ export class ContentDTO implements BaseDTO { | ||
| 69 | vImageUrl: string = ''; | 69 | vImageUrl: string = ''; |
| 70 | screenType: string = ''; | 70 | screenType: string = ''; |
| 71 | source: string = ''; | 71 | source: string = ''; |
| 72 | - objectType: string = ''; | 72 | + objectType: string = '';//0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频,14动态图文,15动态视频 |
| 73 | objectId: string = ''; | 73 | objectId: string = ''; |
| 74 | - objectLevel: string = ''; | 74 | + objectLevel: string = '';// 对象分类;频道(1:一级频道,2:二级频道),专题(21:文章专题,22:音频专题,23:直播专题,24:话题专题) |
| 75 | channelId: string = ''; | 75 | channelId: string = ''; |
| 76 | relId: string = ''; | 76 | relId: string = ''; |
| 77 | relType: string = ''; | 77 | relType: string = ''; |
| @@ -122,7 +122,7 @@ export struct Card10Component { | @@ -122,7 +122,7 @@ export struct Card10Component { | ||
| 122 | ProcessUtils.processPage(this.contentDTO) | 122 | ProcessUtils.processPage(this.contentDTO) |
| 123 | }) | 123 | }) |
| 124 | if (this.contentDTO.objectType == '5') { | 124 | if (this.contentDTO.objectType == '5') { |
| 125 | - Notes({ objectType: 5 }).margin({ left: 5, bottom: 5 }) | 125 | + Notes({ objectType: 5,objectLevel:this.contentDTO.objectLevel }).margin({ left: 5, bottom: 5 }) |
| 126 | } | 126 | } |
| 127 | }.alignContent(Alignment.BottomStart) | 127 | }.alignContent(Alignment.BottomStart) |
| 128 | 128 | ||
| @@ -212,7 +212,7 @@ export struct Card10ComponentTimelineItem { | @@ -212,7 +212,7 @@ export struct Card10ComponentTimelineItem { | ||
| 212 | Column() { | 212 | Column() { |
| 213 | Stack() { | 213 | Stack() { |
| 214 | if (this.slideItem.objectType == '5') { | 214 | if (this.slideItem.objectType == '5') { |
| 215 | - Notes({ objectType: 5 }) | 215 | + Notes({ objectType: 5,objectLevel:this.slideItem.objectLevel }) |
| 216 | } | 216 | } |
| 217 | Text(this.slideItem.newsTitle) | 217 | Text(this.slideItem.newsTitle) |
| 218 | .fontSize($r('app.float.font_size_17')) | 218 | .fontSize($r('app.float.font_size_17')) |
| @@ -255,7 +255,7 @@ export struct Card10ComponentTimelineItem { | @@ -255,7 +255,7 @@ export struct Card10ComponentTimelineItem { | ||
| 255 | Column() { | 255 | Column() { |
| 256 | Stack() { | 256 | Stack() { |
| 257 | if (this.slideItem.objectType == '5') { | 257 | if (this.slideItem.objectType == '5') { |
| 258 | - Notes({ objectType: 5 }) | 258 | + Notes({ objectType: 5,objectLevel:this.slideItem.objectLevel }) |
| 259 | } | 259 | } |
| 260 | Text(this.slideItem.newsTitle) | 260 | Text(this.slideItem.newsTitle) |
| 261 | .fontSize($r('app.float.font_size_17')) | 261 | .fontSize($r('app.float.font_size_17')) |
| @@ -41,7 +41,7 @@ export struct Card11Component { | @@ -41,7 +41,7 @@ export struct Card11Component { | ||
| 41 | Column() { | 41 | Column() { |
| 42 | Stack() { | 42 | Stack() { |
| 43 | if(this.contentDTO.objectType == '5'){ | 43 | if(this.contentDTO.objectType == '5'){ |
| 44 | - Notes({ objectType: this.contentDTO.objectType, }).height(28).align(Alignment.Center) | 44 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(28).align(Alignment.Center) |
| 45 | } else { | 45 | } else { |
| 46 | if (this.contentDTO.seoTags) { | 46 | if (this.contentDTO.seoTags) { |
| 47 | Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) | 47 | Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) |
| @@ -56,7 +56,7 @@ export struct Card20Component { | @@ -56,7 +56,7 @@ export struct Card20Component { | ||
| 56 | if (this.contentDTO.newsTitle) { | 56 | if (this.contentDTO.newsTitle) { |
| 57 | Stack() { | 57 | Stack() { |
| 58 | if(this.contentDTO.objectType == '5'){ | 58 | if(this.contentDTO.objectType == '5'){ |
| 59 | - Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) | 59 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(29).align(Alignment.Center) |
| 60 | } else { | 60 | } else { |
| 61 | if (this.contentDTO.seoTags) { | 61 | if (this.contentDTO.seoTags) { |
| 62 | Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center) | 62 | Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center) |
| @@ -49,7 +49,7 @@ export struct Card2Component { | @@ -49,7 +49,7 @@ export struct Card2Component { | ||
| 49 | Column() { | 49 | Column() { |
| 50 | Stack() { | 50 | Stack() { |
| 51 | if(this.contentDTO.objectType == '5'){ | 51 | if(this.contentDTO.objectType == '5'){ |
| 52 | - Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) | 52 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(29).align(Alignment.Center) |
| 53 | } else { | 53 | } else { |
| 54 | if (this.contentDTO.seoTags) { | 54 | if (this.contentDTO.seoTags) { |
| 55 | Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center) | 55 | Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center) |
| @@ -39,7 +39,7 @@ export struct Card3Component { | @@ -39,7 +39,7 @@ export struct Card3Component { | ||
| 39 | Column() { | 39 | Column() { |
| 40 | Stack() { | 40 | Stack() { |
| 41 | if(this.contentDTO.objectType == '5'){ | 41 | if(this.contentDTO.objectType == '5'){ |
| 42 | - Notes({ objectType: this.contentDTO.objectType }).height(29).align(Alignment.Center) | 42 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(29).align(Alignment.Center) |
| 43 | } else { | 43 | } else { |
| 44 | if (this.contentDTO.seoTags) { | 44 | if (this.contentDTO.seoTags) { |
| 45 | Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center) | 45 | Notes({ newTags: this.contentDTO.seoTags }).height(29).align(Alignment.Center) |
| @@ -49,7 +49,7 @@ export struct Card4Component { | @@ -49,7 +49,7 @@ export struct Card4Component { | ||
| 49 | Column() { | 49 | Column() { |
| 50 | Stack() { | 50 | Stack() { |
| 51 | if(this.contentDTO.objectType == '5'){ | 51 | if(this.contentDTO.objectType == '5'){ |
| 52 | - Notes({ objectType: this.contentDTO.objectType }).height(19).align(Alignment.Center) | 52 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(19).align(Alignment.Center) |
| 53 | } else { | 53 | } else { |
| 54 | if (this.contentDTO.seoTags) { | 54 | if (this.contentDTO.seoTags) { |
| 55 | Notes({ newTags: this.contentDTO.seoTags }).height(19).align(Alignment.Center) | 55 | Notes({ newTags: this.contentDTO.seoTags }).height(19).align(Alignment.Center) |
| @@ -77,7 +77,7 @@ export struct Card5Component { | @@ -77,7 +77,7 @@ export struct Card5Component { | ||
| 77 | Row() { | 77 | Row() { |
| 78 | Stack() { | 78 | Stack() { |
| 79 | if(this.contentDTO.objectType == '5'){ | 79 | if(this.contentDTO.objectType == '5'){ |
| 80 | - Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) | 80 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center) |
| 81 | } else { | 81 | } else { |
| 82 | if (this.contentDTO.seoTags) { | 82 | if (this.contentDTO.seoTags) { |
| 83 | Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) | 83 | Notes({ newTags: this.contentDTO.seoTags }).height(20).align(Alignment.Center) |
| @@ -46,7 +46,7 @@ export struct Card6Component { | @@ -46,7 +46,7 @@ export struct Card6Component { | ||
| 46 | Column() { | 46 | Column() { |
| 47 | Stack() { | 47 | Stack() { |
| 48 | if(this.contentDTO.objectType == '5'){ | 48 | if(this.contentDTO.objectType == '5'){ |
| 49 | - Notes({ objectType: this.contentDTO.objectType }).height(28).align(Alignment.Center) | 49 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(28).align(Alignment.Center) |
| 50 | } else { | 50 | } else { |
| 51 | if (this.contentDTO.seoTags) { | 51 | if (this.contentDTO.seoTags) { |
| 52 | Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) | 52 | Notes({ newTags: this.contentDTO.seoTags }).height(28).align(Alignment.Center) |
| @@ -108,7 +108,7 @@ export struct Card9Component { | @@ -108,7 +108,7 @@ export struct Card9Component { | ||
| 108 | topRight: $r('app.float.image_border_radius') | 108 | topRight: $r('app.float.image_border_radius') |
| 109 | }) | 109 | }) |
| 110 | if(this.contentDTO.objectType == '5'){ | 110 | if(this.contentDTO.objectType == '5'){ |
| 111 | - Notes({ objectType: this.contentDTO.objectType }).height(20).align(Alignment.Center) | 111 | + Notes({ objectType: this.contentDTO.objectType,objectLevel:this.contentDTO.objectLevel }).height(20).align(Alignment.Center) |
| 112 | .margin({ left: 5, bottom: 5 }) | 112 | .margin({ left: 5, bottom: 5 }) |
| 113 | } else { | 113 | } else { |
| 114 | if (this.contentDTO.seoTags) { | 114 | if (this.contentDTO.seoTags) { |
| @@ -2,12 +2,14 @@ | @@ -2,12 +2,14 @@ | ||
| 2 | * 表示 | 2 | * 表示 |
| 3 | * objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频, | 3 | * objectType 0:不跳转 1:点播,2:直播,3:活动,4:广告,5:专题,6:链接,7:榜单,8:图文,9:组图,10:H5新闻,11:频道,12:组件,13:音频, |
| 4 | 14动态图文,15动态视频16问政;100人民号,101标签 | 4 | 14动态图文,15动态视频16问政;100人民号,101标签 |
| 5 | + * objectLevel: 对象分类;频道(1:一级频道,2:二级频道),专题(21:文章专题,22:音频专题,23:直播专题,24:话题专题) | ||
| 5 | */ | 6 | */ |
| 6 | 7 | ||
| 7 | @Preview | 8 | @Preview |
| 8 | @Component | 9 | @Component |
| 9 | export struct Notes { | 10 | export struct Notes { |
| 10 | @State objectType: number | string = 5 | 11 | @State objectType: number | string = 5 |
| 12 | + @State objectLevel: number | string = -1 | ||
| 11 | @State newTags: string = '' | 13 | @State newTags: string = '' |
| 12 | @State seoTags: string = '' | 14 | @State seoTags: string = '' |
| 13 | build() { | 15 | build() { |
| @@ -30,16 +32,19 @@ export struct Notes { | @@ -30,16 +32,19 @@ export struct Notes { | ||
| 30 | returnTypeTitleFn(): string { | 32 | returnTypeTitleFn(): string { |
| 31 | if (this.newTags) { | 33 | if (this.newTags) { |
| 32 | return this.newTags | 34 | return this.newTags |
| 33 | - } else { | ||
| 34 | - if (this.objectType == 5) { | ||
| 35 | - return '专题' | ||
| 36 | - } else if (this.objectType == 10) { | ||
| 37 | - return 'H5' | ||
| 38 | - } else if (this.objectType == 8) { | ||
| 39 | - return '文章' | 35 | + } |
| 36 | + if (this.objectType == 5) { | ||
| 37 | + if (this.objectLevel == 24) { | ||
| 38 | + return '调查' | ||
| 40 | } | 39 | } |
| 40 | + return '专题' | ||
| 41 | + } | ||
| 42 | + if (this.objectType == 10) { | ||
| 43 | + return 'H5' | ||
| 44 | + } | ||
| 45 | + if (this.objectType == 8) { | ||
| 46 | + return '文章' | ||
| 41 | } | 47 | } |
| 42 | - | ||
| 43 | return '' | 48 | return '' |
| 44 | } | 49 | } |
| 45 | } | 50 | } |
| @@ -219,7 +219,7 @@ struct CarouselLayout01CardView { | @@ -219,7 +219,7 @@ struct CarouselLayout01CardView { | ||
| 219 | // 文本信息 | 219 | // 文本信息 |
| 220 | Stack() { | 220 | Stack() { |
| 221 | if(this.item.objectType == '5'){ | 221 | if(this.item.objectType == '5'){ |
| 222 | - Notes({ objectType: this.item.objectType }) | 222 | + Notes({ objectType: this.item.objectType,objectLevel:this.item.objectLevel }) |
| 223 | } else { | 223 | } else { |
| 224 | if (this.item.seoTags) { | 224 | if (this.item.seoTags) { |
| 225 | Notes({ newTags: this.item.seoTags }) | 225 | Notes({ newTags: this.item.seoTags }) |
| @@ -209,6 +209,10 @@ export struct DetailPlayShortVideoPage { | @@ -209,6 +209,10 @@ export struct DetailPlayShortVideoPage { | ||
| 209 | this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') | 209 | this.publishCommentModel.targetId = String(this.contentDetailData?.newsId || '') |
| 210 | this.publishCommentModel.targetTitle = String(this.contentDetailData?.newsTitle || '') | 210 | this.publishCommentModel.targetTitle = String(this.contentDetailData?.newsTitle || '') |
| 211 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') | 211 | this.publishCommentModel.targetType = String(this.contentDetailData?.newsType || '') |
| 212 | + | ||
| 213 | + ///解决初始化竖屏视频时 this.ratio未更新导致显示错误 | ||
| 214 | + this.calculatePlayerRect() | ||
| 215 | + | ||
| 212 | } | 216 | } |
| 213 | 217 | ||
| 214 | contentTrackingDict() { | 218 | contentTrackingDict() { |
-
Please register or login to post a comment