首页添加底部导航 修改区域选项设置
This commit is contained in:
@@ -31,10 +31,10 @@
|
|||||||
</span>
|
</span>
|
||||||
<span v-if="itemData.type === 'apartment'">{{ itemData.propaganda }}</span>
|
<span v-if="itemData.type === 'apartment'">{{ itemData.propaganda }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div style="padding: 0 10px;margin-top:15px;" class="dis-f al-item" v-if="itemData.type === 'housing'">
|
<div style="padding: 0 10px;margin-top:15px;" class="dis-f al-item" v-if="itemData.type === 'housing'">
|
||||||
<img src="../../assets/homeImage/addMarker.png" class="add-marker" alt="">
|
<img src="../../assets/homeImage/addMarker.png" class="add-marker" alt="">
|
||||||
<span class="address-text">九龙 > 尖沙咀/佐敦</span>
|
<span class="address-text">{{ location.data&&location.data[itemData.location&&itemData.location.substring(0,1)] }} > {{ location.data&&location.data[itemData.location] }}</span>
|
||||||
</div> -->
|
</div>
|
||||||
<div style="padding:0 10px;margin-top:12px;" v-if="itemData.type === 'housing'">
|
<div style="padding:0 10px;margin-top:12px;" v-if="itemData.type === 'housing'">
|
||||||
<span class="unit">{{ itemData.currency }}</span>
|
<span class="unit">{{ itemData.currency }}</span>
|
||||||
<span class="price">{{ itemData.rent }}</span>
|
<span class="price">{{ itemData.rent }}</span>
|
||||||
@@ -90,6 +90,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { defineProps, reactive } from 'vue'
|
import { defineProps, reactive } from 'vue'
|
||||||
|
import store from '../../store/index';
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
data: {
|
data: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@@ -99,6 +100,8 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
let itemData = props.data
|
let itemData = props.data
|
||||||
|
let location=reactive({data:{}})
|
||||||
|
location.data=store.state.indexData.config.location
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|||||||
@@ -275,6 +275,7 @@ tabBtnType.value = route.path
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
width: 660px;
|
width: 660px;
|
||||||
height: 280px;
|
height: 280px;
|
||||||
|
border-radius:15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.user-box:hover .user-out-box {
|
.user-box:hover .user-out-box {
|
||||||
@@ -288,7 +289,7 @@ tabBtnType.value = route.path
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 10px;
|
font-size: 10px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -35px;
|
bottom: -32px;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -106,22 +106,18 @@ let historyArr = reactive({ data: [] })//历史查找记录
|
|||||||
let hotArr = reactive({ data: [] })
|
let hotArr = reactive({ data: [] })
|
||||||
|
|
||||||
//获取区域下列数据
|
//获取区域下列数据
|
||||||
let getLocationData = () => {
|
let getLocationData = (data) => {
|
||||||
console.log(seachArea.data)
|
console.log(seachArea.data)
|
||||||
api.getLocationData().then(res => {
|
for (let item in data) {
|
||||||
console.log(res)
|
if (!seachArea.data[item.substring(0, 1) - 1].data) seachArea.data[item.substring(0, 1) - 1].data = []
|
||||||
if (res.code === 200) {
|
if (item.length > 1) {
|
||||||
for (let item in res.data) {
|
seachArea.data[item.substring(0, 1) - 1].data.push({
|
||||||
if (!seachArea.data[item.substring(0, 1) - 1].data) seachArea.data[item.substring(0, 1) - 1].data = []
|
title: data[item],
|
||||||
if (item.length > 1) {
|
id: item
|
||||||
seachArea.data[item.substring(0, 1) - 1].data.push({
|
})
|
||||||
title: res.data[item],
|
|
||||||
id: item
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
|
console.log(store.state)
|
||||||
}
|
}
|
||||||
|
|
||||||
//监听路由
|
//监听路由
|
||||||
@@ -134,7 +130,8 @@ watchEffect(() => {
|
|||||||
hireType.data = store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[0].data : []
|
hireType.data = store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[0].data : []
|
||||||
allHireType.data = store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[1].data : []
|
allHireType.data = store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[1].data : []
|
||||||
seachArea.data = store.state.seachTypeData[1] ? store.state.seachTypeData[1].where : []
|
seachArea.data = store.state.seachTypeData[1] ? store.state.seachTypeData[1].where : []
|
||||||
if (seachArea.data.length > 0&&!seachArea.data[0].data) getLocationData()
|
if (seachArea.data.length > 0 && !seachArea.data[0].data) getLocationData(store.state.indexData.config.location
|
||||||
|
)
|
||||||
hotArr.data = store.state.indexData.hotSearcheWords
|
hotArr.data = store.state.indexData.hotSearcheWords
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<div class="select-box s-w-50 bor-r">
|
<div class="select-box s-w-50 bor-r">
|
||||||
<div class="dis-f bor-b-das" :class="{'al-item housing-pd':routePath==='/needHousing'}">
|
<div class="dis-f bor-b-das" :class="{'al-item housing-pd':routePath==='/needHousing'}">
|
||||||
<div class="tab-title">{{routePath==='/needHousing'?'目标区域':'地理位置'}}</div>
|
<div class="tab-title">{{routePath==='/needHousing'?'目标区域':'地理位置'}}</div>
|
||||||
<!-- 非求房源页面 -->
|
<!-- 中介/个人房源页面 -->
|
||||||
<div class="tab-text" v-if="routePath!=='/needHousing'">
|
<div class="tab-text" v-if="routePath!=='/needHousing'">
|
||||||
<div class="dis-f">
|
<div class="dis-f">
|
||||||
<div class="btn jus-x al-item dis-f" :class="{ 'btn-check': selectPosition === 'region' }"
|
<div class="btn jus-x al-item dis-f" :class="{ 'btn-check': selectPosition === 'region' }"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-skeleton style="width: 240px" animated="true">
|
<el-skeleton style="width: 240px" :animated="true">
|
||||||
<template #template>
|
<template #template>
|
||||||
<el-skeleton-item variant="image" style="width: 240px; height: 240px" />
|
<el-skeleton-item variant="image" style="width: 240px; height: 240px" />
|
||||||
<div style="padding: 14px">
|
<div style="padding: 14px">
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="home">
|
<div class="home">
|
||||||
<pageTopBar :bannerList="bannerList.data"></pageTopBar>
|
<pageTopBar :bannerList="bannerList.data"></pageTopBar>
|
||||||
<!-- <headerNavigation></headerNavigation> -->
|
|
||||||
<!-- 搜索模块 -->
|
<!-- 搜索模块 -->
|
||||||
<seachModule></seachModule>
|
<seachModule></seachModule>
|
||||||
<!-- 房源展示 -->
|
<!-- 房源展示 -->
|
||||||
@@ -178,8 +177,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="dis-f jus-x bottom-tps">
|
<div class="dis-f jus-x bottom-tps">
|
||||||
- 到底了 -
|
- {{loadText}} -
|
||||||
</div>
|
</div>
|
||||||
|
<footerTool></footerTool>
|
||||||
<indexRegularBox></indexRegularBox>
|
<indexRegularBox></indexRegularBox>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -192,7 +192,7 @@ import indexWaterfallBox from "../components/indexWaterfallBox/indexWaterfallBox
|
|||||||
import seachModule from "../components/seachModule/seachModule.vue";
|
import seachModule from "../components/seachModule/seachModule.vue";
|
||||||
import indexRegularBox from '../components/indexRegularBox/indexRegularBox.vue';
|
import indexRegularBox from '../components/indexRegularBox/indexRegularBox.vue';
|
||||||
import skeletonBox from '../components/skeletonBox/skeletonBox.vue'
|
import skeletonBox from '../components/skeletonBox/skeletonBox.vue'
|
||||||
import headerNavigation from '../components/public/head.vue';
|
import footerTool from '@/components/footer/footer.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import store from '../store/index';
|
import store from '../store/index';
|
||||||
import api from "../utils/api";
|
import api from "../utils/api";
|
||||||
@@ -286,6 +286,7 @@ let addListData = (data) => {
|
|||||||
}
|
}
|
||||||
//开关
|
//开关
|
||||||
let loadMore = ref(true)
|
let loadMore = ref(true)
|
||||||
|
let loadText=ref('加载中.....')
|
||||||
//瀑布流数据
|
//瀑布流数据
|
||||||
let getRecommendList = () => {
|
let getRecommendList = () => {
|
||||||
api.recommendList({
|
api.recommendList({
|
||||||
@@ -304,6 +305,7 @@ let getRecommendList = () => {
|
|||||||
loadMore.value = true
|
loadMore.value = true
|
||||||
} else {
|
} else {
|
||||||
loadMore.value = false
|
loadMore.value = false
|
||||||
|
loadText.value='到底了'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -325,7 +327,7 @@ let listDataTypeChange = (item) => {
|
|||||||
|
|
||||||
//监听滚动条
|
//监听滚动条
|
||||||
const onPageSrcoll = (e) => {
|
const onPageSrcoll = (e) => {
|
||||||
if (!loadMore.value) return
|
if (!loadMore.value||waterfallList['4'].length===0) return
|
||||||
let body = document.documentElement ? document.documentElement : document.body ?
|
let body = document.documentElement ? document.documentElement : document.body ?
|
||||||
document.body :
|
document.body :
|
||||||
document.querySelector('.element');
|
document.querySelector('.element');
|
||||||
@@ -412,6 +414,7 @@ img {
|
|||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #555555;
|
color: #555555;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding:30px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.information-box {
|
.information-box {
|
||||||
|
|||||||
Reference in New Issue
Block a user