feat: 百科rag
This commit is contained in:
+12
-1
@@ -14,6 +14,7 @@ Page({
|
||||
total: 0,
|
||||
isLastPage: false,
|
||||
isLoading: false,
|
||||
isRefreshing: false,
|
||||
scrollTop: 0
|
||||
},
|
||||
|
||||
@@ -34,13 +35,23 @@ Page({
|
||||
this.loadPlants(true);
|
||||
},
|
||||
|
||||
// Pull to refresh
|
||||
// Pull to refresh (page-level)
|
||||
onPullDownRefresh() {
|
||||
this.loadPlants(true).then(() => {
|
||||
wx.stopPullDownRefresh();
|
||||
});
|
||||
},
|
||||
|
||||
// Pull to refresh (scroll-view)
|
||||
onRefresh() {
|
||||
this.setData({ isRefreshing: true });
|
||||
this.loadPlants(true).then(() => {
|
||||
this.setData({ isRefreshing: false });
|
||||
}).catch(() => {
|
||||
this.setData({ isRefreshing: false });
|
||||
});
|
||||
},
|
||||
|
||||
// Infinite scroll
|
||||
onReachBottom() {
|
||||
if (!this.data.isLastPage && !this.data.isLoading) {
|
||||
|
||||
Reference in New Issue
Block a user