Browse Source

【修复】login问题

程志平 4 years ago
parent
commit
9eb219fc96
1 changed files with 6 additions and 2 deletions
  1. 6 2
      src/components/login/Login.vue

+ 6 - 2
src/components/login/Login.vue

@@ -102,8 +102,12 @@
 						.then(res => {
 							// console.log(res.data);
 							if (typeof(res.data.msg) != 'undefined' && res.data.msg != '' && JSON.stringify(res
-									.data) !=
-								'{}') {
+									.data) != '{}') {
+								console.log(typeof(res.data.msg));
+								if (res.data.msg == '用户名或密码不正确') {
+									_this.$message.error(res.data.msg);
+									return
+								}
 								_this.$message.success(res.data.msg);
 								sessionStorage.setItem('uname', username)
 								if (typeof(res.data.name) == 'undefined') {