求房源页面+接口修改
This commit is contained in:
@@ -142,7 +142,8 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="image-box">
|
||||
<div class="image-box" v-if="(housingInfo['data'] && housingInfo['data'].info && housingInfo['data'].info.video) ||
|
||||
(housingInfo['data'] && housingInfo['data'].info && housingInfo['data'].info.picturegroup)">
|
||||
<div class="dis-f al-item">
|
||||
<img src="../assets/img/detail/videoIcon.png" v-if="housingInfo['data'] &&
|
||||
housingInfo['data'].info.video &&
|
||||
@@ -609,7 +610,7 @@
|
||||
<img src="../assets/homeImage/intermediaryTabImg.png" class="intermediary-logo" alt="">
|
||||
</div>
|
||||
<div class="dis-f jus-x"
|
||||
v-if="pageType == 1 || (pageType == 2 && housingInfo['data'] && housingInfo['data'].isintermediary != 1)">
|
||||
v-if="!(pageType == 2 && housingInfo['data'] && housingInfo['data'].isintermediary != 1)">
|
||||
<div class="user-type">
|
||||
{{
|
||||
indexData['data'] &&
|
||||
@@ -759,7 +760,7 @@
|
||||
</div>
|
||||
|
||||
<div class="dis-f jus-x bottom-tps"
|
||||
v-if="(pageType === 1&&recommendListData.length > 0) || (pageType === 2 && recommendListData.length > 0 && housingInfo['data'] && housingInfo['data'].isintermediary)">
|
||||
v-if="(pageType === 1 && recommendListData.length > 0) || (pageType === 2 && recommendListData.length > 0 && housingInfo['data'] && housingInfo['data'].isintermediary)">
|
||||
- {{ loadText }} -
|
||||
</div>
|
||||
<footerTool class="mg-t-60"></footerTool>
|
||||
@@ -1163,15 +1164,16 @@ let location = store.state.indexData.config && store.state.indexData.config.loca
|
||||
let setNavigation = () => {
|
||||
let type = store.state.indexData.config && store.state.indexData.config.type
|
||||
indexData['data'] = store.state.indexData
|
||||
console.log()
|
||||
if (!location) return
|
||||
if (pageType.value == 1 || pageType.value == 2) {
|
||||
// location=3.8,3.13&areaItem=3
|
||||
// console.log(`${store.state.routeList['secondaryIndex'].path}/location/${JSON.stringify([housingInfo['data']['info'].location.substring(0, 1)])}`)
|
||||
store.state.routeList['secondaryIndex'] = {
|
||||
path: pageType.value===2 ? '/intermediaryHousing' :
|
||||
pageType.value===3 ? '/needHousing' : '/personHousing',
|
||||
path: pageType.value === 2 ? '/intermediaryHousing' :
|
||||
pageType.value === 3 ? '/needHousing' : '/personHousing',
|
||||
title: pageType.value === 2 ? '中介房源' :
|
||||
pageType.value===3 ? '求房源' : '个人房源'
|
||||
pageType.value === 3 ? '求房源' : '个人房源'
|
||||
}
|
||||
store.state.routeList['thirdIndex'] = {
|
||||
path: `${store.state.routeList['secondaryIndex'].path}`,
|
||||
@@ -1194,8 +1196,16 @@ let setNavigation = () => {
|
||||
title: `${location[housingInfo['data']['info'].location]}${type[housingInfo['data']['info'].type]}`
|
||||
}
|
||||
} else {
|
||||
store.state.routeList['thirdIndex'] = ''
|
||||
store.state.routeList['fourthIndex'] = ''
|
||||
store.state.routeList = {
|
||||
index: {
|
||||
path: '/',
|
||||
title: '港校租房'
|
||||
},
|
||||
secondaryIndex: {
|
||||
path: '/needHousing',
|
||||
title:'求房源'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//中介数据
|
||||
@@ -1212,7 +1222,7 @@ let getHousingInfo = () => {
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
housingInfo['data'] = res.data
|
||||
pageType.value =housingInfo['data']['info'].intermediary===1?2:housingInfo['data']['info'].intermediary===6?3:1 //1个人 2中介 3求房源
|
||||
pageType.value = housingInfo['data']['info'].intermediary === 1 ? 2 : housingInfo['data']['info'].intermediary === 6 ? 3 : 1 //1个人 2中介 3求房源
|
||||
setHousingArr()
|
||||
setNavigation()
|
||||
distanceList.value = housingInfo['data']['info'].pointData || []
|
||||
@@ -1226,6 +1236,8 @@ let getHousingInfo = () => {
|
||||
getPublisherList()
|
||||
} else if (pageType.value != 3) {
|
||||
recommendList()
|
||||
} else {
|
||||
loadMore.value = false
|
||||
}
|
||||
|
||||
} else {
|
||||
@@ -1396,7 +1408,7 @@ let route = useRoute()
|
||||
watch(route, () => {
|
||||
let { id } = router.currentRoute.value.query
|
||||
uniqid.value = id
|
||||
pageType.value = housingInfo['data']['info'].intermediary===1?2:housingInfo['data']['info'].intermediary===6?3:1 //1个人 2中介 3求房源
|
||||
pageType.value = housingInfo['data']['info'].intermediary === 1 ? 2 : housingInfo['data']['info'].intermediary === 6 ? 3 : 1 //1个人 2中介 3求房源
|
||||
publisherList.value = []
|
||||
recommendListData.value = []
|
||||
getHousingInfo()
|
||||
|
||||
Reference in New Issue
Block a user