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
wangliang_wd
2024-10-17 16:09:09 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
955084907b66392f98275debcdf74a7b0283956d
95508490
1 parent
abafbe5f
feat:优化沉浸式视频列表刷新问题
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
sight_harmony/features/wdDetailPlayShortVideo/src/main/ets/pages/VideoChannelDetail.ets
View file @
9550849
...
...
@@ -64,6 +64,7 @@ export struct VideoChannelDetail {
@State interactDataList: InteractDataDTO[] = []
@State totalCount: number = 0
@State isMouted: boolean = false
@State isNewMouted: boolean = false
@State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图
@State isOffLine: boolean = false // 存储视频下线状态用来展示缺省图
@State isRequesting: boolean = false
...
...
@@ -84,10 +85,6 @@ export struct VideoChannelDetail {
this.interactDataList = []
this.totalCount = 0
this.isMouted = false
this.isRefreshList = true
this.loadStrategy = 'first_load'
this.refreshTime = new Date().getTime()
this.dataContentDetail.clearAllData()
this.getRecCompInfo()
}
...
...
@@ -226,6 +223,12 @@ export struct VideoChannelDetail {
return
}
this.isRequesting = true
if (this.pageNum === 1) {
this.isRefreshList = true
this.loadStrategy = 'first_load'
this.refreshTime = new Date().getTime()
this.dataContentDetail.clearAllData()
}
const params: getRecCompInfoParams = {
groupId: this.groupId.length>2?this.groupId:this.pageId,
pageId: this.pageId,
...
...
@@ -321,11 +324,20 @@ export struct VideoChannelDetail {
build() {
Stack({ alignContent: Alignment.Center }) {
if (this.netStatus !== undefined) {
EmptyComponent({
emptyType: 1, emptyButton: true, isBlack: true, showBackButton: false, retry: () => {
this.getDetail()
}
})
if (this.isNewMouted){
PictureLoading()
}else {
EmptyComponent({
emptyType: 1, emptyButton: true, isBlack: true, showBackButton: false, retry: () => {
this.isNewMouted = true
let timer = setInterval(() => {
this.isNewMouted = false
clearInterval(timer);
}, 500);
this.getDetail()
}
})
}
} else if (this.isOffLine) {
EmptyComponent({
showBackButton: false,
...
...
Please
register
or
login
to post a comment