Browse Source

fix: header

ArvinQi 6 years ago
parent
commit
21e3589981
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/common.js

+ 1 - 1
plugins/common.js

@@ -7,7 +7,7 @@ Vue.mixin({
     let headers = req && req.headers
     let res = await $axios.$get('/api/user/getInfo', {headers});
     if(res) {
-      store.commit('updateUserinfo', { userinfo: res.data })
+      store.commit('updateUserinfo', { userinfo: res.data || {} })
     }
   },
   components: {