We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent1598599 commit39d5738Copy full SHA for 39d5738
app/assets/vue/views/Login.vue
@@ -67,19 +67,22 @@
67
},
68
69
methods: {
70
-performLogin() {
71
-let payload= {login:this.$data.login, password:this.$data.password},
+performLogin() {
+let payload= {login:this.$data.login, password:this.$data.password},
72
redirect=this.$route.query.redirect;
73
-
74
this.$store.dispatch('security/login', payload)
75
.then(()=> {
76
-if (typeof redirect!=='undefined') {
77
-this.$router.push({path: redirect});
78
- }else {
79
-this.$router.push({path:'/home'});
+if (!this.$store.getters['security/hasError']) {
+if (typeof redirect!=='undefined') {
+this.$router.push({path: redirect});
+ }else {
+this.$router.push({path:'/home'});
80
+ }
81
}
- });
82
+ }).catch(()=> {
83
+console.log("error");
84
+ });
85
86
87
-</script>
88
+</script>