Explorar o código

【修复】login问题

程志平 %!s(int64=5) %!d(string=hai) anos
pai
achega
9eb219fc96
Modificáronse 1 ficheiros con 6 adicións e 2 borrados
  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') {