xiongzhu 4 years ago
parent
commit
ab00ab240b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/store/index.js

+ 1 - 1
src/store/index.js

@@ -59,7 +59,7 @@ export default createStore({
             return http.http
                 .get('/user/my')
                 .then(res => {
-                    http.axios.defaults.headers.common['user-id'] = res.id;
+                    http.axios.defaults.headers.common['X-Username'] = res.id;
                     context.commit('setUserInfo', res);
                     return Promise.resolve();
                 })