Add TravelAlbum, ProfileSpace, and wired camera transfer modules.
Introduce travel album entry with Sony PTP tethering pipeline, profile space settings page, home routing updates, Launch Screen storyboard, and related tests/docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -8,6 +8,22 @@
|
||||
import Foundation
|
||||
import Combine
|
||||
|
||||
@MainActor
|
||||
/// 个人空间配置 API 协议,便于页面 ViewModel 使用测试替身。
|
||||
protocol ProfileSpaceServing {
|
||||
/// 拉取当前景区下的个人空间配置。
|
||||
func profileSpaceInfo(scenicId: Int) async throws -> ProfileSpaceInfoResponse
|
||||
|
||||
/// 更新当前景区下的个人空间配置。
|
||||
func updateProfileSpaceInfo(_ request: UpdateProfileSpaceRequest) async throws
|
||||
|
||||
/// 更新用户昵称、密码或头像地址。
|
||||
func updateUserInfo(nickname: String?, password: String?, avatar: String?) async throws
|
||||
|
||||
/// 单独更新用户头像 URL。
|
||||
func updateUserAvatarURL(_ fileURL: String) async throws
|
||||
}
|
||||
|
||||
@MainActor
|
||||
/// 个人信息 API,封装“我的”页面需要的用户资料和资料更新接口。
|
||||
final class ProfileAPI {
|
||||
@ -71,6 +87,28 @@ final class ProfileAPI {
|
||||
)
|
||||
}
|
||||
|
||||
/// 拉取当前景区下的个人空间配置。
|
||||
func profileSpaceInfo(scenicId: Int) async throws -> ProfileSpaceInfoResponse {
|
||||
try await client.send(
|
||||
APIRequest(
|
||||
method: .get,
|
||||
path: "/api/yf-handset-app/photog/profile/info",
|
||||
queryItems: [URLQueryItem(name: "scenic_id", value: "\(scenicId)")]
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/// 更新当前景区下的个人空间配置。
|
||||
func updateProfileSpaceInfo(_ request: UpdateProfileSpaceRequest) async throws {
|
||||
let _: EmptyPayload = try await client.send(
|
||||
APIRequest(
|
||||
method: .post,
|
||||
path: "/api/yf-handset-app/photog/profile/info-update",
|
||||
body: request
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
/// 发送实名认证短信验证码。
|
||||
func realNameSmsVerifyCode() async throws {
|
||||
let _: EmptyPayload = try await client.send(
|
||||
@ -95,3 +133,4 @@ final class ProfileAPI {
|
||||
}
|
||||
|
||||
extension ProfileAPI: UserProfileServing {}
|
||||
extension ProfileAPI: ProfileSpaceServing {}
|
||||
|
||||
@ -4,6 +4,8 @@
|
||||
|
||||
Profile 模块负责“我的/个人信息”页面及其二级页面,包括用户资料展示、昵称编辑、账号切换、密码修改、实名认证、系统设置、协议页和退出登录。
|
||||
|
||||
首页“空间设置”入口对应的是摄影师当前景区下的个人空间配置,已拆到 `ProfileSpace` 模块;`Profile` 模块只保留账号级个人资料能力。
|
||||
|
||||
该模块聚焦个人资料业务:
|
||||
- 拉取用户基础资料。
|
||||
- 拉取实名认证信息。
|
||||
@ -35,6 +37,8 @@ DEBUG 构建下,“我的”列表会额外展示“首页调试”入口,
|
||||
- `UpdateInfoRequest`:昵称、密码或头像更新请求体。
|
||||
- `RealNameAuthRequest`:实名认证提交请求体。
|
||||
|
||||
`basic_info` 首页权限入口继续进入 `ProfileView`;`space_settings` 进入 `ProfileSpaceView`,两者不共用页面状态。
|
||||
|
||||
## 加载流程
|
||||
|
||||
1. `ProfileView.task` 进入页面时调用 `reloadProfile()`。
|
||||
|
||||
Reference in New Issue
Block a user