This commit is contained in:
2026-11-08 15:26:55 +08:00
parent 6ffa548b25
commit cbb261de9d
+4 -4
View File
@@ -14,13 +14,13 @@ import 'api_error.dart';
const kDefaultBaseUrl = String.fromEnvironment(
'API_BASE_URL',
defaultValue: 'https://ceryuan.top', // 正式端(HTTPS 域名)
defaultValue: 'http://42.194.179.190:3003', // 正式端
);
/// 候选地址按序尝试;连接失败或证书异常时切换到下一个
const kBaseUrlCandidates = <String>[
'https://ceryuan.top',
'http://42.194.179.190:3003', // 旧直连兜底(WiFi 下可用)
'http://42.194.179.190:3003', // 正式端直连
'https://ceryuan.top', // 域名备用通道(证书/端口被封时)
];
/// 当前生效的服务器地址(切换成功后会更新)
@@ -84,7 +84,7 @@ class ApiClient {
);
}
static const _kBasePref = 'xl_api_base_v2'; // v2:旧 IP 端口记忆不迁移
static const _kBasePref = 'xl_api_base_v3'; // v3:旧地址记忆不迁移
final TokenStore _tokens;
late final Dio _dio;