收藏加载界面 详情页求房源增加数组判断
This commit is contained in:
@@ -25,15 +25,17 @@
|
||||
housingInfo['data'].isintermediary == 1"></div>
|
||||
<span class="need-houing-type" v-if="pageType == 3">预算</span>
|
||||
<span class="unit">HK$</span>
|
||||
<span class="rent" v-if="pageType != 3">{{ housingInfo['data'] &&
|
||||
housingInfo['data'].info.rent }}</span>
|
||||
<span class="rent" v-if="pageType == 3">
|
||||
<span class="rent"
|
||||
v-if="!Array.isArray(housingInfo['data'] && housingInfo['data'].info.rent)">{{
|
||||
housingInfo['data'] &&
|
||||
housingInfo['data'].info.rent }}</span>
|
||||
<span class="rent"
|
||||
v-if="Array.isArray(housingInfo['data'] && housingInfo['data'].info.rent)">
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data'].info.rent[0]
|
||||
}}~
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data'].info.rent[1]
|
||||
}}
|
||||
}} <span
|
||||
v-if="housingInfo['data'] && housingInfo['data'].info.rent[1]">~{{ housingInfo['data']
|
||||
&& housingInfo['data'].info.rent[1] }}</span>
|
||||
</span>
|
||||
<span>/{{ housingInfo['data'] && housingInfo['data'].info.rentalperiod }}</span>
|
||||
<div class="line"></div>
|
||||
@@ -97,15 +99,20 @@
|
||||
<div class="detail-price-box dis-f" style="align-items: end;">
|
||||
<span class="need-houing-type" v-if="pageType == 3">预算</span>
|
||||
<span class="unit" :class="{ 'line-h-17': pageType == 3 }"
|
||||
:style="{ 'font-size': pageType === 3 ? '20px' : '' }">HK$</span><span class="rent"
|
||||
:style="{ 'font-size': pageType === 3 ? '20px' : '' }">HK$</span>
|
||||
<!-- <span class="rent"
|
||||
v-if="pageType != 3">{{
|
||||
housingInfo['data'] && housingInfo['data'].info.rent }}</span>
|
||||
<span class="rent" v-if="pageType == 3">
|
||||
housingInfo['data'] && housingInfo['data'].info.rent }}</span> -->
|
||||
<span class="rent"
|
||||
v-if="!Array.isArray(housingInfo['data'] && housingInfo['data'].info.rent)">{{
|
||||
housingInfo['data'] &&
|
||||
housingInfo['data'].info.rent }}</span>
|
||||
<span class="rent" v-if="Array.isArray(housingInfo['data'] && housingInfo['data'].info.rent)">
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data'].info.rent[0]
|
||||
}}~{{
|
||||
housingInfo['data'] && housingInfo['data'].info.rent[1]
|
||||
}}
|
||||
}} <span
|
||||
v-if="housingInfo['data'] && housingInfo['data'].info.rent[1]">~{{ housingInfo['data'] &&
|
||||
housingInfo['data'].info.rent[1] }}</span>
|
||||
</span>
|
||||
<span>/{{ housingInfo['data'] && housingInfo['data'].info.rentalperiod }}</span>
|
||||
</div>
|
||||
@@ -242,7 +249,8 @@
|
||||
<div class="title-box">
|
||||
所在楼层
|
||||
</div>
|
||||
<div class="text mg-l-30">
|
||||
<div class="text mg-l-30"
|
||||
v-if="Array.isArray(housingInfo['data'] && housingInfo['data'].info.floor)">
|
||||
<span v-for="(item, i) in housingInfo['data'] && housingInfo['data'].info.floor"
|
||||
:key="i">
|
||||
<span v-show="i != 0">/</span>{{
|
||||
@@ -254,6 +262,12 @@
|
||||
</span>
|
||||
<!-- {{ housingInfo['data'] && housingInfo['data'].info.floor }} -->
|
||||
</div>
|
||||
<div class="text mg-l-30"
|
||||
v-if="!Array.isArray(housingInfo['data'] && housingInfo['data'].info.floor)">
|
||||
<span>
|
||||
{{ housingInfo['data'] && housingInfo['data'].info.floor }}层
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info dis-f al-item"
|
||||
v-if="housingInfo['data'] && housingInfo['data'].info.elevator">
|
||||
@@ -292,17 +306,29 @@
|
||||
面积
|
||||
</div>
|
||||
<div class="text mg-l-30">
|
||||
<span>
|
||||
<span v-if="Array.isArray(housingInfo['data'] && housingInfo['data'].info.acreage)">
|
||||
<span>
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data'].info.acreage[0] ?
|
||||
housingInfo['data']
|
||||
&&
|
||||
housingInfo['data'].info.acreage[0] : 0
|
||||
}}
|
||||
</span><span v-if="housingInfo['data'] && housingInfo['data'].info.acreage[1] ? housingInfo['data']
|
||||
&&
|
||||
housingInfo['data'].info.acreage[1] : 0">~
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data'].info.acreage[1] ?
|
||||
housingInfo['data']
|
||||
&&
|
||||
housingInfo['data'].info.acreage[1] : 0
|
||||
}}
|
||||
</span>
|
||||
</span>
|
||||
<span
|
||||
v-if="!Array.isArray(housingInfo['data'] && housingInfo['data'].info.acreage)">
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data'].info.acreage[0] ? housingInfo['data']
|
||||
&&
|
||||
housingInfo['data'].info.acreage[0] : 0
|
||||
}}
|
||||
</span>~<span>
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data'].info.acreage[1] ? housingInfo['data']
|
||||
&&
|
||||
housingInfo['data'].info.acreage[1] : 0
|
||||
housingInfo['data'] && housingInfo['data'].info.acreage
|
||||
}}
|
||||
</span>
|
||||
平方呎
|
||||
@@ -428,7 +454,8 @@
|
||||
目标区域
|
||||
</span>
|
||||
</div>
|
||||
<div class="need-housing-location">
|
||||
<div class="need-housing-location"
|
||||
v-if="Array.isArray(housingInfo['data'] && housingInfo['data'].info.location)">
|
||||
<div class="dis-f al-item" :class="{ 'mg-t-15': i != 0 }"
|
||||
v-for="(item, i) in housingInfo['data'] && housingInfo['data'].info.location" :key="i">
|
||||
<span>
|
||||
@@ -446,6 +473,26 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="need-housing-location"
|
||||
v-if="!Array.isArray(housingInfo['data'] && housingInfo['data'].info.location)">
|
||||
<div class="dis-f al-item" :class="{ 'mg-t-15': i != 0 }">
|
||||
<span>
|
||||
{{
|
||||
location && location[housingInfo['data'] &&
|
||||
housingInfo['data']['info'].location.substring(0, 1)]
|
||||
}}
|
||||
</span>
|
||||
<div class="icon dis-f jus-x al-item">
|
||||
<img src="../assets/img/detail/moreAllow.svg" class="icon-img" alt="">
|
||||
</div>
|
||||
<div class="text-box">
|
||||
{{
|
||||
housingInfo['data'] && housingInfo['data']['info'].location.length == 1 ? '不限' :
|
||||
location && location[housingInfo['data'] && housingInfo['data']['info'].location]
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- -->
|
||||
|
||||
@@ -1346,7 +1393,7 @@ const onPageSrcoll = (e) => {
|
||||
let scrollTop = body.scrollTop
|
||||
let clientHeight = body.clientHeight
|
||||
let offsetHeight = body.offsetHeight
|
||||
if (scrollTop + clientHeight >= offsetHeight-200) {
|
||||
if (scrollTop + clientHeight >= offsetHeight - 200) {
|
||||
if (loadMore.value) {
|
||||
loadMore.value = false
|
||||
pages.value += 1
|
||||
@@ -2029,16 +2076,14 @@ img {
|
||||
width: 210px;
|
||||
}
|
||||
|
||||
.fav-btn{
|
||||
.fav-btn {}
|
||||
|
||||
}
|
||||
|
||||
.fav-btn:hover .fav-img-f{
|
||||
.fav-btn:hover .fav-img-f {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.fav-btn:hover .fav-img-t{
|
||||
opacity:0;
|
||||
.fav-btn:hover .fav-img-t {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.tool-btn {
|
||||
@@ -2057,20 +2102,21 @@ img {
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
|
||||
.fav-img{
|
||||
.fav-img {
|
||||
width: 20px;
|
||||
height:20px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
top:0;
|
||||
left:0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
transition: all linear 0.2s;
|
||||
}
|
||||
|
||||
.fav-img-f{
|
||||
opacity:0;
|
||||
.fav-img-f {
|
||||
opacity: 0;
|
||||
}
|
||||
.fav-img-t{
|
||||
opacity:1;
|
||||
|
||||
.fav-img-t {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.tool-icon {
|
||||
@@ -3014,6 +3060,5 @@ img {
|
||||
.el-icon {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
}</style>
|
||||
|
||||
Reference in New Issue
Block a user