王士厅

fix: 动态视频>进入视频播放详情页-引导功能未实现

... ... @@ -7,7 +7,7 @@ import router from '@ohos.router';
import { contentListParams } from 'wdDetailPlayApi/src/main/ets/request/ContentDetailRequest';
import { DisplayDirection } from 'wdConstant/Index';
import { window } from '@kit.ArkUI';
import { EmptyComponent } from 'wdComponent/Index';
import { EmptyComponent, LottieView } from 'wdComponent/Index';
import { DateTimeUtils } from 'wdKit/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { AudioSuspensionModel } from 'wdComponent'
... ... @@ -15,6 +15,7 @@ import { BusinessError } from '@kit.BasicServicesKit';
const storage = LocalStorage.getShared();
const TAG = 'DetailVideoListPage'
PersistentStorage.persistProp('DetailVideoListGestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播
@Entry(storage)
@Component
... ... @@ -46,6 +47,7 @@ export struct DetailVideoListPage {
@Provide toastTextVisible: boolean = false
private AudioSuspension = new AudioSuspensionModel()
@State isShowAudioCom: boolean = false
@StorageLink('DetailVideoListGestureLoadStrategy') DetailVideoListGestureLoadStrategy: number = 0
async aboutToAppear(): Promise<void> {
// 注册监听网络连接
... ... @@ -228,20 +230,20 @@ export struct DetailVideoListPage {
}
build() {
if (this.netStatus !== undefined || this.isOffLine) {
EmptyComponent({
emptyType: 15, emptyButton: true, retry: () => {
this.getContentDetail(this.contentId, this.relId, this.relType)
}
})
.id('e_empty_content')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
Stack({ alignContent: Alignment.Center }) {
if (this.netStatus !== undefined || this.isOffLine) {
EmptyComponent({
emptyType: 15, emptyButton: true, retry: () => {
this.getContentDetail(this.contentId, this.relId, this.relType)
}
})
.backgroundColor(Color.Black)
} else {
Column() {
.id('e_empty_content')
.alignRules({
center: { anchor: "__container__", align: VerticalAlign.Center },
middle: { anchor: "__container__", align: HorizontalAlign.Center }
})
.backgroundColor(Color.Black)
} else {
Swiper(this.swiperController) {
ForEach(this.data, (item: ContentDetailDTO, index: number) => {
DetailPlayShortVideoPage({
... ... @@ -267,16 +269,34 @@ export struct DetailVideoListPage {
this.queryVideoList()
}
})
// 作为手势动画的背景
Row() {}
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
.visibility(this.DetailVideoListGestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
.backgroundColor('rgba(0, 0, 0, 0.50)')
.onTouch(() => {
this.DetailVideoListGestureLoadStrategy = 1
})
// 手势动画 初次进入显示
LottieView({
name: 'slider_up_view_more',
path: "lottie/slider_up_view_more.json",
lottieWidth: 167,
lottieHeight: 167,
autoplay: true,
loop: true
})
.visibility(this.DetailVideoListGestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
.onTouch(() => {
this.DetailVideoListGestureLoadStrategy = 1
})
}
.width('100%')
.height('100%')
.backgroundColor(Color.Black)
.expandSafeArea([SafeAreaType.SYSTEM], [SafeAreaEdge.TOP, SafeAreaEdge.BOTTOM])
// .padding({
// bottom: this.bottomSafeHeight + 'px'
// })
}
.width('100%')
.height('100%')
.backgroundColor(Color.Black)
}
}
\ No newline at end of file
... ...