|
|
|
|
@@ -182,13 +182,11 @@
|
|
|
|
|
style="transform: rotate(180deg);" @click.stop="moveImageList('left')"
|
|
|
|
|
v-show="imgListTab > 0 && scrollWidth > clientWidth">
|
|
|
|
|
<img src="../assets/img/detail/moreAllow.svg" class="icon right-icon" alt=""
|
|
|
|
|
@click.stop="moveImageList('right')"
|
|
|
|
|
v-show="imgList.length - 1 !== imgListTab &&
|
|
|
|
|
scrollWidth > clientWidth &&
|
|
|
|
|
imageLIstLeft[imgListTab] + clientWidth < scrollWidth">
|
|
|
|
|
<img src="../assets/img/detail/moreNot.svg" class="icon right-icon" alt=""
|
|
|
|
|
style="transform: rotate(180deg);" v-show="
|
|
|
|
|
@click.stop="moveImageList('right')" v-show="imgList.length - 1 !== imgListTab &&
|
|
|
|
|
scrollWidth > clientWidth &&
|
|
|
|
|
imageLIstLeft[imgListTab] + clientWidth < scrollWidth">
|
|
|
|
|
<img src="../assets/img/detail/moreNot.svg" class="icon right-icon" alt=""
|
|
|
|
|
style="transform: rotate(180deg);" v-show="scrollWidth > clientWidth &&
|
|
|
|
|
imageLIstLeft[imgListTab] + clientWidth >= scrollWidth">
|
|
|
|
|
<div class="dis-f al-item list-box s-w-100" ref="imageList" v-if="imgList.length > 0">
|
|
|
|
|
<div v-for="(item, i) in imgList" :key="i"
|
|
|
|
|
@@ -496,15 +494,17 @@
|
|
|
|
|
v-show="item && !item.address" alt="">
|
|
|
|
|
</div>
|
|
|
|
|
{{ item && item.name }}
|
|
|
|
|
<div v-for="(items, i) in item && item.point" :key="i">
|
|
|
|
|
<span class="address-info">
|
|
|
|
|
{{ items.title }}
|
|
|
|
|
</span>
|
|
|
|
|
<span v-html="setDistanceList(items && `${items.distance}`)">
|
|
|
|
|
</span>
|
|
|
|
|
<!-- <span class="distance-text">
|
|
|
|
|
<div class="dis-f" style="flex-wrap: wrap;width:540px;">
|
|
|
|
|
<div v-for="(items, i) in item && item.point" :key="i">
|
|
|
|
|
<span class="address-info">
|
|
|
|
|
{{ items.title }}
|
|
|
|
|
</span>
|
|
|
|
|
<span v-html="setDistanceList(items && `${items.distance}`)">
|
|
|
|
|
</span>
|
|
|
|
|
<!-- <span class="distance-text">
|
|
|
|
|
1.1公里
|
|
|
|
|
</span> -->
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@@ -1085,8 +1085,8 @@ let imageLIstLeft = ref([])
|
|
|
|
|
let imgListTab = ref(0)
|
|
|
|
|
//计时器
|
|
|
|
|
let interval = ''
|
|
|
|
|
let clientWidth = ref(null)
|
|
|
|
|
let scrollWidth = ref(null)
|
|
|
|
|
let clientWidth = ref(null)
|
|
|
|
|
let scrollWidth = ref(null)
|
|
|
|
|
//点击方向按钮
|
|
|
|
|
let moveImageList = (type) => {
|
|
|
|
|
if (type === 'right' && imgScrollBottom()) return
|
|
|
|
|
@@ -1120,11 +1120,9 @@ let imgData = ref(null)
|
|
|
|
|
//获取图片宽度
|
|
|
|
|
let setImageWidth = (num) => {
|
|
|
|
|
imageLIstLeft.value[num] = imgData.value[num] && imgData.value[num].offsetLeft - 20
|
|
|
|
|
console.log(imageLIstLeft.value)
|
|
|
|
|
if (imageLIstLeft.value.length === imgList.value.length) {
|
|
|
|
|
clientWidth.value = imageList.value.clientWidth
|
|
|
|
|
scrollWidth.value = imageList.value.scrollWidth
|
|
|
|
|
console.log(scrollWidth.value,clientWidth.value)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1153,7 +1151,6 @@ let setShowDistance = () => {
|
|
|
|
|
let titleType = ref(false)
|
|
|
|
|
//标题
|
|
|
|
|
let changeTitleType = () => {
|
|
|
|
|
// console.log(1)
|
|
|
|
|
titleType.value = !titleType.value
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1224,7 +1221,6 @@ let setNavigation = () => {
|
|
|
|
|
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',
|
|
|
|
|
@@ -1401,7 +1397,6 @@ let recommendList = () => {
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
// console.log(res.data.data && res.data.data.length >= 30)
|
|
|
|
|
if (res.data.data && res.data.data.length >= 30) {
|
|
|
|
|
loadMore.value = true
|
|
|
|
|
loadText.value = '下拉加载更多'
|
|
|
|
|
@@ -1443,7 +1438,6 @@ let getPublisherList = () => {
|
|
|
|
|
}).then(res => {
|
|
|
|
|
console.log(res)
|
|
|
|
|
if (res.code === 200) {
|
|
|
|
|
// console.log(res.data.length >= 30)
|
|
|
|
|
if (res.data.length >= 30) {
|
|
|
|
|
loadMore.value = true
|
|
|
|
|
} else {
|
|
|
|
|
@@ -1470,7 +1464,6 @@ 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求房源
|
|
|
|
|
// console.log('pageType', pageType.value)
|
|
|
|
|
publisherList.value = []
|
|
|
|
|
recommendListData.value = []
|
|
|
|
|
getHousingInfo()
|
|
|
|
|
|