搜索页搜索数量同步
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<div class="body-maxWidth">
|
||||
<div class="s-w-100 seach-box-bg">
|
||||
<div class="seach-box">
|
||||
<div class="top-seach dis-f al-item">
|
||||
<div class="top-seach dis-f al-item" v-if="props.seachPage">
|
||||
<div style="position: absolute;left: -8px;top: 20px;">
|
||||
<div class="location-box dis-f jus-x al-item">
|
||||
<img src="../../assets/homeImage/addressImg.png" class="img" alt="">
|
||||
@@ -160,7 +160,7 @@
|
||||
收起筛选条件<img class="icon" src="@/assets/img/publicImage/triangle-black.svg" />
|
||||
</div>
|
||||
|
||||
<div class="screen-footer flexacenter">
|
||||
<div class="screen-footer flexacenter" v-if="props.seachPage">
|
||||
<div class="quantity flexacenter">
|
||||
共 <b class="b">{{ count }}</b> 个品牌公寓
|
||||
</div>
|
||||
@@ -185,6 +185,10 @@ const props = defineProps({
|
||||
count: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
seachPage: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
0
src/components/detail/imageWatch.vue
Normal file
0
src/components/detail/imageWatch.vue
Normal file
@@ -157,7 +157,7 @@
|
||||
<script setup>
|
||||
import { reactive, ref, shallowReactive, defineProps, watchEffect, defineExpose } from 'vue'
|
||||
import selectTabBox from "../selectTabBox/selectTabBox.vue";
|
||||
import apartmentSelect from '../apartment/seach.vue'
|
||||
import apartmentSelect from '../apartment/seachModule.vue'
|
||||
import store from '../../store/index';
|
||||
import api from '@/utils/api';
|
||||
import { useRouter } from 'vue-router';
|
||||
@@ -184,19 +184,18 @@ let selectPage = (type) => {
|
||||
if (type === 'apartment') {
|
||||
selectTabBoxInfo.value.cleanSelect()//清空筛选数据
|
||||
} else {
|
||||
apartmentSelectInfo.value.cleanSelect()
|
||||
apartmentSelectInfo.value.cleanSelect&&apartmentSelectInfo.value.cleanSelect()
|
||||
}
|
||||
//清空数据
|
||||
if (type === 'apartment')
|
||||
seachAllType = reactive({
|
||||
keyword: '',
|
||||
keyword: seachAllType['keyword'],
|
||||
location: [],
|
||||
searchid: '',
|
||||
intermediary: 0
|
||||
intermediary: ''
|
||||
})
|
||||
|
||||
tabType.value = type
|
||||
seachAllType['tabType'] = type
|
||||
seachAllType['searchid'] = setPageKey()
|
||||
if (type === 'person') {
|
||||
seachAllType['intermediary'] = 0
|
||||
} else if (type === 'intermediary') {
|
||||
@@ -240,11 +239,13 @@ let checkPageType = () => {
|
||||
|
||||
|
||||
//搜索key
|
||||
let seachKey = reactive({ key: {
|
||||
personal:{},
|
||||
intermediary:{},
|
||||
studentapartment:{}
|
||||
} })
|
||||
let seachKey = reactive({
|
||||
key: {
|
||||
personal: {},
|
||||
intermediary: {},
|
||||
studentapartment: {}
|
||||
}
|
||||
})
|
||||
|
||||
//搜索数据
|
||||
let seachAllType = reactive({
|
||||
@@ -311,10 +312,10 @@ let seachList = (item) => {
|
||||
if (!seachVal.value) {
|
||||
return
|
||||
}
|
||||
if(seachAllType['intermediary']===6){
|
||||
seachAllType['keyword']=seachVal.value
|
||||
if (seachAllType['intermediary'] === 6) {
|
||||
seachAllType['keyword'] = seachVal.value
|
||||
getDataList(seachAllType)
|
||||
}else{
|
||||
} else {
|
||||
searchInit(seachVal.value)
|
||||
}
|
||||
}
|
||||
@@ -365,6 +366,19 @@ let getLocationData = (data) => {
|
||||
}
|
||||
}
|
||||
|
||||
//更新当前数据数量
|
||||
let setListCount=(item,num)=>{
|
||||
console.log(item,num)
|
||||
console.log(seachKey.key)
|
||||
if(item.tabType==="intermediary"){
|
||||
seachKey.key['intermediary']['count']=num
|
||||
}else if(item.tabType==="person"){
|
||||
seachKey.key['personal']['count']=num
|
||||
}else if(item.tabType==="apartment"){
|
||||
seachKey.key['studentapartment']['count']=num
|
||||
}
|
||||
}
|
||||
|
||||
//调用判断页面
|
||||
checkPageType()
|
||||
|
||||
@@ -373,7 +387,8 @@ watchEffect(() => {
|
||||
if (seachArea.data.length > 0 && !seachArea.data[0].data) getLocationData(store.state.indexData.config.location)
|
||||
})
|
||||
defineExpose({
|
||||
searchInit
|
||||
searchInit,
|
||||
setListCount
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -549,7 +549,7 @@ let setOtherCheck = (data) => {
|
||||
|
||||
//清除筛选
|
||||
let cleanSelect = () => {
|
||||
cleanRent()
|
||||
// cleanRent()
|
||||
otherCheck['list'] = []
|
||||
releaseObj.id = 0
|
||||
gender.id = 0
|
||||
@@ -564,6 +564,8 @@ let cleanSelect = () => {
|
||||
selectData.data = []
|
||||
schoolSelectObj.id = ''
|
||||
schoolSelectObj.title = '不限'
|
||||
rentObj.min = ''
|
||||
rentObj.max = ''
|
||||
// setCheckData([])
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user