|
|
@ -66,7 +66,16 @@ export default {
|
|
|
|
password: [{ required: true, trigger: 'blur', validator: validatePass }]
|
|
|
|
password: [{ required: true, trigger: 'blur', validator: validatePass }]
|
|
|
|
},
|
|
|
|
},
|
|
|
|
loading: false,
|
|
|
|
loading: false,
|
|
|
|
pwdType: 'password'
|
|
|
|
pwdType: 'password',
|
|
|
|
|
|
|
|
redirect: undefined
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
watch: {
|
|
|
|
|
|
|
|
$route: {
|
|
|
|
|
|
|
|
handler: function(route) {
|
|
|
|
|
|
|
|
this.redirect = route.query && route.query.redirect
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
immediate: true
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
@ -83,7 +92,7 @@ export default {
|
|
|
|
this.loading = true
|
|
|
|
this.loading = true
|
|
|
|
this.$store.dispatch('Login', this.loginForm).then(() => {
|
|
|
|
this.$store.dispatch('Login', this.loginForm).then(() => {
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|
this.$router.push({ path: '/' })
|
|
|
|
this.$router.push({ path: this.redirect || '/' })
|
|
|
|
}).catch(() => {
|
|
|
|
}).catch(() => {
|
|
|
|
this.loading = false
|
|
|
|
this.loading = false
|
|
|
|
})
|
|
|
|
})
|
|
|
|