@@ -181,7 +181,7 @@ import { useRouter } from 'vue-router';
181181import type { ElForm } from ' element-plus' ;
182182import { loginApi , getCaptcha , mfaLoginApi , getLoginSetting } from ' @/api/modules/auth' ;
183183import { GlobalStore , MenuStore , TabsStore } from ' @/store' ;
184- import { MsgSuccess } from ' @/utils/message' ;
184+ import { MsgError , MsgSuccess } from ' @/utils/message' ;
185185import { useI18n } from ' vue-i18n' ;
186186import { encryptPassword } from ' @/utils/util' ;
187187import { getXpackSettingForTheme } from ' @/utils/xpack' ;
@@ -338,6 +338,7 @@ const login = (formEl: FormInstance | undefined) => {
338338 tabsStore .removeAllTabs ();
339339 globalStore .currentNode = ' local' ;
340340 MsgSuccess (i18n .t (' commons.msg.loginSuccess' ));
341+ console .log (' loiin syc' );
341342 router .push ({ name: ' home' });
342343 document .onkeydown = null ;
343344 } catch (res ) {
@@ -346,12 +347,15 @@ const login = (formEl: FormInstance | undefined) => {
346347 loginForm .captcha = ' ' ;
347348 errCaptcha .value = true ;
348349 errAuthInfo .value = false ;
350+ return ;
349351 }
350352 if (res .message === ' ErrAuth' ) {
351353 globalStore .ignoreCaptcha = false ;
352354 errCaptcha .value = false ;
353355 errAuthInfo .value = true ;
356+ return ;
354357 }
358+ MsgError (res .message );
355359 }
356360 loginVerify ();
357361 } finally {
0 commit comments