feat: 新增用户信息更新功能

- 在APIEndpoints中新增用户信息更新端点。
- 实现UpdateUserRequest和UpdateUserResponse结构体,支持用户信息更新请求和响应。
- 在APIService中添加updateUser方法,处理用户信息更新请求。
- 更新AppSettingFeature以支持头像和昵称的修改,整合用户信息更新逻辑。
- 在AppSettingView中实现头像选择和昵称编辑功能,提升用户体验。
This commit is contained in:
edwinQQQ
2025-07-24 16:38:27 +08:00
parent c072a7e73d
commit 343fd9e2df
7 changed files with 307 additions and 88 deletions

View File

@@ -2,11 +2,13 @@ import Foundation
import ComposableArchitecture
import CasePaths
struct MainFeature: Reducer {
@Reducer
struct MainFeature {
enum Tab: Int, Equatable, CaseIterable {
case feed, other
}
@ObservableState
struct State: Equatable {
var selectedTab: Tab = .feed
var feedList: FeedListFeature.State = .init()
@@ -42,10 +44,10 @@ struct MainFeature: Reducer {
}
var body: some ReducerOf<Self> {
Scope(state: \.feedList, action: \.feedList) {
Scope(state: \ .feedList, action: \ .feedList) {
FeedListFeature()
}
Scope(state: \.me, action: \.me) {
Scope(state: \ .me, action: \ .me) {
MeFeature()
}
Reduce { state, action in
@@ -104,7 +106,7 @@ struct MainFeature: Reducer {
}
}
//
.ifLet(\ .appSettingState, action: \.appSettingAction) {
.ifLet(\ .appSettingState, action: \ .appSettingAction) {
AppSettingFeature()
}
}