wangliang_wd

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)公共跳转地方添加频道跳转功能
... ... @@ -38,6 +38,10 @@ export class ContentConstants {
*/
static readonly TYPE_NINE: string = "9";
/**
* 11:频道跳转
*/
static readonly TYPE_CHANNEL: string = "11";
/**
* 13:音频详情
*/
static readonly TYPE_AUDIO: string = "13";
... ...
... ... @@ -134,6 +134,10 @@ export class ProcessUtils {
// 专题详情,跳转h5
ProcessUtils.gotoSpecialTopic(content);
break;
case ContentConstants.TYPE_CHANNEL:
// 频道跳转
HomeChannelUtils.jumpChannelTab(content.objectId, content.pageId, content.newsTitle)
break;
//动态详情页(动态图文)
case ContentConstants.TYPE_FOURTEEN:
ProcessUtils.gotoDynamicDetailPage(content);
... ...
... ... @@ -104,7 +104,7 @@ export class ContentDTO implements BaseDTO {
//底部导航栏 id(用于频道跳转)
bottomNavId: string = '';
// 链接类型: 0:无链接;1:内链(文章);2:外链
openType: string = '';
openType: string = '1';
extra: string = ''
sameContentList:ContentDTO[] = []
sameContentListJson:string = ""
... ...
... ... @@ -47,7 +47,7 @@ struct MyCollectionListPage {
},
title:this.isAllSelect?'是否确认清空?':'确认删除'+this.deleteNum.toString()+'条收藏',
tipShow: false ,
leftTextColor:$r('app.color.color_648DF2'),
leftTextColor:$r('app.color.color_333333')
}),
autoCancel: true,
alignment: DialogAlignment.Center,
... ...
... ... @@ -49,7 +49,7 @@ export struct MineSettingComponent {
title: "清理缓存",
tipValue:"是否确认清理此App的缓存",
tipShow:true,
leftTextColor:$r('app.color.color_648DF2')
leftTextColor:$r('app.color.color_333333')
}),
autoCancel: true,
alignment: DialogAlignment.Center,
... ...
... ... @@ -68,7 +68,9 @@ export struct DetailPlayShortVideoPage {
this.queryNewsInfoOfUser()
if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) {
await this.playerController.play()
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
}
}
... ... @@ -81,7 +83,9 @@ export struct DetailPlayShortVideoPage {
if (this.currentIndex === this.index) {
if (this.switchVideoStatus && this.isPlay && this.onlyWifiLoadVideo) {
await this.playerController.play()
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
} else {
this.playerController.pause()
}
... ... @@ -106,14 +110,18 @@ export struct DetailPlayShortVideoPage {
this.playerController.onCanplay = async () => {
this.ratio = this.playerController.videoWidth / this.playerController.videoHeight
await this.playerController.play()
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
} else {
if (!this.onlyWifiLoadVideo) {
await this.playerController.pause()
} else {
await this.playerController.play()
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
}
}
... ... @@ -186,7 +194,9 @@ export struct DetailPlayShortVideoPage {
await this.playerController.pause()
} else {
await this.playerController.play()
await this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
}
}
}
... ... @@ -363,8 +373,10 @@ export struct DetailPlayShortVideoPage {
this.onlyWifiLoadVideo = true
this.toastTextVisible = false
this.playerController?.play()
this.playerController.startRenderFrame(() => {
this.imageVisible = false
})
})
}
.width('100%')
.height(64)
... ...
... ... @@ -250,6 +250,13 @@ export class WDPlayerController {
this.avPlayer?.play();
}
async startRenderFrame(cb: Function) {
this.avPlayer?.on('startRenderFrame', () => {
cb && cb();
console.info('startRenderFrame success')
})
}
async stop() {
// if (this.avPlayer == null) {
// await this.initPromise;
... ...
... ... @@ -9,6 +9,8 @@ const TAG = 'DefaultWebPage'
@Entry
@Component
struct DefaultWebPage {
@State topSafeHeight: number = AppStorage.get<number>('topSafeHeight') as number;
@State bottomSafeHeight: number = AppStorage.get<number>('bottomSafeHeight') || 0
webviewControl: BridgeWebViewControl = new BridgeWebViewControl()
scroller: Scroller = new Scroller();
action: Action = {} as Action
... ... @@ -24,10 +26,10 @@ struct DefaultWebPage {
isPageEnd: $isPageEnd
})
}.layoutWeight(1)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP])
Row() {
Button({type: ButtonType.Normal}) {
Button({ type: ButtonType.Normal }) {
Image($r("app.media.back_icon_black"))
.width(20).height(25)
}.height(44).width(44)
... ... @@ -35,13 +37,17 @@ struct DefaultWebPage {
.onClick(() => {
router.back()
})
Blank()
}.width("100%").height(44)
.alignItems(VerticalAlign.Center)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.BOTTOM])
}
.width(CommonConstants.FULL_WIDTH)
.height(CommonConstants.FULL_HEIGHT)
.height(CommonConstants.FULL_HEIGHT).padding({
top: px2vp(this.topSafeHeight),
bottom: px2vp(this.bottomSafeHeight)
})
}
aboutToAppear() {
... ...