Browse Source

用户故事分页参数更改

liyuan 1 month ago
parent
commit
3b46b5e4d2
1 changed files with 3 additions and 2 deletions
  1. 3 2
      pages/home/index.vue

+ 3 - 2
pages/home/index.vue

@@ -145,7 +145,7 @@ export default {
   },
   onLoad() {
     this.initScrollViewHeight();
-    this.loadStories();
+    // this.loadStories();
   },
   onShow() {
     this.noMore = false
@@ -229,7 +229,7 @@ export default {
       if (this.loading || this.noMore) return;
       this.loading = true;
       try {
-        const newData = await getStoryList({ page: this.page, pageSize: this.pageSize });
+        const newData = await getStoryList({ current: this.page, size: this.pageSize });
         this.allStories = [...this.allStories, ...newData.data.records];
         this.displayedStories = [...this.allStories];
         this.page++;
@@ -245,6 +245,7 @@ export default {
 
     // 滚动到底部触发
     onReachBottom() {
+      console.info('this.page--------', this.page)
       if (!this.noMore && !this.loading) {
         this.loadStories();
       }