搜索页新增求房源判断

This commit is contained in:
2023-07-21 11:49:34 +08:00
parent 1559002cd5
commit e0f1eddfe0
9 changed files with 100 additions and 37 deletions

View File

@@ -160,22 +160,29 @@ historyArr.data = JSON.parse(localStorage.getItem('historyArr')) || []
//搜索数据
let seachList = (item) => {
// console.log(123)
let string=seachAllType.keyword
let string = seachAllType.keyword
if (!string.replace(/\s/g, "")) return
if (historyArr.data.indexOf(seachAllType.keyword) === -1) {
historyArr.data.push(seachAllType.keyword)
}
localStorage.setItem('historyArr', JSON.stringify(historyArr.data));
if (routePath.value === '/') {
route.push({
path: '/seachPage',
query: {
keyword: seachAllType.keyword
}
})
}else{
setSeachConditions()
}
route.push({
path: '/seachPage',
query: {
keyword: seachAllType.keyword,
isNeedHousing:routePath.value === '/needHousing'
}
})
// if (routePath.value === '/') {
// route.push({
// path: '/seachPage',
// query: {
// keyword: seachAllType.keyword
// }
// })
// }else{
// setSeachConditions()
// }
// getDataList(seachAllType)
}
@@ -418,6 +425,7 @@ defineExpose({
border-radius: 0 8px 8px 0;
line-height: 48px;
cursor: pointer;
transform: translateX(-3px);
}
.img {