From 850ee73fa280f3ae01fa8ec4a74927b0b888367d 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: Tue, 2 Jul 2024 15:40:43 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=BE=E5=BA=93=E6=94=AF=E6=8C=81?=
=?UTF-8?q?=E7=80=91=E5=B8=83=E6=B5=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
config/index.js | 2 +-
pages/tabbar/gallery/gallery.vue | 39 ++++++++++++++++++++++++--------
2 files changed, 30 insertions(+), 11 deletions(-)
diff --git a/config/index.js b/config/index.js
index fd78858..0267b32 100644
--- a/config/index.js
+++ b/config/index.js
@@ -19,7 +19,7 @@ export const getAppConfigs = () => {
if (configs) return JSON.parse(configs)
uni.setStorageSync(_AppConfigKey, JSON.stringify(DefaultAppConfigs))
- return configs;
+ return DefaultAppConfigs;
}
/**
diff --git a/pages/tabbar/gallery/gallery.vue b/pages/tabbar/gallery/gallery.vue
index dc8881c..ea77c98 100644
--- a/pages/tabbar/gallery/gallery.vue
+++ b/pages/tabbar/gallery/gallery.vue
@@ -21,7 +21,27 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
{{ loadMoreText }}
+
@@ -149,7 +170,6 @@ export default {
this.$httpApi.v2
.getPhotoListByGroupName(this.queryParams)
.then(res => {
- console.log("相册 res", res)
this.hasNext = res.hasNext;
this.loading = 'success';
if (res.items.length != 0) {
@@ -163,6 +183,10 @@ export default {
} else {
this.dataList = _list;
}
+ this.$nextTick(() => {
+ this.$refs.wafll.clear();
+ this.$refs.wafll.pushData(this.dataList);
+ })
}
this.loadMoreText = res.hasNext ? '上拉加载更多' : '呜呜,没有更多数据啦~';
@@ -188,15 +212,10 @@ export default {
this.cache.dataList = [...this.cache.dataList, ...dataList];
}
},
-
- // 瀑布流组件点击事件
- fnOnClick(data) {
- console.log('点击数据', data);
- },
// 预览
- fnPreview(index) {
+ fnPreview(data) {
uni.previewImage({
- current: index,
+ current: this.dataList.findIndex(x => x.metadata.name === data.metadata.name),
urls: this.dataList.map(x => x.spec.cover),
indicator: 'number',
loop: true