wangliang_wd

feat:优化沉浸式视频列表刷新问题

... ... @@ -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) {
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,
... ...