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 {}
|
||||
|
||||
Reference in New Issue
Block a user