update:预览优化

This commit is contained in:
2026-01-05 18:33:55 +08:00
parent 6fa431541d
commit e95786b42d
8 changed files with 92 additions and 67 deletions

View File

@@ -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;