|
@@ -81,15 +81,10 @@ service.interceptors.request.use(
|
|
// please modify it according to the actual situation
|
|
// please modify it according to the actual situation
|
|
config.headers['Authorization'] = getToken()
|
|
config.headers['Authorization'] = getToken()
|
|
}
|
|
}
|
|
- // const tenantId = sessionStorage.getItem('tenantId') || null
|
|
|
|
- // const configData = {
|
|
|
|
- // ...config.data,
|
|
|
|
- // tenantId
|
|
|
|
- // }
|
|
|
|
- // const configParams = {
|
|
|
|
- // ...config.params,
|
|
|
|
- // tenantId
|
|
|
|
- // }
|
|
|
|
|
|
+ const tenantId = sessionStorage.getItem('tenantId') || null
|
|
|
|
+ if(tenantId) {
|
|
|
|
+ config.headers['tenantId'] = tenantId
|
|
|
|
+ }
|
|
if (config.requestType === 'form') {
|
|
if (config.requestType === 'form') {
|
|
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
config.headers['Content-Type'] = 'application/x-www-form-urlencoded'
|
|
config.data = qs.stringify(cleanDeep(config.data))
|
|
config.data = qs.stringify(cleanDeep(config.data))
|