Browse Source

增加登录中

tanxue 2 tháng trước cách đây
mục cha
commit
4a9bbb0a41

+ 7 - 0
pages/Login/components/adminloginBox.vue

@@ -105,6 +105,11 @@
 		// 去除 userName 两端的空格
 		const trimmedUserName = userName.value;
 		const trimmedPassword = lliPassword.value;
+		
+		uni.showLoading({
+			title: '登录中'
+		})
+		
 		httpApi.login({
 			userName: trimmedUserName,
 			password: lliPassword.value,
@@ -120,6 +125,8 @@
 			}
 		}).catch(err => {
 			store.setIsCanBack(true)
+		}).finally(err => {
+			uni.hideLoading()
 		})
 	}
 	

+ 7 - 0
pages/Login/components/clientloginBox.vue

@@ -105,6 +105,11 @@
 		// 去除 userName 两端的空格
 		const trimmedUserName = userName.value;
 		const trimmedPassword = lliPassword.value;
+		
+		uni.showLoading({
+			title: '登录中'
+		})
+		
 		httpApi.login({
 			userName: trimmedUserName,
 			password: lliPassword.value,
@@ -122,6 +127,8 @@
 			
 		}).catch(err => {
 			store.setIsCanBack(true)
+		}).finally(err => {
+			uni.hideLoading()
 		})
 	}