diff --git a/src/App.vue b/src/App.vue index c3e2718..07efd99 100644 --- a/src/App.vue +++ b/src/App.vue @@ -73,6 +73,11 @@ img { width: 1200px; } +.box-min-1200-src{ + min-width:1200px; + overflow-x: scroll; +} + /* // 全局css 加上以下代码,可以隐藏上下箭头 */ /* // 取消input的上下箭头 */ diff --git a/src/components/seachModule/seachModule.vue b/src/components/seachModule/seachModule.vue index 4b457ee..00b42b6 100644 --- a/src/components/seachModule/seachModule.vue +++ b/src/components/seachModule/seachModule.vue @@ -175,19 +175,18 @@ let seachList = (item) => { historyArr.data.push(seachAllType.keyword) } localStorage.setItem('historyArr', JSON.stringify(historyArr.data)); + sessionStorage.setItem('houseingPageType',routePath.value === '/needHousing' ? '6' : routePath.value === '/intermediaryHousing' ? '1' : routePath.value === '/personHousing' ? '0' : '0') route.push({ path: '/seachPage', query: { keyword: seachAllType.keyword, isNeedHousing: routePath.value === '/needHousing', - houseingPageType: routePath.value === '/needHousing' ? 6 : routePath.value === '/intermediaryHousing' ? 1 : routePath.value === '/personHousing' ? 0 : 0 } }) } //设置搜索数据 let setSeachConditions = (type, data,second=null) => { - console.log(type,data,second) if (type === 'rent') { seachAllType['rent_min'] = data.min seachAllType['rent_max'] = data.max diff --git a/src/components/seachPage/input.vue b/src/components/seachPage/input.vue index 32eed59..097aff9 100644 --- a/src/components/seachPage/input.vue +++ b/src/components/seachPage/input.vue @@ -215,11 +215,14 @@ let selectPage = (type) => { seachAllType['searchid'] = setPageKey() if (type === 'person') { seachAllType['intermediary'] = 0 - route.currentRoute.value.query.houseingPageType='0' + houseingPageType='0' + sessionStorage.setItem('houseingPageType',0) selectTabBoxInfo.value.routerQuerySet() } else if (type === 'intermediary') { seachAllType['intermediary'] = 1 - route.currentRoute.value.query.houseingPageType='1' + houseingPageType='1' + sessionStorage.setItem('houseingPageType',1) + // route.currentRoute.value.query.houseingPageType='1' selectTabBoxInfo.value.routerQuerySet() } else { seachAllType['intermediary'] = '' @@ -238,8 +241,8 @@ seachVal.value = route.currentRoute.value.query.keyword&&route.currentRoute.valu isNeedHousing.value = route.currentRoute.value.query.isNeedHousing === 'true' //判断当前是什么页面 -let houseingPageType = route.currentRoute.value.query.houseingPageType -console.log('houseingPageType',route.currentRoute.value.query) +let houseingPageType = sessionStorage.getItem('houseingPageType') +console.log('houseingPageType',houseingPageType) let type = houseingPageType === '0' ? 'person' : houseingPageType === '1' ? 'intermediary' : houseingPageType === '6' ? 'need' : 'apartment' tabType.value = type @@ -336,6 +339,7 @@ let searchInit = (data) => { } //搜索数据 let seachList = (item) => { + let routeInfo = route.currentRoute.value if (!seachVal.value.replace(/\s/g, "")) return if (!seachVal.value) { return @@ -346,6 +350,13 @@ let seachList = (item) => { } else { searchInit(seachVal.value) } + route.push({ + path:routeInfo.path, + query:{ + keyword:seachVal.value, + isNeedHousing:routeInfo.query.isNeedHousing + } + }) } //筛选词条 diff --git a/src/components/selectTabBox/selectTabBox.vue b/src/components/selectTabBox/selectTabBox.vue index b19424c..607a4f3 100644 --- a/src/components/selectTabBox/selectTabBox.vue +++ b/src/components/selectTabBox/selectTabBox.vue @@ -637,6 +637,7 @@ let setRouterQuerySet = ref(true) let routerQuerySet = () => { if(routePath.value==='/seachPage'){ deconstructionSeachData = routeQuery.data + deconstructionSeachData.houseingPageType=sessionStorage.getItem('houseingPageType') }else{ deconstructionSeachData = deconstructionData(routeQuery.data) } diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index 18363ae..c61012c 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -1,5 +1,5 @@