xiongzhu пре 7 година
родитељ
комит
7174b9ec24
1 измењених фајлова са 1 додато и 1 уклоњено
  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;