update:预览优化
This commit is contained in:
@@ -14,12 +14,17 @@ const service = axios.create({
|
||||
});
|
||||
|
||||
const company = 'carsafe';
|
||||
const userId = $wujie?.props?.USER_ID || localStorage.getItem('USER_ID') || '';
|
||||
const token = $wujie?.props?.TOKEN || localStorage.getItem('TOKEN') || '';
|
||||
const tenantId = $wujie?.props?.TENANT_ID || localStorage.getItem('TENANT_ID') || '';
|
||||
let userId = $wujie?.props?.USER_ID || localStorage.getItem('USER_ID') || '';
|
||||
let token = $wujie?.props?.TOKEN || localStorage.getItem('TOKEN') || '';
|
||||
let tenantId = $wujie?.props?.TENANT_ID || localStorage.getItem('TENANT_ID') || '';
|
||||
|
||||
service.interceptors.request.use(
|
||||
(config) => {
|
||||
if (config.params?.token) {
|
||||
userId = config.params.userId;
|
||||
token = config.params.token;
|
||||
tenantId = config.params.tenantId;
|
||||
}
|
||||
config.headers['company'] = company;
|
||||
config.headers['jobNumber'] = userId;
|
||||
config.headers['token'] = token;
|
||||
|
||||
Reference in New Issue
Block a user