import SwiftUI /// 顶层 View:隐私同意未通过 → PrivacyConsentView;通过后 → 主 Tab。 /// 登录守卫不在这里(首页允许未登录浏览),而在「福利 / 我的」Tab 内部按需拦截。 struct RootView: View { @State private var privacyAgreed: Bool = PrivacyPrefs.agreed() var body: some View { Group { if privacyAgreed { MainTabView() } else { PrivacyConsentView { PrivacyPrefs.setAgreed(true) privacyAgreed = true } } } } }