feat: 优化
This commit is contained in:
@@ -65,14 +65,7 @@ export default function createClientAxios(options = {}) {
|
||||
if (!currentToken) {
|
||||
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)
|
||||
|
||||
if (!isTokenExpired) {
|
||||
|
||||
Reference in New Issue
Block a user