我的页面的跳转

This commit is contained in:
A1300399510
2023-07-26 19:14:37 +08:00
parent 0f3c5fd311
commit 44d99b26ce
3 changed files with 27 additions and 67 deletions

View File

@@ -18,7 +18,6 @@
<el-carousel-item class="flexcenter" v-for="item in allCarouselsData">
<img class="img" :src="item['image'] || item['imageurl']"
@click="cloaseImageShow(allCarouselsData)">
<!-- <img class="video-icon" src="@/assets/img/publicImage/video-icon.svg" alt=""> -->
</el-carousel-item>
</el-carousel>
<div class="indicate-type flexacenter" v-if="allCarouselsData.length != 0">
@@ -180,8 +179,8 @@
<img class="icon" src="@/assets/img/apartmentDetail/location-icon.png">
{{ info.location || '位置' }}
</div>
<!-- <view-map :latlng="{ longitude: info['coordinate'][0], latitude: info['coordinate'][1] }"
:name="info['address']"></view-map> -->
<view-map :latlng="{ longitude: info['coordinate'][0], latitude: info['coordinate'][1] }"
:name="info['address']"></view-map>
<!-- 交通 -->
<div class="traffic-box" v-if="info['traffic']">
@@ -428,15 +427,9 @@ proxy.$get("/tenement/pc/api/apartment/details", { uniqid }).then(res => {
handleAllCarouselsData()
// setTimeout(() => {
nextTick(() => {
handleNavData()
})
// }, 2000)
nextTick(() => handleNavData())
if (data.withsameapartments > 0) dualBrandData()
})
@@ -516,52 +509,15 @@ let navTab = ref("roomEle")
// 处理 navList 数据
const handleNavData = () => {
navconfig.forEach(element => {
console.log("element", eval(element['value']).value);
if (eval(element['value']).value) navList.value.push(element)
// if (info.value[element.value] && element.value != 'roomEle' && element.value != 'companyEle') navList.value.push(element)
// else navList.value.push(element)
})
}
// 处理点击nav 滚动事件
const handleClickNav = value => {
let scrollTop = 0
switch (value) {
case "roomEle":
scrollTop = roomEle.value.offsetTop - 110;
break;
case "specialEle":
scrollTop = specialEle.value.offsetTop - 110;
break;
case "addressEle":
scrollTop = addressEle.value.offsetTop - 110;
break;
case "messageEle":
scrollTop = messageEle.value.offsetTop - 110;
break;
case "facilitiesEle":
scrollTop = facilitiesEle.value.offsetTop - 110;
break;
case "lifeEle":
scrollTop = lifeEle.value.offsetTop - 110;
break;
case "companyEle":
scrollTop = companyEle.value.offsetTop - 110;
break;
case "eleseEle":
scrollTop = eleseEle.value.offsetTop - 110;
break;
default:
break;
}
let scrollTop = eval(value).value.offsetTop + 136
if (value != 'eleseEle') navTab.value = value
window.scrollTo({ top: scrollTop, behavior: 'smooth' });
}