feat: 添加腾讯云COS Token管理功能及相关视图更新

- 在APIEndpoints.swift中新增tcToken端点以支持腾讯云COS Token获取。
- 在APIModels.swift中新增TcTokenRequest和TcTokenResponse模型,处理Token请求和响应。
- 在COSManager.swift中实现Token的获取、缓存和过期管理逻辑,提升API请求的安全性。
- 在LanguageSettingsView中添加调试功能,允许测试COS Token获取。
- 在多个视图中更新状态管理和导航逻辑,确保用户体验一致性。
- 在FeedFeature和HomeFeature中优化状态管理,简化视图逻辑。
This commit is contained in:
edwinQQQ
2025-07-18 20:50:25 +08:00
parent fb7ae9e0ad
commit 9a49d591c3
17 changed files with 1090 additions and 767 deletions

View File

@@ -133,7 +133,8 @@ struct LoginView: View {
),
onBack: {
showIDLogin = false
}
},
showIDLogin: $showIDLogin // Binding
)
.navigationBarHidden(true)
}
@@ -147,7 +148,8 @@ struct LoginView: View {
),
onBack: {
showEmailLogin = false
}
},
showEmailLogin: $showEmailLogin // Binding
)
.navigationBarHidden(true)
}
@@ -169,10 +171,20 @@ struct LoginView: View {
)
//
.onChange(of: viewStore.state) { completed in
WithPerceptionTracking {
if completed {
onLoginSuccess()
}
if completed {
onLoginSuccess()
}
}
// showIDLogin
.onChange(of: showIDLogin) { newValue in
if newValue == false && viewStore.state {
onLoginSuccess()
}
}
// showEmailLogin
.onChange(of: showEmailLogin) { newValue in
if newValue == false && viewStore.state {
onLoginSuccess()
}
}
}