|
|
@@ -112,7 +112,19 @@ export default {
|
|
|
watch: {
|
|
|
$route: {
|
|
|
handler: function(route) {
|
|
|
- this.redirect = route.query && route.query.redirect
|
|
|
+ // this.redirect = route.query && route.query.redirect
|
|
|
+ // console.log(route.query)
|
|
|
+ if (route.query.username) {
|
|
|
+ this.$store.dispatch('user/login', {
|
|
|
+ username: route.query.username,
|
|
|
+ password: route.query.password
|
|
|
+ }).then(async(res) => {
|
|
|
+ this.loading = false
|
|
|
+ this.$router.push({ path: '/', query: this.otherQuery })
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
immediate: true
|
|
|
}
|