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 ? '上拉加载更多' : '呜呜,没有更多数据啦~';