Merge branch 'main' of http://192.168.1.42/developOne/harmonyPool into main
* 'main' of http://192.168.1.42/developOne/harmonyPool: fix:1)修改我的首次删除弹框和清理缓存弹框按钮颜色 fix: 18424 UI还原问题-【生产环境】视频频道向上滑动,视频内容会一闪一闪,亮晶晶 feat:1)内链 页面,添加距顶部距底部间距 feat:1)公共跳转地方添加频道跳转功能
Showing
8 changed files
with
39 additions
and
6 deletions
| @@ -38,6 +38,10 @@ export class ContentConstants { | @@ -38,6 +38,10 @@ export class ContentConstants { | ||
| 38 | */ | 38 | */ |
| 39 | static readonly TYPE_NINE: string = "9"; | 39 | static readonly TYPE_NINE: string = "9"; |
| 40 | /** | 40 | /** |
| 41 | + * 11:频道跳转 | ||
| 42 | + */ | ||
| 43 | + static readonly TYPE_CHANNEL: string = "11"; | ||
| 44 | + /** | ||
| 41 | * 13:音频详情 | 45 | * 13:音频详情 |
| 42 | */ | 46 | */ |
| 43 | static readonly TYPE_AUDIO: string = "13"; | 47 | static readonly TYPE_AUDIO: string = "13"; |
| @@ -134,6 +134,10 @@ export class ProcessUtils { | @@ -134,6 +134,10 @@ export class ProcessUtils { | ||
| 134 | // 专题详情,跳转h5 | 134 | // 专题详情,跳转h5 |
| 135 | ProcessUtils.gotoSpecialTopic(content); | 135 | ProcessUtils.gotoSpecialTopic(content); |
| 136 | break; | 136 | break; |
| 137 | + case ContentConstants.TYPE_CHANNEL: | ||
| 138 | + // 频道跳转 | ||
| 139 | + HomeChannelUtils.jumpChannelTab(content.objectId, content.pageId, content.newsTitle) | ||
| 140 | + break; | ||
| 137 | //动态详情页(动态图文) | 141 | //动态详情页(动态图文) |
| 138 | case ContentConstants.TYPE_FOURTEEN: | 142 | case ContentConstants.TYPE_FOURTEEN: |
| 139 | ProcessUtils.gotoDynamicDetailPage(content); | 143 | ProcessUtils.gotoDynamicDetailPage(content); |
| @@ -104,7 +104,7 @@ export class ContentDTO implements BaseDTO { | @@ -104,7 +104,7 @@ export class ContentDTO implements BaseDTO { | ||
| 104 | //底部导航栏 id(用于频道跳转) | 104 | //底部导航栏 id(用于频道跳转) |
| 105 | bottomNavId: string = ''; | 105 | bottomNavId: string = ''; |
| 106 | // 链接类型: 0:无链接;1:内链(文章);2:外链 | 106 | // 链接类型: 0:无链接;1:内链(文章);2:外链 |
| 107 | - openType: string = ''; | 107 | + openType: string = '1'; |
| 108 | extra: string = '' | 108 | extra: string = '' |
| 109 | sameContentList:ContentDTO[] = [] | 109 | sameContentList:ContentDTO[] = [] |
| 110 | sameContentListJson:string = "" | 110 | sameContentListJson:string = "" |
| @@ -47,7 +47,7 @@ struct MyCollectionListPage { | @@ -47,7 +47,7 @@ struct MyCollectionListPage { | ||
| 47 | }, | 47 | }, |
| 48 | title:this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏', | 48 | title:this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏', |
| 49 | tipShow: false , | 49 | tipShow: false , |
| 50 | - leftTextColor:$r('app.color.color_648DF2'), | 50 | + leftTextColor:$r('app.color.color_333333') |
| 51 | }), | 51 | }), |
| 52 | autoCancel: true, | 52 | autoCancel: true, |
| 53 | alignment: DialogAlignment.Center, | 53 | alignment: DialogAlignment.Center, |
| @@ -49,7 +49,7 @@ export struct MineSettingComponent { | @@ -49,7 +49,7 @@ export struct MineSettingComponent { | ||
| 49 | title: "清理缓存", | 49 | title: "清理缓存", |
| 50 | tipValue:"是否确认清理此App的缓存", | 50 | tipValue:"是否确认清理此App的缓存", |
| 51 | tipShow:true, | 51 | tipShow:true, |
| 52 | - leftTextColor:$r('app.color.color_648DF2') | 52 | + leftTextColor:$r('app.color.color_333333') |
| 53 | }), | 53 | }), |
| 54 | autoCancel: true, | 54 | autoCancel: true, |
| 55 | alignment: DialogAlignment.Center, | 55 | alignment: DialogAlignment.Center, |
| @@ -68,7 +68,9 @@ export struct DetailPlayShortVideoPage { | @@ -68,7 +68,9 @@ export struct DetailPlayShortVideoPage { | ||
| 68 | this.queryNewsInfoOfUser() | 68 | this.queryNewsInfoOfUser() |
| 69 | if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) { | 69 | if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) { |
| 70 | await this.playerController.play() | 70 | await this.playerController.play() |
| 71 | + await this.playerController.startRenderFrame(() => { | ||
| 71 | this.imageVisible = false | 72 | this.imageVisible = false |
| 73 | + }) | ||
| 72 | } | 74 | } |
| 73 | } | 75 | } |
| 74 | } | 76 | } |
| @@ -81,7 +83,9 @@ export struct DetailPlayShortVideoPage { | @@ -81,7 +83,9 @@ export struct DetailPlayShortVideoPage { | ||
| 81 | if (this.currentIndex === this.index) { | 83 | if (this.currentIndex === this.index) { |
| 82 | if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) { | 84 | if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) { |
| 83 | await this.playerController.play() | 85 | await this.playerController.play() |
| 86 | + await this.playerController.startRenderFrame(() => { | ||
| 84 | this.imageVisible = false | 87 | this.imageVisible = false |
| 88 | + }) | ||
| 85 | } else { | 89 | } else { |
| 86 | this.playerController.pause() | 90 | this.playerController.pause() |
| 87 | } | 91 | } |
| @@ -106,14 +110,18 @@ export struct DetailPlayShortVideoPage { | @@ -106,14 +110,18 @@ export struct DetailPlayShortVideoPage { | ||
| 106 | this.playerController.onCanplay = async () => { | 110 | this.playerController.onCanplay = async () => { |
| 107 | this.ratio = this.playerController.videoWidth / this.playerController.videoHeight | 111 | this.ratio = this.playerController.videoWidth / this.playerController.videoHeight |
| 108 | await this.playerController.play() | 112 | await this.playerController.play() |
| 113 | + await this.playerController.startRenderFrame(() => { | ||
| 109 | this.imageVisible = false | 114 | this.imageVisible = false |
| 115 | + }) | ||
| 110 | } | 116 | } |
| 111 | } else { | 117 | } else { |
| 112 | if (!this.onlyWifiLoadVideo) { | 118 | if (!this.onlyWifiLoadVideo) { |
| 113 | await this.playerController.pause() | 119 | await this.playerController.pause() |
| 114 | } else { | 120 | } else { |
| 115 | await this.playerController.play() | 121 | await this.playerController.play() |
| 122 | + await this.playerController.startRenderFrame(() => { | ||
| 116 | this.imageVisible = false | 123 | this.imageVisible = false |
| 124 | + }) | ||
| 117 | } | 125 | } |
| 118 | } | 126 | } |
| 119 | } | 127 | } |
| @@ -186,7 +194,9 @@ export struct DetailPlayShortVideoPage { | @@ -186,7 +194,9 @@ export struct DetailPlayShortVideoPage { | ||
| 186 | await this.playerController.pause() | 194 | await this.playerController.pause() |
| 187 | } else { | 195 | } else { |
| 188 | await this.playerController.play() | 196 | await this.playerController.play() |
| 197 | + await this.playerController.startRenderFrame(() => { | ||
| 189 | this.imageVisible = false | 198 | this.imageVisible = false |
| 199 | + }) | ||
| 190 | } | 200 | } |
| 191 | } | 201 | } |
| 192 | } | 202 | } |
| @@ -363,8 +373,10 @@ export struct DetailPlayShortVideoPage { | @@ -363,8 +373,10 @@ export struct DetailPlayShortVideoPage { | ||
| 363 | this.onlyWifiLoadVideo = true | 373 | this.onlyWifiLoadVideo = true |
| 364 | this.toastTextVisible = false | 374 | this.toastTextVisible = false |
| 365 | this.playerController?.play() | 375 | this.playerController?.play() |
| 376 | + this.playerController.startRenderFrame(() => { | ||
| 366 | this.imageVisible = false | 377 | this.imageVisible = false |
| 367 | }) | 378 | }) |
| 379 | + }) | ||
| 368 | } | 380 | } |
| 369 | .width('100%') | 381 | .width('100%') |
| 370 | .height(64) | 382 | .height(64) |
| @@ -250,6 +250,13 @@ export class WDPlayerController { | @@ -250,6 +250,13 @@ export class WDPlayerController { | ||
| 250 | this.avPlayer?.play(); | 250 | this.avPlayer?.play(); |
| 251 | } | 251 | } |
| 252 | 252 | ||
| 253 | + async startRenderFrame(cb: Function) { | ||
| 254 | + this.avPlayer?.on('startRenderFrame', () => { | ||
| 255 | + cb && cb(); | ||
| 256 | + console.info('startRenderFrame success') | ||
| 257 | + }) | ||
| 258 | + } | ||
| 259 | + | ||
| 253 | async stop() { | 260 | async stop() { |
| 254 | // if (this.avPlayer == null) { | 261 | // if (this.avPlayer == null) { |
| 255 | // await this.initPromise; | 262 | // await this.initPromise; |
| @@ -9,6 +9,8 @@ const TAG = 'DefaultWebPage' | @@ -9,6 +9,8 @@ const TAG = 'DefaultWebPage' | ||
| 9 | @Entry | 9 | @Entry |
| 10 | @Component | 10 | @Component |
| 11 | struct DefaultWebPage { | 11 | struct DefaultWebPage { |
| 12 | + @State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number; | ||
| 13 | + @State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0 | ||
| 12 | webviewControl: BridgeWebViewControl = new BridgeWebViewControl() | 14 | webviewControl: BridgeWebViewControl = new BridgeWebViewControl() |
| 13 | scroller: Scroller = new Scroller(); | 15 | scroller: Scroller = new Scroller(); |
| 14 | action: Action = {} as Action | 16 | action: Action = {} as Action |
| @@ -24,10 +26,10 @@ struct DefaultWebPage { | @@ -24,10 +26,10 @@ struct DefaultWebPage { | ||
| 24 | isPageEnd: $isPageEnd | 26 | isPageEnd: $isPageEnd |
| 25 | }) | 27 | }) |
| 26 | }.layoutWeight(1) | 28 | }.layoutWeight(1) |
| 27 | - .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP]) | 29 | + |
| 28 | 30 | ||
| 29 | Row() { | 31 | Row() { |
| 30 | - Button({type: ButtonType.Normal}) { | 32 | + Button({ type: ButtonType.Normal }) { |
| 31 | Image($r("app.media.back_icon_black")) | 33 | Image($r("app.media.back_icon_black")) |
| 32 | .width(20).height(25) | 34 | .width(20).height(25) |
| 33 | }.height(44).width(44) | 35 | }.height(44).width(44) |
| @@ -35,13 +37,17 @@ struct DefaultWebPage { | @@ -35,13 +37,17 @@ struct DefaultWebPage { | ||
| 35 | .onClick(() => { | 37 | .onClick(() => { |
| 36 | router.back() | 38 | router.back() |
| 37 | }) | 39 | }) |
| 40 | + | ||
| 38 | Blank() | 41 | Blank() |
| 39 | }.width("100%").height(44) | 42 | }.width("100%").height(44) |
| 40 | .alignItems(VerticalAlign.Center) | 43 | .alignItems(VerticalAlign.Center) |
| 41 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) | 44 | .expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM]) |
| 42 | } | 45 | } |
| 43 | .width(CommonConstants.FULL_WIDTH) | 46 | .width(CommonConstants.FULL_WIDTH) |
| 44 | - .height(CommonConstants.FULL_HEIGHT) | 47 | + .height(CommonConstants.FULL_HEIGHT).padding({ |
| 48 | + top: px2vp(this.topSafeHeight), | ||
| 49 | + bottom: px2vp(this.bottomSafeHeight) | ||
| 50 | + }) | ||
| 45 | } | 51 | } |
| 46 | 52 | ||
| 47 | aboutToAppear() { | 53 | aboutToAppear() { |
-
Please register or login to post a comment