src/views/login.vue
@@ -149,6 +149,7 @@ watch: { $route: { handler: function(route) { console.log(route); this.redirect = route.query && route.query.redirect; }, immediate: true @@ -198,6 +199,8 @@ this.loginInfo = loginInfo.user //如果返回为1正常跳转 if(this.loginInfo.firstLogin == 1){ this.$router.push({ path: "/" }).catch(()=>{}); return; this.$router.push({ path: this.redirect || "/" }).catch(()=>{}); } else { localStorage.setItem('firstLogin',0)