Created
December 4, 2017 10:53
-
-
Save vouill/dcfbfb3dea309340953168ce1fd0a8d5 to your computer and use it in GitHub Desktop.
login method vue
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
methods: { | |
login: function () { | |
const { username, password } = this | |
this.$store.dispatch(AUTH_REQUEST, { username, password }).then(() => { | |
this.$router.push('/') | |
}) | |
} | |
} | |
... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment