Pan 7 vuotta sitten
vanhempi
commit
4ac038019a
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/store/modules/user.js

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

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