对齐旅拍相册详情页 Android UI,并修复网格预览与布局问题。
重构相册详情为信息卡片、Tab 筛选、排序、批量删除与底部上传栏;修复网格重叠、禁用按钮蒙层,并支持点击预览大图。同步扩展素材列表 API 与 ViewModel 分页逻辑,并优化有线传图缩略图与传输性能。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@ -18,7 +18,13 @@ protocol TravelAlbumServing {
|
||||
func albumInfo(id: Int) async throws -> TravelAlbumItem
|
||||
func editAlbum(_ request: TravelAlbumEditRequest) async throws
|
||||
func deleteAlbum(_ request: TravelAlbumDeleteRequest) async throws
|
||||
func materialList(userEquityTravelId: Int, page: Int, pageSize: Int) async throws -> ListPayload<TravelAlbumMaterial>
|
||||
func materialList(
|
||||
userEquityTravelId: Int,
|
||||
page: Int,
|
||||
pageSize: Int,
|
||||
orderBy: Int,
|
||||
isPurchased: Int?
|
||||
) async throws -> ListPayload<TravelAlbumMaterial>
|
||||
func uploadMaterial(_ request: TravelAlbumUploadMaterialRequest) async throws -> TravelAlbumMaterial
|
||||
func deleteMaterial(_ request: TravelAlbumDeleteMaterialRequest) async throws
|
||||
func mpCode(id: Int) async throws -> TravelAlbumMpCodeResponse
|
||||
@ -88,17 +94,27 @@ final class TravelAlbumAPI: TravelAlbumServing {
|
||||
}
|
||||
|
||||
/// 获取相册素材列表。
|
||||
func materialList(userEquityTravelId: Int, page: Int, pageSize: Int) async throws -> ListPayload<TravelAlbumMaterial> {
|
||||
try await client.send(
|
||||
func materialList(
|
||||
userEquityTravelId: Int,
|
||||
page: Int,
|
||||
pageSize: Int,
|
||||
orderBy: Int = 2,
|
||||
isPurchased: Int? = nil
|
||||
) async throws -> ListPayload<TravelAlbumMaterial> {
|
||||
var queryItems = [
|
||||
URLQueryItem(name: "user_equity_travel_id", value: "\(userEquityTravelId)"),
|
||||
URLQueryItem(name: "page", value: "\(max(page, 1))"),
|
||||
URLQueryItem(name: "page_size", value: "\(max(pageSize, 1))"),
|
||||
URLQueryItem(name: "order_by", value: "\(max(orderBy, 1))")
|
||||
]
|
||||
if let isPurchased {
|
||||
queryItems.append(URLQueryItem(name: "is_purchased", value: "\(isPurchased)"))
|
||||
}
|
||||
return try await client.send(
|
||||
APIRequest(
|
||||
method: .get,
|
||||
path: "\(travelAlbumBase)/material-list",
|
||||
queryItems: [
|
||||
URLQueryItem(name: "user_equity_travel_id", value: "\(userEquityTravelId)"),
|
||||
URLQueryItem(name: "page", value: "\(max(page, 1))"),
|
||||
URLQueryItem(name: "page_size", value: "\(max(pageSize, 1))"),
|
||||
URLQueryItem(name: "order_by", value: "2")
|
||||
]
|
||||
queryItems: queryItems
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user