98b7600797
对标安卓正式版、对接 app-server(8770)的 SwiftUI 客户端。iOS 无障碍受限、无比价核心,做自成一体:美团 CPS 导购 + 福利(签到/任务/金币)+ 查看(比价记录/省钱战绩)。 功能完整 M0-M5:脚手架、短信登录(JWT+Keychain+401 自动刷新)、首页券 feed 导购、比价记录+省钱战绩、福利、我的(资料/反馈/设置/注销)。 单 target、0 三方依赖、XcodeGen 生成工程;Debug/Release 双 plist 分流 ATS。 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
50 lines
1.6 KiB
Swift
50 lines
1.6 KiB
Swift
import SwiftUI
|
|
|
|
/// 首启隐私同意闸。不同意无法进入主功能(留在本页)。
|
|
struct PrivacyConsentView: View {
|
|
let onAgree: () -> Void
|
|
@State private var showPolicy = false
|
|
|
|
var body: some View {
|
|
VStack(spacing: 20) {
|
|
Spacer()
|
|
|
|
Image(systemName: "tag.fill")
|
|
.font(.system(size: 56))
|
|
.foregroundStyle(AppColors.brand)
|
|
|
|
Text("欢迎使用傻瓜比价")
|
|
.font(.title.bold())
|
|
|
|
Text("买东西前先比一比,自动帮你找全网最低价、领券省钱。\n我们仅在功能必要范围内使用你的信息,绝不追踪。")
|
|
.multilineTextAlignment(.center)
|
|
.foregroundStyle(.secondary)
|
|
.padding(.horizontal, 32)
|
|
|
|
Button("查看《隐私政策》") { showPolicy = true }
|
|
.font(.footnote)
|
|
|
|
Spacer()
|
|
|
|
Button(action: onAgree) {
|
|
Text("同意并继续")
|
|
.font(.headline)
|
|
.frame(maxWidth: .infinity)
|
|
.padding(.vertical, 16)
|
|
.background(AppColors.primary)
|
|
.foregroundStyle(.black)
|
|
.clipShape(RoundedRectangle(cornerRadius: 14))
|
|
}
|
|
.padding(.horizontal, 24)
|
|
|
|
Text("继续即表示你已阅读并同意《隐私政策》")
|
|
.font(.caption2)
|
|
.foregroundStyle(.secondary)
|
|
.padding(.bottom, 24)
|
|
}
|
|
.sheet(isPresented: $showPolicy) {
|
|
NavigationStack { PrivacyPolicyView() }
|
|
}
|
|
}
|
|
}
|