From 1cc99c110e3f0ba0ea92ed3b62ee0ed3de7cb2bd Mon Sep 17 00:00:00 2001 From: A1300399510 Date: Mon, 7 Aug 2023 12:20:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=85=AC=E5=AF=93=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E7=AD=9B=E9=80=89=E7=AE=97=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/housingView/apartment.vue | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/src/views/housingView/apartment.vue b/src/views/housingView/apartment.vue index c6a3d6a..b2f200c 100644 --- a/src/views/housingView/apartment.vue +++ b/src/views/housingView/apartment.vue @@ -65,7 +65,6 @@ onMounted(() => { }); if (route.query['companyid']) pitchValue['companyid'] = route.query['companyid'] - getData() window.addEventListener('scroll', handleScroll); @@ -119,23 +118,25 @@ const handleScroll = () => { if (scrollTop + clientHeight >= scrollHeight - 350) getData() }; -let pitchValue = {} +let pitchValue = { + companyid: 0, + roomtype: 0, + rent_min: null, // 租金 + rent_max: null, // 租金 + school: 0, + roomlistings: 0, + keyword: "", +} // 筛选组件的参数的中转 const handleTransfer = (data) => { for (const key in data.value) { if (data.value[key] != pitchValue[key]) { pitchValue = { ...data.value } - - for (const key in pitchValue) { - if (pitchValue[key]) { - page = 1 - list.value = [] - getData() - break - } - } - + page = 1 + list.value = [] + getData() + break } } }