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-06-13 17:56:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
147be0f68ab6ebcdf7ca0c2f91c16a0e669fb7cb
147be0f6
1 parent
10ef4874
feat:优化我的预约列表展示
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
sight_harmony/features/wdComponent/src/main/ets/components/mine/appointment/AppointmentListUI.ets
View file @
147be0f
...
...
@@ -66,6 +66,7 @@ export struct AppointmentListUI {
CustomPullToRefresh({
alldata:this.data,
scroller:this.scroller,
hasMore:this.hasMore,
customList:()=>{
this.ListLayout()
},
...
...
@@ -73,7 +74,6 @@ export struct AppointmentListUI {
this.curPageNum = 1;
this.hasMore = true
this.isGetRequest = false
this.data.clear()
if (!this.isLoading){
this.getNewPageData()
...
...
@@ -82,8 +82,10 @@ export struct AppointmentListUI {
},
onLoadMore:(resolve)=> {
if (!this.isLoading) {
this.curPageNum++
this.isLoading = true
this.getNewPageData()
if(resolve) resolve('刷新成功')
}
}
})
...
...
@@ -143,6 +145,8 @@ export struct AppointmentListUI {
this.isLoading = true
if (this.hasMore) {
MinePageDatasModel.getAppointmentListData("20", `${this.curPageNum}`, getContext(this)).then((value) => {
if (this.curPageNum) this.data.clear()
if (!this.data || value.list.length == 0) {
this.hasMore = false
} else {
...
...
@@ -156,10 +160,11 @@ export struct AppointmentListUI {
})
this.data.notifyDataReload()
this.count = this.data.totalCount()
if (this.data.totalCount() < value.totalCount) {
this.curPageNum++
if(this.count < 5){
this.getNewPageData()
if (20 < value.totalCount ) {
if (value.list.length === 20) {
this.hasMore = true
}else {
this.hasMore = false
}
} else {
this.hasMore = false
...
...
Please
register
or
login
to post a comment