Browse Source

空调充值加了一个提示,以免学生对宿舍空调充值。

soft5566 3 years ago
parent
commit
395ab6d8df
2 changed files with 26 additions and 7 deletions
  1. 1 1
      pages/recharge/recharge.vue
  2. 25 6
      pagesAir/accountBalance/accountBalance.vue

+ 1 - 1
pages/recharge/recharge.vue

@@ -255,7 +255,7 @@
 				this.tip(false);
 				this.tip(false);
 			},
 			},
 			/**
 			/**
-			 * 提示
+			 * 打开页面时提示
 			 */
 			 */
 			tip(param) {
 			tip(param) {
 				let _this = this;
 				let _this = this;

+ 25 - 6
pagesAir/accountBalance/accountBalance.vue

@@ -31,8 +31,8 @@
 			<view class=" balance" @tap="Recharge(60)" :class="{balanceborder: amount == 60}">60元</view>
 			<view class=" balance" @tap="Recharge(60)" :class="{balanceborder: amount == 60}">60元</view>
 		</view>
 		</view>
 		<view class=" line"></view>
 		<view class=" line"></view>
-		<input class="input-balance" type="text" v-model="amount" @input="onInput" @blur="onBlur"
-			placeholder="请输入充值金额,金额大于10" placeholder-class="pc" maxlength="4" />
+		<input class="input-balance" type="text" v-model="amount" @input="onInput" @blur="onBlur" placeholder="请输入充值金额,金额大于10" placeholder-class="pc"
+			maxlength="4" />
 		<view class="line"></view>
 		<view class="line"></view>
 		<view class="btn-pay">
 		<view class="btn-pay">
 			<button class="btn" url="/pagesAir/rechargeRecord/rechargeRecord" @tap="btn_click">
 			<button class="btn" url="/pagesAir/rechargeRecord/rechargeRecord" @tap="btn_click">
@@ -63,7 +63,7 @@
 				uni.redirectTo({
 				uni.redirectTo({
 					url: '../../pages/index/index'
 					url: '../../pages/index/index'
 				})
 				})
-				
+
 				return;
 				return;
 			}
 			}
 			// 测试环境
 			// 测试环境
@@ -75,6 +75,23 @@
 		},
 		},
 		methods: {
 		methods: {
 			/**
 			/**
+			 * 打开页面时提示
+			 */
+			tip() {
+				uni.showModal({
+					title: '提示',
+					content: '目前只针对墨轩湖校区【公共区域】进行充值,不包含宿舍区域!请知晓!',
+					showCancel: false,
+					confirmText: '我已知晓',
+					confirmColor: '#F00',
+					success: function(res) {
+						if (res.confirm) {
+							// console.log('用户点击确定');
+						}
+					}
+				});
+			},
+			/**
 			 * 获取身份证号
 			 * 获取身份证号
 			 */
 			 */
 			get_base_info(options) {
 			get_base_info(options) {
@@ -102,7 +119,9 @@
 				}
 				}
 
 
 				// 请求服务器,获得余额
 				// 请求服务器,获得余额
-				this.getBalance()
+				this.getBalance();
+				
+				this.tip();
 			},
 			},
 			/**
 			/**
 			 * 请求服务器,获得余额
 			 * 请求服务器,获得余额
@@ -205,7 +224,7 @@
 							icon: 'none',
 							icon: 'none',
 							duration: 3000
 							duration: 3000
 						});
 						});
-						
+
 						return
 						return
 					}
 					}
 					// 调起微信支付
 					// 调起微信支付
@@ -482,4 +501,4 @@
 			}
 			}
 		}
 		}
 	}
 	}
-</style>
+</style>