Browse Source

优化登录

xiongzhu 7 years ago
parent
commit
7174b9ec24
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/main/vue/src/router/index.js

+ 1 - 1
src/main/vue/src/router/index.js

@@ -286,7 +286,7 @@ router.beforeEach((to, from, next) => {
     if (!store.state.userInfo && to.path !== '/login') {
     if (!store.state.userInfo && to.path !== '/login') {
         axios.get('/userInfo/getUserInfo').then(res => {
         axios.get('/userInfo/getUserInfo').then(res => {
             if (res.status === 200) {
             if (res.status === 200) {
-                if (res.data.success) {
+                if (res.data.success && res.data.data) {
                     store.commit('updateUserInfo', res.data.data);
                     store.commit('updateUserInfo', res.data.data);
                     next();
                     next();
                     return;
                     return;