Compare commits
2 Commits
486f69d346
...
a21f163d88
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a21f163d88 | ||
|
|
3c4571fd53 |
@@ -18,7 +18,7 @@
|
|||||||
<img src="../../assets/homeImage/Mycollect.png" class="img" alt="">
|
<img src="../../assets/homeImage/Mycollect.png" class="img" alt="">
|
||||||
我的收藏
|
我的收藏
|
||||||
</div>
|
</div>
|
||||||
<div class="tool-btn dis-f al-item jus-x mg-l-10" @click="gouser('fav')">
|
<div class="tool-btn dis-f al-item jus-x mg-l-10" @click="gouser('publish')">
|
||||||
<img src="../../assets/homeImage/informationO.png" class="img" alt="">
|
<img src="../../assets/homeImage/informationO.png" class="img" alt="">
|
||||||
我的发布
|
我的发布
|
||||||
</div>
|
</div>
|
||||||
@@ -55,7 +55,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="top-btn dis-f jus-x al-item second" v-if="!isNeedHousing&&houseingPageType!=6"
|
<div class="top-btn dis-f jus-x al-item second" v-if="!isNeedHousing && houseingPageType != 6"
|
||||||
@click="selectPage('intermediary')" :class="{ 'select-top-btn-bg': tabType === 'intermediary' }">
|
@click="selectPage('intermediary')" :class="{ 'select-top-btn-bg': tabType === 'intermediary' }">
|
||||||
<div class="first-select" v-show="tabType === 'person'">
|
<div class="first-select" v-show="tabType === 'person'">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
@@ -74,7 +74,8 @@
|
|||||||
中介房源 {{ seachKey.key && seachKey.key.intermediary && seachKey.key.intermediary.count }}
|
中介房源 {{ seachKey.key && seachKey.key.intermediary && seachKey.key.intermediary.count }}
|
||||||
</div>
|
</div>
|
||||||
<div class="top-btn dis-f jus-x al-item third" @click="selectPage('apartment')"
|
<div class="top-btn dis-f jus-x al-item third" @click="selectPage('apartment')"
|
||||||
:class="{ 'select-top-btn-bg': tabType === 'apartment' }" v-if="!isNeedHousing&&houseingPageType!=6">
|
:class="{ 'select-top-btn-bg': tabType === 'apartment' }"
|
||||||
|
v-if="!isNeedHousing && houseingPageType != 6">
|
||||||
<div class="second-select-third-box" v-show="tabType === 'intermediary'">
|
<div class="second-select-third-box" v-show="tabType === 'intermediary'">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
|
|
||||||
@@ -197,7 +198,7 @@ let selectTabBoxInfo = ref(null)//个人/中介筛选实例
|
|||||||
let apartmentSelectInfo = ref(null)//公寓筛选实例
|
let apartmentSelectInfo = ref(null)//公寓筛选实例
|
||||||
//设置请求数据
|
//设置请求数据
|
||||||
let selectPage = (type) => {
|
let selectPage = (type) => {
|
||||||
if (type === seachAllType['tabType']||houseingPageType==6) return
|
if (type === seachAllType['tabType'] || houseingPageType == 6) return
|
||||||
if (type === 'apartment') {
|
if (type === 'apartment') {
|
||||||
selectTabBoxInfo.value.cleanSelect()//清空筛选数据
|
selectTabBoxInfo.value.cleanSelect()//清空筛选数据
|
||||||
} else {
|
} else {
|
||||||
@@ -215,13 +216,13 @@ let selectPage = (type) => {
|
|||||||
seachAllType['searchid'] = setPageKey()
|
seachAllType['searchid'] = setPageKey()
|
||||||
if (type === 'person') {
|
if (type === 'person') {
|
||||||
seachAllType['intermediary'] = 0
|
seachAllType['intermediary'] = 0
|
||||||
houseingPageType='0'
|
houseingPageType = '0'
|
||||||
sessionStorage.setItem('houseingPageType',0)
|
sessionStorage.setItem('houseingPageType', 0)
|
||||||
selectTabBoxInfo.value.routerQuerySet()
|
selectTabBoxInfo.value.routerQuerySet()
|
||||||
} else if (type === 'intermediary') {
|
} else if (type === 'intermediary') {
|
||||||
seachAllType['intermediary'] = 1
|
seachAllType['intermediary'] = 1
|
||||||
houseingPageType='1'
|
houseingPageType = '1'
|
||||||
sessionStorage.setItem('houseingPageType',1)
|
sessionStorage.setItem('houseingPageType', 1)
|
||||||
// route.currentRoute.value.query.houseingPageType='1'
|
// route.currentRoute.value.query.houseingPageType='1'
|
||||||
selectTabBoxInfo.value.routerQuerySet()
|
selectTabBoxInfo.value.routerQuerySet()
|
||||||
} else {
|
} else {
|
||||||
@@ -235,14 +236,18 @@ let getDataList = props.getDataList
|
|||||||
//搜索内容
|
//搜索内容
|
||||||
let seachVal = ref('')
|
let seachVal = ref('')
|
||||||
let isNeedHousing = ref(false)
|
let isNeedHousing = ref(false)
|
||||||
seachVal.value = route.currentRoute.value.query.keyword&&route.currentRoute.value.query.keyword.replace(/\s/g, "")
|
seachVal.value = route.currentRoute.value.query.keyword && route.currentRoute.value.query.keyword.replace(/\s/g, "")
|
||||||
|
|
||||||
//判断是否从求房源页面跳转
|
//判断是否从求房源页面跳转
|
||||||
isNeedHousing.value = route.currentRoute.value.query.isNeedHousing === 'true'
|
isNeedHousing.value = route.currentRoute.value.query.isNeedHousing === 'true'
|
||||||
|
|
||||||
//判断当前是什么页面
|
//判断当前是什么页面
|
||||||
let houseingPageType = sessionStorage.getItem('houseingPageType')
|
let houseingPageType = sessionStorage.getItem('houseingPageType')
|
||||||
|
<<<<<<< HEAD
|
||||||
|
console.log('houseingPageType', houseingPageType)
|
||||||
|
=======
|
||||||
// console.log('houseingPageType',houseingPageType)
|
// console.log('houseingPageType',houseingPageType)
|
||||||
|
>>>>>>> origin/main
|
||||||
let type = houseingPageType === '0' ? 'person' : houseingPageType === '1' ? 'intermediary' : houseingPageType === '6' ? 'need' : 'apartment'
|
let type = houseingPageType === '0' ? 'person' : houseingPageType === '1' ? 'intermediary' : houseingPageType === '6' ? 'need' : 'apartment'
|
||||||
tabType.value = type
|
tabType.value = type
|
||||||
|
|
||||||
@@ -250,7 +255,11 @@ tabType.value = type
|
|||||||
let checkPageType = () => {
|
let checkPageType = () => {
|
||||||
// houseingPageType 0个人 1中介 6求房源
|
// houseingPageType 0个人 1中介 6求房源
|
||||||
let type = houseingPageType === '0' ? 'person' : houseingPageType === '1' ? 'intermediary' : houseingPageType === '6' ? 'need' : 'apartment'
|
let type = houseingPageType === '0' ? 'person' : houseingPageType === '1' ? 'intermediary' : houseingPageType === '6' ? 'need' : 'apartment'
|
||||||
|
<<<<<<< HEAD
|
||||||
|
console.log('type', type)
|
||||||
|
=======
|
||||||
// console.log('type',type)
|
// console.log('type',type)
|
||||||
|
>>>>>>> origin/main
|
||||||
tabType.value = type
|
tabType.value = type
|
||||||
seachAllType['tabType'] = type
|
seachAllType['tabType'] = type
|
||||||
if (type === 'person') {
|
if (type === 'person') {
|
||||||
@@ -285,15 +294,20 @@ let seachAllType = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
//直接输入url
|
//直接输入url
|
||||||
if(isNeedHousing.value){
|
if (isNeedHousing.value) {
|
||||||
tabType.value = 'need'
|
tabType.value = 'need'
|
||||||
seachAllType['intermediary'] = 6
|
seachAllType['intermediary'] = 6
|
||||||
}
|
}
|
||||||
|
|
||||||
//设置搜索数据
|
//设置搜索数据
|
||||||
let setSeachConditions = (type, data) => {
|
let setSeachConditions = (type, data) => {
|
||||||
|
<<<<<<< HEAD
|
||||||
|
console.log(1, seachAllType)
|
||||||
|
console.log(type.value)
|
||||||
|
=======
|
||||||
// console.log(1,seachAllType)
|
// console.log(1,seachAllType)
|
||||||
// console.log(type.value)
|
// console.log(type.value)
|
||||||
|
>>>>>>> origin/main
|
||||||
if (seachAllType['tabType'] !== 'apartment') {
|
if (seachAllType['tabType'] !== 'apartment') {
|
||||||
if (type === 'rent') {
|
if (type === 'rent') {
|
||||||
seachAllType['rent_min'] = data.min
|
seachAllType['rent_min'] = data.min
|
||||||
@@ -313,7 +327,7 @@ let setSeachConditions = (type, data) => {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
seachAllType = {
|
seachAllType = {
|
||||||
tabType:'apartment',
|
tabType: 'apartment',
|
||||||
...type.value
|
...type.value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -359,10 +373,10 @@ let seachList = (item) => {
|
|||||||
searchInit(seachVal.value)
|
searchInit(seachVal.value)
|
||||||
}
|
}
|
||||||
route.push({
|
route.push({
|
||||||
path:routeInfo.path,
|
path: routeInfo.path,
|
||||||
query:{
|
query: {
|
||||||
keyword:seachVal.value,
|
keyword: seachVal.value,
|
||||||
isNeedHousing:routeInfo.query.isNeedHousing
|
isNeedHousing: routeInfo.query.isNeedHousing
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@@ -438,7 +452,13 @@ defineExpose({
|
|||||||
})
|
})
|
||||||
|
|
||||||
// 跳转我的页面
|
// 跳转我的页面
|
||||||
const gouser = tab => route.push(`/user?tab=${tab}`)
|
const gouser = tab => {
|
||||||
|
if (!store.state['user']['uid']) {
|
||||||
|
store.state.showloginmodal = true
|
||||||
|
return
|
||||||
|
}
|
||||||
|
route.push(`/user?tab=${tab}`)
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
@@ -891,7 +911,7 @@ img {
|
|||||||
width: 150px;
|
width: 150px;
|
||||||
background: inherit;
|
background: inherit;
|
||||||
background-color: rgba(255, 255, 255, 1);
|
background-color: rgba(255, 255, 255, 1);
|
||||||
padding:10px;
|
padding: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropdown-check-text {
|
.dropdown-check-text {
|
||||||
|
|||||||
Reference in New Issue
Block a user