Преглед на файлове

项目列表审核列表 只看自己 搜索 回到顶部

XuZinan преди 2 години
родител
ревизия
9dc462aa4c
променени са 2 файла, в които са добавени 15 реда и са изтрити 2 реда
  1. 4 0
      pages/Project/auth.vue
  2. 11 2
      pages/Project/list.vue

+ 4 - 0
pages/Project/auth.vue

@@ -109,6 +109,10 @@ export default {
       this.pagination.currentPage = 1;
       await this.initData();
       this.$refs.searchDrawer.closeDrawer();
+      uni.pageScrollTo({
+        scrollTop: 0,
+        duration: 0,
+      });
     },
   },
 };

+ 11 - 2
pages/Project/list.vue

@@ -123,12 +123,17 @@ export default {
         url: `./detail?id=${project.id}`,
       });
     },
-    checkSelf() {
+    async checkSelf() {
       this.projectFilter = {
         ...this.projectFilter,
         filter_type: this.checkself.length,
       };
-      this.initData();
+      this.pagination.currentPage = 1;
+      await this.initData();
+      uni.pageScrollTo({
+        scrollTop: 0,
+        duration: 0,
+      });
     },
     onClickAdd() {
       uni.navigateTo({
@@ -145,6 +150,10 @@ export default {
       this.pagination.currentPage = 1;
       await this.initData();
       this.$refs.searchDrawer.closeDrawer();
+      uni.pageScrollTo({
+        scrollTop: 0,
+        duration: 0,
+      });
     },
   },
 };