Showing
2 changed files
with
28 additions
and
2 deletions
| @@ -15,6 +15,7 @@ import { DisplayDirection } from 'wdConstant/Index'; | @@ -15,6 +15,7 @@ import { DisplayDirection } from 'wdConstant/Index'; | ||
| 15 | import { window } from '@kit.ArkUI'; | 15 | import { window } from '@kit.ArkUI'; |
| 16 | import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index'; | 16 | import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index'; |
| 17 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; | 17 | import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index'; |
| 18 | +import { LottieView } from 'wdComponent/Index' | ||
| 18 | 19 | ||
| 19 | interface loadMoreData { | 20 | interface loadMoreData { |
| 20 | pageNum: number; | 21 | pageNum: number; |
| @@ -24,6 +25,7 @@ interface loadMoreData { | @@ -24,6 +25,7 @@ interface loadMoreData { | ||
| 24 | 25 | ||
| 25 | const TAG = 'VideoChannelDetail' | 26 | const TAG = 'VideoChannelDetail' |
| 26 | const storage = LocalStorage.getShared(); | 27 | const storage = LocalStorage.getShared(); |
| 28 | +PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播 | ||
| 27 | 29 | ||
| 28 | @Entry(storage) | 30 | @Entry(storage) |
| 29 | @Component | 31 | @Component |
| @@ -66,6 +68,7 @@ export struct VideoChannelDetail { | @@ -66,6 +68,7 @@ export struct VideoChannelDetail { | ||
| 66 | pageHideTime: number = 0; | 68 | pageHideTime: number = 0; |
| 67 | @Provide onlyWifiLoadVideo: boolean = false | 69 | @Provide onlyWifiLoadVideo: boolean = false |
| 68 | @Provide toastTextVisible: boolean = false | 70 | @Provide toastTextVisible: boolean = false |
| 71 | + @StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0 | ||
| 69 | 72 | ||
| 70 | autoRefreshChange() { | 73 | autoRefreshChange() { |
| 71 | if (this.topNavIndex === 0 && !this.isRequesting) { | 74 | if (this.topNavIndex === 0 && !this.isRequesting) { |
| @@ -277,7 +280,7 @@ export struct VideoChannelDetail { | @@ -277,7 +280,7 @@ export struct VideoChannelDetail { | ||
| 277 | } | 280 | } |
| 278 | 281 | ||
| 279 | build() { | 282 | build() { |
| 280 | - Column() { | 283 | + Stack({ alignContent: Alignment.Center }) { |
| 281 | if (this.isRequestError) { | 284 | if (this.isRequestError) { |
| 282 | EmptyComponent({ | 285 | EmptyComponent({ |
| 283 | emptyType: WDViewDefaultType.WDViewDefaultType_NoVideo, | 286 | emptyType: WDViewDefaultType.WDViewDefaultType_NoVideo, |
| @@ -289,6 +292,7 @@ export struct VideoChannelDetail { | @@ -289,6 +292,7 @@ export struct VideoChannelDetail { | ||
| 289 | 292 | ||
| 290 | PictureLoading() | 293 | PictureLoading() |
| 291 | .visibility(this.isMouted ? Visibility.None : Visibility.Visible) | 294 | .visibility(this.isMouted ? Visibility.None : Visibility.Visible) |
| 295 | + | ||
| 292 | Swiper(this.swiperController) { | 296 | Swiper(this.swiperController) { |
| 293 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { | 297 | ForEach(this.data, (item: ContentDetailDTO, index: number) => { |
| 294 | DetailPlayShortVideoPage({ | 298 | DetailPlayShortVideoPage({ |
| @@ -319,6 +323,29 @@ export struct VideoChannelDetail { | @@ -319,6 +323,29 @@ export struct VideoChannelDetail { | ||
| 319 | this.getRecCompInfo() | 323 | this.getRecCompInfo() |
| 320 | } | 324 | } |
| 321 | }) | 325 | }) |
| 326 | + // 作为手势动画的背景 | ||
| 327 | + Row() {} | ||
| 328 | + .justifyContent(FlexAlign.Center) | ||
| 329 | + .width('100%') | ||
| 330 | + .height('100%') | ||
| 331 | + .visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden) | ||
| 332 | + .backgroundColor('rgba(0, 0, 0, 0.50)') | ||
| 333 | + .onTouch(() => { | ||
| 334 | + this.GestureLoadStrategy = 1 | ||
| 335 | + }) | ||
| 336 | + // 手势动画 初次进入显示 | ||
| 337 | + LottieView({ | ||
| 338 | + name: 'slider_up_view_more', | ||
| 339 | + path: "lottie/slider_up_view_more.json", | ||
| 340 | + lottieWidth: 167, | ||
| 341 | + lottieHeight: 167, | ||
| 342 | + autoplay: true, | ||
| 343 | + loop: true | ||
| 344 | + }) | ||
| 345 | + .visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden) | ||
| 346 | + .onTouch(() => { | ||
| 347 | + this.GestureLoadStrategy = 1 | ||
| 348 | + }) | ||
| 322 | 349 | ||
| 323 | } | 350 | } |
| 324 | } | 351 | } |
| @@ -51,7 +51,6 @@ export struct PlayerTitleView { | @@ -51,7 +51,6 @@ export struct PlayerTitleView { | ||
| 51 | 51 | ||
| 52 | /** | 52 | /** |
| 53 | * 截断文本 | 53 | * 截断文本 |
| 54 | - * @author liuzhendong(猩猩G) | ||
| 55 | * @param {string} str 要截断的文本 '啊啊啊啊啊' | 54 | * @param {string} str 要截断的文本 '啊啊啊啊啊' |
| 56 | * @param {number} fontSize 字体大小(px) | 55 | * @param {number} fontSize 字体大小(px) |
| 57 | * @param {number} maxLines 最大行数 3 | 56 | * @param {number} maxLines 最大行数 3 |
-
Please register or login to post a comment