()
| 554 | * 获取 token 过期时间 |
| 555 | */ |
| 556 | export function getTokenExpiresAt(): number | null { |
| 557 | if (typeof window === 'undefined') return null; |
| 558 | const expiresAt = localStorage.getItem('token_expires_at'); |
| 559 | return expiresAt ? parseInt(expiresAt, 10) : null; |
| 560 | } |
| 561 | |
| 562 | /** |
| 563 | * 检查 token 是否即将过期(默认 5 分钟内) |
no outgoing calls
no test coverage detected