From c7f254c904a4ace36af3f8dad97483bb9efd3cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E6=98=B1=E8=BE=BE?= Date: Fri, 21 Mar 2025 14:56:58 +0800 Subject: [PATCH] =?UTF-8?q?refactor(Home):=20=E9=87=8D=E6=9E=84=E5=B8=82?= =?UTF-8?q?=E5=9C=BA=E7=BB=84=E4=BB=B6=E4=B8=AD=E7=9A=84=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -移除了对 parentCode 的判断,保留了所有列表项 -优化了代码格式,调整了缩进和空格 - 保留了原有的功能逻辑,没有引入新的变化 --- src/views/Home/components/Market/Index.vue | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/views/Home/components/Market/Index.vue b/src/views/Home/components/Market/Index.vue index 51cf5d8..6aa48f5 100644 --- a/src/views/Home/components/Market/Index.vue +++ b/src/views/Home/components/Market/Index.vue @@ -21,18 +21,18 @@ const marketList = ref([]); const active = ref(null); const marketInfo = ref([]); -const getTableList = async() => { +const getTableList = async () => { const res = await getListScene(); if (res.data.code === 0) { res.data.data.forEach((item) => { - if (item.parentCode && item.parentCode === 1) { - marketList.value.push(item); - } + // if (item.parentCode && item.parentCode === 1) { + marketList.value.push(item); + // } }); getMarketInfo(marketList.value[0]); } }; -const getMarketInfo = async(item) => { +const getMarketInfo = async (item) => { const data = marketList.value.filter((market, index) => item === index)[0]; if (data) { const params = {