From 21525f47ca011b149a3674d0926cbe495ec872c8 Mon Sep 17 00:00:00 2001
From: zuoxiao <470321431@qq.com>
Date: 星期一, 04 十一月 2024 15:57:11 +0800
Subject: [PATCH] 所有分页加载页面最后一页添加“没有更多数据”提示
---
pages/feedback/feedback.js | 12 +++++-------
app.js | 4 ++--
app.wxss | 1 +
pages/valveList/valveList.wxml | 2 ++
pages/rechargeMoney/rechargMoney.wxml | 6 +++---
pages/feedback/feedback.wxml | 3 ++-
6 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/app.js b/app.js
index 2799a89..be46fc9 100644
--- a/app.js
+++ b/app.js
@@ -14,8 +14,8 @@
})
},
globalData: {
- sessionId:2024102118013700009,
- clientId:"",
+ sessionId:'',
+ clientId:'',
tag:'ym',
userInfo: null,
userId:"",
diff --git a/app.wxss b/app.wxss
index 01c658d..5b31953 100644
--- a/app.wxss
+++ b/app.wxss
@@ -44,4 +44,5 @@
.loading {
text-align: center;
padding: 20px;
+ font-size: 30rpx;
}
\ No newline at end of file
diff --git a/pages/feedback/feedback.js b/pages/feedback/feedback.js
index 3e08801..2872086 100644
--- a/pages/feedback/feedback.js
+++ b/pages/feedback/feedback.js
@@ -503,6 +503,7 @@
this.setData({
isRefreshing: false,
pageCurr: 1,
+ listData:[]
});
}
const app = getApp();
@@ -555,15 +556,12 @@
const item = e.currentTarget.dataset.item;
const that = this;
wx.showLoading({
- title: '姝e湪寮哄埗鍒犻櫎璇风◢鍊�...', // 鍔犺浇鎻愮ず鏂囧瓧
+ title: '姝e湪鍒犻櫎璇风◢鍊�...', // 鍔犺浇鎻愮ず鏂囧瓧
mask: true // 鏄惁鏄剧ず閫忔槑钂欏眰锛岄槻姝㈣Е鎽哥┛閫忥紝榛樿涓� false
});
- that.setData({
- lastIntakeName: intakeName
- })
const data = {
- vcNum: item.vcNum, //鍙栨按鍙D
- rtuAddr: item.rtuAddr, //闃�鎺у櫒鍦板潃
+ issueReportId: item.issueReportId, //鍙栨按鍙D
+ clientId: app.globalData.clientId, //闃�鎺у櫒鍦板潃
};
post({
url: "wx/issue/deleteIssueReport",
@@ -575,7 +573,7 @@
// 鍔犺浇瀹屾垚鍚庨殣钘忓姞杞藉姩鐢�
wx.hideLoading();
//閲嶆柊鑾峰彇鍒楄〃鍒锋柊鏁版嵁
- this.getList();
+ this.getList(true);
}).catch(error => {
// 鍔犺浇瀹屾垚鍚庨殣钘忓姞杞藉姩鐢�
wx.hideLoading();
diff --git a/pages/feedback/feedback.wxml b/pages/feedback/feedback.wxml
index 0e1c773..1973aeb 100644
--- a/pages/feedback/feedback.wxml
+++ b/pages/feedback/feedback.wxml
@@ -62,11 +62,12 @@
<view slot="right" class="delete-btn" bind:tap="onDelete" data-item="{{item}}">鍒犻櫎</view>
</t-swipe-cell>
</block>
- <view wx:if="{{feedBackList.length === 0}}" class="noMore-View">
+ <view wx:if="{{listData.length === 0}}" class="noMore-View">
<image class="noMore-img" src="/images/no_more.svg" />
<text class="noMore-text">娌℃湁鏁版嵁</text>
</view>
<view wx:if="{{loading}}" class="loading">鍔犺浇涓�...</view> <!-- 鍔犺浇鎸囩ず鍣� -->
+ <view wx:if="{{!hasMore&&listData.length>0}}" class="loading">娌℃湁鏇村鏁版嵁</view> <!-- 鍔犺浇鎸囩ず鍣� -->
</scroll-view>
diff --git a/pages/rechargeMoney/rechargMoney.wxml b/pages/rechargeMoney/rechargMoney.wxml
index fd05aac..421db30 100644
--- a/pages/rechargeMoney/rechargMoney.wxml
+++ b/pages/rechargeMoney/rechargMoney.wxml
@@ -58,14 +58,13 @@
<view class="rechage-view">
<view class="rechage{{activeIndex === -1 ? 'active' : ''}}" disabled="{{isClickable}}" bind:tap="creatOrder">
- <text class="rechage-text" >鍏呭��</text>
+ <text class="rechage-text">鍏呭��</text>
</view>
</view>
<view class="rechageList-view">
<text class="rechageList-view-head">鍏呭�艰褰�</text>
- <scroll-view class="list-container" scroll-y="true" scroll-x="false" refresher-enabled="true" refresher-threshold="50"
- bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isWXRefreshing}}" bindscrolltolower="loadMore">
+ <scroll-view class="list-container" scroll-y="true" scroll-x="false" refresher-enabled="true" refresher-threshold="50" bindrefresherrefresh="onPullDownRefresh" refresher-triggered="{{isWXRefreshing}}" bindscrolltolower="loadMore">
<block wx:if="{{allRechargeList.length > 0}}" wx:for="{{allRechargeList}}" wx:key="index">
<view class="itemList">
<text class="item-card-text">{{item.rechargeTime}}</text>
@@ -78,6 +77,7 @@
<text class="noMore-text">娌℃湁鏁版嵁</text>
</view>
<view wx:if="{{loading}}" class="loading">鍔犺浇涓�...</view> <!-- 鍔犺浇鎸囩ず鍣� -->
+ <view wx:if="{{!hasMore&&allRechargeList.length>0}}" class="loading">娌℃湁鏇村鏁版嵁</view>
</scroll-view>
diff --git a/pages/valveList/valveList.wxml b/pages/valveList/valveList.wxml
index bef7966..639a96b 100644
--- a/pages/valveList/valveList.wxml
+++ b/pages/valveList/valveList.wxml
@@ -39,6 +39,7 @@
<text class="noMore-text">娌℃湁鏁版嵁</text>
</view>
<view wx:if="{{virtualIsLoding}}" class="loading">鍔犺浇涓�...</view> <!-- 鍔犺浇鎸囩ず鍣� -->
+ <view wx:if="{{ !virtualhasMore && listVirtualData.length > 0}}" class="loading">娌℃湁鏇村鏁版嵁</view>
</scroll-view>
<scroll-view class="list-container" wx:else scroll-y="true" scroll-x="false" refresher-enabled="true" bindrefresherrefresh="onPullPhysicalDownRefresh" scroll-x="false" refresher-triggered="{{isPhysicalRefreshing}}" bindscrolltolower="loadPhysicalMore">
@@ -69,5 +70,6 @@
<text class="noMore-text">娌℃湁鏁版嵁</text>
</view>
<view wx:if="{{physicalIsLoding}}" class="loading">鍔犺浇涓�...</view> <!-- 鍔犺浇鎸囩ず鍣� -->
+ <view wx:if="{{!physicalHasMore && listPhysicalData.length > 0}}" class="loading">娌℃湁鏇村鏁版嵁</view>
</scroll-view>
</view>
\ No newline at end of file
--
Gitblit v1.8.0