我的页面的跳转
This commit is contained in:
@@ -8,16 +8,17 @@
|
||||
<img src="../../assets/homeImage/seachIcon.svg" class="icon" alt="" @click="seachList">
|
||||
</template>
|
||||
</el-input>
|
||||
<div class="map-box dis-f jus-x al-item">
|
||||
<!-- 地图找房的入口 暂时隐藏 -->
|
||||
<!-- <div class="map-box dis-f jus-x al-item">
|
||||
<img src="../../assets/homeImage/mapImg.png" class="img" alt="">
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="dis-f al-item">
|
||||
<div class="tool-btn dis-f al-item jus-x">
|
||||
<div class="tool-btn dis-f al-item jus-x" @click="gouser('fav')">
|
||||
<img src="../../assets/homeImage/Mycollect.png" class="img" alt="">
|
||||
我的收藏
|
||||
</div>
|
||||
<div class="tool-btn dis-f al-item jus-x mg-l-10">
|
||||
<div class="tool-btn dis-f al-item jus-x mg-l-10" @click="gouser('fav')">
|
||||
<img src="../../assets/homeImage/informationO.png" class="img" alt="">
|
||||
我的发布
|
||||
</div>
|
||||
@@ -46,8 +47,8 @@
|
||||
</div>
|
||||
求房源
|
||||
</div>
|
||||
<div class="top-btn dis-f jus-x al-item second" v-if="isNeedHousing"
|
||||
@click="selectPage('intermediary')" :class="{ 'select-top-btn-bg': tabType === 'intermediary' }">
|
||||
<div class="top-btn dis-f jus-x al-item second" v-if="isNeedHousing" @click="selectPage('intermediary')"
|
||||
:class="{ 'select-top-btn-bg': tabType === 'intermediary' }">
|
||||
<div class="first-select">
|
||||
<div class="box">
|
||||
|
||||
@@ -175,7 +176,7 @@ import selectTabBox from "../selectTabBox/selectTabBox.vue";
|
||||
import apartmentSelect from '../apartment/seachModule.vue'
|
||||
import store from '../../store/index';
|
||||
import api from '@/utils/api';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
//路由
|
||||
@@ -407,6 +408,9 @@ defineExpose({
|
||||
checkPageType
|
||||
})
|
||||
|
||||
// 跳转我的页面
|
||||
const gouser = tab => route.push(`/user?tab=${tab}`)
|
||||
|
||||
</script>
|
||||
<style scoped>
|
||||
img {
|
||||
@@ -657,7 +661,7 @@ img {
|
||||
}
|
||||
|
||||
.four {
|
||||
left:600px;
|
||||
left: 600px;
|
||||
bottom: 0;
|
||||
background: #62b1ff;
|
||||
|
||||
@@ -676,7 +680,7 @@ img {
|
||||
height: 45px;
|
||||
width: 30px;
|
||||
position: absolute;
|
||||
left:0;
|
||||
left: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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