From adfa0156e062a5ffa07d5301f906f1b6b5f9b790 Mon Sep 17 00:00:00 2001 From: luJianJun <2587063613@qq.com> Date: Fri, 14 Jul 2023 15:47:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/HomeView.vue | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index a3270a3..20aea09 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -203,18 +203,21 @@ watchEffect(() => { seachTypeData.data = store.state.seachTypeData indexData.data = store.state.indexData ListSelectBtn.data = store.state.ListSelectBtn - indexData.data.tabs.map(res => { - if (res.name === "个人房源") { - res.path = '/personHousing' - } else if (res.name === "中介房源") { - res.path = '/intermediaryHousing' - } else if (res.name === "求房源") { - res.path = '/needHousing' - } else if (res.name === "品牌公寓") { - res.path = '' - } + if (indexData.data.length) { + indexData.data.tabs.map(res => { + if (res.name === "个人房源") { + res.path = '/personHousing' + } else if (res.name === "中介房源") { + res.path = '/intermediaryHousing' + } else if (res.name === "求房源") { + res.path = '/needHousing' + } else if (res.name === "品牌公寓") { + res.path = '' + } + + }) + } - }) }) //公寓数据