详情顶部导航跳转

This commit is contained in:
2023-07-26 19:27:30 +08:00
parent 44d99b26ce
commit 77b5e5e6aa
7 changed files with 44 additions and 47 deletions

View File

@@ -1107,14 +1107,14 @@ let setNavigation = () => {
if (!location) return
if (pageType.value == 1 || pageType.value == 2) {
// type=location&data=["2.2"]&areaItem={"id":2,"name":"九龙"}
console.log(`${store.state.routeList['secondaryIndex'].path}/location/${housingInfo['data']['info'].location.substring(0, 1)}`)
console.log(`${store.state.routeList['secondaryIndex'].path}/location/${JSON.stringify([housingInfo['data']['info'].location.substring(0, 1)])}`)
store.state.routeList['thirdIndex'] = {
path: `${store.state.routeList['secondaryIndex'].path}/location/${housingInfo['data']['info'].location.substring(0, 1)}`,
path: `${store.state.routeList['secondaryIndex'].path}/location/${JSON.stringify([housingInfo['data']['info'].location.substring(0, 1)])}/${JSON.stringify({id:housingInfo['data']['info'].location.substring(0, 1),name:location[housingInfo['data']['info'].location.substring(0, 1)]})}/${JSON.stringify({type:'types',data:{name:type[housingInfo['data']['info'].type.substring(0, 1)],id:housingInfo['data']['info'].type}})}`,
title: `${location[housingInfo['data']['info'].location.substring(0, 1)]}${type[housingInfo['data']['info'].type.substring(0, 1)]}房源`
}
if (housingInfo['data']['info'].location.length > 0)
store.state.routeList['fourthIndex'] = {
path: "",
path: `${store.state.routeList['secondaryIndex'].path}/location/${JSON.stringify([housingInfo['data']['info'].location.substring(0, 3)])}/${JSON.stringify({id:housingInfo['data']['info'].location.substring(0, 1),name:location[housingInfo['data']['info'].location.substring(0, 1)]})}/${JSON.stringify({type:'types',data:{name:type[housingInfo['data']['info'].type.substring(0, 3)],id:housingInfo['data']['info'].type}})}`,
title: `${location[housingInfo['data']['info'].location]}${type[housingInfo['data']['info'].type]}`
}
}

View File

@@ -143,20 +143,17 @@ let downLoadMore = () => {
//listImg
onMounted(() => {
console.log(123)
let type=null,data=null
console.log(router.currentRoute.value.params)
if (router.currentRoute.value.params.type) {
let { type, data } = router.currentRoute.value.params
type=type
data=data
type=router.currentRoute.value.params.type
data=router.currentRoute.value.params.data
} else {
let { type, data } = router.currentRoute.value.query
type=type
data=data
type=router.currentRoute.value.query.type
data=router.currentRoute.value.query.data
}
let typeData = null
if (data) typeData = JSON.parse(data)
if (data && Object.keys(data).length > 0) {
if (type !== 'location') {
seachSelectData.data = { [type]: typeData.id }