This commit is contained in:
2023-07-26 18:03:04 +08:00
parent 13dacfe5d3
commit dff6345e33
4 changed files with 42 additions and 23 deletions

View File

@@ -46,7 +46,7 @@ const routes = [
}
},
{//个人房源
path: '/personHousing',
path: '/personHousing/:type?/:data?/:areaItem?',
component: () => import(/* webpackChunkName: "housing" */ '@/views/housingView/person.vue'),
meta: {
title: '个人房源'
@@ -101,7 +101,10 @@ router.beforeEach((to, from, next) => {
//导航数据
if (/['seachPage','needHousing','intermediaryHousing','personHousing']/.test(from.path)) {
store.state.routeList.secondaryIndex.title = from.meta.title
store.state.routeList.secondaryIndex.path = from.path
store.state.routeList.secondaryIndex.path = from.path==='/needHousing'?'/needHousing':
from.path==='/intermediaryHousing'?'/intermediaryHousing':
from.path==='/personHousing'?'/personHousing':
from.path==='/seachPage'?'/seachPage':''
}
next()
let meta = to['meta'] || {}