File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 67
67
},
68
68
},
69
69
methods: {
70
- performLogin () {
71
- let payload = { login: this .$data .login , password: this .$data .password },
70
+ performLogin () {
71
+ let payload = {login: this .$data .login , password: this .$data .password },
72
72
redirect = this .$route .query .redirect ;
73
-
74
73
this .$store .dispatch (' security/login' , payload)
75
74
.then (() => {
76
- if (typeof redirect !== ' undefined' ) {
77
- this .$router .push ({path: redirect});
78
- } else {
79
- this .$router .push ({path: ' /home' });
75
+ if (! this .$store .getters [' security/hasError' ]) {
76
+ if (typeof redirect !== ' undefined' ) {
77
+ this .$router .push ({path: redirect});
78
+ } else {
79
+ this .$router .push ({path: ' /home' });
80
+ }
80
81
}
81
- });
82
+ }).catch (() => {
83
+ console .log (" error" );
84
+ });
82
85
},
83
86
},
84
87
}
85
- </script >
88
+ </script >
You can’t perform that action at this time.
0 commit comments