新增 SplashView、SplashCoordinator 与 Launch Screen 资源,移除冷启动 Lottie;LoginView 加载 App 配置。同时将 token 存储迁移至 UserDefaults,并更新相关测试与文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
612 B
Swift
27 lines
612 B
Swift
//
|
||
// AppConfigAPI.swift
|
||
// suixinkan
|
||
//
|
||
// Created by Codex on 2026/6/29.
|
||
//
|
||
|
||
import Foundation
|
||
|
||
@MainActor
|
||
/// App 远程配置 API,封装 `/api/app/config` 接口。
|
||
final class AppConfigAPI {
|
||
private let client: APIClient
|
||
|
||
/// 初始化 App 配置 API,并注入共享网络客户端。
|
||
init(client: APIClient) {
|
||
self.client = client
|
||
}
|
||
|
||
/// 获取 App 远程配置,例如是否开放注册入口。
|
||
func fetchAppConfig() async throws -> AppConfigResponse {
|
||
try await client.send(
|
||
APIRequest(method: .get, path: "/api/app/config")
|
||
)
|
||
}
|
||
}
|