收藏同步 距离房源更新
This commit is contained in:
@@ -163,6 +163,13 @@ let pageType=ref('')
|
||||
//跳转
|
||||
let router = useRouter()
|
||||
let watchInfo = () => {
|
||||
let seachData=router.currentRoute.value.query
|
||||
if(pageType.value===4){
|
||||
for(let key in data){
|
||||
store.state.seachSelect['seachPage'][key]=seachData[key]
|
||||
}
|
||||
console.log(store.state.seachSelect)
|
||||
}
|
||||
router.push({
|
||||
path: '/detail',
|
||||
query: {
|
||||
@@ -178,7 +185,7 @@ onMounted(() => {
|
||||
if(type){
|
||||
pageType.value=type
|
||||
}else{
|
||||
pageType.value=routePath.value==='/personHousing'?1:routePath.value==='/intermediaryHousing'?2:routePath.value==='/needHousing'?3:''
|
||||
pageType.value=routePath.value==='/personHousing'?1:routePath.value==='/intermediaryHousing'?2:routePath.value==='/needHousing'?3:routePath.value==='/seachPage'?4:''
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="pos-r">
|
||||
<div class="authentication-top"
|
||||
:class="[pageType==2?'intermediary-top':'']"
|
||||
v-if="data['data'] && data['data'].info && data['data'].info.verified === 1">
|
||||
v-if="data['data'] && data['data'].info && (data['data'].info.verified === 1||data['data'].isintermediary)">
|
||||
<div class="dis-f al-item jus-bet">
|
||||
<div v-if="pageType==1">
|
||||
<img src="../../assets/img/detail/authenticationLogon.png" class="logo" alt="">
|
||||
@@ -100,11 +100,10 @@ let {type}=router.currentRoute.value.query
|
||||
pageType.value=type
|
||||
//导航数据
|
||||
let storeData = store.state.routeList
|
||||
console.log('storeData', storeData)
|
||||
|
||||
watchEffect(() => {
|
||||
data['data'] = props.data
|
||||
console.log(data['data'])
|
||||
console.log(pageType.value)
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
v-show="tabType === 'need'">
|
||||
求房源
|
||||
</div>
|
||||
求房源
|
||||
求房源{{ tabType }}
|
||||
</div>
|
||||
<div class="top-btn dis-f jus-x al-item second" v-if="isNeedHousing" @click="selectPage('intermediary')"
|
||||
:class="{ 'select-top-btn-bg': tabType === 'intermediary' }">
|
||||
@@ -55,7 +55,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="top-btn dis-f jus-x al-item second" v-if="!isNeedHousing"
|
||||
<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' }">
|
||||
<div class="first-select" v-show="tabType === 'person'">
|
||||
<div class="box">
|
||||
@@ -74,7 +74,7 @@
|
||||
中介房源 {{ seachKey.key && seachKey.key.intermediary && seachKey.key.intermediary.count }}
|
||||
</div>
|
||||
<div class="top-btn dis-f jus-x al-item third" @click="selectPage('apartment')"
|
||||
:class="{ 'select-top-btn-bg': tabType === 'apartment' }" v-if="!isNeedHousing">
|
||||
:class="{ 'select-top-btn-bg': tabType === 'apartment' }" v-if="!isNeedHousing&&houseingPageType!=6">
|
||||
<div class="second-select-third-box" v-show="tabType === 'intermediary'">
|
||||
<div class="box">
|
||||
|
||||
@@ -197,7 +197,7 @@ let selectTabBoxInfo = ref(null)//个人/中介筛选实例
|
||||
let apartmentSelectInfo = ref(null)//公寓筛选实例
|
||||
//设置请求数据
|
||||
let selectPage = (type) => {
|
||||
if (type === seachAllType['tabType']) return
|
||||
if (type === seachAllType['tabType']||houseingPageType==6) return
|
||||
if (type === 'apartment') {
|
||||
selectTabBoxInfo.value.cleanSelect()//清空筛选数据
|
||||
} else {
|
||||
@@ -228,13 +228,16 @@ let getDataList = props.getDataList
|
||||
//搜索内容
|
||||
let seachVal = ref('')
|
||||
let isNeedHousing = ref(false)
|
||||
seachVal.value = 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'
|
||||
|
||||
//判断当前是什么页面
|
||||
let houseingPageType = route.currentRoute.value.query.houseingPageType
|
||||
console.log('houseingPageType',houseingPageType)
|
||||
let type = houseingPageType === '0' ? 'person' : houseingPageType === '1' ? 'intermediary' : houseingPageType === '6' ? 'need' : 'apartment'
|
||||
tabType.value = type
|
||||
|
||||
//页面判断
|
||||
let checkPageType = () => {
|
||||
|
||||
@@ -579,7 +579,7 @@ let routerQuerySet = () => {
|
||||
if (!setRouterQuerySet.value) return
|
||||
//路由参数设置
|
||||
if ((routeQuery.data && routeQuery.data.houseingPageType === '1') || (routePath.value === '/intermediaryHousing')) {
|
||||
otherData = reactive([{ title: '认证中介', id: 'isverified' }, { title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }])
|
||||
otherData = reactive([{ title: '认证中介', id: 'isintermediary' }, { title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }])
|
||||
} else {
|
||||
otherData = reactive([{ title: '认证房源', id: 'isverified' }, { title: '有电梯', id: 'iselevator' }, { title: '有阳台', id: 'issunshinearea' }])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user