'update'
This commit is contained in:
parent
602f7c3ecf
commit
fb1c35eaa8
@ -134,12 +134,16 @@ export default {
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function(route) {
|
||||
// const query = route.query
|
||||
console.log(route)
|
||||
// if (query) {
|
||||
// this.redirect = query.redirect
|
||||
// this.otherQuery = this.getOtherQuery(query)
|
||||
// }
|
||||
const { username, password } = route.query
|
||||
if (username && password) {
|
||||
this.loginForm = {
|
||||
username,
|
||||
password
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.handleLogin()
|
||||
})
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
@ -176,7 +180,6 @@ export default {
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
console.log(1)
|
||||
this.loading = true
|
||||
this.$store.dispatch('user/login', this.loginForm)
|
||||
.then(() => {
|
||||
|
Loading…
Reference in New Issue
Block a user