From ad9899d7161475cfd5e8452aefde95a0767afc11 Mon Sep 17 00:00:00 2001
From: xingyy <64720302+Concur-max@users.noreply.github.com>
Date: Tue, 21 Jan 2025 19:54:00 +0800
Subject: [PATCH] =?UTF-8?q?refactor(app):=20=E4=BC=98=E5=8C=96=E4=BB=A3?=
=?UTF-8?q?=E7=A0=81=E7=BB=93=E6=9E=84=E5=92=8C=E6=80=A7=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
- 移除 default.vue 中的 keep-alive 组件,以提高页面切换性能
- 在 ItemList 组件中增加对返回数据的数组判断,提升代码健壮性
- 删除未使用的 goodStore 导入,清理冗余代码
---
app/layouts/default.vue | 6 +-----
app/pages/home/components/ItemList/index.vue | 4 +++-
2 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/app/layouts/default.vue b/app/layouts/default.vue
index 1e0cd58..e1bfb3c 100644
--- a/app/layouts/default.vue
+++ b/app/layouts/default.vue
@@ -2,14 +2,10 @@
-
-
-
+
\ No newline at end of file
diff --git a/app/pages/home/components/ItemList/index.vue b/app/pages/home/components/ItemList/index.vue
index 5bb338a..33679ff 100644
--- a/app/pages/home/components/ItemList/index.vue
+++ b/app/pages/home/components/ItemList/index.vue
@@ -12,7 +12,9 @@ const finished = ref(false);
const getArtworkList=async ()=>{
const res= await artworkList({auctionUuid: auctionDetail.value.uuid,...pageRef.value})
if (res.status===0){
- itemList.value.push(...res.data.data)
+ if (Array.isArray(res.data.data)&&res.data.data?.length>0){
+ itemList.value.push(...res.data.data)
+ }
pageRef.value.itemCount=res.data.count
}
}