首页跳转个人房源
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<div class="info-box-bg">
|
||||
<div class="box"
|
||||
:class="[{ 'pad-15': seachType === '3' }]">
|
||||
<div @click="setSelectType(i + 1,item.data)" v-for="(item, i) in btn.data" :key="i" :class="[
|
||||
<div @click="setSelectType(i+1,item.data,item)" v-for="(item, i) in btn.data" :key="i" :class="[
|
||||
{ 'btn': seachType === '1' },
|
||||
{ 'mg-l-17': seachType === '1' && i % 5 !== 0 },
|
||||
{ 'seach-long-btn btn': seachType === '2' },
|
||||
@@ -49,6 +49,9 @@ const props = defineProps({
|
||||
default: function () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
checkBtn:{
|
||||
type:Function
|
||||
}
|
||||
})
|
||||
|
||||
@@ -64,7 +67,7 @@ watchEffect(()=>{
|
||||
let selectType = ref('')
|
||||
let selectData = reactive({data:[]})
|
||||
//点击选项
|
||||
let setSelectType = (num,data) => {
|
||||
let setSelectType = (num,data,item) => {
|
||||
if (seachType == 3) {
|
||||
if (num === selectType.value) {
|
||||
selectType.value = ''
|
||||
@@ -72,6 +75,10 @@ let setSelectType = (num,data) => {
|
||||
selectType.value = num
|
||||
selectData.data=data
|
||||
}
|
||||
}else if(seachType == 2){
|
||||
props.checkBtn(item.id,'types')
|
||||
}else if(seachType == 1){
|
||||
props.checkBtn(item.id,'school')
|
||||
}
|
||||
}
|
||||
//取消按钮
|
||||
@@ -81,7 +88,8 @@ let closeSeach = () => {
|
||||
|
||||
//确认按钮
|
||||
let selectSeach = (data) => {
|
||||
console.log(data)
|
||||
props.checkBtn(data,'location')
|
||||
// console.log(data)
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
@@ -64,12 +64,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="seach-info-box dis-f" v-if="routePath === '/'">
|
||||
<seachInfo title="学校附近" :btn="seachSchoolBtn.data" seachType="1" v-if="seachSchoolBtn.data.length">
|
||||
<seachInfo title="学校附近" :btn="seachSchoolBtn.data" seachType="1" v-if="seachSchoolBtn.data.length" :checkBtn="checkBtn">
|
||||
</seachInfo>
|
||||
<seachInfo title="合租" seachType="2" :btn="hireType.data" v-if="hireType.data.length"></seachInfo>
|
||||
<seachInfo title="区域找房" seachType="3" style="margin-top:30px;" :btn="seachArea.data"
|
||||
<seachInfo title="合租" seachType="2" :btn="hireType.data" v-if="hireType.data.length" :checkBtn="checkBtn"></seachInfo>
|
||||
<seachInfo title="区域找房" seachType="3" style="margin-top:30px;" :btn="seachArea.data" :checkBtn="checkBtn"
|
||||
v-if="seachArea.data.length"></seachInfo>
|
||||
<seachInfo title="整租" seachType="2" style="margin-top:30px;" :btn="allHireType.data"
|
||||
<seachInfo title="整租" seachType="2" style="margin-top:30px;" :btn="allHireType.data" :checkBtn="checkBtn"
|
||||
v-if="allHireType.data.length"></seachInfo>
|
||||
</div>
|
||||
<!-- -->
|
||||
@@ -197,6 +197,12 @@ let setHotSeach=(item)=>{
|
||||
getDataList(seachAllType)
|
||||
}
|
||||
|
||||
//点击选项
|
||||
let checkBtn=(data,type)=>{
|
||||
console.log(data,type)
|
||||
getDataList(type,data)
|
||||
}
|
||||
|
||||
|
||||
defineExpose({
|
||||
historyShow
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
<script setup>
|
||||
import { reactive, ref, shallowReactive, defineProps, watchEffect } from 'vue'
|
||||
import selectTabBox from "../selectTabBox/selectTabBox.vue";
|
||||
import apartmentSelect from '../apartment/seachModule.vue'
|
||||
import apartmentSelect from '../apartment/seach.vue'
|
||||
import store from '../../store/index';
|
||||
import api from '@/utils/api';
|
||||
|
||||
@@ -180,7 +180,7 @@ let selectPage = (type) => {
|
||||
searchid: '',
|
||||
intermediary: 0
|
||||
})
|
||||
|
||||
|
||||
tabType.value = type
|
||||
seachAllType['tabType'] = type
|
||||
if (type === 'person') {
|
||||
|
||||
Reference in New Issue
Block a user