Browse Source

头部信息增加用户id

main
QM303176530 4 years ago
parent
commit
95444a6eb5
  1. 4
      web/src/utils/request.js

4
web/src/utils/request.js

@ -32,10 +32,12 @@ service.interceptors.request.use(
config => {
showLoading()
const token = store.getters['user/token']
const user = store.getters['user/userInfo']
config.data = JSON.stringify(config.data);
config.headers = {
'Content-Type': 'application/json',
'x-token': token
'x-token': token,
'x-user-id':user.ID
}
return config;
},

Loading…
Cancel
Save