搜索页 详情页跳转设置

This commit is contained in:
2023-07-28 11:52:59 +08:00
parent 65f43ea7db
commit a98e3280d5
5 changed files with 48 additions and 45 deletions

View File

@@ -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' }]