王士厅

fix: 视频引导手势问题

@@ -15,7 +15,6 @@ import { BusinessError } from '@kit.BasicServicesKit'; @@ -15,7 +15,6 @@ import { BusinessError } from '@kit.BasicServicesKit';
15 15
16 const storage = LocalStorage.getShared(); 16 const storage = LocalStorage.getShared();
17 const TAG = 'DetailVideoListPage' 17 const TAG = 'DetailVideoListPage'
18 -PersistentStorage.persistProp('DetailVideoListGestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播  
19 18
20 @Entry(storage) 19 @Entry(storage)
21 @Component 20 @Component
@@ -47,7 +46,7 @@ export struct DetailVideoListPage { @@ -47,7 +46,7 @@ export struct DetailVideoListPage {
47 @Provide toastTextVisible: boolean = false 46 @Provide toastTextVisible: boolean = false
48 private AudioSuspension = new AudioSuspensionModel() 47 private AudioSuspension = new AudioSuspensionModel()
49 @State isShowAudioCom: boolean = false 48 @State isShowAudioCom: boolean = false
50 - @StorageLink('DetailVideoListGestureLoadStrategy') DetailVideoListGestureLoadStrategy: number = 0 49 + @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
51 50
52 async aboutToAppear(): Promise<void> { 51 async aboutToAppear(): Promise<void> {
53 // 注册监听网络连接 52 // 注册监听网络连接
@@ -285,10 +284,10 @@ export struct DetailVideoListPage { @@ -285,10 +284,10 @@ export struct DetailVideoListPage {
285 .justifyContent(FlexAlign.Center) 284 .justifyContent(FlexAlign.Center)
286 .width('100%') 285 .width('100%')
287 .height('100%') 286 .height('100%')
288 - .visibility(this.DetailVideoListGestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden) 287 + .visibility(this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
289 .backgroundColor('rgba(0, 0, 0, 0.50)') 288 .backgroundColor('rgba(0, 0, 0, 0.50)')
290 .onTouch(() => { 289 .onTouch(() => {
291 - this.DetailVideoListGestureLoadStrategy = 1 290 + this.GestureLoadStrategy = 1
292 }) 291 })
293 // 手势动画 初次进入显示 292 // 手势动画 初次进入显示
294 LottieView({ 293 LottieView({
@@ -299,9 +298,9 @@ export struct DetailVideoListPage { @@ -299,9 +298,9 @@ export struct DetailVideoListPage {
299 autoplay: true, 298 autoplay: true,
300 loop: true 299 loop: true
301 }) 300 })
302 - .visibility(this.DetailVideoListGestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden) 301 + .visibility(this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
303 .onTouch(() => { 302 .onTouch(() => {
304 - this.DetailVideoListGestureLoadStrategy = 1 303 + this.GestureLoadStrategy = 1
305 }) 304 })
306 } 305 }
307 } 306 }
@@ -25,7 +25,6 @@ interface loadMoreData { @@ -25,7 +25,6 @@ interface loadMoreData {
25 25
26 const TAG = 'VideoChannelDetail' 26 const TAG = 'VideoChannelDetail'
27 const storage = LocalStorage.getShared(); 27 const storage = LocalStorage.getShared();
28 -PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播  
29 28
30 @Entry(storage) 29 @Entry(storage)
31 @Component 30 @Component
@@ -15,6 +15,8 @@ import LaunchDataModel from './viewModel/LaunchDataModel'; @@ -15,6 +15,8 @@ import LaunchDataModel from './viewModel/LaunchDataModel';
15 15
16 const TAG = 'MainPage'; 16 const TAG = 'MainPage';
17 17
  18 +PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播
  19 +
18 @Entry 20 @Entry
19 @Component 21 @Component
20 struct MainPage { 22 struct MainPage {