Browse Source

页高的问题

xiaohaizhao 1 year ago
parent
commit
80fd23e019
1 changed files with 5 additions and 1 deletions
  1. 5 1
      pages/index/index/store.vue

+ 5 - 1
pages/index/index/store.vue

@@ -91,13 +91,16 @@ export default {
             })
         },
         getList(init = false) {
+            if (init) uni.pageScrollTo({
+                scrollTop: 0,
+                duration: 0,
+            })
             return new Promise((resolve, reject) => {
                 if (this.paging(this.content, init)) return resolve();
                 this.$Http.basic({
                     "id": "20240430094102",
                     content: this.content
                 }).then(res => {
-                    this.$refs.List.setHeight()
                     this.$refs.List.RefreshToComplete()
                     console.log("获取商城列表", res)
                     resolve();
@@ -109,6 +112,7 @@ export default {
                     this.list = res.pageNumber == 1 ? res.data : this.list.concat(res.data);
                     this.content = this.$refs.List.paging(this.content, res)
                     this.total = res.total;
+                    this.$refs.List.setHeight()
                 })
             })
         },