
- 修改Package.swift以支持iOS 15和macOS 12。 - 更新swift-tca-architecture-guidelines.mdc中的alwaysApply设置为false。 - 注释掉AppDelegate中的NIMSDK导入,移除不再使用的NIMConfigurationManager和NIMSessionManager文件。 - 添加新的API相关文件,包括EMailLoginFeature、IDLoginFeature和相关视图,增强登录功能。 - 更新APIConstants和APIEndpoints以反映新的API路径。 - 添加本地化支持文件,包含英文和中文简体的本地化字符串。 - 新增字体管理和安全工具类,支持AES和DES加密。 - 更新Xcode项目配置,调整版本号和启动画面设置。
44 lines
1.2 KiB
Swift
44 lines
1.2 KiB
Swift
import Foundation
|
||
|
||
/// API 常量定义
|
||
///
|
||
/// 集中管理 API 相关的常量值,包括:
|
||
/// - 通用请求头
|
||
/// - API 端点路径
|
||
/// - 通用参数
|
||
///
|
||
/// 注意:baseURL已统一到AppConfig中管理
|
||
/// 建议后续重构时统一到 APIConfiguration 中
|
||
enum APIConstants {
|
||
|
||
// MARK: - Common Headers
|
||
/// 通用请求头配置
|
||
/// 包含基础的 Content-Type、Accept 和平台信息
|
||
static let defaultHeaders: [String: String] = [
|
||
"Content-Type": "application/json",
|
||
"Accept": "application/json",
|
||
"platform": "ios",
|
||
"version": "1.0.0"
|
||
]
|
||
|
||
// MARK: - Endpoints
|
||
/// API 端点路径定义
|
||
///
|
||
/// 注意:建议使用 APIEndpoints.swift 中的枚举定义,
|
||
/// 此处保留是为了兼容性
|
||
enum Endpoints {
|
||
/// 客户端初始化接口
|
||
static let clientInit = "/client/init"
|
||
/// 用户登录接口
|
||
static let login = "/oauth/token"
|
||
}
|
||
|
||
// MARK: - Common Parameters
|
||
/// 通用请求参数
|
||
/// 当前为空,实际参数通过 BaseRequest 自动添加
|
||
static let commonParameters: [String: String] = [:
|
||
// "platform": "ios",
|
||
// "version": "1.0.0"
|
||
]
|
||
}
|