Showing
1 changed file
with
16 additions
and
4 deletions
| @@ -64,6 +64,7 @@ export struct VideoChannelDetail { | @@ -64,6 +64,7 @@ export struct VideoChannelDetail { | ||
| 64 | @State interactDataList: InteractDataDTO[] = [] | 64 | @State interactDataList: InteractDataDTO[] = [] |
| 65 | @State totalCount: number = 0 | 65 | @State totalCount: number = 0 |
| 66 | @State isMouted: boolean = false | 66 | @State isMouted: boolean = false |
| 67 | + @State isNewMouted: boolean = false | ||
| 67 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 | 68 | @State netStatus: number | undefined = undefined // 存储网络状态用来展示缺省图 |
| 68 | @State isOffLine: boolean = false // 存储视频下线状态用来展示缺省图 | 69 | @State isOffLine: boolean = false // 存储视频下线状态用来展示缺省图 |
| 69 | @State isRequesting: boolean = false | 70 | @State isRequesting: boolean = false |
| @@ -84,10 +85,6 @@ export struct VideoChannelDetail { | @@ -84,10 +85,6 @@ export struct VideoChannelDetail { | ||
| 84 | this.interactDataList = [] | 85 | this.interactDataList = [] |
| 85 | this.totalCount = 0 | 86 | this.totalCount = 0 |
| 86 | this.isMouted = false | 87 | this.isMouted = false |
| 87 | - this.isRefreshList = true | ||
| 88 | - this.loadStrategy = 'first_load' | ||
| 89 | - this.refreshTime = new Date().getTime() | ||
| 90 | - this.dataContentDetail.clearAllData() | ||
| 91 | this.getRecCompInfo() | 88 | this.getRecCompInfo() |
| 92 | } | 89 | } |
| 93 | 90 | ||
| @@ -226,6 +223,12 @@ export struct VideoChannelDetail { | @@ -226,6 +223,12 @@ export struct VideoChannelDetail { | ||
| 226 | return | 223 | return |
| 227 | } | 224 | } |
| 228 | this.isRequesting = true | 225 | this.isRequesting = true |
| 226 | + if (this.pageNum === 1) { | ||
| 227 | + this.isRefreshList = true | ||
| 228 | + this.loadStrategy = 'first_load' | ||
| 229 | + this.refreshTime = new Date().getTime() | ||
| 230 | + this.dataContentDetail.clearAllData() | ||
| 231 | + } | ||
| 229 | const params: getRecCompInfoParams = { | 232 | const params: getRecCompInfoParams = { |
| 230 | groupId: this.groupId.length>2?this.groupId:this.pageId, | 233 | groupId: this.groupId.length>2?this.groupId:this.pageId, |
| 231 | pageId: this.pageId, | 234 | pageId: this.pageId, |
| @@ -321,11 +324,20 @@ export struct VideoChannelDetail { | @@ -321,11 +324,20 @@ export struct VideoChannelDetail { | ||
| 321 | build() { | 324 | build() { |
| 322 | Stack({ alignContent: Alignment.Center }) { | 325 | Stack({ alignContent: Alignment.Center }) { |
| 323 | if (this.netStatus !== undefined) { | 326 | if (this.netStatus !== undefined) { |
| 327 | + if (this.isNewMouted){ | ||
| 328 | + PictureLoading() | ||
| 329 | + }else { | ||
| 324 | EmptyComponent({ | 330 | EmptyComponent({ |
| 325 | emptyType: 1, emptyButton: true, isBlack: true, showBackButton: false, retry: () => { | 331 | emptyType: 1, emptyButton: true, isBlack: true, showBackButton: false, retry: () => { |
| 332 | + this.isNewMouted = true | ||
| 333 | + let timer = setInterval(() => { | ||
| 334 | + this.isNewMouted = false | ||
| 335 | + clearInterval(timer); | ||
| 336 | + }, 500); | ||
| 326 | this.getDetail() | 337 | this.getDetail() |
| 327 | } | 338 | } |
| 328 | }) | 339 | }) |
| 340 | + } | ||
| 329 | } else if (this.isOffLine) { | 341 | } else if (this.isOffLine) { |
| 330 | EmptyComponent({ | 342 | EmptyComponent({ |
| 331 | showBackButton: false, | 343 | showBackButton: false, |
-
Please register or login to post a comment