分页bug

This commit is contained in:
Vinjor 2024-10-22 12:02:57 +08:00
parent 14cd3aafdd
commit 1535eb874e
5 changed files with 25 additions and 25 deletions

View File

@ -11,7 +11,7 @@
</view>
</view>
<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">
<view v-for="(item, index) in orderList" :key="index" class="orderItem">
<view class="line1">
@ -137,7 +137,7 @@ export default {
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')

View File

@ -3,7 +3,7 @@
<VNavigationBar background-color="#fff" title-color="#333" title="通知公告"></VNavigationBar>
<view class="body">
<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">
<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>
@ -65,7 +65,7 @@
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')

View File

@ -33,7 +33,7 @@
<view class="t-zi" v-html="item.newsContent"></view>
</view>
</view>
<view class="c-b-bom">
<!-- <view class="b-left">{{item.createTime.substring(0,item.createTime.length - 3)}}</view> -->
<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/xz.png" v-if="fab == true" @click="getfab()"></image>
</view>
<!-- 悬浮按钮 结束-->
<!-- <tabBar></tabBar> -->
</view>
@ -117,14 +117,14 @@
})
}
},
onReachBottom() {
onReachBottomCus() {
console.log(111)
if (this.pageNum >= this.totalPages) {
uni.showToast({
title: '没有下一页数据',
icon: 'none'
})
} else {
this.pageNum++
this.arrlist=[]
@ -137,7 +137,7 @@
url: '/admin-api/appInspection/news/listGfClass',
method: 'get'
})
this.typeList = typeRes.data
},
getfab() {
@ -152,7 +152,7 @@
getback(){
uni.navigateBack({
delta:1,
})
})
},
async getlistindex(){
//
@ -180,8 +180,8 @@
this.arrlist = res.rows
}
let total = res.total
this.totalPages = Math.ceil(total / this.pageSize);
this.totalPages = Math.ceil(total / this.pageSize);
},
getdetails(id){
uni.navigateTo({
@ -205,9 +205,9 @@
url:'/pages/detedetails/managelist?type=hygg'
})
}
}
}
</script>
@ -315,7 +315,7 @@
width: 100%;
height: 100%;
}
}
.t-right{
width: 60%;
@ -324,7 +324,7 @@
font-size: 20px;
font-weight: bold;
color: #333333;
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
@ -335,10 +335,10 @@
font-size: 16px;
font-weight: bold;
color: #5e5e5e;
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.t-zi{
font-size: 14px;
@ -346,7 +346,7 @@
color: #666666;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
@ -419,6 +419,6 @@
border-style:solid;
border-width:2px;
font-size: 15px;
}
</style>
</style>

View File

@ -2,7 +2,7 @@
<view class="container">
<v-navigation-bar title="操作指南" background-color="#fff" title-color="#333"></v-navigation-bar>
<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">
<view @click="gotoDetail(item)" v-for="(item,index) in dataList" :key="index" class="guideItem">
<text class="guide_content">{{ item.title }}</text>
@ -41,7 +41,7 @@
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')

View File

@ -3,7 +3,7 @@
<VNavigationBar background-color="#fff" title-color="#333" title="消息中心" :showClear="showClear" @clearNoRead="clearNoReadFun"></VNavigationBar>
<view class="body">
<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">
<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>
@ -112,7 +112,7 @@
/**
* 上滑加载数据
*/
onReachBottom() {
onReachBottomCus() {
// *
if (this.pageNo * this.pageSize >= this.total) {
uni.$u.toast('没有更多数据了')