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