feat: 更新.gitignore,删除需求文档,优化API调试信息
- 在.gitignore中添加忽略项以排除不必要的文件。 - 删除架构分析需求文档以简化项目文档。 - 在APIEndpoints.swift和LoginModels.swift中移除调试信息的异步调用,提升代码简洁性。 - 在EMailLoginFeature.swift和HomeFeature.swift中新增登录流程状态管理,优化用户体验。 - 在多个视图中调整状态管理和导航逻辑,确保一致性和可维护性。 - 更新Xcode项目配置以增强调试信息的输出格式。
This commit is contained in:
@@ -2,6 +2,8 @@ import SwiftUI
|
||||
|
||||
struct MeView: View {
|
||||
@State private var showLogoutConfirmation = false
|
||||
let onLogout: () -> Void // 新增:登出回调
|
||||
|
||||
var body: some View {
|
||||
GeometryReader { geometry in
|
||||
ScrollView {
|
||||
@@ -90,8 +92,8 @@ struct MeView: View {
|
||||
debugInfoSync("🔓 开始执行退出登录...")
|
||||
// 清除所有认证数据(包括 keychain 中的内容)
|
||||
await UserInfoManager.clearAllAuthenticationData()
|
||||
// 发送通知重置 window root 为 login view
|
||||
NotificationCenter.default.post(name: .homeLogout, object: nil)
|
||||
// 调用登出回调,通知父级切换视图
|
||||
onLogout()
|
||||
debugInfoSync("✅ 退出登录完成")
|
||||
}
|
||||
}
|
||||
@@ -131,5 +133,5 @@ struct MenuItemView: View {
|
||||
}
|
||||
|
||||
#Preview {
|
||||
MeView()
|
||||
}
|
||||
MeView(onLogout: {})
|
||||
}
|
||||
|
Reference in New Issue
Block a user