Merge remote-tracking branch 'origin/main'
# Conflicts: # src/views/seachIndex.vue
This commit is contained in:
@@ -629,7 +629,7 @@
|
||||
<div v-if="checkUpdateTime(housingInfo['data'] && housingInfo['data'].info.updatetime)">
|
||||
<div class="dis-f al-item jus-x time-box" v-if="housingInfo['data'] &&
|
||||
housingInfo['data'].intermediarylistingcount > 0 &&
|
||||
housingInfo['data'] && ['config']['intermediary'] == 1 &&
|
||||
housingInfo['data']['info']['intermediary'] == 1 &&
|
||||
housingInfo['data'].isintermediary == 1">
|
||||
<img src="../assets/img/detail/presonNumIcon.png" class="icon" alt="">
|
||||
<span>房源 x{{ housingInfo['data'] && housingInfo['data'].intermediarylistingcount
|
||||
@@ -759,7 +759,7 @@
|
||||
</div>
|
||||
|
||||
<div class="dis-f jus-x bottom-tps"
|
||||
v-if="pageType === 1 || (pageType === 2 && recommendListData.length > 0 && housingInfo['data'] && housingInfo['data'].isintermediary)">
|
||||
v-if="(pageType === 1&&recommendListData.length > 0) || (pageType === 2 && recommendListData.length > 0 && housingInfo['data'] && housingInfo['data'].isintermediary)">
|
||||
- {{ loadText }} -
|
||||
</div>
|
||||
<footerTool class="mg-t-60"></footerTool>
|
||||
@@ -1168,10 +1168,10 @@ let setNavigation = () => {
|
||||
// location=3.8,3.13&areaItem=3
|
||||
// console.log(`${store.state.routeList['secondaryIndex'].path}/location/${JSON.stringify([housingInfo['data']['info'].location.substring(0, 1)])}`)
|
||||
store.state.routeList['secondaryIndex'] = {
|
||||
path: housingInfo['data']['info'].intermediary === 1 ? '/intermediaryHousing' :
|
||||
housingInfo['data']['info'].intermediary === 6 ? '/needHousing' : '/personHousing',
|
||||
title: housingInfo['data']['info'].intermediary === 1 ? '中介房源' :
|
||||
housingInfo['data']['info'].intermediary === 6 ? '求房源' : '个人房源'
|
||||
path: pageType.value===2 ? '/intermediaryHousing' :
|
||||
pageType.value===3 ? '/needHousing' : '/personHousing',
|
||||
title: pageType.value === 2 ? '中介房源' :
|
||||
pageType.value===3 ? '求房源' : '个人房源'
|
||||
}
|
||||
store.state.routeList['thirdIndex'] = {
|
||||
path: `${store.state.routeList['secondaryIndex'].path}`,
|
||||
@@ -1212,6 +1212,7 @@ let getHousingInfo = () => {
|
||||
console.log(res)
|
||||
if (res.code === 200) {
|
||||
housingInfo['data'] = res.data
|
||||
pageType.value =housingInfo['data']['info'].intermediary===1?2:housingInfo['data']['info'].intermediary===6?3:1 //1个人 2中介 3求房源
|
||||
setHousingArr()
|
||||
setNavigation()
|
||||
distanceList.value = housingInfo['data']['info'].pointData || []
|
||||
@@ -1221,7 +1222,6 @@ let getHousingInfo = () => {
|
||||
})
|
||||
concatInfo['data'] = store.state.indexData.wechat
|
||||
if (res.data.contacts) contacts['data'] = res.data.contacts
|
||||
console.log('pageType', pageType.value)
|
||||
if (pageType.value == 2 && housingInfo['data'].isintermediary) {
|
||||
getPublisherList()
|
||||
} else if (pageType.value != 3) {
|
||||
@@ -1394,9 +1394,9 @@ let router = useRouter()
|
||||
let route = useRoute()
|
||||
|
||||
watch(route, () => {
|
||||
let { id, type } = router.currentRoute.value.query
|
||||
let { id } = router.currentRoute.value.query
|
||||
uniqid.value = id
|
||||
pageType.value = type //1个人 2中介 3求房源
|
||||
pageType.value = housingInfo['data']['info'].intermediary===1?2:housingInfo['data']['info'].intermediary===6?3:1 //1个人 2中介 3求房源
|
||||
publisherList.value = []
|
||||
recommendListData.value = []
|
||||
getHousingInfo()
|
||||
@@ -1413,9 +1413,8 @@ watch(route, () => {
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
let { id, type } = router.currentRoute.value.query
|
||||
let { id } = router.currentRoute.value.query
|
||||
uniqid.value = id
|
||||
pageType.value = type //1个人 2中介 3求房源
|
||||
getHousingInfo()
|
||||
masonryInstance = new Masonry(gridContainer.value, {
|
||||
itemSelector: '.waterfall-box',
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<loadMoreText :loadText="loading?'加载中....':'到底了'"></loadMoreText>
|
||||
<loadMoreText :loadText="loadingText"></loadMoreText>
|
||||
<listBtmPrompt></listBtmPrompt>
|
||||
<footerTool></footerTool>
|
||||
</div>
|
||||
@@ -52,6 +52,7 @@ let dataCount = ref(0)
|
||||
let pageList = reactive({ 1: [], 2: [], height1: 0, height2: 0, tab: 1 })
|
||||
let seachSelectData = reactive({ data: {} })
|
||||
let loading = ref(true)
|
||||
let loadingText=ref(' 加载中... ')
|
||||
provide('count', dataCount)
|
||||
|
||||
//保存搜索设置
|
||||
@@ -85,6 +86,11 @@ let getDataList = (data) => {
|
||||
api.getLists(postData).then(res => {
|
||||
if (res.code === 200) {
|
||||
dataList.data = res.data.data
|
||||
if(res.data.data.length<20){
|
||||
loadingText.value=' 到底了 '
|
||||
}else{
|
||||
loadingText.value=' 加载中... '
|
||||
}
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<loadMoreText :loadText="loading?'加载中....':'到底了'"></loadMoreText>
|
||||
<loadMoreText :loadText="loadingText"></loadMoreText>
|
||||
<listBtmPrompt></listBtmPrompt>
|
||||
<footerTool></footerTool>
|
||||
</div>
|
||||
@@ -52,6 +52,7 @@ let dataCount = ref(0)
|
||||
let pageList = reactive({ 1: [], 2: [], height1: 0, height2: 0, tab: 1 })
|
||||
let seachSelectData = reactive({ data: {} })
|
||||
let loading = ref(true)
|
||||
let loadingText=ref(' 加载中... ')
|
||||
provide('count', dataCount)
|
||||
|
||||
//保存搜索设置
|
||||
@@ -85,6 +86,11 @@ let getDataList = (data) => {
|
||||
api.getLists(postData).then(res => {
|
||||
if (res.code === 200) {
|
||||
dataList.data = res.data.data
|
||||
if(res.data.data.length<20){
|
||||
loadingText.value=' 到底了 '
|
||||
}else{
|
||||
loadingText.value=' 加载中... '
|
||||
}
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<loadMoreText :loadText="loading ? '加载中....' : '到底了'"></loadMoreText>
|
||||
<loadMoreText :loadText="loadingText"></loadMoreText>
|
||||
<listBtmPrompt></listBtmPrompt>
|
||||
<footerTool></footerTool>
|
||||
</div>
|
||||
@@ -58,6 +58,7 @@ let dataCount = ref(0)
|
||||
let pageList = reactive({ 1: [], 2: [], height1: 0, height2: 0, tab: 1 })
|
||||
let seachSelectData = reactive({ data: {} })
|
||||
let loading = ref(true)
|
||||
let loadingText = ref(' 加载中... ')
|
||||
provide('count', dataCount)
|
||||
|
||||
//保存搜索设置
|
||||
@@ -91,6 +92,11 @@ let getDataList = (data) => {
|
||||
api.getLists(postData).then(res => {
|
||||
if (res.code === 200) {
|
||||
dataList.data = res.data.data
|
||||
if(res.data.data.length<20){
|
||||
loadingText.value=' 到底了 '
|
||||
}else{
|
||||
loadingText.value=' 加载中... '
|
||||
}
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<div class="dis-f jus-x al-item">
|
||||
<div class="body-maxWidth mg-t-35">
|
||||
<div class="dis-f jus-bet"
|
||||
v-show="dataList.data && dataList.data.length > 0&&seachSelectData.data.tabType!=='apartment' && seachSelectData.data.intermediary !== ''">
|
||||
v-show="dataList.data && dataList.data.length > 0 && seachSelectData.data.tabType !== 'apartment' && seachSelectData.data.intermediary !== ''">
|
||||
<div ref="list">
|
||||
<biserialItem v-for="(item, i) in pageList['1']" :key="i" :item="item" :imgLoad="watchImgLoad"
|
||||
listId="1"></biserialItem>
|
||||
@@ -15,7 +15,7 @@
|
||||
listId="2"></biserialItem>
|
||||
</div>
|
||||
</div>
|
||||
<div v-show="seachSelectData.data&&seachSelectData.data.tabType==='apartment' && dataList.data && dataList.data.length > 0"
|
||||
<div v-show="seachSelectData.data && seachSelectData.data.tabType === 'apartment' && dataList.data && dataList.data.length > 0"
|
||||
ref="gridContainer">
|
||||
<apartment-item v-for="item in listApartment" :item="item"></apartment-item>
|
||||
</div>
|
||||
@@ -24,13 +24,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <<<<<<< HEAD
|
||||
<loadMoreText v-if="loading" loadText="加载中...."></loadMoreText>
|
||||
<loadMoreText loadText="到底了"></loadMoreText>
|
||||
======= -->
|
||||
<loadMoreText :loadText="loadingText"></loadMoreText>
|
||||
<!-- >>>>>>> origin/main -->
|
||||
<listBtmPrompt></listBtmPrompt>
|
||||
<footerTool></footerTool>
|
||||
</div>
|
||||
<back-to-top></back-to-top>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -61,6 +64,7 @@ let dataCount = ref(0)//数据数量
|
||||
let pageList = reactive({ 1: [], 2: [], height1: 0, height2: 0, tab: 1 })//双列瀑布数据
|
||||
let seachSelectData = reactive({ data: {} })//搜索数据
|
||||
let loading = ref(true)//开关
|
||||
let loadingText = ref(` 加载中..... `)
|
||||
let listApartment = ref([])//公寓数据
|
||||
let masonryInstance = null//瀑布实例
|
||||
provide('count', dataCount)
|
||||
@@ -109,6 +113,11 @@ let getDataList = (data) => {
|
||||
console.log(res.data)
|
||||
// console.log(seachSelectData.data)
|
||||
dataList.data = res.data.data
|
||||
if (res.data.data.length < 20) {
|
||||
loadingText.value = ` 到底了 `
|
||||
} else {
|
||||
loadingText.value = ' 加载中... '
|
||||
}
|
||||
if (seachSelectData.data.tabType !== 'apartment') {
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
@@ -124,12 +133,16 @@ let getDataList = (data) => {
|
||||
let data = res.data
|
||||
dataList.count = res.data.count
|
||||
dataCount.value = res.data.count
|
||||
if(pages.value===1)listApartment.value=[]
|
||||
if (pages.value === 1) listApartment.value = []
|
||||
listApartment.value = listApartment.value.concat(data.data)
|
||||
console.log(seachSelectData.data)
|
||||
nextTick(() => {
|
||||
masonryInstance.reloadItems();
|
||||
masonryInstance.layout();
|
||||
if (res.data.data.length >= 20) {
|
||||
console.log(123)
|
||||
loading.value = true
|
||||
}
|
||||
})
|
||||
}
|
||||
inputModuleInfo.value.setListCount(seachSelectData.data, dataList.count)
|
||||
@@ -190,9 +203,9 @@ onMounted(() => {
|
||||
gutter: 20
|
||||
});
|
||||
routeQuery.data = route.currentRoute.value.query
|
||||
if (routeQuery.data.keyword && routeQuery.data.keyword.replace(/\s/g, "")&&routeQuery.data.houseingPageType!=6) {
|
||||
inputModuleInfo.value.searchInit(routeQuery.data.keyword)//调用搜索组件的搜索功能
|
||||
route.currentRoute.value.query.keyword = ''
|
||||
if (routeQuery.data.keyword && routeQuery.data.keyword.replace(/\s/g, "") && routeQuery.data.houseingPageType != 6) {
|
||||
inputModuleInfo.value.searchInit(routeQuery.data.keyword)//调用搜索组件的搜索功能
|
||||
route.currentRoute.value.query.keyword = ''
|
||||
} else {
|
||||
console.log(seachSelectData.data)
|
||||
inputModuleInfo.value.checkPageType()
|
||||
|
||||
Reference in New Issue
Block a user