新增运营区域与飞手认证模块,并完善直播推流就绪流程

将运营区域与飞手认证从首页占位页迁移为完整模块,扩展 Live 播放与推流就绪流程,并新增飞手证书 OSS 上传。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-25 18:15:59 +08:00
parent fcb692b56a
commit a04168cf30
33 changed files with 3455 additions and 37 deletions

View File

@ -0,0 +1,52 @@
//
// OperatingAreaAPI.swift
// suixinkan
//
// Created by Codex on 2026/6/25.
//
import Foundation
import Observation
///
@MainActor
protocol OperatingAreaServing {
func storeBusinessArea(storeId: Int) async throws -> ListPayload<OperatingAreaItem>
func scenicAdminBusinessArea(scenicId: Int) async throws -> ListPayload<OperatingAreaItem>
}
@MainActor
@Observable
/// API
final class OperatingAreaAPI {
@ObservationIgnored private let client: APIClient
/// API
init(client: APIClient) {
self.client = client
}
///
func storeBusinessArea(storeId: Int) async throws -> ListPayload<OperatingAreaItem> {
try await client.send(
APIRequest(
method: .get,
path: "/api/app/store/business-area",
queryItems: [URLQueryItem(name: "store_id", value: String(storeId))]
)
)
}
///
func scenicAdminBusinessArea(scenicId: Int) async throws -> ListPayload<OperatingAreaItem> {
try await client.send(
APIRequest(
method: .get,
path: "/api/app/scenic-admin/business-area",
queryItems: [URLQueryItem(name: "scenic_id", value: String(scenicId))]
)
)
}
}
extension OperatingAreaAPI: OperatingAreaServing {}