添加鼠标移动到可点模块 鼠标样式改变 全局新增加载动画
This commit is contained in:
@@ -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}
|
||||
|
||||
Reference in New Issue
Block a user