搜索页新增求房源判断
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user