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