feat: login with url query (#1108)

This commit is contained in:
danzou1ge6 2023-10-01 17:20:23 +08:00 committed by GitHub
parent 7ca220dfa6
commit 459b7e08f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -61,7 +61,13 @@ export default {
mdiAccount
}
},
mounted() {
async mounted() {
if (this.$route.query.username !== undefined && this.$route.query.password !== undefined) {
this.authenticated = await this.$store.dispatch('LOGIN',{
username: this.$route.query.username,
password: this.$route.query.password
})
}
if (this.authenticated) {
this.redirectOnSuccess()
}