Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit39d5738

Browse files
authored
Skip redirect on auth error
1 parent1598599 commit39d5738

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

‎app/assets/vue/views/Login.vue‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -67,19 +67,22 @@
6767
},
6868
},
6969
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},
7272
redirect=this.$route.query.redirect;
73-
7473
this.$store.dispatch('security/login', payload)
7574
.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+
}
8081
}
81-
});
82+
}).catch(()=> {
83+
console.log("error");
84+
});
8285
},
8386
},
8487
}
85-
</script>
88+
</script>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp