feat(drone-dock): 接入素材下载并限制拍满后游客确认

This commit is contained in:
2026-10-30 17:46:22 +08:00
parent e0da4728e5
commit 2913273e35
21 changed files with 1173 additions and 53 deletions
@@ -303,10 +303,19 @@ struct DroneDockHomeOrder: Decodable, Equatable, Sendable {
return "已拍摄 \(used)/\(total) 次,剩余 \(remain) 次"
}
/// 依据后端权限提供入口标识;不从剩余次数猜测是否可拍。
/// 套餐成功拍摄次数已全部完成;未知或零次套餐不能作为邀请确认依据。
var hasCompletedShootingQuota: Bool {
guard let total = shotTotal, total > 0, let used = shotUsed else { return false }
return used >= total
}
/// 邀请游客确认须拍满套餐次数,且后端明确允许发起确认。
var canInviteVisitorConfirmation: Bool { hasCompletedShootingQuota && canConfirm == true }
/// 依据后端权限提供入口标识;邀请确认额外要求成功拍满套餐次数。
var primaryAction: String? {
if canCreateTask == true { return "start_shoot" }
if canConfirm == true { return "confirm_delivery" }
if canInviteVisitorConfirmation { return "confirm_delivery" }
if canUploadFilm == true { return "view_materials" }
return nil
}