feat: 百科rag

This commit is contained in:
Blizzard
2026-04-23 11:13:23 +08:00
parent 40f3a8cfa8
commit 9fe2fd42e0
23 changed files with 1129 additions and 69 deletions
+12 -1
View File
@@ -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) {