为 album_list 与 album_trailer 接入首页路由,在 Profile 中新增 DEBUG 首页菜单预览,并扩展 Assets 测试。 Co-authored-by: Cursor <cursoragent@cursor.com>
39 lines
877 B
Swift
39 lines
877 B
Swift
//
|
||
// ProfileRoute.swift
|
||
// suixinkan
|
||
//
|
||
// Created by Codex on 2026/6/22.
|
||
//
|
||
|
||
import SwiftUI
|
||
|
||
/// 个人中心二级页面路由,集中声明“我的”Tab 可以 push 的页面。
|
||
enum ProfileRoute: Hashable {
|
||
case accountSwitch
|
||
case realNameAuth
|
||
case settings
|
||
case agreement(AgreementPage)
|
||
#if DEBUG
|
||
case debugHomeMenus
|
||
#endif
|
||
|
||
/// 构建个人中心路由对应的 SwiftUI 目标页面。
|
||
@ViewBuilder
|
||
var destinationView: some View {
|
||
switch self {
|
||
case .accountSwitch:
|
||
AccountSwitchView()
|
||
case .realNameAuth:
|
||
RealNameAuthView()
|
||
case .settings:
|
||
SettingsCenterView()
|
||
case .agreement(let page):
|
||
AgreementView(page: page)
|
||
#if DEBUG
|
||
case .debugHomeMenus:
|
||
DebugHomeMenuPreviewView()
|
||
#endif
|
||
}
|
||
}
|
||
}
|