xiongzhu %!s(int64=4) %!d(string=hai) anos
pai
achega
f33d9ff2d1
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      src/store/index.js

+ 1 - 0
src/store/index.js

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