From 48301d5bf493123abcb02949d1449bfa0d83fa79 Mon Sep 17 00:00:00 2001 From: luJianJun <2587063613@qq.com> Date: Fri, 11 Aug 2023 11:41:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=AC=E5=AF=93=E8=B7=B3=E8=BD=AC=E4=BC=98?= =?UTF-8?q?=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/apartment/seachModule.vue | 1 + src/components/seachPage/input.vue | 21 +++++++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/components/apartment/seachModule.vue b/src/components/apartment/seachModule.vue index 5a219e7..b6deed1 100644 --- a/src/components/apartment/seachModule.vue +++ b/src/components/apartment/seachModule.vue @@ -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) diff --git a/src/components/seachPage/input.vue b/src/components/seachPage/input.vue index fc40dd4..248767e 100644 --- a/src/components/seachPage/input.vue +++ b/src/components/seachPage/input.vue @@ -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){