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