feat: 完善相册 AI 修图模板选择流程

This commit is contained in:
2026-08-11 15:22:08 +08:00
parent 43c75c8e36
commit e64dcec094
11 changed files with 261 additions and 202 deletions
@@ -29,6 +29,9 @@ protocol TravelAlbumServing {
isPurchased: Int?
) async throws -> TravelAlbumListResponse<TravelAlbumMaterial>
/// 拉取单个相册素材及其最新关联图片信息。
func materialInfo(userEquityTravelId: Int, materialId: Int) async throws -> TravelAlbumMaterial
/// 上传并登记旅拍相册素材。
func uploadMaterial(_ request: TravelAlbumUploadMaterialRequest) async throws -> TravelAlbumMaterial
@@ -122,6 +125,20 @@ final class TravelAlbumAPI: TravelAlbumServing {
)
}
/// 拉取单个相册素材及其最新关联图片信息。
func materialInfo(userEquityTravelId: Int, materialId: Int) async throws -> TravelAlbumMaterial {
try await client.send(
APIRequest(
method: .get,
path: "\(basePath)/material-info",
queryItems: [
URLQueryItem(name: "user_equity_travel_id", value: String(userEquityTravelId)),
URLQueryItem(name: "material_id", value: String(materialId)),
]
)
)
}
/// 上传并登记旅拍相册素材。
func uploadMaterial(_ request: TravelAlbumUploadMaterialRequest) async throws -> TravelAlbumMaterial {
try await client.send(APIRequest(method: .post, path: "\(basePath)/upload-material", body: request))