搜索页 详情页跳转设置
This commit is contained in:
@@ -281,6 +281,8 @@ let seachAllType = reactive({
|
||||
})
|
||||
//设置搜索数据
|
||||
let setSeachConditions = (type, data) => {
|
||||
console.log(1,seachAllType)
|
||||
console.log(type.value)
|
||||
if (seachAllType['tabType'] !== 'apartment') {
|
||||
if (type === 'rent') {
|
||||
seachAllType['rent_min'] = data.min
|
||||
@@ -300,7 +302,8 @@ let setSeachConditions = (type, data) => {
|
||||
}
|
||||
} else {
|
||||
seachAllType = {
|
||||
...data
|
||||
tabType:'apartment',
|
||||
...type.value
|
||||
}
|
||||
}
|
||||
if (!seachVal.value) {
|
||||
|
||||
@@ -271,11 +271,7 @@ const route = useRouter()
|
||||
let routePath = ref('')
|
||||
let routeQuery = reactive({ data: {} })
|
||||
routePath.value = route.currentRoute.value.meta.path
|
||||
if (route.currentRoute.value.params.type) {
|
||||
routeQuery.data = route.currentRoute.value.params
|
||||
} else {
|
||||
routeQuery.data = route.currentRoute.value.query
|
||||
}
|
||||
routeQuery.data = route.currentRoute.value.query
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const props = defineProps({
|
||||
@@ -639,11 +635,13 @@ let deconstructionSeachData = null
|
||||
//根据路由设置参数
|
||||
let setRouterQuerySet = ref(true)
|
||||
let routerQuerySet = () => {
|
||||
deconstructionSeachData = deconstructionData(routeQuery.data)
|
||||
console.log(deconstructionSeachData)
|
||||
if (!setRouterQuerySet.value) return
|
||||
if(routePath.value==='/seachPage'){
|
||||
deconstructionSeachData = routeQuery.data
|
||||
}else{
|
||||
deconstructionSeachData = deconstructionData(routeQuery.data)
|
||||
}
|
||||
//路由参数设置
|
||||
if ((routeQuery.data && routeQuery.data.houseingPageType === '1') || (routePath.value === '/intermediaryHousing')) {
|
||||
if ((deconstructionSeachData.houseingPageType == '1') || (routePath.value === '/intermediaryHousing')) {
|
||||
otherData.value = [{ title: '认证中介', id: 'isintermediary' }, { title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }]
|
||||
} else if ((routeQuery.data && routeQuery.data.houseingPageType === '6') || (routePath.value === '/needHousing')) {
|
||||
otherData.value = [{ title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }]
|
||||
|
||||
Reference in New Issue
Block a user