分页bug
This commit is contained in:
parent
14cd3aafdd
commit
1535eb874e
@ -11,7 +11,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="orderList">
|
<view class="orderList">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
|
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<view v-for="(item, index) in orderList" :key="index" class="orderItem">
|
<view v-for="(item, index) in orderList" :key="index" class="orderItem">
|
||||||
<view class="line1">
|
<view class="line1">
|
||||||
@ -137,7 +137,7 @@ export default {
|
|||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
*/
|
*/
|
||||||
onReachBottom() {
|
onReachBottomCus() {
|
||||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
if (this.pageNo * this.pageSize >= this.total) {
|
if (this.pageNo * this.pageSize >= this.total) {
|
||||||
uni.$u.toast('没有更多数据了')
|
uni.$u.toast('没有更多数据了')
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<VNavigationBar background-color="#fff" title-color="#333" title="通知公告"></VNavigationBar>
|
<VNavigationBar background-color="#fff" title-color="#333" title="通知公告"></VNavigationBar>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="messageList">
|
<view class="messageList">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
|
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<view v-for="(item, index) in messageList" :key="index" class="messageItem" @click="readNotice(item)">
|
<view v-for="(item, index) in messageList" :key="index" class="messageItem" @click="readNotice(item)">
|
||||||
<image class="messageIcon" src="../../static/icons/message-icon1.png" mode="aspectFit"></image>
|
<image class="messageIcon" src="../../static/icons/message-icon1.png" mode="aspectFit"></image>
|
||||||
@ -65,7 +65,7 @@
|
|||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
*/
|
*/
|
||||||
onReachBottom() {
|
onReachBottomCus() {
|
||||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
if (this.pageNo * this.pageSize >= this.total) {
|
if (this.pageNo * this.pageSize >= this.total) {
|
||||||
uni.$u.toast('没有更多数据了')
|
uni.$u.toast('没有更多数据了')
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<view class="t-zi" v-html="item.newsContent"></view>
|
<view class="t-zi" v-html="item.newsContent"></view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="c-b-bom">
|
<view class="c-b-bom">
|
||||||
<!-- <view class="b-left">{{item.createTime.substring(0,item.createTime.length - 3)}}</view> -->
|
<!-- <view class="b-left">{{item.createTime.substring(0,item.createTime.length - 3)}}</view> -->
|
||||||
<view class="b-right">
|
<view class="b-right">
|
||||||
@ -60,7 +60,7 @@
|
|||||||
<image src="http://www.nuoyunr.com/lananRsc/detection/fab.png" v-if="fab == false" @click="getfab()"></image>
|
<image src="http://www.nuoyunr.com/lananRsc/detection/fab.png" v-if="fab == false" @click="getfab()"></image>
|
||||||
<image src="http://www.nuoyunr.com/lananRsc/detection/xz.png" v-if="fab == true" @click="getfab()"></image>
|
<image src="http://www.nuoyunr.com/lananRsc/detection/xz.png" v-if="fab == true" @click="getfab()"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 悬浮按钮 结束-->
|
<!-- 悬浮按钮 结束-->
|
||||||
<!-- <tabBar></tabBar> -->
|
<!-- <tabBar></tabBar> -->
|
||||||
</view>
|
</view>
|
||||||
@ -117,14 +117,14 @@
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottomCus() {
|
||||||
console.log(111)
|
console.log(111)
|
||||||
if (this.pageNum >= this.totalPages) {
|
if (this.pageNum >= this.totalPages) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '没有下一页数据',
|
title: '没有下一页数据',
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.arrlist=[]
|
this.arrlist=[]
|
||||||
@ -137,7 +137,7 @@
|
|||||||
url: '/admin-api/appInspection/news/listGfClass',
|
url: '/admin-api/appInspection/news/listGfClass',
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
|
|
||||||
this.typeList = typeRes.data
|
this.typeList = typeRes.data
|
||||||
},
|
},
|
||||||
getfab() {
|
getfab() {
|
||||||
@ -152,7 +152,7 @@
|
|||||||
getback(){
|
getback(){
|
||||||
uni.navigateBack({
|
uni.navigateBack({
|
||||||
delta:1,
|
delta:1,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async getlistindex(){
|
async getlistindex(){
|
||||||
//行业公告分类
|
//行业公告分类
|
||||||
@ -180,8 +180,8 @@
|
|||||||
this.arrlist = res.rows
|
this.arrlist = res.rows
|
||||||
}
|
}
|
||||||
let total = res.total
|
let total = res.total
|
||||||
this.totalPages = Math.ceil(total / this.pageSize);
|
this.totalPages = Math.ceil(total / this.pageSize);
|
||||||
|
|
||||||
},
|
},
|
||||||
getdetails(id){
|
getdetails(id){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@ -205,9 +205,9 @@
|
|||||||
url:'/pages/detedetails/managelist?type=hygg'
|
url:'/pages/detedetails/managelist?type=hygg'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@ -315,7 +315,7 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.t-right{
|
.t-right{
|
||||||
width: 60%;
|
width: 60%;
|
||||||
@ -324,7 +324,7 @@
|
|||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
@ -335,10 +335,10 @@
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #5e5e5e;
|
color: #5e5e5e;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
|
|
||||||
}
|
}
|
||||||
.t-zi{
|
.t-zi{
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
@ -346,7 +346,7 @@
|
|||||||
color: #666666;
|
color: #666666;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 3;
|
-webkit-line-clamp: 3;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
|
|
||||||
@ -419,6 +419,6 @@
|
|||||||
border-style:solid;
|
border-style:solid;
|
||||||
border-width:2px;
|
border-width:2px;
|
||||||
font-size: 15px;
|
font-size: 15px;
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<view class="container">
|
<view class="container">
|
||||||
<v-navigation-bar title="操作指南" background-color="#fff" title-color="#333"></v-navigation-bar>
|
<v-navigation-bar title="操作指南" background-color="#fff" title-color="#333"></v-navigation-bar>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
|
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<view @click="gotoDetail(item)" v-for="(item,index) in dataList" :key="index" class="guideItem">
|
<view @click="gotoDetail(item)" v-for="(item,index) in dataList" :key="index" class="guideItem">
|
||||||
<text class="guide_content">{{ item.title }}</text>
|
<text class="guide_content">{{ item.title }}</text>
|
||||||
@ -41,7 +41,7 @@
|
|||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
*/
|
*/
|
||||||
onReachBottom() {
|
onReachBottomCus() {
|
||||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
if (this.pageNo * this.pageSize >= this.total) {
|
if (this.pageNo * this.pageSize >= this.total) {
|
||||||
uni.$u.toast('没有更多数据了')
|
uni.$u.toast('没有更多数据了')
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<VNavigationBar background-color="#fff" title-color="#333" title="消息中心" :showClear="showClear" @clearNoRead="clearNoReadFun"></VNavigationBar>
|
<VNavigationBar background-color="#fff" title-color="#333" title="消息中心" :showClear="showClear" @clearNoRead="clearNoReadFun"></VNavigationBar>
|
||||||
<view class="body">
|
<view class="body">
|
||||||
<view class="messageList">
|
<view class="messageList">
|
||||||
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" bindscrolltolower="onReachBottom"
|
<scroll-view style="height: 100%;" scroll-y="true" class="itemContent" @scrolltolower="onReachBottomCus"
|
||||||
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
refresher-enabled @refresherrefresh="onRefresherrefresh" :refresher-triggered="isTriggered">
|
||||||
<view v-for="(item, index) in messageList" :key="index" class="messageItem" @click="readNotice(item)">
|
<view v-for="(item, index) in messageList" :key="index" class="messageItem" @click="readNotice(item)">
|
||||||
<image class="messageIcon" src="../../static/icons/message-icon1.png" mode="aspectFit"></image>
|
<image class="messageIcon" src="../../static/icons/message-icon1.png" mode="aspectFit"></image>
|
||||||
@ -112,7 +112,7 @@
|
|||||||
/**
|
/**
|
||||||
* 上滑加载数据
|
* 上滑加载数据
|
||||||
*/
|
*/
|
||||||
onReachBottom() {
|
onReachBottomCus() {
|
||||||
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
//判断 如果页码*页容量大于等于总条数,提示该页数据加载完毕
|
||||||
if (this.pageNo * this.pageSize >= this.total) {
|
if (this.pageNo * this.pageSize >= this.total) {
|
||||||
uni.$u.toast('没有更多数据了')
|
uni.$u.toast('没有更多数据了')
|
||||||
|
Loading…
Reference in New Issue
Block a user