|
@ -55,6 +55,18 @@ export default class Login extends Vue { |
|
|
private username = ''; |
|
|
private username = ''; |
|
|
private password = ''; |
|
|
private password = ''; |
|
|
|
|
|
|
|
|
|
|
|
mounted() { |
|
|
|
|
|
this.getCurrentUser(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private getCurrentUser() { |
|
|
|
|
|
this.$store.dispatch('getCurrentUser') |
|
|
|
|
|
.then(() => this.$router.push('/dashboard')) |
|
|
|
|
|
.catch((err: any) => { |
|
|
|
|
|
this.$router.push('/') |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private login() { |
|
|
private login() { |
|
|
let user = {username: this.username, password: this.password} |
|
|
let user = {username: this.username, password: this.password} |
|
|
|
|
|
|
|
|