同步 Android 启动页到 iOS,并在冷启动期间静默恢复登录态。
新增 SplashView、SplashCoordinator 与 Launch Screen 资源,移除冷启动 Lottie;LoginView 加载 App 配置。同时将 token 存储迁移至 UserDefaults,并更新相关测试与文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
26
suixinkan/Features/Auth/API/AppConfigAPI.swift
Normal file
26
suixinkan/Features/Auth/API/AppConfigAPI.swift
Normal file
@ -0,0 +1,26 @@
|
||||
//
|
||||
// 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")
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user