Files
mediaplayer/ios/OralTrainer/Config.swift

28 lines
1.2 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Foundation
enum AppConfig {
/// 服务端地址:改成你实际部署的域名或 IP。
/// 内网/开发环境可填 http://<服务器IP>:<端口>(例如 http://192.168.1.100:80)。
static let serverBaseURL = "https://videoservice.d1kt.cn"
/// 朗读评测密钥:填服务器 sentence_api/.env 里的 CLIENT_API_KEY。
static let assessmentAPIKey = "fcf60fa10bc1c49e5ddb93d570bc54df5648e187b64096962498d57661c14220"
/// 与安卓端一致:HTTPS 请求因 TLS 问题失败时自动降级重试 HTTP(仅限内网/私有部署)。
static let allowHTTPFallback = true
static let userAgent = "OralTrainerKit/0.1.0 (iOS)"
static let connectTimeout: TimeInterval = 15
static let readTimeout: TimeInterval = 30
static let assessmentTimeout: TimeInterval = 180
static let translationTimeout: TimeInterval = 180
static let sha256Pattern = #"^[0-9a-fA-F]{64}$"#
/// 当前登录用户的认证 token,由 AuthManager 在登录/注销时设置。
static var authToken: String = ""
/// 当前登录用户 ID,用于隔离本机缓存的历史录音和评分。
static var currentUserId: String = ""
}