wangliang_wd

feat:优化我的收藏

... ... @@ -66,6 +66,7 @@ struct MyCollectionListPage {
}
if (this.isEditState){
Stack(){
CustomBottomFuctionUI({
selectAllCallback:(isAllSelect)=>{
this.allSelectDatas(isAllSelect)
... ... @@ -74,7 +75,7 @@ struct MyCollectionListPage {
this.deleteDatas()
}
})
.position({y:'92%'})
}.position({y:'92%'})
}
}
.width(CommonConstants.FULL_WIDTH)
... ... @@ -119,16 +120,22 @@ 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 = []
if (this.currentPage === 1) {
this.allDatas = []
this.allDatas.push(...collectionItem.list)
}else {
this.allDatas = this.allDatas.concat(...collectionItem.list)
if (collectionItem.totalCount === this.allDatas.length) {
}
if (collectionItem.hasNext === 0) {
this.browSingModel.hasMore = false;
} else {
this.browSingModel.hasMore = true;
}
} else {
if (this.currentPage === 1) {
this.browSingModel.viewType = ViewType.EMPTY;
}
}
})
}
... ...