refactor(auth): 重命名环境变量VITE_TOKEN_STRATEGY为VITE_AUTH_MODE

使变量命名更准确反映其用途,统一认证模式相关命名
This commit is contained in:
feige996
2025-08-22 15:27:25 +08:00
parent 3143635764
commit 57924d47cc
3 changed files with 5 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ let refreshing = false // 防止重复刷新 token 标识
let taskQueue: (() => void)[] = [] // 刷新 token 请求队列
// token 刷新策略: single-不刷新double-无感刷新(需后端配合)
const sessionMode = import.meta.env.VITE_TOKEN_STRATEGY === 'double' ? 'double' : 'single'
const sessionMode = import.meta.env.VITE_AUTH_MODE === 'double' ? 'double' : 'single'
export function http<T>(options: CustomRequestOptions) {
// 1. 返回 Promise 对象