diff --git a/src/pages/Login.vue b/src/pages/Login.vue index bc34f9d..3c7f057 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -29,7 +29,7 @@ -

@@ -60,12 +60,16 @@ email: '', password: '', badLogin: false, + pending: false, sendTo: {}, }; }, methods: { doLogin() { + if (this.pending) return; + const { email, password } = this; + this.pending = true; store.dispatch('userLogin', { email, password }) .then(() => { @@ -73,6 +77,7 @@ this.$router.push(this.sendTo); }) .catch(() => { + this.pending = false; this.badLogin = true }); }