Parcourir la source

【优化】结算成功刷新当前结算结果记录。

程志平 il y a 4 ans
Parent
commit
51ca176f56
1 fichiers modifiés avec 10 ajouts et 7 suppressions
  1. 10 7
      pages/reshui/reshui.vue

+ 10 - 7
pages/reshui/reshui.vue

@@ -231,6 +231,11 @@
 							this.showRoom = true
 						}
 					})
+
+
+					setTimeout(function() {
+						uni.hideLoading();
+					}, 3000);
 				}
 			},
 			/**
@@ -699,7 +704,7 @@
 						if (err.errCode == 10001) {
 							uni.showModal({
 								content: '请开启手机蓝牙!',
-								showCancel: false,
+								showCancel: false
 							})
 						} else {
 							uni.showToast({
@@ -859,10 +864,6 @@
 						}
 					});
 
-					setTimeout(function() {
-						uni.hideLoading();
-					}, 300);
-
 					if (res.data.msg == '获取成功') {
 						// 消费记录
 						let items = res.data.data
@@ -1365,8 +1366,10 @@
 								this.use_amount = res.data.use_amount.toFixed(2)
 								this.amount = (this.amount - this.use_amount).toFixed(2)
 								this.$store.state.reshui_amount = this.amount
-								// 刷新选定的月份消费记录
-								this.request_consumption_records()
+								setTimeout(() => {
+									// 刷新选定的月份消费记录
+									this.request_consumption_records()
+								}, 1000)
 							}
 						})
 					} else {