添加鼠标移动到可点模块 鼠标样式改变 全局新增加载动画
This commit is contained in:
@@ -9,9 +9,6 @@
|
||||
<div v-for="(item, i) in apartmentData.data" :key="i">
|
||||
<listItem :style="{ 'margin-left': i === 0 ? 0 : '12px' }" :data="item" v-if="i < 4"></listItem>
|
||||
</div>
|
||||
<!-- <listItem style="margin-left:12px;"></listItem>
|
||||
<listItem style="margin-left:12px;"></listItem>
|
||||
<listItem style="margin-left:12px;"></listItem> -->
|
||||
</div>
|
||||
</div>
|
||||
<!-- 科普 -->
|
||||
@@ -25,9 +22,11 @@
|
||||
<img src="../assets/homeImage/informationO.png" class="img" alt="">
|
||||
<span class="title">攻略</span>
|
||||
</div>
|
||||
<div v-for="(item, i) in informationData" :key="i" class="dis-f al-item list-li">
|
||||
<div v-for="(item, i) in informationData && informationData[0].list" :key="i" class="dis-f al-item list-li">
|
||||
<div class="list-mark"></div>
|
||||
<span>{{ item }}</span>
|
||||
<div class="text-s" @click="informationDataOpen(item)">
|
||||
<span class="text">{{ item.title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="list-box">
|
||||
@@ -35,9 +34,11 @@
|
||||
<img src="../assets/homeImage/informationT.png" class="img" alt="">
|
||||
<span class="title">科普</span>
|
||||
</div>
|
||||
<div v-for="(item, i) in informationData" :key="i" class="dis-f al-item list-li">
|
||||
<div v-for="(item, i) in informationData && informationData[1].list" :key="i" class="dis-f al-item list-li">
|
||||
<div class="list-mark"></div>
|
||||
<span>{{ item }}</span>
|
||||
<div class="text-s" @click="informationDataOpen(item)">
|
||||
<span class="text">{{ item.title }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -200,11 +201,16 @@ import footerTool from '@/components/footer/footer.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import store from '../store/index';
|
||||
import api from "../utils/api";
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
//
|
||||
let informationData = [
|
||||
'123456', '2456789', '3456789', '47894564', '545649879987'
|
||||
]
|
||||
let informationData = ref([
|
||||
{}, {}
|
||||
])
|
||||
let informationDataOpen = (item) => {
|
||||
window.open(item.url)
|
||||
}
|
||||
|
||||
let ListSelectBtn = reactive({ data: [], selectType: 'recommend' })
|
||||
|
||||
//首页数据
|
||||
@@ -235,7 +241,7 @@ watchEffect(() => {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
informationData.value = store.state.indexData.articleList
|
||||
})
|
||||
|
||||
//公寓数据
|
||||
@@ -311,6 +317,11 @@ let getRecommendList = () => {
|
||||
loadMore.value = false
|
||||
loadText.value = '到底了'
|
||||
}
|
||||
} else {
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
center: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -356,12 +367,12 @@ let indexWaterfallBoxCheck = (res) => {
|
||||
}
|
||||
|
||||
//跳转个人房源
|
||||
let personHouseingInfo = (type, data,areaItem) => {
|
||||
let personHouseingInfo = (type, data, areaItem) => {
|
||||
router.push({
|
||||
path: `/personHousing`,
|
||||
query: {
|
||||
type,
|
||||
data:JSON.stringify(data),
|
||||
data: JSON.stringify(data),
|
||||
areaItem
|
||||
},
|
||||
// params:{
|
||||
@@ -438,7 +449,7 @@ img {
|
||||
|
||||
.information-box {
|
||||
width: 836px;
|
||||
height: 329px;
|
||||
min-height: 329px;
|
||||
background: inherit;
|
||||
background-color: rgba(255, 255, 255, 1);
|
||||
border: none;
|
||||
@@ -492,6 +503,22 @@ img {
|
||||
.list-li {
|
||||
margin-top: 20px;
|
||||
cursor: pointer;
|
||||
|
||||
.text-s {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
|
||||
.text {
|
||||
font-family: 'PingFangSC-Regular', 'PingFang SC', sans-serif;
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-size: 16px;
|
||||
text-align: left;
|
||||
letter-spacing: normal;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-mark {
|
||||
@@ -708,4 +735,5 @@ img {
|
||||
font-size: 16px;
|
||||
color: #7F7F7F;
|
||||
text-align: left;
|
||||
}</style>
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4,7 +4,17 @@
|
||||
<div class="dis-f jus-x al-item">
|
||||
<div class="body-maxWidth mg-t-35">
|
||||
<div class="title-top-box">
|
||||
123
|
||||
<div class="breadcrumb-box">
|
||||
<el-breadcrumb :separator-icon="ArrowRight">
|
||||
<el-breadcrumb-item :to="{ path: '/' }">homepage</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>promotion management</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>promotion list</el-breadcrumb-item>
|
||||
<el-breadcrumb-item>promotion detail</el-breadcrumb-item>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,7 +69,7 @@ img {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.title-top-box{
|
||||
.title-top-box {
|
||||
width: 1200px;
|
||||
height: 186px;
|
||||
background: inherit;
|
||||
@@ -74,6 +84,10 @@ img {
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.117647058823529);
|
||||
font-size: 14px;
|
||||
transform: translateY(-38px);
|
||||
|
||||
.breadcrumb-box {
|
||||
padding: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -35,6 +35,7 @@ import noList from "../../components/public/empty-duck.vue";
|
||||
import circleBtn from '@/components/public/circle-btn.vue'
|
||||
import api from "../../utils/api";
|
||||
import tool from '../../toolJs/downLoadMore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
//获取数据
|
||||
let pages = ref(1)
|
||||
@@ -70,15 +71,15 @@ let getDataList = (data) => {
|
||||
let postData = {
|
||||
page: pages.value,
|
||||
intermediary: 1,
|
||||
limit:20,
|
||||
...data
|
||||
}
|
||||
api.getLists(postData).then(res => {
|
||||
if (res.code === 200) {
|
||||
loading.value = true
|
||||
dataList.data = res.data.data
|
||||
if (res.data.data.length === 0) {
|
||||
if(res.data.count<20){
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
@@ -91,7 +92,10 @@ let getDataList = (data) => {
|
||||
pageList['2'].push(dataList.data[1])
|
||||
})
|
||||
} else {
|
||||
// ElMessage(res.message)
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
center: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -99,10 +103,12 @@ let getDataList = (data) => {
|
||||
//添加数据
|
||||
let addListData = () => {
|
||||
let num = null
|
||||
if (pageList.tab >= 18){
|
||||
loading.value = true
|
||||
if (pageList.tab >= (dataList.count>20?20-2:dataList.count-2)) {
|
||||
if(dataList.count>20){
|
||||
loading.value = true
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
pageList.tab++
|
||||
if (pageList.height1 > pageList.height2) {
|
||||
num = 2
|
||||
|
||||
@@ -36,6 +36,7 @@ import noList from "../../components/public/empty-duck.vue";
|
||||
import circleBtn from '@/components/public/circle-btn.vue'
|
||||
import api from "../../utils/api";
|
||||
import tool from '../../toolJs/downLoadMore'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
//获取数据
|
||||
let pages = ref(1)
|
||||
@@ -77,15 +78,15 @@ let getDataList = (data) => {
|
||||
let postData = {
|
||||
page: pages.value,
|
||||
intermediary: 0,
|
||||
limit:20,
|
||||
...data
|
||||
}
|
||||
api.getLists(postData).then(res => {
|
||||
if (res.code === 200) {
|
||||
loading.value = true
|
||||
dataList.data = res.data.data
|
||||
if (res.data.data.length === 0) {
|
||||
if(res.data.count<20){
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
@@ -98,7 +99,10 @@ let getDataList = (data) => {
|
||||
pageList['2'].push(dataList.data[1])
|
||||
})
|
||||
} else {
|
||||
// ElMessage(res.message)
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
center: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -106,10 +110,12 @@ let getDataList = (data) => {
|
||||
//添加数据
|
||||
let addListData = () => {
|
||||
let num = null
|
||||
if (pageList.tab >= 18){
|
||||
loading.value = true
|
||||
if (pageList.tab >= (dataList.count>20?20-2:dataList.count-2)) {
|
||||
if(dataList.count>20){
|
||||
loading.value = true
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
pageList.tab++
|
||||
if (pageList.height1 > pageList.height2) {
|
||||
num = 2
|
||||
|
||||
@@ -37,6 +37,7 @@ import circleBtn from '@/components/public/circle-btn.vue'
|
||||
import api from "../../utils/api";
|
||||
import tool from '../../toolJs/downLoadMore'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
//路由
|
||||
const router = useRouter()
|
||||
@@ -82,9 +83,12 @@ let getDataList = (data) => {
|
||||
api.getLists(postData).then(res => {
|
||||
if (res.code === 200) {
|
||||
dataList.data = res.data.data
|
||||
if (res.data.data.length === 0) {
|
||||
// if (res.data.data.length === 0) {
|
||||
// loading.value = false
|
||||
// return
|
||||
// }
|
||||
if(res.data.count<20){
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
if (pages.value === 1) {
|
||||
setInitial()
|
||||
@@ -92,12 +96,16 @@ let getDataList = (data) => {
|
||||
pageList.tab = 1
|
||||
dataList.count = res.data.count
|
||||
dataCount.value = res.data.count
|
||||
|
||||
nextTick(() => {
|
||||
pageList['1'].push(dataList.data[0])
|
||||
pageList['2'].push(dataList.data[1])
|
||||
})
|
||||
} else {
|
||||
// ElMessage(res.message)
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
center: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -105,10 +113,12 @@ let getDataList = (data) => {
|
||||
//添加数据
|
||||
let addListData = () => {
|
||||
let num = null
|
||||
if (pageList.tab >= 18){
|
||||
loading.value = true
|
||||
if (pageList.tab >= (dataList.count>20?20-2:dataList.count-2)) {
|
||||
if(dataList.count>20){
|
||||
loading.value = true
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
pageList.tab++
|
||||
if (pageList.height1 > pageList.height2) {
|
||||
num = 2
|
||||
@@ -137,7 +147,9 @@ let downLoadMore = () => {
|
||||
//listImg
|
||||
onMounted(() => {
|
||||
let {type,data}=router.currentRoute.value.query
|
||||
let typeData=JSON.parse(data)
|
||||
let typeData=null
|
||||
if(data)typeData=JSON.parse(data)
|
||||
|
||||
if(Object.keys(data).length>0){
|
||||
if(type!=='location'){
|
||||
seachSelectData.data={[type]:typeData.id}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<pageTopBar></pageTopBar>
|
||||
<inputModule :getDataList="setSeachSelectData" :count="dataCount"></inputModule>
|
||||
<inputModule :getDataList="setSeachSelectData" :count="dataCount" ref="inputModuleInfo"></inputModule>
|
||||
<div class="dis-f jus-x al-item">
|
||||
<div class="body-maxWidth mg-t-35">
|
||||
<div class="dis-f jus-bet"
|
||||
@@ -38,6 +38,12 @@ import tool from '../toolJs/downLoadMore'
|
||||
import inputModule from '../components/seachPage/input.vue'
|
||||
import apartmentItem from '@/components/public/apartment-item.vue';
|
||||
import Masonry from 'masonry-layout';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { ElMessage } from 'element-plus'
|
||||
|
||||
//路由
|
||||
const route = useRouter()
|
||||
let routeQuery = reactive({ data: {} })
|
||||
|
||||
//获取数据
|
||||
let pages = ref(1)//页数
|
||||
@@ -80,6 +86,7 @@ let getDataList = (data) => {
|
||||
let postData = {
|
||||
page: pages.value,
|
||||
intermediary: 0,
|
||||
limit:20,
|
||||
...data
|
||||
}
|
||||
loading.value = false
|
||||
@@ -94,7 +101,7 @@ let getDataList = (data) => {
|
||||
console.log(res.data)
|
||||
loading.value = true
|
||||
dataList.data = res.data.data
|
||||
if (res.data.data.length < 20) {
|
||||
if (res.data.count < 20) {
|
||||
loading.value = false
|
||||
}
|
||||
if (seachSelectData.data.tabType !== 'apartment') {
|
||||
@@ -119,7 +126,10 @@ let getDataList = (data) => {
|
||||
|
||||
|
||||
} else {
|
||||
// ElMessage(res.message)
|
||||
ElMessage({
|
||||
message: res.message,
|
||||
center: true,
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
@@ -127,10 +137,13 @@ let getDataList = (data) => {
|
||||
//添加数据
|
||||
let addListData = () => {
|
||||
let num = null
|
||||
if (pageList.tab >= 18){
|
||||
loading.value = true
|
||||
console.log(pageList.tab , dataList.count)
|
||||
if (pageList.tab >= (dataList.count>20?20-2:dataList.count-2)) {
|
||||
if(dataList.count>20){
|
||||
loading.value = true
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
pageList.tab++
|
||||
if (pageList.height1 > pageList.height2) {
|
||||
num = 2
|
||||
@@ -149,12 +162,15 @@ let watchImgLoad = (id, listId, height) => {
|
||||
//加载更多
|
||||
let downLoadMore = () => {
|
||||
tool.loadMore(() => {
|
||||
if (!loading.value||dataList.data.length==0) return
|
||||
console.log(loading.value)
|
||||
if (!loading.value) return
|
||||
pages.value++
|
||||
getDataList(seachSelectData.data)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
let inputModuleInfo=ref(null)
|
||||
const gridContainer = ref(null);
|
||||
//listImg
|
||||
onMounted(() => {
|
||||
@@ -162,7 +178,14 @@ onMounted(() => {
|
||||
itemSelector: '.item',
|
||||
gutter: 20
|
||||
});
|
||||
getDataList()
|
||||
routeQuery.data = route.currentRoute.value.query
|
||||
console.log(routeQuery)
|
||||
if(routeQuery.data.keyword){
|
||||
inputModuleInfo.value.searchInit(routeQuery.data.keyword)
|
||||
route.currentRoute.value.query={}
|
||||
}else{
|
||||
getDataList()
|
||||
}
|
||||
window.addEventListener('scroll', downLoadMore, true);
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user