王士厅

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

@@ -6,6 +6,7 @@ import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from @@ -6,6 +6,7 @@ import { DateTimeUtils, EmitterEventId, EmitterUtils, Logger, WindowModel } from
6 import { DisplayDirection } from 'wdConstant/Index' 6 import { DisplayDirection } from 'wdConstant/Index'
7 import { window } from '@kit.ArkUI' 7 import { window } from '@kit.ArkUI'
8 8
  9 +const TAG = 'PlayerFullScreenView'
9 @Component 10 @Component
10 export struct PlayerFullScreenView { 11 export struct PlayerFullScreenView {
11 private playerController?: WDPlayerController; 12 private playerController?: WDPlayerController;
@@ -33,7 +34,11 @@ export struct PlayerFullScreenView { @@ -33,7 +34,11 @@ export struct PlayerFullScreenView {
33 } 34 }
34 35
35 share() { 36 share() {
  37 + this.playerController?.switchPlayOrPause()
36 WDShare.shareContent(this.contentDetailData) 38 WDShare.shareContent(this.contentDetailData)
  39 + // WDShare.shareContent(this.contentDetailData).then(() => {
  40 + // this.playerController?.switchPlayOrPause()
  41 + // })
37 } 42 }
38 43
39 updateProgress() { 44 updateProgress() {
@@ -150,11 +155,13 @@ export struct PlayerFullScreenView { @@ -150,11 +155,13 @@ export struct PlayerFullScreenView {
150 Image($r(`app.media.ic_play_2`)).height(24).width(24) 155 Image($r(`app.media.ic_play_2`)).height(24).width(24)
151 .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible) 156 .visibility(this.status === PlayerConstants.STATUS_START ? Visibility.None : Visibility.Visible)
152 .onClick(() => { 157 .onClick(() => {
  158 + // console.log(TAG, `ic_play_2 onClick`, this.status )
153 this.playerController?.switchPlayOrPause() 159 this.playerController?.switchPlayOrPause()
154 }) 160 })
155 Image($r(`app.media.ic_pause_2`)).height(24).width(24) 161 Image($r(`app.media.ic_pause_2`)).height(24).width(24)
156 .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible) 162 .visibility(this.status === PlayerConstants.STATUS_PAUSE ? Visibility.None : Visibility.Visible)
157 .onClick(() => { 163 .onClick(() => {
  164 + // console.log(TAG, `ic_pause_2 onClick`, this.status )
158 this.playerController?.switchPlayOrPause() 165 this.playerController?.switchPlayOrPause()
159 }) 166 })
160 167
@@ -48,6 +48,7 @@ export struct VideoChannelPage { @@ -48,6 +48,7 @@ export struct VideoChannelPage {
48 @State isShowAudioCom: boolean = false 48 @State isShowAudioCom: boolean = false
49 // 国殇灰度管理 49 // 国殇灰度管理
50 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage') 50 GrayManage: SubscribedAbstractProperty<GrayManageModel> = AppStorage.link<GrayManageModel>('GrayManage')
  51 + @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
51 52
52 async aboutToAppear() { 53 async aboutToAppear() {
53 // 背景图高度 54 // 背景图高度
@@ -161,15 +162,30 @@ export struct VideoChannelPage { @@ -161,15 +162,30 @@ export struct VideoChannelPage {
161 .width(CommonUtils.calTopTabWidth(36, item.iconUrlSize)) 162 .width(CommonUtils.calTopTabWidth(36, item.iconUrlSize))
162 .enabled(false) 163 .enabled(false)
163 } else { 164 } else {
  165 + Stack({ alignContent: Alignment.TopEnd }){
164 Text(item.name) 166 Text(item.name)
165 .fontSize($r('app.float.selected_text_size')) 167 .fontSize($r('app.float.selected_text_size'))
166 .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal) 168 .fontWeight(this.currentTopNavSelectedIndex === index ? FontWeight.Bold : FontWeight.Normal)
167 .fontColor(this.getTopNavFontColor(item, index)) 169 .fontColor(this.getTopNavFontColor(item, index))
  170 + .maxLines(this.MAX_LINE)
  171 + if (item.name == '直播') {
  172 + Button()
  173 + .type(ButtonType.Circle)
  174 + .width(6)
  175 + .height(6)
  176 + .backgroundColor('#ED2800')
  177 + .position({
  178 + x: 36,
  179 + y: -4
  180 + })
  181 + .visibility(this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
  182 + }
  183 + }
168 .padding({ 184 .padding({
169 top: $r('app.float.top_tab_item_padding_top'), 185 top: $r('app.float.top_tab_item_padding_top'),
170 bottom: $r('app.float.top_tab_item_padding_bottom') 186 bottom: $r('app.float.top_tab_item_padding_bottom')
171 }) 187 })
172 - .maxLines(this.MAX_LINE) 188 +
173 189
174 Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor(""))) 190 Image($r('app.media.icon_channel_active'))// .colorFilter(ColorUtils.getDrawingColorFilter(this.getBothColor("")))
175 .width(20) 191 .width(20)
@@ -186,7 +202,7 @@ export struct VideoChannelPage { @@ -186,7 +202,7 @@ export struct VideoChannelPage {
186 // 视频tab埋点 202 // 视频tab埋点
187 const tab = this.topNavList[index] 203 const tab = this.topNavList[index]
188 this.handleAudio(tab) 204 this.handleAudio(tab)
189 - Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`); 205 + // Logger.info(TAG, `视频tab埋点: ${JSON.stringify(tab)}`);
190 const params: ParamType = { 206 const params: ParamType = {
191 "pageName": tab.name, 207 "pageName": tab.name,
192 "tabName": tab.name, 208 "tabName": tab.name,