From d22620a7cefffc0253684e167eee8438fca70135 Mon Sep 17 00:00:00 2001 From: xingyu4j Date: Thu, 10 Nov 2022 14:36:45 +0800 Subject: [PATCH] fix: axios error --- yudao-ui-admin-vue3/src/config/axios/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yudao-ui-admin-vue3/src/config/axios/service.ts b/yudao-ui-admin-vue3/src/config/axios/service.ts index 2eff086f4..7ef424c98 100644 --- a/yudao-ui-admin-vue3/src/config/axios/service.ts +++ b/yudao-ui-admin-vue3/src/config/axios/service.ts @@ -48,7 +48,7 @@ service.interceptors.request.use( // 设置租户 if (tenantEnable && tenantEnable === 'true') { const tenantId = getTenantId() - if (tenantId) service.defaults.headers.common['tenant-id'] = tenantId + if (tenantId) (config as Recordable).headers.common['tenant-id'] = tenantId } const params = config.params || {} const data = config.data || false