王士厅

fix: 第一次进入点击底部视频tab ,底部直播tab小红点未显示

... ... @@ -6,6 +6,7 @@ import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from
import { DisplayDirection } from 'wdConstant/Index'
import { window } from '@kit.ArkUI'
const TAG = 'PlayerFullScreenView'
@Component
export struct PlayerFullScreenView {
private playerController?: WDPlayerController;
... ... @@ -33,7 +34,11 @@ export struct PlayerFullScreenView {
}
share() {
this.playerController?.switchPlayOrPause()
WDShare.shareContent(this.contentDetailData)
// WDShare.shareContent(this.contentDetailData).then(() => {
// this.playerController?.switchPlayOrPause()
// })
}
updateProgress() {
... ... @@ -150,11 +155,13 @@ export struct PlayerFullScreenView {
Image($r(`app.media.ic_play_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible)
.onClick(() => {
// console.log(TAG, `ic_play_2 onClick`, this.status )
this.playerController?.switchPlayOrPause()
})
Image($r(`app.media.ic_pause_2`)).height(24).width(24)
.visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible)
.onClick(() => {
// console.log(TAG, `ic_pause_2 onClick`, this.status )
this.playerController?.switchPlayOrPause()
})
... ...
... ... @@ -48,6 +48,7 @@ export struct VideoChannelPage {
@State isShowAudioCom: boolean = false
// 国殇灰度管理
GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
@StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
async aboutToAppear() {
// 背景图高度
... ... @@ -161,15 +162,30 @@ export struct VideoChannelPage {
.width(CommonUtils.calTopTabWidth(36, item.iconUrlSize))
.enabled(false)
} else {
Stack({ alignContent: Alignment.TopEnd }){
Text(item.name)
.fontSize($r('app.float.selected_text_size'))
.fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
.fontColor(this.getTopNavFontColor(item, index))
.maxLines(this.MAX_LINE)
if (item.name == '直播') {
Button()
.type(ButtonType.Circle)
.width(6)
.height(6)
.backgroundColor('#ED2800')
.position({
x: 36,
y: -4
})
.visibility(this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
}
}
.padding({
top: $r('app.float.top_tab_item_padding_top'),
bottom: $r('app.float.top_tab_item_padding_bottom')
})
.maxLines(this.MAX_LINE)
Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
.width(20)
... ... @@ -186,7 +202,7 @@ export struct VideoChannelPage {
// 视频tab埋点
const tab = this.topNavList[index]
this.handleAudio(tab)
Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
// Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
const params: ParamType = {
"pageName": tab.name,
"tabName": tab.name,
... ...