公寓跳转优化

This commit is contained in:
2023-08-11 11:41:58 +08:00
parent e938cb645a
commit 48301d5bf4
2 changed files with 14 additions and 8 deletions

View File

@@ -273,6 +273,7 @@ const rentInput = () => clearingAmountState = false
// 点击历史搜索和热门推荐
const handleKeyword = value => {
sessionStorage.setItem('houseingPageType', '')
router.push(`/seachPage?keyword=${value}`)
if (historyArr.value.indexOf(value) == -1 && value) {
historyArr.value.unshift(value)

View File

@@ -257,6 +257,14 @@ let selectPage = (type) => {
let getDataList = props.getDataList
//搜索数据
let seachAllType = reactive({
keyword: '',
location: [],
searchid: '',
intermediary: 0
})
//搜索内容
let seachVal = ref('')
let isNeedHousing = ref(false)
@@ -270,6 +278,10 @@ let houseingPageType = sessionStorage.getItem('houseingPageType')
let type = houseingPageType === '0' ? 'person' : houseingPageType === '1' ? 'intermediary' : houseingPageType === '6' ? 'need' : 'apartment'
tabType.value = type
if(tabType.value=='apartment'){
seachAllType['intermediary'] = ''
seachAllType['tabType']='apartment'
}
//页面判断
let checkPageType = () => {
@@ -304,14 +316,6 @@ let seachInfoData=shallowReactive({
data:{}
})
//搜索数据
let seachAllType = reactive({
keyword: '',
location: [],
searchid: '',
intermediary: 0
})
//直接输入url
if (isNeedHousing.value) {
tabType.value = 'need'
@@ -409,6 +413,7 @@ let searchInit = (data) => {
//判断搜索数据数量
let checkSearckInit=(data)=>{
console.log(tabType.value,data)
if(data.count) return data
let obj={}
if(seachInfoData.data.personal.count>0){