From 0e342d5fa362ab09f623d98dd20ec5861cfa9b82 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, 9 Jul 2024 16:11:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=81=8B=E7=88=B1?= =?UTF-8?q?=E7=9B=B8=E5=86=8C=E6=97=A0=E5=B0=81=E9=9D=A2=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pagesA/love/album.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pagesA/love/album.vue b/pagesA/love/album.vue index 722f69c..9629e4c 100644 --- a/pagesA/love/album.vue +++ b/pagesA/love/album.vue @@ -123,14 +123,13 @@ export default { fnGetData() { this.loading = 'loading'; this.queryParams.group = this.loveConfig.lovePhoto.groupName - console.log('this.loveConfig------------',this.loveConfig) this.$httpApi.v2 .getPhotoListByGroupName(this.queryParams) .then(res => { console.log("相册 res", res) this.loading = 'success'; this.dataList = res.items.map((item, index) => { - item['image'] = this.$utils.checkImageUrl(item.spec.cover); + item['image'] = this.$utils.checkImageUrl(item.spec.cover || item.spec.url); item['takeTime'] = this.$tm.dayjs(item.metadata.creationTimestamp).format( 'DD/MM/YYYY'); return item; @@ -161,13 +160,13 @@ export default { fnChange(isNext) { throttle(() => { if (isNext) { - if (this.swiperIndex == this.dataList.length - 1) { + if (this.swiperIndex === this.dataList.length - 1) { this.swiperIndex = 0; } else { this.swiperIndex += 1; } } else { - if (this.swiperIndex == 0) { + if (this.swiperIndex === 0) { this.swiperIndex = this.dataList.length - 1; } else { this.swiperIndex -= 1;