中介详情显示房源

This commit is contained in:
2023-07-28 17:43:00 +08:00
parent 7bf9f59c75
commit 8da2aaf482
9 changed files with 63 additions and 40 deletions

View File

@@ -629,7 +629,7 @@
<div v-if="checkUpdateTime(housingInfo['data'] && housingInfo['data'].info.updatetime)">
<div class="dis-f al-item jus-x time-box" v-if="housingInfo['data'] &&
housingInfo['data'].intermediarylistingcount > 0 &&
housingInfo['data'] && ['config']['intermediary'] == 1 &&
housingInfo['data']['info']['intermediary'] == 1 &&
housingInfo['data'].isintermediary == 1">
<img src="../assets/img/detail/presonNumIcon.png" class="icon" alt="">
<span>房源 x{{ housingInfo['data'] && housingInfo['data'].intermediarylistingcount
@@ -759,7 +759,7 @@
</div>
<div class="dis-f jus-x bottom-tps"
v-if="pageType === 1 || (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>
@@ -1165,10 +1165,10 @@ let setNavigation = () => {
// 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: housingInfo['data']['info'].intermediary === 1 ? '/intermediaryHousing' :
housingInfo['data']['info'].intermediary === 6 ? '/needHousing' : '/personHousing',
title: housingInfo['data']['info'].intermediary === 1 ? '中介房源' :
housingInfo['data']['info'].intermediary === 6 ? '求房源' : '个人房源'
path: pageType.value===2 ? '/intermediaryHousing' :
pageType.value===3 ? '/needHousing' : '/personHousing',
title: pageType.value === 2 ? '中介房源' :
pageType.value===3 ? '求房源' : '个人房源'
}
store.state.routeList['thirdIndex'] = {
path: `${store.state.routeList['secondaryIndex'].path}`,
@@ -1209,6 +1209,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求房源
setHousingArr()
setNavigation()
distanceList.value = housingInfo['data']['info'].pointData || []
@@ -1218,7 +1219,6 @@ let getHousingInfo = () => {
})
concatInfo['data'] = store.state.indexData.wechat
if (res.data.contacts) contacts['data'] = res.data.contacts
console.log('pageType', pageType.value)
if (pageType.value == 2 && housingInfo['data'].isintermediary) {
getPublisherList()
} else if (pageType.value != 3) {
@@ -1253,7 +1253,10 @@ let setOperation = () => {
//获取联系方式
let concatData = reactive({})
let getConcatData = () => {
if (concatData['data']) return
if (concatData['data']){
showConcat.value = true
return
}
api.contactData({
token: housingInfo['data'].token
}).then(res => {
@@ -1391,9 +1394,9 @@ let router = useRouter()
let route = useRoute()
watch(route, () => {
let { id, type } = router.currentRoute.value.query
let { id } = router.currentRoute.value.query
uniqid.value = id
pageType.value = type //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()
@@ -1410,9 +1413,8 @@ watch(route, () => {
})
onMounted(() => {
let { id, type } = router.currentRoute.value.query
let { id } = router.currentRoute.value.query
uniqid.value = id
pageType.value = type //1个人 2中介 3求房源
getHousingInfo()
masonryInstance = new Masonry(gridContainer.value, {
itemSelector: '.waterfall-box',