Browse Source

优化账单页面下拉刷新

MS-CIAZDCOIXVRW\Administrator 3 years ago
parent
commit
ffd65dd163

+ 1 - 1
pages.json

@@ -25,7 +25,7 @@
 			"style": {
 				"navigationBarTitleText": "订单列表",
 				"navigationStyle": "custom",
-				"enablePullDownRefresh": false
+				"enablePullDownRefresh": true
 			}
 
 		}

+ 16 - 7
pages/bill/bill.vue

@@ -136,7 +136,7 @@
 			</view>
 
 			<!-- 悬浮按钮返回主页区域 -->
-			<view id="item_box" class="suspension" @click="goHome" @touchstart="down" @touchmove.prevent="move"
+			<view id="item_box" class="suspension" @click="goHome" @touchstart="down" @touchmove.prevent.stop="move"
 				@touchend="end">
 				<view class="icon">
 					<img src="../../static/home.png" />
@@ -328,13 +328,14 @@
 			},
 			// 获取账单列表数据
 			async getData() {
+				this.list = []
 				let res = await this.$myRequest({
 					url: "/payorder/queryWaterOrder",
 					data: {
 						payYear: this.payYear,
 						payStatu: this.payStatu,
 						itemName: "水费缴纳",
-						cardNmber: localStorage.card_number
+						cardNumber: localStorage.card_number
 					}
 				})
 				// console.log(res);
@@ -601,7 +602,7 @@
 							if (res.errMsg == "get_brand_wcpay_request:ok") {
 								// 使用以上方式判断前端返回,微信团队郑重提示:
 								//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
-							}else{
+							} else {
 								uni.showToast({
 									title: "支付失败",
 									icon: 'error'
@@ -700,15 +701,23 @@
 			end() {
 				this.flags = false;
 			},
+
+			// 下拉刷新
+			onPullDownRefresh() {
+				this.getData()
+				this.getTime()
+				setTimeout(() => {
+					uni.stopPullDownRefresh();
+				}, 1500)
+			},
 		},
 	};
 </script>
 
 <style lang="scss" scoped>
 	.container {
-		position: relative;
 		overflow: auto;
-		height: 100vh;
+		min-height: 100vh;
 		background-image: url(../../static/bg.png);
 		background-size: 100% 100%;
 
@@ -732,7 +741,7 @@
 				}
 
 				.content {
-					height: 80vh;
+					min-height: 80vh;
 					overflow: auto;
 
 					.detail {
@@ -852,7 +861,7 @@
 			}
 
 			.suspension {
-				position: absolute;
+				position: fixed;
 				left: 36rpx;
 				bottom: 50rpx;
 				display: flex;

+ 1 - 1
pages/home/home.vue

@@ -107,7 +107,7 @@
 		<view class="phone">
 			<view class="phone_box">
 				咨询电话:
-				<span @click="handlePhone">82293462</span>
+				<span @click="handlePhone">0791-82293462</span>
 			</view>
 		</view>
 

File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/h5/index.html


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/h5/static/js/index.4007c5f9.js


File diff suppressed because it is too large
+ 1 - 0
unpackage/dist/build/h5/static/js/pages-bill-bill.23e5d182.js


File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/build/h5/static/js/pages-bill-bill.41c49d95.js


File diff suppressed because it is too large
+ 1 - 1
unpackage/dist/build/h5/static/js/pages-bill-bill~pages-home-home.6b64223f.js


File diff suppressed because it is too large
+ 0 - 8
unpackage/dist/build/h5/static/js/pages-home-home.db8432d8.js


File diff suppressed because it is too large
+ 8 - 0
unpackage/dist/build/h5/static/js/pages-home-home.e0696be3.js