From 1e3ec86377c93798b604737d7f05a22c56dbba28 Mon Sep 17 00:00:00 2001 From: Junhui Chen Date: Sun, 7 Sep 2025 14:08:18 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8A=A8=E7=94=BB=E8=BF=87=E6=B8=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wake/View/Blind/ContentView.swift | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wake/View/Blind/ContentView.swift b/wake/View/Blind/ContentView.swift index 724ba8e..539374b 100644 --- a/wake/View/Blind/ContentView.swift +++ b/wake/View/Blind/ContentView.swift @@ -262,6 +262,7 @@ struct BlindBoxView: View { // 检查状态是否为Unopened,如果是则停止轮询 if data.status == "Unopened" { print("✅ 盲盒已准备就绪,停止轮询") + self.animationPhase = .ready stopPolling() break } @@ -558,9 +559,9 @@ struct BlindBoxView: View { Button(action: { // 导航到BlindOutcomeView if mediaType == .video, !videoURL.isEmpty, let url = URL(string: videoURL) { - Router.shared.navigate(to: .blindOutcome(media: .video(url, nil), time: blindGenerate?.videoGenerateTime ?? "hhsdshjsjdhn", description:blindGenerate?.description ?? "informationinformationinformationinformationinformationinformation")) + Router.shared.navigate(to: .blindOutcome(media: .video(url, nil), time: blindGenerate?.name ?? "Your box", description:blindGenerate?.description ?? "")) } else if mediaType == .image, let image = displayImage { - Router.shared.navigate(to: .blindOutcome(media: .image(image), time: blindGenerate?.videoGenerateTime ?? "hhsdshjsjdhn", description:blindGenerate?.description ?? "informationinformationinformationinformationinformationinformation")) + Router.shared.navigate(to: .blindOutcome(media: .image(image), time: blindGenerate?.name ?? "Your box", description:blindGenerate?.description ?? "")) } }) { Image(systemName: "chevron.left") @@ -656,10 +657,11 @@ struct BlindBoxView: View { .padding(.horizontal) .padding(.top, 20) } + // 标题 VStack(alignment: .leading, spacing: 4) { Text("Hi! Click And") - Text("Open Your First Box~") + Text("Open Your Box~") } .font(Typography.font(for: .smallLargeTitle)) .fontWeight(.bold) @@ -804,7 +806,8 @@ struct BlindBoxView: View { .animation(.easeOut(duration: 1.5), value: showScalingOverlay) .offset(y: showScalingOverlay ? -100 : 0) .animation(.easeInOut(duration: 1.5), value: showScalingOverlay) - // 打开 + + // 打开 TODO 引导时,也要有按钮 if mediaType == .all { Button(action: { if animationPhase == .ready { @@ -856,6 +859,7 @@ struct BlindBoxView: View { .animation(.spring(response: 0.6, dampingFraction: 0.8), value: showModal) .edgesIgnoringSafeArea(.all) } + // 用户资料弹窗 SlideInModal( isPresented: $showModal,