收藏同步 距离房源更新

This commit is contained in:
2023-07-27 12:03:13 +08:00
parent ec456e000d
commit 49f1105e28
7 changed files with 57 additions and 26 deletions

View File

@@ -1,7 +1,7 @@
<template>
<div>
<pageTopBar></pageTopBar>
<div class="dis-f jus-x al-item" :class="{'mg-b-80':pageType==3}">
<div class="dis-f jus-x al-item" :class="{'mg-b-80':pageType==3&&(recommendListData.length==0||publisherList.length==0)}">
<div class="body-maxWidth mg-t-35">
<breadcrumb :data="housingInfo['data']" :operation='setOperation'></breadcrumb>
<el-affix :offset="0" @change="changeTitleType" z-index="700">
@@ -12,7 +12,7 @@
v-if="pageType == 1 &&
housingInfo['data'] &&
housingInfo['data'].info.verified" alt="">
<img src="../assets/homeImage/intermediaryTabImg.png" class="intermediary-logo" v-if="pageType == 2 &&
<img src="../assets/homeImage/intermediaryTabImg.png" class="intermediary-logo" style="margin-right:10px;" v-if="pageType == 2 &&
housingInfo['data'] &&
housingInfo['data'].isintermediary == 1" alt="">
<div class="line" v-if="housingInfo['data'] && housingInfo['data'].info.verified"></div>
@@ -46,12 +46,12 @@
</div>
<div class="dis-f al-item">
<div class="tool-btn dis-f al-item jus-x">
<div class="dis-f al-item">
<img src="../assets/img/detail/collect.png" class="tool-icon" alt="">
<img src="../assets/img/detail/collectT.png" v-show="false" class="tool-icon"
<div class="dis-f al-item" @click="setOperation">
<img src="../assets/img/detail/collect.png" v-show="housingInfo['data']&&!housingInfo['data'].isfav" class="tool-icon" alt="">
<img src="../assets/img/detail/collectT.png" v-show="housingInfo['data']&&housingInfo['data'].isfav" class="tool-icon"
alt="">
<span>
收藏
{{ housingInfo['data']&&housingInfo['data'].isfav ? housingInfo['data']&&housingInfo['data']['info'].count_fav : '收藏' }}
</span>
</div>
<div class="line" style="margin:0 20px;"></div>
@@ -440,7 +440,7 @@
<div class="top-box"></div>
<div class="title-box dis-f al-item jus-x">
<span class="title">房源距离院校</span>
<img src="../assets/img/detail/close.png" class="close-icon" alt="">
<img src="../assets/img/detail/close.png" class="close-icon" @click="showDistance=false" alt="">
</div>
<div class="distance-info-data dis-f" v-if="distanceList.length > 0">
<div class="dis-f al-item school-info" v-for="(item, index) in distanceList"
@@ -513,7 +513,8 @@
</div>
<div class="houseing-info-box dis-f al-item jus-bet">
<div class="dis-f al-item houseing-info-box-s">
房源ID: <span class="houseing-id" @click="clone('123456789')">{{ housingInfo['data'] &&
房源ID: <span class="houseing-id" @click="clone(housingInfo['data'] &&
housingInfo['data'].info.uid)">{{ housingInfo['data'] &&
housingInfo['data'].info.uid }}</span>
<span class="browse-box">
浏览: <span class="text">{{ housingInfo['data'] && housingInfo['data'].info.count_view
@@ -551,7 +552,7 @@
<div>
如房源信息中有内容侵犯了您的合法权益,可点击屏幕右侧的举报或联系寄托方同学(微信号
<el-dropdown>
<span class="text-line" @click="clone('gternet2')">{{
<span class="text-line" @click="clone(concatInfo.data && concatInfo.data.wechat)">{{
concatInfo.data && concatInfo.data.wechat }}</span>
<template #dropdown>
<el-dropdown-menu>
@@ -671,7 +672,7 @@
</div>
<div class="dis-f jus-x ">
<div class="wx-qrcode-box dis-f jus-x al-item">
<img src="../assets/img/detail/wxQrCode.svg" class="wx-qrcode" alt="">
<img :src="housingInfo['data'] && housingInfo['data'].qrcode" class="wx-qrcode" alt="">
</div>
</div>
<div class="dis-f jus-x s-w-100">
@@ -708,7 +709,7 @@
<img :src="contacts['data'].businesscard&&contacts['data'].businesscard[0].image" class="img" alt="">
</div>
<!-- 推荐 -->
<div class="dis-f jus-x" v-if="pageType != 3">
<div class="dis-f jus-x" v-if="pageType != 3&&(recommendListData.length > 0||publisherList.length > 0)">
<div class="body-maxWidth housing-title" style="margin-top:30px;">
附近房源
</div>
@@ -728,7 +729,7 @@
</div>
</div>
</div>
<div class="dis-f jus-x bottom-tps" v-if="pageType != 3">
<div class="dis-f jus-x bottom-tps" v-if="pageType != 3&&(recommendListData.length > 0||publisherList.length > 0)">
- {{ loadText }} -
</div>
<footerTool></footerTool>
@@ -999,6 +1000,9 @@ let imgListTab = ref(0)
let interval = ''
//点击方向按钮
let moveImageList = (type) => {
let clientWidth = imageList.value.clientWidth
let scrollWidth = imageList.value.scrollWidth
if(type === 'right'&&imageLIst.value[imgListTab.value] + clientWidth >= scrollWidth)return
if ((type === 'left' && imgListTab.value === 0) || (imgListTab.value === imageLIst.value.length - 1 && type === 'right')) return
type === 'left' ? imgListTab.value-- : imgListTab.value++
setOffsetWidth(imageLIst.value[imgListTab.value], type)
@@ -1107,7 +1111,7 @@ 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/${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['thirdIndex'] = {
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)]}房源`
@@ -1117,6 +1121,21 @@ let setNavigation = () => {
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]}`
}
}else if(pageType.value == 4){
store.state.routeList['thirdIndex'] = {
path:{
path:`${store.state.routeList['secondaryIndex'].path}`,
query:{
id:1
}
} ,
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: `${store.state.routeList['secondaryIndex'].path}`,
title: `${location[housingInfo['data']['info'].location]}${type[housingInfo['data']['info'].type]}`
}
}
}
//中介数据
@@ -1315,7 +1334,7 @@ let router = useRouter()
onMounted(() => {
let { id, type } = router.currentRoute.value.query
uniqid.value = id
pageType.value = type
pageType.value = type //1个人 2中介 3求房源 4搜索
getHousingInfo()
masonryInstance = new Masonry(gridContainer.value, {
itemSelector: '.waterfall-box',
@@ -2021,6 +2040,7 @@ img {
.wx-qrcode {
width: 103px;
height: 103px;
border-radius:50%;
}
}