Pan 7 years ago
parent
commit
4ac038019a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/store/modules/user.js

+ 1 - 1
src/store/modules/user.js

@@ -44,7 +44,7 @@ const user = {
     GetInfo({ commit, state }) {
       return new Promise((resolve, reject) => {
         getInfo(state.token).then(response => {
-          const data = response
+          const data = response.data
           if (data.roles && data.roles.length > 0) { // 验证返回的roles是否是一个非空数组
             commit('SET_ROLES', data.roles)
           } else {