Files
suixinkan_ios_new/suixinkan/Features/Home/Views/HomeSupportViews.swift
汉秋 1b1e93b9ca 新增宣传页 Mock 模块并接入首页路由。
从 xh_test 同步 ScenicPromotion 演示页,补齐 MVVM 结构、本地资源、单元测试与模块文档,注册 promotion_page 首页入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-07-02 15:29:25 +08:00

151 lines
4.9 KiB
Swift
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

//
// HomeSupportViews.swift
// suixinkan
//
// Created by Codex on 2026/6/22.
//
import SwiftUI
extension HomeRoute {
///
@ViewBuilder
var destinationView: some View {
switch self {
case .profileSpace:
ProfileView()
case .profileSpaceSettings:
ProfileSpaceView()
case .scenicSelection:
ScenicSelectionView()
case .permissionApply:
PermissionApplyView()
case .permissionApplyStatus:
PermissionApplyStatusView()
case .scenicApplication:
ScenicApplicationView()
case .moreFunctions:
HomeMoreFunctionsView()
case .settings:
SettingsCenterView()
case .paymentCollection:
PaymentCollectionView()
case .wallet:
WalletView()
case .taskManagement:
TaskManagementView()
case .taskCreate:
TaskCreateView()
case .taskDetail(let id, let summary):
TaskDetailView(taskId: id, summary: summary)
case .projectManagement:
ProjectManagementView()
case .pmProjectManagement:
StoreProjectManagementView()
case .projectDetail(let id, let storeMode):
ProjectDetailView(projectId: id, storeMode: storeMode)
case .projectEditor(let id, let storeMode):
if storeMode {
StoreProjectEditorView(projectId: id)
} else {
ProjectEditorView(projectId: id)
}
case .scheduleManagement:
ScheduleManagementView()
case .scheduleAdd:
ScheduleAddView()
case .photographerInvite:
PhotographerInviteView()
case .inviteRecord:
InviteRecordView()
case .cloudStorage:
CloudStorageView()
case .cloudStorageTransit:
CloudStorageTransitView()
case .materialLibrary:
MediaLibraryView()
case .materialUpload:
MediaLibraryUploadView()
case .sampleLibrary:
MediaLibraryView(kind: .sample)
case .sampleUpload:
MediaLibraryUploadView(kind: .sample)
case .albumList:
AlbumListView()
case .albumTrailer:
AlbumTrailerEntryView()
case .punchPointList:
PunchPointListView()
case .punchPointDetail(let id, let summary):
PunchPointDetailView(punchPointId: id, summary: summary)
case .punchPointEditor(let id):
PunchPointEditorView(punchPointId: id)
case .punchPointQR(_, let title, let qrURL):
PunchPointQRView(title: title, qrURL: qrURL)
case .locationReport:
LocationReportView()
case .locationReportHistory:
LocationReportHistoryView()
case .photographerReport:
WildPhotographerReportHomeView()
case .depositOrders:
DepositOrderEntryView()
case .withdrawalAudit:
WithdrawalAuditView()
case .cooperationOrder:
CooperationOrderAccessView()
case .scenicSettlement:
ScenicSettlementView()
case .scenicSettlementReview:
ScenicSettlementReviewView()
case .messageCenter:
MessageCenterView()
case .queueManagement:
QueueManagementView()
case .liveManagement:
LiveManagementView()
case .liveAlbum:
LiveAlbumView()
case .travelAlbumEntry:
TravelAlbumEntryView()
case .operatingArea:
OperatingAreaView()
case .pilotCertification:
PilotCertificationView()
case .scenicPromotion:
ScenicPromotionView()
case let .modulePlaceholder(uri, title):
HomeMigrationModuleView(title: title, uri: uri)
}
}
}
///
struct HomeMigrationModuleView: View {
let title: String
let uri: String
var body: some View {
VStack(spacing: AppMetrics.Spacing.medium) {
Image(systemName: "square.grid.2x2")
.font(.system(size: 44, weight: .semibold))
.foregroundStyle(AppDesign.primary)
Text(title)
.font(.system(size: AppMetrics.FontSize.title2, weight: .semibold))
.foregroundStyle(AppDesign.textPrimary)
Text(uri)
.font(.system(size: AppMetrics.FontSize.subheadline))
.foregroundStyle(AppDesign.textSecondary)
.lineLimit(2)
.multilineTextAlignment(.center)
.padding(.horizontal, AppMetrics.Spacing.large)
}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(Color(hex: 0xF5F7FA))
.navigationTitle(title)
.navigationBarTitleDisplayMode(.inline)
}
}