修改公寓列表筛选算法

This commit is contained in:
A1300399510 2023-08-07 12:20:44 +08:00
parent 2799f24e7d
commit 1cc99c110e

View File

@ -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
}
}
}