Showing
11 changed files
with
98 additions
and
62 deletions
| 1 | -import { EmitterUtils, EmitterEventId, Logger } from 'wdKit/Index' | 1 | +import { EmitterUtils, EmitterEventId, Logger, NetworkUtil } from 'wdKit/Index' |
| 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel' | 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel' |
| 3 | import { FollowListItem } from '../../../viewmodel/FollowListItem' | 3 | import { FollowListItem } from '../../../viewmodel/FollowListItem' |
| 4 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' | 4 | import { CustomTitleUI } from '../../reusable/CustomTitleUI' |
| 5 | +import { EmptyComponent } from '../../view/EmptyComponent' | ||
| 5 | import { FollowSecondTabsComponent } from './FollowSecondTabsComponent' | 6 | import { FollowSecondTabsComponent } from './FollowSecondTabsComponent' |
| 6 | const TAG = "FollowFirstTabsComponent" | 7 | const TAG = "FollowFirstTabsComponent" |
| 7 | @Component | 8 | @Component |
| @@ -12,13 +13,24 @@ export struct FollowFirstTabsComponent{ | @@ -12,13 +13,24 @@ export struct FollowFirstTabsComponent{ | ||
| 12 | @State data:FollowListItem[] = [] | 13 | @State data:FollowListItem[] = [] |
| 13 | fontColor: string = '#999999' | 14 | fontColor: string = '#999999' |
| 14 | selectedFontColor: string = '#000000' | 15 | selectedFontColor: string = '#000000' |
| 16 | + @State isConnectNetwork : boolean = NetworkUtil.isNetConnected() | ||
| 15 | 17 | ||
| 16 | aboutToAppear(){ | 18 | aboutToAppear(){ |
| 19 | + this.getFollowTabList() | ||
| 20 | + | ||
| 21 | + EmitterUtils.receiveEvent(EmitterEventId.MY_FOLLOW_EMPTY, (() => { | ||
| 22 | + if(this.controller != null && this.data.length>1 ){ | ||
| 23 | + this.jumpFollowNextPage() | ||
| 24 | + } | ||
| 25 | + })) | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + getFollowTabList(){ | ||
| 17 | MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ | 29 | MinePageDatasModel.getFollowListData(getContext(this)).then((value)=>{ |
| 18 | this.data.push(new FollowListItem("我的")) | 30 | this.data.push(new FollowListItem("我的")) |
| 19 | - value.forEach((element)=>{ | ||
| 20 | - this.data.push(element) | ||
| 21 | - }) | 31 | + value.forEach((element)=>{ |
| 32 | + this.data.push(element) | ||
| 33 | + }) | ||
| 22 | 34 | ||
| 23 | if(this.controller != null && this.data.length>1 && this.changeIndex === 1){ | 35 | if(this.controller != null && this.data.length>1 && this.changeIndex === 1){ |
| 24 | this.jumpFollowNextPage() | 36 | this.jumpFollowNextPage() |
| @@ -26,12 +38,6 @@ export struct FollowFirstTabsComponent{ | @@ -26,12 +38,6 @@ export struct FollowFirstTabsComponent{ | ||
| 26 | }).catch((err:Error)=>{ | 38 | }).catch((err:Error)=>{ |
| 27 | console.log(TAG,JSON.stringify(err)) | 39 | console.log(TAG,JSON.stringify(err)) |
| 28 | }) | 40 | }) |
| 29 | - | ||
| 30 | - EmitterUtils.receiveEvent(EmitterEventId.MY_FOLLOW_EMPTY, (() => { | ||
| 31 | - if(this.controller != null && this.data.length>1 ){ | ||
| 32 | - this.jumpFollowNextPage() | ||
| 33 | - } | ||
| 34 | - })) | ||
| 35 | } | 41 | } |
| 36 | 42 | ||
| 37 | jumpFollowNextPage(){ | 43 | jumpFollowNextPage(){ |
| @@ -75,24 +81,40 @@ export struct FollowFirstTabsComponent{ | @@ -75,24 +81,40 @@ export struct FollowFirstTabsComponent{ | ||
| 75 | //标题栏目 | 81 | //标题栏目 |
| 76 | CustomTitleUI({titleName:"关注列表"}) | 82 | CustomTitleUI({titleName:"关注列表"}) |
| 77 | 83 | ||
| 78 | - Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { | ||
| 79 | - ForEach(this.data, (item: FollowListItem, index: number ) => { | ||
| 80 | - TabContent(){ | ||
| 81 | - FollowSecondTabsComponent({data:$data,firstIndex:index}) | ||
| 82 | - }.tabBar(this.TabBuilder(index,item)) | ||
| 83 | - }, (item: FollowListItem, index: number) => index.toString()) | 84 | + if(!this.isConnectNetwork){ |
| 85 | + EmptyComponent({ emptyType: 1,emptyHeight:"100%" ,retry: () => { | ||
| 86 | + this.reloadNetWork() | ||
| 87 | + },}) | ||
| 88 | + .layoutWeight(1) | ||
| 89 | + .width('100%') | ||
| 90 | + }else{ | ||
| 91 | + Tabs({ barPosition: BarPosition.Start, controller: this.controller }) { | ||
| 92 | + ForEach(this.data, (item: FollowListItem, index: number ) => { | ||
| 93 | + TabContent(){ | ||
| 94 | + FollowSecondTabsComponent({data:$data,firstIndex:index}) | ||
| 95 | + }.tabBar(this.TabBuilder(index,item)) | ||
| 96 | + }, (item: FollowListItem, index: number) => index.toString()) | ||
| 97 | + } | ||
| 98 | + .vertical(false) | ||
| 99 | + .barMode(BarMode.Scrollable) | ||
| 100 | + .barWidth('100%') | ||
| 101 | + .barBackgroundColor($r('app.color.white')) | ||
| 102 | + .barHeight('84lpx') | ||
| 103 | + .animationDuration(0) | ||
| 104 | + .onChange((index: number) => { | ||
| 105 | + this.currentIndex = index | ||
| 106 | + }) | ||
| 107 | + .width('100%') | ||
| 108 | + .layoutWeight(1) | ||
| 84 | } | 109 | } |
| 85 | - .vertical(false) | ||
| 86 | - .barMode(BarMode.Scrollable) | ||
| 87 | - .barWidth('100%') | ||
| 88 | - .barBackgroundColor($r('app.color.white')) | ||
| 89 | - .barHeight('84lpx') | ||
| 90 | - .animationDuration(0) | ||
| 91 | - .onChange((index: number) => { | ||
| 92 | - this.currentIndex = index | ||
| 93 | - }) | ||
| 94 | - .width('100%') | ||
| 95 | - .layoutWeight(1) | ||
| 96 | }.width('100%') | 110 | }.width('100%') |
| 97 | } | 111 | } |
| 112 | + | ||
| 113 | + reloadNetWork(){ | ||
| 114 | + let c = NetworkUtil.isNetConnected() | ||
| 115 | + if(c){ | ||
| 116 | + this.getFollowTabList() | ||
| 117 | + this.isConnectNetwork = c | ||
| 118 | + } | ||
| 119 | + } | ||
| 98 | } | 120 | } |
| 1 | -import { EmitterEventId, EmitterUtils, LazyDataSource, SPHelper, UserDataLocal } from 'wdKit'; | 1 | +import { EmitterEventId, EmitterUtils, LazyDataSource, NetworkUtil, SPHelper, UserDataLocal } from 'wdKit'; |
| 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; | 2 | import MinePageDatasModel from '../../../model/MinePageDatasModel'; |
| 3 | import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel'; | 3 | import SearcherAboutDataModel from '../../../model/SearcherAboutDataModel'; |
| 4 | import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem'; | 4 | import { CreatorDetailRequestItem } from '../../../viewmodel/CreatorDetailRequestItem'; |
| @@ -70,7 +70,11 @@ export struct FollowListDetailUI { | @@ -70,7 +70,11 @@ export struct FollowListDetailUI { | ||
| 70 | Column() { | 70 | Column() { |
| 71 | if (this.count === 0) { | 71 | if (this.count === 0) { |
| 72 | if (this.isGetRequest == true) { | 72 | if (this.isGetRequest == true) { |
| 73 | - if(this.creatorDirectoryId === -1){ | 73 | + if(!NetworkUtil.isNetConnected()){ |
| 74 | + EmptyComponent({ emptyType: 1,emptyHeight:"100%" }) | ||
| 75 | + .layoutWeight(1) | ||
| 76 | + .width('100%') | ||
| 77 | + }else if(this.creatorDirectoryId === -1){ | ||
| 74 | EmptyComponent({ emptyType: 14,emptyHeight:"100%" }) | 78 | EmptyComponent({ emptyType: 14,emptyHeight:"100%" }) |
| 75 | .layoutWeight(1) | 79 | .layoutWeight(1) |
| 76 | .width('100%') | 80 | .width('100%') |
| @@ -129,7 +129,7 @@ struct ReserveMorePage { | @@ -129,7 +129,7 @@ struct ReserveMorePage { | ||
| 129 | Stack() { | 129 | Stack() { |
| 130 | Image(item.fullColumnImgUrls[0]?.url) | 130 | Image(item.fullColumnImgUrls[0]?.url) |
| 131 | .width('100%') | 131 | .width('100%') |
| 132 | - .height(196) | 132 | + .objectFit(ImageFit.Contain) |
| 133 | .borderRadius(4) | 133 | .borderRadius(4) |
| 134 | this.LiveImage() | 134 | this.LiveImage() |
| 135 | 135 | ||
| @@ -283,7 +283,7 @@ struct ReserveMorePage { | @@ -283,7 +283,7 @@ struct ReserveMorePage { | ||
| 283 | .fontWeight(400) | 283 | .fontWeight(400) |
| 284 | .fontColor(Color.White) | 284 | .fontColor(Color.White) |
| 285 | } | 285 | } |
| 286 | - .backgroundColor('#4D000000') | 286 | + .backgroundColor(Color.Transparent) |
| 287 | .margin({ right: 8, bottom: 8 }) | 287 | .margin({ right: 8, bottom: 8 }) |
| 288 | } | 288 | } |
| 289 | 289 |
| @@ -16,7 +16,7 @@ export struct SearchHistoryComponent{ | @@ -16,7 +16,7 @@ export struct SearchHistoryComponent{ | ||
| 16 | confirm: () => { | 16 | confirm: () => { |
| 17 | this.onAccept() | 17 | this.onAccept() |
| 18 | }, | 18 | }, |
| 19 | - title: "确认清空历史记录", | 19 | + title: "确认清空历史记录?", |
| 20 | tipShow:false, | 20 | tipShow:false, |
| 21 | leftTextColor:$r('app.color.color_648DF2') | 21 | leftTextColor:$r('app.color.color_648DF2') |
| 22 | }), | 22 | }), |
| @@ -51,7 +51,7 @@ export struct SearchHistoryComponent{ | @@ -51,7 +51,7 @@ export struct SearchHistoryComponent{ | ||
| 51 | .height('31lpx') | 51 | .height('31lpx') |
| 52 | .width('31lpx') | 52 | .width('31lpx') |
| 53 | .interpolation(ImageInterpolation.High) | 53 | .interpolation(ImageInterpolation.High) |
| 54 | - .objectFit(ImageFit.Cover) | 54 | + .objectFit(ImageFit.Auto) |
| 55 | .onClick(()=>{ | 55 | .onClick(()=>{ |
| 56 | //弹框提示 | 56 | //弹框提示 |
| 57 | this.dialogController.open() | 57 | this.dialogController.open() |
| @@ -234,7 +234,9 @@ export struct AccountAndSecurityLayout { | @@ -234,7 +234,9 @@ export struct AccountAndSecurityLayout { | ||
| 234 | RelativeContainer() { | 234 | RelativeContainer() { |
| 235 | Text('注销账号') | 235 | Text('注销账号') |
| 236 | .fontColor('#FF333333') | 236 | .fontColor('#FF333333') |
| 237 | - .fontSize(18) | 237 | + .fontSize("35lpx") |
| 238 | + .fontWeight(400) | ||
| 239 | + .lineHeight("50lpx") | ||
| 238 | .textAlign(TextAlign.Center) | 240 | .textAlign(TextAlign.Center) |
| 239 | .height(44) | 241 | .height(44) |
| 240 | .alignRules({ | 242 | .alignRules({ |
| @@ -265,51 +267,52 @@ export struct AccountAndSecurityLayout { | @@ -265,51 +267,52 @@ export struct AccountAndSecurityLayout { | ||
| 265 | 267 | ||
| 266 | Text('为保证您的账号安全,在您提交的注销申请生效前,需同时满足以下几个条件:') | 268 | Text('为保证您的账号安全,在您提交的注销申请生效前,需同时满足以下几个条件:') |
| 267 | .fontColor('#FF222222') | 269 | .fontColor('#FF222222') |
| 268 | - .fontSize(16) | ||
| 269 | .fontWeight(600) | 270 | .fontWeight(600) |
| 270 | - .padding({ top:17,left: 16, right: 16 }) | 271 | + .lineHeight("42lpx") |
| 272 | + .fontSize("31lpx") | ||
| 273 | + .padding({ top:17,left: "31lpx", right: "31lpx" }) | ||
| 271 | .width('100%') | 274 | .width('100%') |
| 272 | 275 | ||
| 273 | Text('1. 账号处于安全状态') | 276 | Text('1. 账号处于安全状态') |
| 274 | .fontColor('#FF222222') | 277 | .fontColor('#FF222222') |
| 275 | .fontSize(16) | 278 | .fontSize(16) |
| 276 | .fontWeight(600) | 279 | .fontWeight(600) |
| 277 | - .padding({ top: 24, left: 16 }) | 280 | + .padding({ top: 24, left: "62lpx" }) |
| 278 | .width('100%') | 281 | .width('100%') |
| 279 | 282 | ||
| 280 | Text('账号处于正常使用状态,无被盗风险。') | 283 | Text('账号处于正常使用状态,无被盗风险。') |
| 281 | .fontColor('#FF666666') | 284 | .fontColor('#FF666666') |
| 282 | .fontSize(14) | 285 | .fontSize(14) |
| 283 | .fontWeight(400) | 286 | .fontWeight(400) |
| 284 | - .padding({ top: 8, left: 16 }) | 287 | + .padding({ top: 8, left: "62lpx" }) |
| 285 | .width('100%') | 288 | .width('100%') |
| 286 | 289 | ||
| 287 | Text('2. 账号权限解除') | 290 | Text('2. 账号权限解除') |
| 288 | .fontColor('#FF222222') | 291 | .fontColor('#FF222222') |
| 289 | .fontSize(16) | 292 | .fontSize(16) |
| 290 | .fontWeight(600) | 293 | .fontWeight(600) |
| 291 | - .padding({ top: 24, left: 16 }) | 294 | + .padding({ top: 24, left: "62lpx" }) |
| 292 | .width('100%') | 295 | .width('100%') |
| 293 | 296 | ||
| 294 | Text('账号已解除与其他产品的授权登录或绑定关系。') | 297 | Text('账号已解除与其他产品的授权登录或绑定关系。') |
| 295 | .fontColor('#FF666666') | 298 | .fontColor('#FF666666') |
| 296 | .fontSize(14) | 299 | .fontSize(14) |
| 297 | .fontWeight(400) | 300 | .fontWeight(400) |
| 298 | - .padding({ top: 8, left: 16 }) | 301 | + .padding({ top: 8, left: "62lpx" }) |
| 299 | .width('100%') | 302 | .width('100%') |
| 300 | 303 | ||
| 301 | Text('3. 账号无任何纠纷,包括举报投诉') | 304 | Text('3. 账号无任何纠纷,包括举报投诉') |
| 302 | .fontColor('#FF222222') | 305 | .fontColor('#FF222222') |
| 303 | .fontSize(16) | 306 | .fontSize(16) |
| 304 | .fontWeight(600) | 307 | .fontWeight(600) |
| 305 | - .padding({ top: 24, left: 16 }) | 308 | + .padding({ top: 24, left: "62lpx" }) |
| 306 | .width('100%') | 309 | .width('100%') |
| 307 | 310 | ||
| 308 | Text('请注意:注销后7天内不能再次注册人民日报客户端,需要等到账号冷静期结束才能再次登录注册') | 311 | Text('请注意:注销后7天内不能再次注册人民日报客户端,需要等到账号冷静期结束才能再次登录注册') |
| 309 | .fontColor('#FFED2800') | 312 | .fontColor('#FFED2800') |
| 310 | .fontSize(14) | 313 | .fontSize(14) |
| 311 | .fontWeight(400) | 314 | .fontWeight(400) |
| 312 | - .padding({ top: 32, left: 16, right: 16 }) | 315 | + .padding({ top: 32, left: "31lpx", right: "31lpx" }) |
| 313 | .width('100%') | 316 | .width('100%') |
| 314 | 317 | ||
| 315 | }.alignRules({ | 318 | }.alignRules({ |
sight_harmony/features/wdDetailPlayLive/src/main/resources/base/media/datail_imageLoading_w.gif
0 → 100644
191 KB
| @@ -54,11 +54,11 @@ export struct DetailPlayShortVideoPage { | @@ -54,11 +54,11 @@ export struct DetailPlayShortVideoPage { | ||
| 54 | /** | 54 | /** |
| 55 | * 页面显示重查用户关注、点赞等信息 | 55 | * 页面显示重查用户关注、点赞等信息 |
| 56 | */ | 56 | */ |
| 57 | - pageShowChange() { | 57 | + async pageShowChange() { |
| 58 | if (this.currentIndex === this.index) { | 58 | if (this.currentIndex === this.index) { |
| 59 | this.queryNewsInfoOfUser() | 59 | this.queryNewsInfoOfUser() |
| 60 | if (this.switchVideoStatus) { | 60 | if (this.switchVideoStatus) { |
| 61 | - this.playerController.play() | 61 | + await this.playerController.play() |
| 62 | this.imageVisible = false | 62 | this.imageVisible = false |
| 63 | } | 63 | } |
| 64 | } | 64 | } |
| @@ -68,10 +68,10 @@ export struct DetailPlayShortVideoPage { | @@ -68,10 +68,10 @@ export struct DetailPlayShortVideoPage { | ||
| 68 | * 频道切换视频暂停、播放 | 68 | * 频道切换视频暂停、播放 |
| 69 | * 页面显隐视频暂停、播放 | 69 | * 页面显隐视频暂停、播放 |
| 70 | */ | 70 | */ |
| 71 | - videoStatusChange() { | 71 | + async videoStatusChange() { |
| 72 | if (this.currentIndex === this.index) { | 72 | if (this.currentIndex === this.index) { |
| 73 | if (this.switchVideoStatus) { | 73 | if (this.switchVideoStatus) { |
| 74 | - this.playerController.play() | 74 | + await this.playerController.play() |
| 75 | this.imageVisible = false | 75 | this.imageVisible = false |
| 76 | } else { | 76 | } else { |
| 77 | this.playerController.pause() | 77 | this.playerController.pause() |
| @@ -82,7 +82,7 @@ export struct DetailPlayShortVideoPage { | @@ -82,7 +82,7 @@ export struct DetailPlayShortVideoPage { | ||
| 82 | /** | 82 | /** |
| 83 | * 监听下标变化手动创建或销毁视频 | 83 | * 监听下标变化手动创建或销毁视频 |
| 84 | */ | 84 | */ |
| 85 | - currentIndexChange() { | 85 | + async currentIndexChange() { |
| 86 | if (this.currentIndex != this.index) { | 86 | if (this.currentIndex != this.index) { |
| 87 | this.playerController.pause() | 87 | this.playerController.pause() |
| 88 | if (this.index <= this.currentIndex - 2 && this.playerController.getPlayer()) { | 88 | if (this.index <= this.currentIndex - 2 && this.playerController.getPlayer()) { |
| @@ -94,7 +94,7 @@ export struct DetailPlayShortVideoPage { | @@ -94,7 +94,7 @@ export struct DetailPlayShortVideoPage { | ||
| 94 | if (!this.playerController.getPlayer()) { | 94 | if (!this.playerController.getPlayer()) { |
| 95 | this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl || ''); | 95 | this.playerController.firstPlay(this.contentDetailData?.videoInfo[0]?.videoUrl || ''); |
| 96 | } else { | 96 | } else { |
| 97 | - this.playerController.play() | 97 | + await this.playerController.play() |
| 98 | this.imageVisible = false | 98 | this.imageVisible = false |
| 99 | } | 99 | } |
| 100 | } | 100 | } |
| @@ -153,10 +153,10 @@ export struct DetailPlayShortVideoPage { | @@ -153,10 +153,10 @@ export struct DetailPlayShortVideoPage { | ||
| 153 | this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape | 153 | this.videoLandScape = this.contentDetailData.videoInfo[0]?.videoLandScape |
| 154 | this.ratio = this.contentDetailData.videoInfo[0].resolutionWidth / | 154 | this.ratio = this.contentDetailData.videoInfo[0].resolutionWidth / |
| 155 | this.contentDetailData.videoInfo[0].resolutionHeight | 155 | this.contentDetailData.videoInfo[0].resolutionHeight |
| 156 | - this.playerController.onCanplay = () => { | 156 | + this.playerController.onCanplay = async () => { |
| 157 | this.ratio = this.playerController.videoWidth / this.playerController.videoHeight | 157 | this.ratio = this.playerController.videoWidth / this.playerController.videoHeight |
| 158 | if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) { | 158 | if ((this.index == 0 || this.currentIndex === this.index) && this.switchVideoStatus) { |
| 159 | - this.playerController.play() | 159 | + await this.playerController.play() |
| 160 | this.imageVisible = false | 160 | this.imageVisible = false |
| 161 | } | 161 | } |
| 162 | } | 162 | } |
| @@ -186,7 +186,7 @@ export struct DetailPlayShortVideoPage { | @@ -186,7 +186,7 @@ export struct DetailPlayShortVideoPage { | ||
| 186 | Stack({ alignContent: Alignment.Top }) { | 186 | Stack({ alignContent: Alignment.Top }) { |
| 187 | Column() { | 187 | Column() { |
| 188 | Stack() { | 188 | Stack() { |
| 189 | - // this.playerCoverBuilder() | 189 | + |
| 190 | this.playerViewBuilder() | 190 | this.playerViewBuilder() |
| 191 | 191 | ||
| 192 | PlayerBottomView({ | 192 | PlayerBottomView({ |
| @@ -243,16 +243,14 @@ export struct DetailPlayShortVideoPage { | @@ -243,16 +243,14 @@ export struct DetailPlayShortVideoPage { | ||
| 243 | */ | 243 | */ |
| 244 | @Builder | 244 | @Builder |
| 245 | playerCoverBuilder() { | 245 | playerCoverBuilder() { |
| 246 | + // 问题:画面会闪一下 | ||
| 246 | Image(this.contentDetailData?.firstFrameImageUri) | 247 | Image(this.contentDetailData?.firstFrameImageUri) |
| 247 | .width('100%') | 248 | .width('100%') |
| 248 | - .padding({ | ||
| 249 | - bottom: this.videoLandScape === 1 ? 115 : 0, | ||
| 250 | - })// .align(this.videoLandScape === 0 ? Alignment.Top : Alignment.Center) | ||
| 251 | - .fitOriginalSize(true) | ||
| 252 | - .autoResize(true) | ||
| 253 | - .position({ x: 0, y: this.videoLandScape === 0 ? 0 : '50%' }) | ||
| 254 | - .markAnchor({ y: this.videoLandScape === 0 ? 0 : '50%' }) | ||
| 255 | - // .visibility(this.imageVisible ? Visibility.Visible : Visibility.None) | 249 | + .height(this.windowWidth / this.ratio + 'px') |
| 250 | + .opacity(this.imageVisible ? 1 : 0) | ||
| 251 | + .animation({ | ||
| 252 | + duration: 500, curve: Curve.EaseInOut | ||
| 253 | + }) | ||
| 256 | } | 254 | } |
| 257 | 255 | ||
| 258 | @Builder | 256 | @Builder |
| @@ -269,6 +267,8 @@ export struct DetailPlayShortVideoPage { | @@ -269,6 +267,8 @@ export struct DetailPlayShortVideoPage { | ||
| 269 | .width('100%') | 267 | .width('100%') |
| 270 | .height(this.windowWidth / this.ratio + 'px') | 268 | .height(this.windowWidth / this.ratio + 'px') |
| 271 | 269 | ||
| 270 | + this.playerCoverBuilder() | ||
| 271 | + | ||
| 272 | // .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' : | 272 | // .height(this.displayDirection === DisplayDirection.VIDEO_HORIZONTAL ? '100%' : |
| 273 | // this.videoLandScape === 1 ? 210 : 'auto')// .height(this.videoLandScape === 1 ? 210 : '100%') | 273 | // this.videoLandScape === 1 ? 210 : 'auto')// .height(this.videoLandScape === 1 ? 210 : '100%') |
| 274 | // .width(this.videoLandScape === 1 ? | 274 | // .width(this.videoLandScape === 1 ? |
| @@ -16,7 +16,7 @@ export struct PictureLoading { | @@ -16,7 +16,7 @@ export struct PictureLoading { | ||
| 16 | build() { | 16 | build() { |
| 17 | Row() { | 17 | Row() { |
| 18 | Image(this.imagePath) | 18 | Image(this.imagePath) |
| 19 | - .alt($r('app.media.picture_loading')) | 19 | + .alt($r('app.media.datail_imageLoading_w')) |
| 20 | .width(this.imageWidth) | 20 | .width(this.imageWidth) |
| 21 | .aspectRatio(this.ratio) | 21 | .aspectRatio(this.ratio) |
| 22 | .objectFit(ImageFit.Fill) | 22 | .objectFit(ImageFit.Fill) |
| @@ -254,7 +254,8 @@ export struct VideoChannelDetail { | @@ -254,7 +254,8 @@ export struct VideoChannelDetail { | ||
| 254 | }) | 254 | }) |
| 255 | } else { | 255 | } else { |
| 256 | 256 | ||
| 257 | - PictureLoading().visibility(this.isMouted ? Visibility.None : Visibility.Visible) | 257 | + PictureLoading() |
| 258 | + .visibility(this.isMouted ? Visibility.None : Visibility.Visible) | ||
| 258 | Swiper(this.swiperController) { | 259 | Swiper(this.swiperController) { |
| 259 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { | 260 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { |
| 260 | Column() { | 261 | Column() { |
191 KB
| @@ -2,6 +2,7 @@ import { PageComponent } from 'wdComponent/Index'; | @@ -2,6 +2,7 @@ import { PageComponent } from 'wdComponent/Index'; | ||
| 2 | import { HashMap } from '@kit.ArkTS'; | 2 | import { HashMap } from '@kit.ArkTS'; |
| 3 | import { router } from '@kit.ArkUI'; | 3 | import { router } from '@kit.ArkUI'; |
| 4 | import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; | 4 | import { AssignChannelParam } from 'wdRouter/src/main/ets/utils/HomeChannelUtils'; |
| 5 | +import { CustomTitleUI } from 'wdComponent/src/main/ets/components/reusable/CustomTitleUI'; | ||
| 5 | 6 | ||
| 6 | const TAG = 'ColumnPage'; | 7 | const TAG = 'ColumnPage'; |
| 7 | 8 | ||
| @@ -15,21 +16,26 @@ export struct ColumnPage { | @@ -15,21 +16,26 @@ export struct ColumnPage { | ||
| 15 | @State param: AssignChannelParam = router.getParams() as AssignChannelParam | 16 | @State param: AssignChannelParam = router.getParams() as AssignChannelParam |
| 16 | pageId: string = ""; | 17 | pageId: string = ""; |
| 17 | channelId: string = ""; | 18 | channelId: string = ""; |
| 19 | + pageName: string = '' | ||
| 18 | 20 | ||
| 19 | aboutToAppear() { | 21 | aboutToAppear() { |
| 20 | this.pageId = this.param.pageId | 22 | this.pageId = this.param.pageId |
| 21 | this.channelId = this.param.channelId | 23 | this.channelId = this.param.channelId |
| 24 | + this.pageName = this.param.pageName | ||
| 22 | } | 25 | } |
| 23 | 26 | ||
| 24 | build() { | 27 | build() { |
| 25 | Column() { | 28 | Column() { |
| 29 | + CustomTitleUI({ titleName: this.pageName }) | ||
| 26 | PageComponent({ | 30 | PageComponent({ |
| 27 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, | 31 | currentTopNavSelectedIndex: $currentTopNavSelectedIndex, |
| 28 | navIndex: this.currentTopNavSelectedIndex, | 32 | navIndex: this.currentTopNavSelectedIndex, |
| 29 | pageId: this.pageId, | 33 | pageId: this.pageId, |
| 30 | channelId: this.channelId, | 34 | channelId: this.channelId, |
| 31 | }); | 35 | }); |
| 32 | - } | 36 | + }.height('100%') |
| 37 | + .width('100%') | ||
| 38 | + .backgroundColor($r('app.color.white')) | ||
| 33 | } | 39 | } |
| 34 | } | 40 | } |
| 35 | 41 |
-
Please register or login to post a comment