个人房源列表
This commit is contained in:
@@ -74,8 +74,9 @@
|
||||
</div>
|
||||
<!-- -->
|
||||
<div
|
||||
v-if="routePath === '/personHousing' || routePath === '/intermediaryHousing' || routePath === '/needHousing'">
|
||||
v-if="routePath === '/personHousing' || routePath === '/intermediaryHousing' || routePath === '/needHousing'" :count="counti">
|
||||
<selectTabBox></selectTabBox>
|
||||
{{ counti }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,13 +85,20 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watchEffect, reactive, beforeMount } from 'vue';
|
||||
import { ref, watchEffect, reactive, defineProps } from 'vue';
|
||||
import seachInfo from '../indexSeachInfo/indexSeachInfo.vue';
|
||||
import selectTabBox from "../selectTabBox/selectTabBox.vue";
|
||||
import { useRoute } from 'vue-router';
|
||||
import store from '../../store/index';
|
||||
import api from "../../utils/api";
|
||||
|
||||
const props=defineProps({
|
||||
count:{
|
||||
type:Number,
|
||||
default:0
|
||||
}
|
||||
})
|
||||
let counti = ref(0)
|
||||
|
||||
//搜索框
|
||||
let seachValue = ref('')
|
||||
@@ -107,7 +115,6 @@ let hotArr = reactive({ data: [] })
|
||||
|
||||
//获取区域下列数据
|
||||
let getLocationData = (data) => {
|
||||
console.log(seachArea.data)
|
||||
for (let item in data) {
|
||||
if (!seachArea.data[item.substring(0, 1) - 1].data) seachArea.data[item.substring(0, 1) - 1].data = []
|
||||
if (item.length > 1) {
|
||||
@@ -117,7 +124,6 @@ let getLocationData = (data) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
console.log(store.state)
|
||||
}
|
||||
|
||||
//监听路由
|
||||
@@ -130,9 +136,9 @@ watchEffect(() => {
|
||||
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 : []
|
||||
seachArea.data = store.state.seachTypeData[1] ? store.state.seachTypeData[1].where : []
|
||||
if (seachArea.data.length > 0 && !seachArea.data[0].data) getLocationData(store.state.indexData.config.location
|
||||
)
|
||||
if (seachArea.data.length > 0 && !seachArea.data[0].data) getLocationData(store.state.indexData.config.location)
|
||||
hotArr.data = store.state.indexData.hotSearcheWords
|
||||
counti.value=props.count
|
||||
})
|
||||
|
||||
//获取历史搜索记录
|
||||
|
||||
Reference in New Issue
Block a user