Add PunchPoint and LocationReport modules with home routing.

Migrate check-in point management and location reporting from placeholders to full MVVM flows, including foreground location support and unit tests.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-24 11:08:41 +08:00
parent c772b25897
commit 0d4b63d273
22 changed files with 2698 additions and 12 deletions

View File

@ -33,6 +33,6 @@ Home 模块负责登录后的首页工作台,包括当前景区展示、工作
## 后续迁移
目前 `payment_collection``payment_qr``payment_code` 已由 `Features/Payment` 的真实收款页面接管,`wallet` 已由 `Features/Wallet` 的真实钱包页面接管,`scenicselection``permission_apply``permission_apply_status``scenicapplication` 已由 `Features/ScenicPermission` 接管,`task_management``task_management_editor``task_create` 已由 `Features/Tasks` 接管,`cloud_management``cloud_storage_transit``asset_management``material_upload``album_list``album_trailer``sample_management``sample_upload` 已由 `Features/Assets` 接管。`withdrawal_audit` 仍属于后台性质的提现审核管理模块,`scenic_settlement``scenic_settlement_review` 仍属于独立结算模块,本轮保留占位,后续应作为独立功能迁移。
目前 `payment_collection``payment_qr``payment_code` 已由 `Features/Payment` 的真实收款页面接管,`wallet` 已由 `Features/Wallet` 的真实钱包页面接管,`scenicselection``permission_apply``permission_apply_status``scenicapplication` 已由 `Features/ScenicPermission` 接管,`task_management``task_management_editor``task_create` 已由 `Features/Tasks` 接管,`cloud_management``cloud_storage_transit``asset_management``material_upload``album_list``album_trailer``sample_management``sample_upload` 已由 `Features/Assets` 接管`checkin_points` 已由 `Features/PunchPoint` 接管,`location_report``location_report_history` 已由 `Features/LocationReport` 接管`withdrawal_audit` 仍属于后台性质的提现审核管理模块,`scenic_settlement``scenic_settlement_review` 仍属于独立结算模块,本轮保留占位,后续应作为独立功能迁移。
后续迁移具体首页子模块时,应先在 `HomeRoute` 增加目标页面,再更新 `HomeMenuRouter.resolve` 对应 URI 的映射,并同步补充单元测试。

View File

@ -40,6 +40,12 @@ enum HomeRoute: Hashable {
case sampleUpload
case albumList
case albumTrailer
case punchPointList
case punchPointDetail(id: Int, summary: PunchPointItem?)
case punchPointEditor(id: Int?)
case punchPointQR(id: Int, title: String, qrURL: String)
case locationReport
case locationReportHistory
case modulePlaceholder(uri: String, title: String)
}

View File

@ -111,6 +111,12 @@ enum HomeMenuRouter {
return .destination(.albumList)
case "album_trailer":
return .destination(.albumTrailer)
case "checkin_points":
return .destination(.punchPointList)
case "location_report":
return .destination(.locationReport)
case "location_report_history":
return .destination(.locationReportHistory)
case "store", "more_functions":
return .destination(.moreFunctions)
case "fly", "pilot_controller":
@ -127,7 +133,6 @@ enum HomeMenuRouter {
"deposit_order_shooting_info",
"withdrawal_audit",
"schedule_management",
"checkin_points",
"pm",
"pm_manager",
"project_edit",
@ -136,8 +141,6 @@ enum HomeMenuRouter {
"scenic_settlement",
"scenic_settlement_review",
"operating-area",
"location_report_history",
"location_report",
"registration_invitation",
"photographer_invite",
"invite_record",

View File

@ -52,6 +52,18 @@ extension HomeRoute {
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 let .modulePlaceholder(uri, title):
HomeMigrationModuleView(title: title, uri: uri)
}

View File

@ -241,8 +241,7 @@ struct HomeView: View {
Spacer()
Button {
secondsUntilReport = 7_200
showReportSuccess = true
openRoute(HomeMenuRouter.resolve(uri: "location_report", title: "位置上报"))
} label: {
Image(systemName: "hand.tap.fill")
.font(.system(size: 38, weight: .semibold))