同步 Android 启动页到 iOS,并在冷启动期间静默恢复登录态。
新增 SplashView、SplashCoordinator 与 Launch Screen 资源,移除冷启动 Lottie;LoginView 加载 App 配置。同时将 token 存储迁移至 UserDefaults,并更新相关测试与文档。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
47
suixinkan/Features/Splash/Views/SplashView.swift
Normal file
47
suixinkan/Features/Splash/Views/SplashView.swift
Normal file
@ -0,0 +1,47 @@
|
||||
//
|
||||
// SplashView.swift
|
||||
// suixinkan
|
||||
//
|
||||
// Created by Codex on 2026/6/29.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
/// 启动页视图,对齐 Android `activity_splash.xml` 的品牌展示布局。
|
||||
struct SplashView: View {
|
||||
var body: some View {
|
||||
ZStack {
|
||||
Color.white
|
||||
.ignoresSafeArea()
|
||||
|
||||
VStack(spacing: 0) {
|
||||
Spacer()
|
||||
|
||||
Image("SplashLogo")
|
||||
.resizable()
|
||||
.scaledToFit()
|
||||
.frame(width: 180, height: 180)
|
||||
.accessibilityIdentifier("splash.logo")
|
||||
|
||||
Text("随心瞰")
|
||||
.font(.system(size: 40, weight: .bold))
|
||||
.italic()
|
||||
.foregroundStyle(AppDesign.primary)
|
||||
.accessibilityIdentifier("splash.title")
|
||||
|
||||
Spacer()
|
||||
|
||||
Text("商家版")
|
||||
.font(.system(size: 20, weight: .bold))
|
||||
.foregroundStyle(AppDesign.primary)
|
||||
.padding(.bottom, 32)
|
||||
.accessibilityIdentifier("splash.subtitle")
|
||||
}
|
||||
}
|
||||
.accessibilityIdentifier("splash.root")
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
SplashView()
|
||||
}
|
||||
Reference in New Issue
Block a user