From c312fab4b13e5095366c2c79f469537da62a902a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=B0=8F=E8=8E=AB=E5=94=90=E5=B0=BC?= <1431128779@qq.com>
Date: Wed, 3 Jul 2024 18:31:43 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=BE=E5=BA=93?=
=?UTF-8?q?=E5=9B=BE=E7=89=87=E4=B8=8B=E6=8B=89=E5=92=8C=E5=8A=A0=E8=BD=BD?=
=?UTF-8?q?=E6=9B=B4=E5=A4=9A=E7=9A=84=E6=97=B6=E5=80=99=E6=B8=85=E7=A9=BA?=
=?UTF-8?q?=E4=B8=94=E9=9A=8F=E6=9C=BA=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pages/tabbar/gallery/gallery.vue | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/pages/tabbar/gallery/gallery.vue b/pages/tabbar/gallery/gallery.vue
index ea77c98..9e73e0b 100644
--- a/pages/tabbar/gallery/gallery.vue
+++ b/pages/tabbar/gallery/gallery.vue
@@ -8,7 +8,7 @@
-
+
@@ -16,12 +16,12 @@
-
+
-
+
@@ -141,7 +141,10 @@ export default {
this.queryParams.group = this.category.list[index].name;
this.queryParams.page = 1;
this.fnToTopPage();
- this.fnGetData();
+ this.$nextTick(() => {
+ this.$refs.wafll.clear();
+ this.fnGetData();
+ })
},
fnGetCategory() {
this.$httpApi.v2.getPhotoGroupList({
@@ -158,7 +161,6 @@ export default {
this.queryParams.group = this.category.list[0].name;
this.fnGetData();
}
-
});
},
fnGetData() {
@@ -172,7 +174,7 @@ export default {
.then(res => {
this.hasNext = res.hasNext;
this.loading = 'success';
- if (res.items.length != 0) {
+ if (res.items.length !== 0) {
const _list = res.items.map((item, index) => {
item.spec.cover = this.$utils.checkImageUrl(item.spec.cover);
return item;
@@ -184,8 +186,7 @@ export default {
this.dataList = _list;
}
this.$nextTick(() => {
- this.$refs.wafll.clear();
- this.$refs.wafll.pushData(this.dataList);
+ this.$refs.wafll.pushData(_list)
})
}
this.loadMoreText = res.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';