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-04-19 10:17:43 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bccb346884b3e18fc851dac2c88fd98f05c529ac
bccb3468
1 parent
7de093d9
feat:优化我的收藏
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
13 deletions
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
sight_harmony/features/wdComponent/src/main/ets/components/page/MyCollectionListPage.ets
View file @
bccb346
...
...
@@ -66,15 +66,16 @@ struct MyCollectionListPage {
}
if (this.isEditState){
CustomBottomFuctionUI({
selectAllCallback:(isAllSelect)=>{
this.allSelectDatas(isAllSelect)
},
confirmCallback:()=>{
this.deleteDatas()
}
})
.position({y:'92%'})
Stack(){
CustomBottomFuctionUI({
selectAllCallback:(isAllSelect)=>{
this.allSelectDatas(isAllSelect)
},
confirmCallback:()=>{
this.deleteDatas()
}
})
}.position({y:'92%'})
}
}
.width(CommonConstants.FULL_WIDTH)
...
...
@@ -119,15 +120,21 @@ struct MyCollectionListPage {
MyCollectionViewModel.fetchMyCollectList(1,'1',this.currentPage,getContext(this)).then(collectionItem => {
if(resolve) resolve('刷新成功')
if (collectionItem && collectionItem.list && collectionItem.list.length > 0) {
if (this.currentPage === 1) this.allDatas = []
this.allDatas = this.allDatas.concat(...collectionItem.list)
if (collectionItem.totalCount === this.allDatas.length) {
if (this.currentPage === 1) {
this.allDatas = []
this.allDatas.push(...collectionItem.list)
}else {
this.allDatas = this.allDatas.concat(...collectionItem.list)
}
if (collectionItem.hasNext === 0) {
this.browSingModel.hasMore = false;
} else {
this.browSingModel.hasMore = true;
}
} else {
this.browSingModel.viewType = ViewType.EMPTY;
if (this.currentPage === 1) {
this.browSingModel.viewType = ViewType.EMPTY;
}
}
})
}
...
...
Please
register
or
login
to post a comment