Toggle navigation
Toggle navigation
This project
Loading...
Sign in
developOne
/
harmonyPool
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
王士厅
2024-06-18 14:50:42 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
689f53aa020b8956d2786555d1dbce385327eec8
689f53aa
1 parent
bec87adf
进入视频页面,鸿蒙端添加新手引导
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
2 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
689f53a
...
...
@@ -15,6 +15,7 @@ import { DisplayDirection } from 'wdConstant/Index';
import { window } from '@kit.ArkUI';
import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index';
import { TrackConstants, TrackingPageBrowse } from 'wdTracking/Index';
import { LottieView } from 'wdComponent/Index'
interface loadMoreData {
pageNum: number;
...
...
@@ -24,6 +25,7 @@ interface loadMoreData {
const TAG = 'VideoChannelDetail'
const storage = LocalStorage.getShared();
PersistentStorage.persistProp('GestureLoadStrategy', 0); // 点播视频手势动画0为用户首次进入视频点播,1为用户已进入视频点播
@Entry(storage)
@Component
...
...
@@ -66,6 +68,7 @@ export struct VideoChannelDetail {
pageHideTime: number = 0;
@Provide onlyWifiLoadVideo: boolean = false
@Provide toastTextVisible: boolean = false
@StorageLink('GestureLoadStrategy') GestureLoadStrategy: number = 0
autoRefreshChange() {
if (this.topNavIndex === 0 && !this.isRequesting) {
...
...
@@ -277,7 +280,7 @@ export struct VideoChannelDetail {
}
build() {
Column(
) {
Stack({ alignContent: Alignment.Center }
) {
if (this.isRequestError) {
EmptyComponent({
emptyType: WDViewDefaultType.WDViewDefaultType_NoVideo,
...
...
@@ -289,6 +292,7 @@ export struct VideoChannelDetail {
PictureLoading()
.visibility(this.isMouted ? Visibility.None : Visibility.Visible)
Swiper(this.swiperController) {
ForEach(this.data, (item: ContentDetailDTO, index: number) => {
DetailPlayShortVideoPage({
...
...
@@ -319,6 +323,29 @@ export struct VideoChannelDetail {
this.getRecCompInfo()
}
})
// 作为手势动画的背景
Row() {}
.justifyContent(FlexAlign.Center)
.width('100%')
.height('100%')
.visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
.backgroundColor('rgba(0, 0, 0, 0.50)')
.onTouch(() => {
this.GestureLoadStrategy = 1
})
// 手势动画 初次进入显示
LottieView({
name: 'slider_up_view_more',
path: "lottie/slider_up_view_more.json",
lottieWidth: 167,
lottieHeight: 167,
autoplay: true,
loop: true
})
.visibility(this.isMouted && this.GestureLoadStrategy == 0 ? Visibility.Visible : Visibility.Hidden)
.onTouch(() => {
this.GestureLoadStrategy = 1
})
}
}
...
...
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/view/PlayerTitleView.ets
View file @
689f53a
...
...
@@ -51,7 +51,6 @@ export struct PlayerTitleView {
/**
* 截断文本
* @author liuzhendong(猩猩G)
* @param {string} str 要截断的文本 '啊啊啊啊啊'
* @param {number} fontSize 字体大小(px)
* @param {number} maxLines 最大行数 3
...
...
Please
register
or
login
to post a comment