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
zhenghy
2024-05-28 20:20:45 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
8c528631b19fed8f4d9a8975cba45c68df6c3d39
8c528631
1 parent
7dc5e93d
修复视频频道点击接口重复调用
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
8 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
8c52863
...
...
@@ -15,7 +15,7 @@ import { DisplayDirection } from 'wdConstant/Index';
import { window } from '@kit.ArkUI';
import { EmptyComponent, WDViewDefaultType } from 'wdComponent/Index';
import { DateTimeUtils } from 'wdKit/Index';
import {
TrackConstants,
TrackingPageBrowse } from 'wdTracking/Index';
import {
TrackConstants,
TrackingPageBrowse } from 'wdTracking/Index';
interface loadMoreData {
pageNum: number;
...
...
@@ -61,17 +61,17 @@ export struct VideoChannelDetail {
@State totalCount: number = 0
@State isMouted: boolean = false
@State isRequestError: boolean = false
pageShowTime:number = 0;
pageHideTime:number = 0;
@State isRequesting: boolean = false
pageShowTime: number = 0;
pageHideTime: number = 0;
autoRefreshChange() {
if (this.topNavIndex === 0) {
if (this.topNavIndex === 0
&& !this.isRequesting
) {
this.data = []
this.interactDataList = []
this.totalCount = 0
this.isMouted = false
this.getRecCompInfo()
this.getRecCompInfo()
}
}
...
...
@@ -95,8 +95,9 @@ export struct VideoChannelDetail {
console.log(TAG, '一级视频隐藏')
this.pageHideTime = DateTimeUtils.getTimeStamp()
let duration = 0
duration = Math.floor((this.pageHideTime - this.pageShowTime)/1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,TrackConstants.PageName.Customer_Personal,duration)
duration = Math.floor((this.pageHideTime - this.pageShowTime) / 1000)
TrackingPageBrowse.trackCommonPageExposureEnd(TrackConstants.PageName.Customer_Personal,
TrackConstants.PageName.Customer_Personal, duration)
}
/**
...
...
@@ -187,7 +188,7 @@ export struct VideoChannelDetail {
AlertDialog.show({ message: '没有更多视频了~' })
return
}
this.isRequesting = true
const params: getRecCompInfoParams = {
groupId: this.groupId,
pageId: this.pageId,
...
...
@@ -237,6 +238,7 @@ export struct VideoChannelDetail {
}).catch(() => {
// 获取内容失败请重试
this.isRequestError = true
this.isRequesting = false
})
}
...
...
@@ -251,7 +253,14 @@ export struct VideoChannelDetail {
this.data = this.data.concat(res.data)
}
console.log('根据视频楼层信息批量查询视频列表', JSON.stringify(res.data))
}).finally(() => {
setTimeout(() => {
this.isRequesting = false
}, 2000)
})
} else {
this.isRequesting = false
}
}
...
...
@@ -268,6 +277,7 @@ export struct VideoChannelDetail {
})
}
}
build() {
Column() {
if (this.isRequestError) {
...
...
Please
register
or
login
to post a comment