Showing
7 changed files
with
39 additions
and
35 deletions
| @@ -219,8 +219,7 @@ struct createImg { | @@ -219,8 +219,7 @@ struct createImg { | ||
| 219 | }) { | 219 | }) { |
| 220 | Image(this.loadImg ? item.fullUrl : '') | 220 | Image(this.loadImg ? item.fullUrl : '') |
| 221 | .backgroundColor(0xf5f5f5) | 221 | .backgroundColor(0xf5f5f5) |
| 222 | - .width(113) | ||
| 223 | - .height(113) | 222 | + .aspectRatio(item.landscape === 1 ? 343 / 172 : 228 / 305) |
| 224 | .autoResize(true) | 223 | .autoResize(true) |
| 225 | .borderRadius(this.caclImageRadius(index)) | 224 | .borderRadius(this.caclImageRadius(index)) |
| 226 | .opacity(!item.weight && !item.height ? 0 : 1) | 225 | .opacity(!item.weight && !item.height ? 0 : 1) |
| @@ -88,7 +88,7 @@ export struct Card6Component { | @@ -88,7 +88,7 @@ export struct Card6Component { | ||
| 88 | .fontSize(18) | 88 | .fontSize(18) |
| 89 | .lineHeight(27) | 89 | .lineHeight(27) |
| 90 | .fontWeight(FontWeight.Normal) | 90 | .fontWeight(FontWeight.Normal) |
| 91 | - .maxLines(this.contentDTO.appStyle === '6' ? 5 : 2) | 91 | + .maxLines(this.contentDTO.appStyle === '6' ? 4 : 2) |
| 92 | .alignSelf(ItemAlign.Start) | 92 | .alignSelf(ItemAlign.Start) |
| 93 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 | 93 | .textOverflow({ overflow: TextOverflow.Ellipsis }) // 超出的部分显示省略号。 |
| 94 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && | 94 | .textIndent((this.contentDTO.newTags?.length || this.contentDTO.seoTags?.length) > 2 && |
| @@ -107,7 +107,7 @@ export struct Card6Component { | @@ -107,7 +107,7 @@ export struct Card6Component { | ||
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | .alignItems(HorizontalAlign.Start) | 109 | .alignItems(HorizontalAlign.Start) |
| 110 | - .height(78) | 110 | + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) |
| 111 | 111 | ||
| 112 | 112 | ||
| 113 | .justifyContent(FlexAlign.SpaceBetween) | 113 | .justifyContent(FlexAlign.SpaceBetween) |
| @@ -119,7 +119,7 @@ export struct Card6Component { | @@ -119,7 +119,7 @@ export struct Card6Component { | ||
| 119 | .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) | 119 | .backgroundColor(this.loadImg ? $r('app.color.color_B0B0B0') : 0xf5f5f5) |
| 120 | .borderRadius(5) | 120 | .borderRadius(5) |
| 121 | .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) | 121 | .aspectRatio(this.contentDTO.appStyle === CompStyle.Card_13 ? 3 / 2 : 3 / 4) |
| 122 | - .height(78) | 122 | + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 78 : 156) |
| 123 | CardMediaInfo({ contentDTO: this.contentDTO }) | 123 | CardMediaInfo({ contentDTO: this.contentDTO }) |
| 124 | } | 124 | } |
| 125 | 125 | ||
| @@ -138,8 +138,7 @@ export struct Card6Component { | @@ -138,8 +138,7 @@ export struct Card6Component { | ||
| 138 | }) | 138 | }) |
| 139 | 139 | ||
| 140 | .width(CommonConstants.FULL_WIDTH) | 140 | .width(CommonConstants.FULL_WIDTH) |
| 141 | - .height(106) | ||
| 142 | - .justifyContent(FlexAlign.SpaceBetween) | 141 | + .height(this.contentDTO.appStyle === CompStyle.Card_13 ? 106 : 184) .justifyContent(FlexAlign.SpaceBetween) |
| 143 | .alignItems(VerticalAlign.Top) | 142 | .alignItems(VerticalAlign.Top) |
| 144 | } | 143 | } |
| 145 | } | 144 | } |
| @@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel'; | @@ -4,7 +4,7 @@ import PageModel from '../../viewmodel/PageModel'; | ||
| 4 | import { CommonConstants, ViewType } from 'wdConstant' | 4 | import { CommonConstants, ViewType } from 'wdConstant' |
| 5 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' | 5 | import { EmptyComponent,WDViewDefaultType } from '../view/EmptyComponent' |
| 6 | import { ErrorComponent } from '../view/ErrorComponent' | 6 | import { ErrorComponent } from '../view/ErrorComponent' |
| 7 | -import { CompDTO, ContentDTO } from 'wdBean' | 7 | +import { CompDTO, ContentDTO, contentListParams,contentListItem } from 'wdBean' |
| 8 | import NoMoreLayout from './NoMoreLayout' | 8 | import NoMoreLayout from './NoMoreLayout' |
| 9 | import { CustomSelectUI } from '../view/CustomSelectUI'; | 9 | import { CustomSelectUI } from '../view/CustomSelectUI'; |
| 10 | import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; | 10 | import { CustomBottomFuctionUI } from '../view/CustomBottomFuctionUI'; |
| @@ -149,16 +149,13 @@ struct MyCollectionListPage { | @@ -149,16 +149,13 @@ struct MyCollectionListPage { | ||
| 149 | .margin({left:16}) | 149 | .margin({left:16}) |
| 150 | } | 150 | } |
| 151 | Column() { | 151 | Column() { |
| 152 | - BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO}) | 152 | + BigPicCardComponent({compDTO:new CompDTO,contentDTO:compDTO,pageId:TrackConstants.PageName.My_Collect,pageName:TrackConstants.PageName.My_Collect}) |
| 153 | } | 153 | } |
| 154 | }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { | 154 | }.onVisibleAreaChange([0.0, 1.0], (isVisible: boolean, currentRatio: number) => { |
| 155 | if (isVisible) { | 155 | if (isVisible) { |
| 156 | TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO)) | 156 | TrackingContent.common(TrackConstants.EventType.Show, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO)) |
| 157 | } | 157 | } |
| 158 | }) | 158 | }) |
| 159 | - // .onClick(()=>{ | ||
| 160 | - // TrackingContent.common(TrackConstants.EventType.Click, TrackConstants.PageName.My_Collect,TrackConstants.PageName.My_Collect, TrackParamConvert.program(compDTO)) | ||
| 161 | - // }) | ||
| 162 | } | 159 | } |
| 163 | 160 | ||
| 164 | 161 | ||
| @@ -262,4 +259,12 @@ struct MyCollectionListPage { | @@ -262,4 +259,12 @@ struct MyCollectionListPage { | ||
| 262 | } | 259 | } |
| 263 | } | 260 | } |
| 264 | 261 | ||
| 262 | + getContentData(){ | ||
| 263 | + for (let index = 0; index < this.allDatas.length; index++) { | ||
| 264 | + const compDTO = this.allDatas[index]; | ||
| 265 | + compDTO.isCollection = true ///用于时间展示 | ||
| 266 | + this.allDatas.push(compDTO) | ||
| 267 | + } | ||
| 268 | + } | ||
| 269 | + | ||
| 265 | } | 270 | } |
| @@ -15,6 +15,8 @@ const TAG: string = 'BigPicCardComponent'; | @@ -15,6 +15,8 @@ const TAG: string = 'BigPicCardComponent'; | ||
| 15 | @Component | 15 | @Component |
| 16 | export struct BigPicCardComponent { | 16 | export struct BigPicCardComponent { |
| 17 | @ObjectLink compDTO: CompDTO | 17 | @ObjectLink compDTO: CompDTO |
| 18 | + @State pageId: string = ''; | ||
| 19 | + @State pageName: string = ''; | ||
| 18 | contentDTO: ContentDTO = new ContentDTO(); | 20 | contentDTO: ContentDTO = new ContentDTO(); |
| 19 | 21 | ||
| 20 | aboutToAppear() { | 22 | aboutToAppear() { |
| @@ -110,7 +112,7 @@ export struct BigPicCardComponent { | @@ -110,7 +112,7 @@ export struct BigPicCardComponent { | ||
| 110 | 112 | ||
| 111 | @Builder | 113 | @Builder |
| 112 | cardBuild() { | 114 | cardBuild() { |
| 113 | - CardParser({ compDTO: this.compDTO, contentDTO: this.contentDTO }); | 115 | + CardParser({ compDTO: this.compDTO, contentDTO: this.contentDTO,pageId:this.pageId,pageName:this.pageName}); |
| 114 | } | 116 | } |
| 115 | } | 117 | } |
| 116 | 118 |
| @@ -66,7 +66,7 @@ export struct TopPlayComponent { | @@ -66,7 +66,7 @@ export struct TopPlayComponent { | ||
| 66 | * 更新直播播放数据 | 66 | * 更新直播播放数据 |
| 67 | */ | 67 | */ |
| 68 | updateData() { | 68 | updateData() { |
| 69 | - // 检测等待中的直播预告是否视频资源 | 69 | + // 检测直播等待状态的直播预告是否视频资源 |
| 70 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1 | 70 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewType === 1 |
| 71 | && this.contentDetailData?.liveInfo?.liveState == 'wait' | 71 | && this.contentDetailData?.liveInfo?.liveState == 'wait' |
| 72 | && this.contentDetailData.liveInfo.previewUrl && | 72 | && this.contentDetailData.liveInfo.previewUrl && |
| @@ -79,7 +79,6 @@ export struct TopPlayComponent { | @@ -79,7 +79,6 @@ export struct TopPlayComponent { | ||
| 79 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl && | 79 | if (this.contentDetailData.liveInfo && this.contentDetailData.liveInfo.previewUrl && |
| 80 | this.contentDetailData.liveInfo.previewUrl.length > 0) { | 80 | this.contentDetailData.liveInfo.previewUrl.length > 0) { |
| 81 | this.previewUrl = this.contentDetailData.liveInfo.previewUrl | 81 | this.previewUrl = this.contentDetailData.liveInfo.previewUrl |
| 82 | - | ||
| 83 | } else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) { | 82 | } else if (this.contentDetailData.fullColumnImgUrls && this.contentDetailData.fullColumnImgUrls.length > 0) { |
| 84 | this.previewUrl = this.contentDetailData.fullColumnImgUrls[0].url | 83 | this.previewUrl = this.contentDetailData.fullColumnImgUrls[0].url |
| 85 | } | 84 | } |
| @@ -126,8 +125,8 @@ export struct TopPlayComponent { | @@ -126,8 +125,8 @@ export struct TopPlayComponent { | ||
| 126 | } | 125 | } |
| 127 | // 直播结束 | 126 | // 直播结束 |
| 128 | if (this.contentDetailData?.liveInfo?.liveState === 'end') { | 127 | if (this.contentDetailData?.liveInfo?.liveState === 'end') { |
| 129 | - this.isHideLoading = true | ||
| 130 | - this.isWait = StringUtils.isNotEmpty(this.playUrl) | 128 | + this.isHideLoading = !StringUtils.isNotEmpty(this.playUrl) |
| 129 | + this.isWait = !StringUtils.isNotEmpty(this.playUrl) | ||
| 131 | } | 130 | } |
| 132 | 131 | ||
| 133 | 132 | ||
| @@ -141,7 +140,7 @@ export struct TopPlayComponent { | @@ -141,7 +140,7 @@ export struct TopPlayComponent { | ||
| 141 | this.previewUrl = '' | 140 | this.previewUrl = '' |
| 142 | } | 141 | } |
| 143 | } | 142 | } |
| 144 | - //Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd+' -->'+this.isVideoSource) | 143 | + // Logger.debug(TAG, `---0------>` + this.isWait + ' ->' + this.isHideLoading + ' ->' + this.isEnd+' -->'+this.isVideoSource) |
| 145 | } | 144 | } |
| 146 | 145 | ||
| 147 | tryToPlay() { | 146 | tryToPlay() { |
| @@ -74,6 +74,22 @@ struct LaunchAdvertisingPage { | @@ -74,6 +74,22 @@ struct LaunchAdvertisingPage { | ||
| 74 | bottom: 0 | 74 | bottom: 0 |
| 75 | }) | 75 | }) |
| 76 | 76 | ||
| 77 | + if (this.defaultModel.isAd === '1'){ | ||
| 78 | + Stack({alignContent:Alignment.TopStart}){ | ||
| 79 | + Text('广告') | ||
| 80 | + .fontColor(Color.White) | ||
| 81 | + .textAlign(TextAlign.Center) | ||
| 82 | + .fontSize('24lpx') | ||
| 83 | + .width('72lpx') | ||
| 84 | + .height('36lpx') | ||
| 85 | + .borderRadius(2) | ||
| 86 | + .margin({top:'15lpx',left:'19lpx'}) | ||
| 87 | + .backgroundColor('#80000000') | ||
| 88 | + } | ||
| 89 | + .width('100%') | ||
| 90 | + .height('100%') | ||
| 91 | + } | ||
| 92 | + | ||
| 77 | Stack({alignContent:Alignment.TopEnd}){ | 93 | Stack({alignContent:Alignment.TopEnd}){ |
| 78 | Button(){ | 94 | Button(){ |
| 79 | Text(this.time + 's 跳过') | 95 | Text(this.time + 's 跳过') |
| @@ -95,22 +111,6 @@ struct LaunchAdvertisingPage { | @@ -95,22 +111,6 @@ struct LaunchAdvertisingPage { | ||
| 95 | .width('100%') | 111 | .width('100%') |
| 96 | .height('100%') | 112 | .height('100%') |
| 97 | 113 | ||
| 98 | - if (this.defaultModel.isAd === '1'){ | ||
| 99 | - Stack({alignContent:Alignment.TopStart}){ | ||
| 100 | - Text('广告') | ||
| 101 | - .fontColor(Color.White) | ||
| 102 | - .textAlign(TextAlign.Center) | ||
| 103 | - .fontSize('24lpx') | ||
| 104 | - .width('72lpx') | ||
| 105 | - .height('36lpx') | ||
| 106 | - .borderRadius(2) | ||
| 107 | - .margin({top:'15lpx',left:'19lpx'}) | ||
| 108 | - .backgroundColor('#80000000') | ||
| 109 | - } | ||
| 110 | - .width('100%') | ||
| 111 | - .height('100%') | ||
| 112 | - } | ||
| 113 | - | ||
| 114 | if(this.defaultModel.screenType != '2'){ | 114 | if(this.defaultModel.screenType != '2'){ |
| 115 | //底部logo样式 按钮加载在背景展示图上 | 115 | //底部logo样式 按钮加载在背景展示图上 |
| 116 | Button(){ | 116 | Button(){ |
| @@ -179,7 +179,7 @@ export struct VideoChannelPage { | @@ -179,7 +179,7 @@ export struct VideoChannelPage { | ||
| 179 | channelId: item.channelId + '', | 179 | channelId: item.channelId + '', |
| 180 | autoRefresh: this.autoRefresh | 180 | autoRefresh: this.autoRefresh |
| 181 | }) | 181 | }) |
| 182 | - .padding({ top: 40 }) | 182 | + .padding({ top: 55 }) |
| 183 | .backgroundColor(Color.White) | 183 | .backgroundColor(Color.White) |
| 184 | } | 184 | } |
| 185 | }, (item: TopNavDTO) => item.channelId + '') | 185 | }, (item: TopNavDTO) => item.channelId + '') |
-
Please register or login to post a comment