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
zhangbo1_wd
2024-05-25 10:40:10 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
73c0947afc9171f73c6da4a424d0ca8d01085ce9
73c0947a
1 parent
619f705d
解决直播间 数据大概率出不来问题【接口时序问题】
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletions
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
sight_harmony/features/wdDetailPlayLive/src/main/ets/widgets/details/TabLiveComponent.ets
View file @
73c0947
...
...
@@ -17,7 +17,7 @@ const TAG: string = 'TabLiveComponent';
export struct TabLiveComponent {
liveViewModel: LiveViewModel = new LiveViewModel()
@State liveList: Array<LiveRoomItemBean> = []
@Consume liveDetailsBean: LiveDetailsBean
@Consume
@Watch('updateData')
liveDetailsBean: LiveDetailsBean
@State private pageModel: PageModel = new PageModel()
aboutToAppear(): void {
...
...
@@ -81,6 +81,10 @@ export struct TabLiveComponent {
}
getLiveList() {
if (!this.liveDetailsBean || !this.liveDetailsBean.newsId) {
// 参数不够,直接拦截接口
return
}
this.pageModel.currentPage = 1
this.liveViewModel.getLiveList(
this.pageModel.currentPage,
...
...
@@ -147,4 +151,12 @@ export struct TabLiveComponent {
aboutToDisappear(): void {
}
updateData() {
if (this.liveList.length > 0) {
// TODO 拦截刷新?根据业务斟酌下
return
}
this.getLiveList()
}
}
\ No newline at end of file
...
...
Please
register
or
login
to post a comment