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