去除打印
This commit is contained in:
@@ -195,14 +195,7 @@ let watchInfo = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(document.location.origin)
|
// console.log(document.location.origin)
|
||||||
// return
|
|
||||||
window.open(`${document.location.origin}/detail?id=${data.data.uniqid}`)
|
window.open(`${document.location.origin}/detail?id=${data.data.uniqid}`)
|
||||||
// router.push({
|
|
||||||
// path: '/detail',
|
|
||||||
// query: {
|
|
||||||
// id: data.data.uniqid,
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
|||||||
@@ -116,7 +116,6 @@ location.data = store.state.indexData.config.location
|
|||||||
|
|
||||||
let router = useRouter()
|
let router = useRouter()
|
||||||
let watchInfo = () => {
|
let watchInfo = () => {
|
||||||
// console.log(router,window.location.href)
|
|
||||||
window.open(`${document.location.origin}/${itemData.type === 'apartment' ? 'apartmentDetail' : 'detail'}?${itemData.type == 'apartment' ? "uniqid" : "id"}=${itemData.type == 'apartment' ? itemData.id : itemData.uniqid}`)
|
window.open(`${document.location.origin}/${itemData.type === 'apartment' ? 'apartmentDetail' : 'detail'}?${itemData.type == 'apartment' ? "uniqid" : "id"}=${itemData.type == 'apartment' ? itemData.id : itemData.uniqid}`)
|
||||||
// router.push({
|
// router.push({
|
||||||
// path: itemData.type === 'apartment' ? '/apartmentDetail' : '/detail',
|
// path: itemData.type === 'apartment' ? '/apartmentDetail' : '/detail',
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ const goIndex = () => router.push("/")
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="less">
|
<style lang="less" scoped>
|
||||||
.pos-r {
|
.pos-r {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -208,8 +208,6 @@ let setSeachConditions = (type, data, second = null) => {
|
|||||||
if (second) {
|
if (second) {
|
||||||
seachAllType[second.type] = second.id
|
seachAllType[second.type] = second.id
|
||||||
}
|
}
|
||||||
// console.log('seachAllType', seachAllType)
|
|
||||||
// return
|
|
||||||
getDataList(seachAllType)
|
getDataList(seachAllType)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ isNeedHousing.value = route.currentRoute.value.query.isNeedHousing === 'true'
|
|||||||
|
|
||||||
//判断当前是什么页面
|
//判断当前是什么页面
|
||||||
let houseingPageType = sessionStorage.getItem('houseingPageType')
|
let houseingPageType = sessionStorage.getItem('houseingPageType')
|
||||||
// console.log('houseingPageType',houseingPageType)
|
|
||||||
|
|
||||||
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
|
||||||
@@ -262,7 +261,6 @@ 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'
|
||||||
// console.log('type',type)
|
|
||||||
tabType.value = type
|
tabType.value = type
|
||||||
seachAllType['tabType'] = type
|
seachAllType['tabType'] = type
|
||||||
if (type === 'person') {
|
if (type === 'person') {
|
||||||
@@ -310,7 +308,6 @@ let setSeachVal = () => {
|
|||||||
|
|
||||||
//设置搜索数据
|
//设置搜索数据
|
||||||
let setSeachConditions = (type, data) => {
|
let setSeachConditions = (type, data) => {
|
||||||
// console.log(1,seachAllType)
|
|
||||||
if (seachAllType['tabType'] !== 'apartment') {
|
if (seachAllType['tabType'] !== 'apartment') {
|
||||||
if (type === 'rent') {
|
if (type === 'rent') {
|
||||||
seachAllType['rent_min'] = data.min
|
seachAllType['rent_min'] = data.min
|
||||||
@@ -355,8 +352,6 @@ let setSeachConditions = (type, data) => {
|
|||||||
seachAllType['isverified'] = 0
|
seachAllType['isverified'] = 0
|
||||||
seachAllType['isintermediary'] = 0
|
seachAllType['isintermediary'] = 0
|
||||||
}
|
}
|
||||||
// console.log('seachAllType', seachAllType)
|
|
||||||
// return
|
|
||||||
getDataList(seachAllType)
|
getDataList(seachAllType)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,8 +445,6 @@ let getLocationData = (data) => {
|
|||||||
|
|
||||||
//更新当前数据数量
|
//更新当前数据数量
|
||||||
let setListCount = (item, num) => {
|
let setListCount = (item, num) => {
|
||||||
// console.log(item, num)
|
|
||||||
// console.log(seachKey.key)
|
|
||||||
if (item.tabType === "intermediary") {
|
if (item.tabType === "intermediary") {
|
||||||
seachKey.key['intermediary']['count'] = num
|
seachKey.key['intermediary']['count'] = num
|
||||||
} else if (item.tabType === "person") {
|
} else if (item.tabType === "person") {
|
||||||
|
|||||||
@@ -252,24 +252,6 @@ import store from '../../store/index';
|
|||||||
//数据包
|
//数据包
|
||||||
let configData = reactive({ data: {} })
|
let configData = reactive({ data: {} })
|
||||||
|
|
||||||
//保存筛选参数
|
|
||||||
// let setStoreSelectData=(obj,data,type)=>{
|
|
||||||
// console.log(store.state.seachSelect)
|
|
||||||
// // otherCheck['list']
|
|
||||||
// // releaseObj.id
|
|
||||||
// // gender.id
|
|
||||||
// // hireDate.id
|
|
||||||
// // hireDate.title
|
|
||||||
// // hireTypeObj.id
|
|
||||||
// // hireTypeObj.title
|
|
||||||
// // hireTypeObj.hireId
|
|
||||||
// // selectTabCheck.id
|
|
||||||
// // selectTabCheck.title
|
|
||||||
// // selectTabCheck.data
|
|
||||||
// // selectData.data
|
|
||||||
// // schoolSelectObj.id
|
|
||||||
// // schoolSelectObj.title
|
|
||||||
// }
|
|
||||||
|
|
||||||
//监听路由
|
//监听路由
|
||||||
const route = useRouter()
|
const route = useRouter()
|
||||||
@@ -325,9 +307,8 @@ let setRegionList = () => {
|
|||||||
name: '不限',
|
name: '不限',
|
||||||
id: ''
|
id: ''
|
||||||
})
|
})
|
||||||
// console.log('arr', JSON.stringify(list))
|
|
||||||
routerQuerySet()
|
routerQuerySet()
|
||||||
// console.log(store.state.seachTypeData)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//按区域/学校选择的地区
|
//按区域/学校选择的地区
|
||||||
@@ -347,7 +328,6 @@ let schoolSelectObj = reactive({ id: '', title: '不限' })
|
|||||||
let schoolPages = ref(0) //页数
|
let schoolPages = ref(0) //页数
|
||||||
let shcoolData = shallowReactive([])
|
let shcoolData = shallowReactive([])
|
||||||
let setSchoolData = () => {
|
let setSchoolData = () => {
|
||||||
console.log(store.state)
|
|
||||||
let arr = routePath.value === '/' ? store.state.seachTypeData[0] && store.state.seachTypeData[0].where : store.state.schoolList
|
let arr = routePath.value === '/' ? store.state.seachTypeData[0] && store.state.seachTypeData[0].where : store.state.schoolList
|
||||||
arr.unshift({ name: '不限', id: '' })
|
arr.unshift({ name: '不限', id: '' })
|
||||||
let num = 0
|
let num = 0
|
||||||
@@ -415,7 +395,6 @@ let setSelectData = (id, data = [], title) => {
|
|||||||
}
|
}
|
||||||
//取消按钮
|
//取消按钮
|
||||||
let closeSeach = () => {
|
let closeSeach = () => {
|
||||||
// console.log(selectTabCheck,selectData)
|
|
||||||
showSelect.value = false
|
showSelect.value = false
|
||||||
clearSelectTabCheck.value = false
|
clearSelectTabCheck.value = false
|
||||||
}
|
}
|
||||||
@@ -448,9 +427,7 @@ let selectSeach = (data = []) => {
|
|||||||
}
|
}
|
||||||
schoolSelectObj.id = ''
|
schoolSelectObj.id = ''
|
||||||
schoolSelectObj.title = ''
|
schoolSelectObj.title = ''
|
||||||
// console.log(selectData,selectTabCheck)
|
|
||||||
// store.state.routeList['hireTypeObj']=JSON.parse(JSON.stringify(hireTypeObj))
|
|
||||||
// return
|
|
||||||
setSeachCondition('location', data)
|
setSeachCondition('location', data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +588,7 @@ let getAddressListId = (id, type) => {
|
|||||||
|
|
||||||
//查找出租类型
|
//查找出租类型
|
||||||
let getHireType = (data, id) => {
|
let getHireType = (data, id) => {
|
||||||
// console.log(data)
|
|
||||||
let obj = null
|
let obj = null
|
||||||
data.map(res => {
|
data.map(res => {
|
||||||
if (res.id == id) obj = res
|
if (res.id == id) obj = res
|
||||||
@@ -713,7 +690,7 @@ watchEffect(() => {
|
|||||||
if (configData.data) {
|
if (configData.data) {
|
||||||
hireTypeArr[1].hireType = setHireTypeArr(store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[0].data : [], 1)
|
hireTypeArr[1].hireType = setHireTypeArr(store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[0].data : [], 1)
|
||||||
hireTypeArr[2].hireType = setHireTypeArr(store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[1].data : [], 2)
|
hireTypeArr[2].hireType = setHireTypeArr(store.state.seachTypeData[2] ? store.state.seachTypeData[2].where[1].data : [], 2)
|
||||||
// console.log('route', route)
|
|
||||||
if (setRouterQuerySet.value) {
|
if (setRouterQuerySet.value) {
|
||||||
setRegionList()//设置地区数据
|
setRegionList()//设置地区数据
|
||||||
setSchoolData()//设置学校数据
|
setSchoolData()//设置学校数据
|
||||||
|
|||||||
@@ -242,14 +242,14 @@ let getRecommendList = () => {
|
|||||||
type: ListSelectBtn.selectType,
|
type: ListSelectBtn.selectType,
|
||||||
pagevalue: pagevalue.value
|
pagevalue: pagevalue.value
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.data.pagevalue) {
|
if (res.data.pagevalue) {
|
||||||
if (pages.value === 1) waterfallList.value = []
|
if (pages.value === 1) waterfallList.value = []
|
||||||
waterfallList.value = waterfallList.value.concat(res.data.data)
|
waterfallList.value = waterfallList.value.concat(res.data.data)
|
||||||
pagevalue.value = res.data.pagevalue
|
pagevalue.value = res.data.pagevalue
|
||||||
}
|
}
|
||||||
// console.log(waterfallList.value)
|
|
||||||
if (res.data.data.length >= 30) {
|
if (res.data.data.length >= 30) {
|
||||||
loadMore.value = true
|
loadMore.value = true
|
||||||
loadText.value = '下拉加载更多'
|
loadText.value = '下拉加载更多'
|
||||||
@@ -258,11 +258,11 @@ let getRecommendList = () => {
|
|||||||
loadText.value = '到底了'
|
loadText.value = '到底了'
|
||||||
}
|
}
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// console.log(1)
|
|
||||||
listMasonryInstance.reloadItems();
|
listMasonryInstance.reloadItems();
|
||||||
listMasonryInstance.layout();
|
listMasonryInstance.layout();
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
// console.log(3)
|
|
||||||
listMasonryInstance.reloadItems();
|
listMasonryInstance.reloadItems();
|
||||||
listMasonryInstance.layout();
|
listMasonryInstance.layout();
|
||||||
}, 600)
|
}, 600)
|
||||||
|
|||||||
@@ -1271,7 +1271,6 @@ let setNavigation = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// console.log(111, store.state.routeList)
|
|
||||||
}
|
}
|
||||||
//中介数据
|
//中介数据
|
||||||
let contacts = reactive({
|
let contacts = reactive({
|
||||||
@@ -1284,7 +1283,7 @@ let getHousingInfo = () => {
|
|||||||
api.details({
|
api.details({
|
||||||
uniqid: uniqid.value
|
uniqid: uniqid.value
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
housingInfo['data'] = res.data
|
housingInfo['data'] = res.data
|
||||||
pageType.value = housingInfo['data']['info'].intermediary === 1 ? 2 : housingInfo['data']['info'].intermediary === 6 ? 3 : 1 //1个人 2中介 3求房源
|
pageType.value = housingInfo['data']['info'].intermediary === 1 ? 2 : housingInfo['data']['info'].intermediary === 6 ? 3 : 1 //1个人 2中介 3求房源
|
||||||
@@ -1320,7 +1319,7 @@ let setOperation = () => {
|
|||||||
api.operation({
|
api.operation({
|
||||||
token: housingInfo['data'].token
|
token: housingInfo['data'].token
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
housingInfo['data'].info.count_fav = res.data.count
|
housingInfo['data'].info.count_fav = res.data.count
|
||||||
housingInfo['data'].isfav = res.data.status
|
housingInfo['data'].isfav = res.data.status
|
||||||
@@ -1409,7 +1408,7 @@ let recommendList = () => {
|
|||||||
pagevalue: pagevalue.value,
|
pagevalue: pagevalue.value,
|
||||||
token: housingInfo['data'].token
|
token: housingInfo['data'].token
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.data.data && res.data.data.length >= 30) {
|
if (res.data.data && res.data.data.length >= 30) {
|
||||||
loadMore.value = true
|
loadMore.value = true
|
||||||
@@ -1450,7 +1449,7 @@ let getPublisherList = () => {
|
|||||||
limit: 30,
|
limit: 30,
|
||||||
token: housingInfo['data'].token
|
token: housingInfo['data'].token
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
// console.log(res)
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
if (res.data.length >= 30) {
|
if (res.data.length >= 30) {
|
||||||
loadMore.value = true
|
loadMore.value = true
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ let setSeachSelectData = (data) => {
|
|||||||
seachSelectData.data = {
|
seachSelectData.data = {
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
// console.log(data)
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
getDataList(seachSelectData.data)
|
getDataList(seachSelectData.data)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,16 +63,10 @@ provide('count', dataCount)
|
|||||||
//保存搜索设置
|
//保存搜索设置
|
||||||
let setSeachSelectData = (data) => {
|
let setSeachSelectData = (data) => {
|
||||||
pages.value = 1
|
pages.value = 1
|
||||||
|
|
||||||
// if(data.location.length>0){
|
|
||||||
// data.location=JSON.stringify(data.location)
|
|
||||||
// }
|
|
||||||
seachSelectData.data = {
|
seachSelectData.data = {
|
||||||
...data
|
...data
|
||||||
}
|
}
|
||||||
loading.value = true
|
loading.value = true
|
||||||
// console.log('seachSelectData', seachSelectData.data)
|
|
||||||
// return
|
|
||||||
getDataList(seachSelectData.data)
|
getDataList(seachSelectData.data)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,8 +96,7 @@ let getDataList = (data) => {
|
|||||||
}
|
}
|
||||||
seachApi.then(res => {
|
seachApi.then(res => {
|
||||||
if (res.code === 200) {
|
if (res.code === 200) {
|
||||||
console.log(res.data)
|
// console.log(res.data)
|
||||||
// console.log(seachSelectData.data)
|
|
||||||
dataList.data = res.data.data
|
dataList.data = res.data.data
|
||||||
if (res.data.data.length < 20) {
|
if (res.data.data.length < 20) {
|
||||||
loadingText.value = ` 到底了 `
|
loadingText.value = ` 到底了 `
|
||||||
@@ -122,9 +115,6 @@ let getDataList = (data) => {
|
|||||||
dataCount.value = res.data.count
|
dataCount.value = res.data.count
|
||||||
pageList.value = pageList.value.concat(dataList.data)
|
pageList.value = pageList.value.concat(dataList.data)
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
// if (dataList.data[0]) pageList['1'].push(dataList.data[0])
|
|
||||||
// if (dataList.data[1]) pageList['2'].push(dataList.data[1])
|
|
||||||
// console.log('listMasonryInstance',listMasonryInstance)
|
|
||||||
listMasonryInstance.reloadItems();
|
listMasonryInstance.reloadItems();
|
||||||
listMasonryInstance.layout();
|
listMasonryInstance.layout();
|
||||||
})
|
})
|
||||||
@@ -138,7 +128,6 @@ let getDataList = (data) => {
|
|||||||
masonryInstance.reloadItems();
|
masonryInstance.reloadItems();
|
||||||
masonryInstance.layout();
|
masonryInstance.layout();
|
||||||
if (res.data.data.length >= 20) {
|
if (res.data.data.length >= 20) {
|
||||||
// console.log(123)
|
|
||||||
loading.value = true
|
loading.value = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -157,7 +146,6 @@ let getDataList = (data) => {
|
|||||||
//加载更多
|
//加载更多
|
||||||
let downLoadMore = () => {
|
let downLoadMore = () => {
|
||||||
tool.loadMore(() => {
|
tool.loadMore(() => {
|
||||||
// console.log(loading.value)
|
|
||||||
if (!loading.value) return
|
if (!loading.value) return
|
||||||
pages.value++
|
pages.value++
|
||||||
getDataList(seachSelectData.data)
|
getDataList(seachSelectData.data)
|
||||||
|
|||||||
Reference in New Issue
Block a user