Commit a7db54df authored by lixy's avatar lixy

车型、旅游、营地列表分页

parent 4f4fcdee
@import './mixin';
@import './iconfont';
html{
overflow-x: hidden;
overflow-x: hidden !important;
}
* {
word-break: break-all;
......
This diff is collapsed.
......@@ -44,11 +44,10 @@
<div class="ellipsis2 campsite-name">{{ item.name }}</div>
</router-link>
</li>
</ul>
<!--<p-->
<!--v-if="preventRepeatReuqest"-->
<!--class="loading">加载中……</p>-->
<p
v-if="preventRepeatReuqest"
class="loading">加载中……</p>
<p id="empty"/>
<p
v-if="touchend"
......@@ -125,7 +124,7 @@
let scrollObj = document.getElementById("scroll-area"); // 滚动区域
let menuTop = document.querySelector('#nav').offsetTop;
let empty = document.querySelector('#empty').offsetTop;
if (scrollTop > menuTop-44 && empty > scrollObj.clientHeight) {
if (scrollTop > menuTop-44 && empty > document.documentElement.clientHeight) {
this.searchBarFixed = true;
}
if (scrollTop < 80) {
......@@ -136,7 +135,7 @@
let scrollHeight = scrollObj.scrollHeight; // 滚动条的总高度
//滚动条到底部的条件
console.log(scrollHeight - scrollTop);
if (document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight) {
if (document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight-100) {
if (this.touchend) {
return;
}
......@@ -176,6 +175,7 @@
let list = response.data.data.data;
t.dataDetail = [...t.dataDetail, ...list];
t.currentPage = response.data.data.pageNum;
response.data.data.totalCount = response.data.data.totalCount?response.data.data.totalCount: 0;
if (response.data.data.totalCount < t.listQuery.pageNo*t.listQuery.pageSize) {
t.touchend = true;
}
......
......@@ -115,7 +115,7 @@
if(scrollObj){
let scrollHeight = scrollObj.scrollHeight; // 滚动条的总高度
//滚动条到底部的条件
if(document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight) {
if(document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight-100) {
if (this.touchend) {
return;
}
......
......@@ -69,6 +69,8 @@
async asyncData({ route }) {
const { data } = await axios.get('/api/uccn/article/app/unauth/one?id='+route.query.id+"&urlType=1");
let detail = data.data;
detail.text = detail.text.replace(/<img/g,"<img style='width:100%'");
detail.text = detail.text.replace(/<video style="/g,'<video style="width:100% !important; heigit:auto;"');
let tempBannerData = await axios.get('/api/uccn/article/app/unauth/three?type=1&number=3&id='+route.query.id);
let hot = tempBannerData.data.data;
return {detail: detail, hotList: hot}
......
......@@ -68,6 +68,8 @@
async asyncData({ route }) {
const { data } = await axios.get('/api/uccn/article/app/unauth/one?id='+route.query.id+"&urlType=1");
let detail = data.data;
detail.text = detail.text.replace(/<img/g,"<img style='width:100%'");
detail.text = detail.text.replace(/<video style="/g,'<video style="width:100% !important; heigit:auto;"');
let tempBannerData = await axios.get('/api/uccn/article/app/unauth/three?type=1&number=3&id='+route.query.id);
let hot = tempBannerData.data.data;
return {detail: detail, hotList: hot}
......
<template>
<div class="tour-container">
<div
id="scroll-area"
class="tour-container">
<Head/>
<second-banner
:list = "bannerList"
......@@ -125,7 +127,7 @@
let scrollObj = document.getElementById("scroll-area"); // 滚动区域
let menuTop = document.querySelector('#nav').offsetTop;
let empty = document.querySelector('#empty').offsetTop;
if (scrollTop > menuTop-44 && empty > scrollObj.clientHeight) {
if (scrollTop > menuTop-44 && empty > document.documentElement.clientHeight) {
this.searchBarFixed = true;
}
if (scrollTop < 80) {
......@@ -135,7 +137,7 @@
if (scrollObj) {
let scrollHeight = scrollObj.scrollHeight; // 滚动条的总高度
//滚动条到底部的条件
if (document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight) {
if (document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight-100) {
if (this.touchend) {
return;
}
......@@ -258,42 +260,5 @@
width: 100%;
}
}
.news-item{
margin: 10px 0;
}
.tour-home-r, .news-home-r{
width: 58%;
}
.tour-img-home, .news-home-img{
width: px2rem(300px);
height: px2rem(150px);
}
.order-page {
.no-data {
text-align: center;
.nodata {
width: px2rem(400px);
height: px2rem(400px);
margin: 15vh auto px2rem(10px) auto;
}
p {
color: #6a6a6a;
font-size: px2rem(32px);
margin-bottom: px2rem(15px);
}
.login {
width: px2rem(240px);
height: px2rem(80px);
background: #56d176;
border: none;
color: #fff;
font-size: px2rem(28px);
border-radius: 2px;
}
}
}
</style>
......@@ -129,7 +129,7 @@
if(scrollObj){
let scrollHeight = scrollObj.scrollHeight; // 滚动条的总高度
//滚动条到底部的条件
if(document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight){
if(document.documentElement.scrollTop + document.documentElement.clientHeight >= document.body.scrollHeight-100){
if (this.touchend) {
return;
}
......
......@@ -273,7 +273,7 @@
if(this.searchBarFixed){
document.documentElement.scrollTop = top1 +180;
} else {
document.documentElement.scrollTop = top1+130;
document.documentElement.scrollTop = top1+135;
}
this.searchBarFixed = true;
},
......@@ -285,7 +285,7 @@
if(this.searchBarFixed){
document.documentElement.scrollTop = top1 +180;
} else {
document.documentElement.scrollTop = top1 +130;
document.documentElement.scrollTop = top1 +135;
}
this.searchBarFixed = true;
},
......@@ -296,7 +296,7 @@
if(this.searchBarFixed){
document.documentElement.scrollTop = top1 +180;
} else {
document.documentElement.scrollTop = top1 +130;
document.documentElement.scrollTop = top1 +135;
}
this.searchBarFixed = true;
},
......@@ -307,7 +307,7 @@
if(this.searchBarFixed){
document.documentElement.scrollTop = top1 +180;
} else {
document.documentElement.scrollTop = top1+130;
document.documentElement.scrollTop = top1+135;
}
this.searchBarFixed = true;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment