feat: 优化

This commit is contained in:
2026-01-18 15:37:31 +08:00
parent 5ef12f7d51
commit db93ede110

View File

@@ -65,14 +65,7 @@ export default function createClientAxios(options = {}) {
if (!currentToken) { if (!currentToken) {
return config return config
} }
const tenantId =
(typeof import.meta !== 'undefined' && import.meta.env?.VITE_TENANT_ID) ||
(typeof process !== 'undefined' && process.env?.VITE_TENANT_ID) ||
'1'
if (tenantId) {
config.headers['tenant-id'] = tenantId
}
const isTokenExpired = tokenManager.isExpired(30 * 1000) const isTokenExpired = tokenManager.isExpired(30 * 1000)
if (!isTokenExpired) { if (!isTokenExpired) {