搜索页 详情页跳转设置
This commit is contained in:
@@ -281,6 +281,8 @@ let seachAllType = reactive({
|
|||||||
})
|
})
|
||||||
//设置搜索数据
|
//设置搜索数据
|
||||||
let setSeachConditions = (type, data) => {
|
let setSeachConditions = (type, data) => {
|
||||||
|
console.log(1,seachAllType)
|
||||||
|
console.log(type.value)
|
||||||
if (seachAllType['tabType'] !== 'apartment') {
|
if (seachAllType['tabType'] !== 'apartment') {
|
||||||
if (type === 'rent') {
|
if (type === 'rent') {
|
||||||
seachAllType['rent_min'] = data.min
|
seachAllType['rent_min'] = data.min
|
||||||
@@ -300,7 +302,8 @@ let setSeachConditions = (type, data) => {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
seachAllType = {
|
seachAllType = {
|
||||||
...data
|
tabType:'apartment',
|
||||||
|
...type.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!seachVal.value) {
|
if (!seachVal.value) {
|
||||||
|
|||||||
@@ -271,11 +271,7 @@ const route = useRouter()
|
|||||||
let routePath = ref('')
|
let routePath = ref('')
|
||||||
let routeQuery = reactive({ data: {} })
|
let routeQuery = reactive({ data: {} })
|
||||||
routePath.value = route.currentRoute.value.meta.path
|
routePath.value = route.currentRoute.value.meta.path
|
||||||
if (route.currentRoute.value.params.type) {
|
routeQuery.data = route.currentRoute.value.query
|
||||||
routeQuery.data = route.currentRoute.value.params
|
|
||||||
} else {
|
|
||||||
routeQuery.data = route.currentRoute.value.query
|
|
||||||
}
|
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@@ -639,11 +635,13 @@ let deconstructionSeachData = null
|
|||||||
//根据路由设置参数
|
//根据路由设置参数
|
||||||
let setRouterQuerySet = ref(true)
|
let setRouterQuerySet = ref(true)
|
||||||
let routerQuerySet = () => {
|
let routerQuerySet = () => {
|
||||||
deconstructionSeachData = deconstructionData(routeQuery.data)
|
if(routePath.value==='/seachPage'){
|
||||||
console.log(deconstructionSeachData)
|
deconstructionSeachData = routeQuery.data
|
||||||
if (!setRouterQuerySet.value) return
|
}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' }]
|
otherData.value = [{ title: '认证中介', id: 'isintermediary' }, { title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }]
|
||||||
} else if ((routeQuery.data && routeQuery.data.houseingPageType === '6') || (routePath.value === '/needHousing')) {
|
} else if ((routeQuery.data && routeQuery.data.houseingPageType === '6') || (routePath.value === '/needHousing')) {
|
||||||
otherData.value = [{ title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }]
|
otherData.value = [{ title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }]
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ const routes = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{//中介房源
|
{//中介房源
|
||||||
path: '/intermediaryHousing/:type?/:data?/:areaItem?/:types?',
|
path: '/intermediaryHousing',
|
||||||
component: () => import(/* webpackChunkName: "housing" */ '@/views/housingView/intermediary.vue'),
|
component: () => import(/* webpackChunkName: "housing" */ '@/views/housingView/intermediary.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
title: '中介房源',
|
title: '中介房源',
|
||||||
@@ -120,7 +120,7 @@ const router = createRouter({
|
|||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
//导航数据
|
//导航数据
|
||||||
if (/['seachPage','needHousing','intermediaryHousing','personHousing']/.test(from.path)) {
|
if (/['needHousing','intermediaryHousing','personHousing']/.test(from.path)) {
|
||||||
store.state.routeList.secondaryIndex.title = from.meta.title
|
store.state.routeList.secondaryIndex.title = from.meta.title
|
||||||
store.state.routeList.secondaryIndex.path = from.meta.path
|
store.state.routeList.secondaryIndex.path = from.meta.path
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<pageTopBar></pageTopBar>
|
<pageTopBar></pageTopBar>
|
||||||
<div class="dis-f jus-x al-item"
|
<div class="dis-f jus-x al-item"
|
||||||
:class="{ 'mg-b-80': pageType == 3 && (recommendListData.length == 0 || publisherList.length == 0) }">
|
:class="{ 'mg-b-80': pageType == 3 || (recommendListData.length == 0 || publisherList.length == 0) }">
|
||||||
<div class="body-maxWidth mg-t-35">
|
<div class="body-maxWidth mg-t-35">
|
||||||
<breadcrumb :data="housingInfo['data']" :operation='setOperation'></breadcrumb>
|
<breadcrumb :data="housingInfo['data']" :operation='setOperation'></breadcrumb>
|
||||||
<el-affix :offset="0" @change="changeTitleType" z-index="700">
|
<el-affix :offset="0" @change="changeTitleType" z-index="700">
|
||||||
@@ -126,7 +126,7 @@
|
|||||||
{{ !housingInfo['data'] || housingInfo['data'] &&
|
{{ !housingInfo['data'] || housingInfo['data'] &&
|
||||||
housingInfo['data'].info.rentalduration
|
housingInfo['data'].info.rentalduration
|
||||||
=== '0' ?
|
=== '0' ?
|
||||||
'不限' : `${config.rentalduration[housingInfo['data'] && housingInfo['data'].info.rentalduration]}` }}
|
'不限' : `${ indexData['data']&&indexData['data']['config']&&indexData['data']['config']['rentalduration'][housingInfo['data'] && housingInfo['data'].info.rentalduration]}` }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="condition">
|
<div class="condition">
|
||||||
@@ -202,7 +202,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div class="need-housing-info" v-if="pageType == 3">
|
<div class="need-housing-info" v-if="pageType == 3">
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] && housingInfo['data'].info.property">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
房屋类型
|
房屋类型
|
||||||
</div>
|
</div>
|
||||||
@@ -219,7 +219,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] && housingInfo['data'].info.floor">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
所在楼层
|
所在楼层
|
||||||
</div>
|
</div>
|
||||||
@@ -235,7 +235,7 @@
|
|||||||
<!-- {{ housingInfo['data'] && housingInfo['data'].info.floor }} -->
|
<!-- {{ housingInfo['data'] && housingInfo['data'].info.floor }} -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] &&housingInfo['data'].info.elevator">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
电梯
|
电梯
|
||||||
</div>
|
</div>
|
||||||
@@ -248,7 +248,7 @@
|
|||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] &&housingInfo['data'].info.sunshinearea">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
晾晒区
|
晾晒区
|
||||||
</div>
|
</div>
|
||||||
@@ -264,7 +264,7 @@
|
|||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] && housingInfo['data'].info.acreage[0]">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
面积
|
面积
|
||||||
</div>
|
</div>
|
||||||
@@ -286,7 +286,7 @@
|
|||||||
平方呎
|
平方呎
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] &&housingInfo['data'].info.publishergender">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
同住人性别要求
|
同住人性别要求
|
||||||
</div>
|
</div>
|
||||||
@@ -299,7 +299,7 @@
|
|||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] && housingInfo['data'].info.gender">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
发布者性别
|
发布者性别
|
||||||
</div>
|
</div>
|
||||||
@@ -317,7 +317,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- -->
|
<!-- -->
|
||||||
<div class="info-box-s" v-if="pageType != 3">
|
<div class="info-box-s" v-if="pageType != 3">
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] &&housingInfo['data'].info.property">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
房屋类型
|
房屋类型
|
||||||
</div>
|
</div>
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] &&housingInfo['data'].info.elevator">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
所在楼层
|
所在楼层
|
||||||
</div>
|
</div>
|
||||||
@@ -349,7 +349,7 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item">
|
<div class="info dis-f al-item" v-if="housingInfo['data'] &&housingInfo['data'].info.sunshinearea">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
晾晒区
|
晾晒区
|
||||||
</div>
|
</div>
|
||||||
@@ -365,7 +365,7 @@
|
|||||||
}}
|
}}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item" style="margin-top:30px;">
|
<div class="info dis-f al-item" style="margin-top:30px;" v-if="housingInfo['data'] && housingInfo['data'].info.acreage">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
面积
|
面积
|
||||||
</div>
|
</div>
|
||||||
@@ -376,7 +376,7 @@
|
|||||||
}} 平方呎
|
}} 平方呎
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="info dis-f al-item" style="margin-top:30px;">
|
<div class="info dis-f al-item" style="margin-top:30px;" v-if="housingInfo['data'] &&housingInfo['data'].info.gender">
|
||||||
<div class="title-box">
|
<div class="title-box">
|
||||||
性别要求
|
性别要求
|
||||||
</div>
|
</div>
|
||||||
@@ -595,7 +595,7 @@
|
|||||||
v-if="pageType == 2 && housingInfo['data'] && housingInfo['data'].isintermediary == 1">
|
v-if="pageType == 2 && housingInfo['data'] && housingInfo['data'].isintermediary == 1">
|
||||||
<img src="../assets/homeImage/intermediaryTabImg.png" class="intermediary-logo" alt="">
|
<img src="../assets/homeImage/intermediaryTabImg.png" class="intermediary-logo" alt="">
|
||||||
</div>
|
</div>
|
||||||
<div class="dis-f jus-x" v-if="pageType == 1">
|
<div class="dis-f jus-x" v-if="pageType == 1||(pageType == 2 && housingInfo['data'] && housingInfo['data'].isintermediary != 1)">
|
||||||
<div class="user-type">
|
<div class="user-type">
|
||||||
{{
|
{{
|
||||||
indexData['data'] &&
|
indexData['data'] &&
|
||||||
@@ -1128,20 +1128,23 @@ let setHousingArr = () => {
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
//总体数据
|
|
||||||
let config=store.state.indexData.config
|
|
||||||
|
|
||||||
let location = store.state.indexData.config && store.state.indexData.config.location
|
let location = store.state.indexData.config && store.state.indexData.config.location
|
||||||
//设置顶部导航
|
//设置顶部导航
|
||||||
|
// intermediary 1中介 2-5个人 6求房源
|
||||||
let setNavigation = () => {
|
let setNavigation = () => {
|
||||||
let type = store.state.indexData.config && store.state.indexData.config.type
|
let type = store.state.indexData.config && store.state.indexData.config.type
|
||||||
indexData['data'] = store.state.indexData
|
indexData['data'] = store.state.indexData
|
||||||
console.log('routeLis', store.state)
|
|
||||||
console.log(location)
|
|
||||||
if (!location) return
|
if (!location) return
|
||||||
if (pageType.value == 1 || pageType.value == 2) {
|
if (pageType.value == 1 || pageType.value == 2) {
|
||||||
// location=3.8,3.13&areaItem=3
|
// location=3.8,3.13&areaItem=3
|
||||||
// console.log(`${store.state.routeList['secondaryIndex'].path}/location/${JSON.stringify([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['secondaryIndex']={
|
||||||
|
path:housingInfo['data']['info'].intermediary===1?'/intermediaryHousing':
|
||||||
|
housingInfo['data']['info'].intermediary===6?'/needHousing':'/personHousing',
|
||||||
|
title:housingInfo['data']['info'].intermediary===1?'中介房源':
|
||||||
|
housingInfo['data']['info'].intermediary===6?'求房源':'个人房源'
|
||||||
|
}
|
||||||
store.state.routeList['thirdIndex'] = {
|
store.state.routeList['thirdIndex'] = {
|
||||||
path: `${store.state.routeList['secondaryIndex'].path}`,
|
path: `${store.state.routeList['secondaryIndex'].path}`,
|
||||||
query: {
|
query: {
|
||||||
@@ -1189,9 +1192,10 @@ let getHousingInfo = () => {
|
|||||||
})
|
})
|
||||||
concatInfo['data'] = store.state.indexData.wechat
|
concatInfo['data'] = store.state.indexData.wechat
|
||||||
if (res.data.contacts) contacts['data'] = res.data.contacts
|
if (res.data.contacts) contacts['data'] = res.data.contacts
|
||||||
if (housingInfo['data'].info.verified && pageType.value != 3) {
|
console.log('pageType',pageType.value)
|
||||||
|
if ( pageType.value ==2) {
|
||||||
getPublisherList()
|
getPublisherList()
|
||||||
} else if (pageType.value != 3) {
|
} else if (pageType.value == 1) {
|
||||||
recommendList()
|
recommendList()
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1299,17 +1303,17 @@ let recommendList = () => {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.data.length === 0) return
|
if (res.data.data&&res.data.data.length >= 30) {
|
||||||
if (res.data.pagevalue) {
|
|
||||||
recommendListData.value = recommendListData.value.concat(res.data.data)
|
|
||||||
pagevalue.value = res.data.pagevalue
|
|
||||||
}
|
|
||||||
if (res.data.data.length >= 30) {
|
|
||||||
loadMore.value = true
|
loadMore.value = true
|
||||||
} else {
|
} else {
|
||||||
loadMore.value = false
|
loadMore.value = false
|
||||||
loadText.value = '到底了'
|
loadText.value = '到底了'
|
||||||
}
|
}
|
||||||
|
if (res.data.length === 0) return
|
||||||
|
if (res.data.pagevalue) {
|
||||||
|
recommendListData.value = recommendListData.value.concat(res.data.data)
|
||||||
|
pagevalue.value = res.data.pagevalue
|
||||||
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
masonryInstance.reloadItems();
|
masonryInstance.reloadItems();
|
||||||
masonryInstance.layout();
|
masonryInstance.layout();
|
||||||
@@ -1339,13 +1343,13 @@ let getPublisherList = () => {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
publisherList.value = publisherList.value.concat(res.data)
|
|
||||||
if (res.data.length >= 30) {
|
if (res.data.length >= 30) {
|
||||||
loadMore.value = true
|
loadMore.value = true
|
||||||
} else {
|
} else {
|
||||||
loadMore.value = false
|
loadMore.value = false
|
||||||
loadText.value = '到底了'
|
loadText.value = '到底了'
|
||||||
}
|
}
|
||||||
|
publisherList.value = publisherList.value.concat(res.data)
|
||||||
} else {
|
} else {
|
||||||
ElMessage({
|
ElMessage({
|
||||||
message: res.message,
|
message: res.message,
|
||||||
@@ -2104,7 +2108,7 @@ img {
|
|||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
padding: 2px 3px;
|
padding: 2px 6px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-box {
|
.time-box {
|
||||||
@@ -2649,8 +2653,6 @@ img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.school-info {
|
.school-info {
|
||||||
height: 500px;
|
|
||||||
overflow-y: scroll;
|
|
||||||
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC', sans-serif;
|
font-family: 'PingFangSC-Semibold', 'PingFang SC Semibold', 'PingFang SC', sans-serif;
|
||||||
font-weight: 650;
|
font-weight: 650;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
listId="2"></biserialItem>
|
listId="2"></biserialItem>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="seachSelectData.data.intermediary === '' && dataList.data && dataList.data.length > 0"
|
<div v-show="seachSelectData.data&&seachSelectData.data.intermediary === '' && dataList.data && dataList.data.length > 0"
|
||||||
ref="gridContainer">
|
ref="gridContainer">
|
||||||
<apartment-item v-for="item in listApartment" :item="item"></apartment-item>
|
<apartment-item v-for="item in listApartment" :item="item"></apartment-item>
|
||||||
</div>
|
</div>
|
||||||
@@ -75,7 +75,7 @@ let setSeachSelectData = (data) => {
|
|||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
loading.value = true
|
loading.value = true
|
||||||
// console.log('seachSelectData', seachSelectData.data, type)
|
// console.log('seachSelectData', seachSelectData.data)
|
||||||
// return
|
// return
|
||||||
getDataList(seachSelectData.data)
|
getDataList(seachSelectData.data)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user