选择图片分享功能

This commit is contained in:
2025-08-17 22:08:25 +08:00
parent e6afca5ba6
commit d80289fe73
19 changed files with 1402 additions and 110 deletions

View File

@@ -0,0 +1,15 @@
struct Album: Codable {
let album_id: String
let name: String
let authors: [String]
let actors: [String]
let tags: [String]
let image_urls: [String]
let nums: [Int]
enum CodingKeys: String, CodingKey {
case album_id, name, authors, actors, tags
case image_urls = "image_urls"
case nums
}
}

View File

@@ -0,0 +1,8 @@
//
struct AlbumItem: Codable, Identifiable {
let album_id: String
let title: String
var id: String { album_id }
}

View File

@@ -0,0 +1,27 @@
import Foundation
// API
final class Config {
//
static let shared = Config()
// HOST
private let host = "http://jm.rbq.college"
//
private init() {}
// API
func apiURL(path: String) -> String {
// path
let formattedPath = path.starts(with: "/") ? path : "/\(path)"
return "\(host)\(formattedPath)"
}
// API
struct Path {
static let search = "search/" //
static let albumDetail = "album/" //
static let rankings = "rankings/" //
}
}