我的页面的跳转
This commit is contained in:
@@ -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' });
|
||||
}
|
||||
|
||||
|
||||
@@ -103,13 +103,14 @@ import pageFooter from '@/components/footer/footer.vue'
|
||||
import publicListItem from '@/components/public/public-list-item.vue'
|
||||
import emptyDuck from '@/components/public/empty-duck.vue'
|
||||
import { ref, reactive, onMounted, onUnmounted, getCurrentInstance, nextTick } from 'vue'
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
|
||||
import { ElLoading, ElMessage } from 'element-plus'
|
||||
import Masonry from 'masonry-layout';
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const route = useRoute();
|
||||
|
||||
const gridContainer = ref(null);
|
||||
const gridContainerpublish = ref(null);
|
||||
@@ -149,19 +150,19 @@ const init = () => {
|
||||
if (res.code != 200) return
|
||||
let data = res.data
|
||||
|
||||
if (data.count['publish'] > 0) {
|
||||
tabState.value = 'publish'
|
||||
getPublishData()
|
||||
} else {
|
||||
tabState.value = 'fav'
|
||||
getFavData()
|
||||
}
|
||||
if (!route.query['tab']) {
|
||||
if (data.count['publish'] > 0) tabState.value = 'publish'
|
||||
else tabState.value = 'fav'
|
||||
} else tabState.value = route.query['tab']
|
||||
|
||||
if (tabState.value == 'publish') getPublishData()
|
||||
else getFavData()
|
||||
|
||||
user.value = data.user
|
||||
count.value = data.count
|
||||
newmessagenum.value = data.newmessagenum
|
||||
validityidentity.value = data.validityidentity
|
||||
}).finally(()=>{})
|
||||
}).finally(() => { })
|
||||
}
|
||||
|
||||
|
||||
@@ -522,5 +523,4 @@ onUnmounted(() => {
|
||||
align-items: center;
|
||||
border-radius: 16px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user