From 501e7180823c29e893d87efabd0e2b9a629bae40 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 20 Aug 2021 17:25:09 +0800
Subject: [PATCH] 下拉刷新等

---
 pages/groupChat/groupChat.vue |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/pages/groupChat/groupChat.vue b/pages/groupChat/groupChat.vue
index 3166af6..b3696b3 100644
--- a/pages/groupChat/groupChat.vue
+++ b/pages/groupChat/groupChat.vue
@@ -6,8 +6,8 @@
 
 		<view style="height:205rpx;"></view>
 		<view class="tab" style="position: fixed;top: 0;width: 100%;height: 205rpx;z-index: 100;">
-			<u-navbar style="position: relative;" :is-fixed="false" :border-bottom="false" :is-back="false"
-				title="好友" :background="{ background: '#0BB9C8' }" title-color="#fff">
+			<u-navbar style="position: relative;" :is-fixed="false" :border-bottom="false" :is-back="false" title="好友"
+				:background="{ background: '#0BB9C8' }" title-color="#fff">
 				<u-icon @click="addFriend" slot="right" class="message-icon" mode="widthFix" name="plus" color="#fff">
 				</u-icon>
 				<!-- <image  src="../../static/add.png" ></image> -->
@@ -15,7 +15,7 @@
 			<u-tabs :list="list" :is-scroll="false" :current="current" active-color="#14B9C8" inactive-color="#595959"
 				height="100" @change="change" style="background-color:rgba(255,255,255,0.8); "></u-tabs>
 		</view>
-		
+
 		<swiper id="swiperBoxPeo" :style="{ height: swiperHeight + 'px' }" :current="current" @change="tabsChange">
 			<swiper-item class="swiper-item" v-for="(item, indexs) in list" :key="indexs">
 				<view v-if="indexs == 0" class="main">
@@ -81,7 +81,7 @@
 				</view>
 			</swiper-item>
 		</swiper>
-		
+
 	</view>
 </template>
 
@@ -140,14 +140,23 @@
 					query
 						.select('#swiperBoxPeo')
 						.boundingClientRect(data => {
-							
+
 							that.swiperHeight = safeArea.bottom - data.top;
-							
+
 						})
 						.exec();
 				}
 			});
 		},
+
+		onPullDownRefresh: function() {
+
+			setTimeout(() => {
+				this.getdataList()
+			}, 1000)
+
+		},
+
 		methods: {
 			change(index) {
 				this.current = index;
@@ -185,6 +194,8 @@
 								}
 							}
 							that.dataListP = resdata;
+
+							uni.stopPullDownRefresh();
 						}
 					});
 				} else if (this.current == 1) {
@@ -204,6 +215,8 @@
 							}
 
 							that.dataListTXL = resdata;
+
+							uni.stopPullDownRefresh();
 						}
 					})
 				} else if (this.current == 2) {
@@ -223,6 +236,8 @@
 								}
 							}
 							that.dataListQZ = resdata;
+
+							uni.stopPullDownRefresh();
 						}
 					});
 				}
@@ -358,6 +373,7 @@
 
 			.m-main {
 				box-sizing: border-box;
+
 				.main {
 					padding: 0 16px;
 				}
@@ -479,7 +495,7 @@
 			}
 		}
 	}
-	
+
 	.swiper-item {
 		overflow-y: auto !important;
 	}

--
Gitblit v1.9.3