feat: 更新动态功能,新增我的动态视图及相关状态管理
- 在HomeFeature中添加MeDynamicFeature以管理用户动态状态。 - 在MainFeature中集成MeDynamicFeature,支持动态内容的加载与展示。 - 新增MeDynamicView以展示用户的动态列表,支持下拉刷新和上拉加载更多功能。 - 更新MeView以集成用户动态视图,提升用户体验。 - 在APIEndpoints中新增getMyDynamic端点以支持获取用户动态信息。 - 更新DynamicsModels以适应新的动态数据结构,确保数据解析的准确性。 - 在OptimizedDynamicCardView中优化图片处理逻辑,提升动态展示效果。 - 更新相关视图组件以支持动态内容的展示与交互,增强用户体验。
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import SwiftUI
|
||||
import ComposableArchitecture
|
||||
//import Components // 如果 BottomTabView 在 Components 命名空间,否则移除
|
||||
|
||||
struct MainView: View {
|
||||
let store: StoreOf<MainFeature>
|
||||
@@ -27,9 +26,17 @@ struct MainView: View {
|
||||
))
|
||||
.transition(.opacity)
|
||||
case .other:
|
||||
|
||||
MeView(onLogout: {}) // 这里可根据需要传递实际登出回调
|
||||
if let accountModel = viewStore.accountModel {
|
||||
MeView(
|
||||
meDynamicStore: store.scope(
|
||||
state: \.meDynamic,
|
||||
action: \.meDynamic
|
||||
),
|
||||
accountModel: accountModel,
|
||||
onLogout: {}
|
||||
)
|
||||
.transition(.opacity)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, maxHeight: .infinity)
|
||||
@@ -45,6 +52,9 @@ struct MainView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
viewStore.send(.onAppear)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user