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