feat: 引入ready状态的lottie动画

This commit is contained in:
Junhui Chen 2025-09-10 15:19:24 +08:00
parent c4ed6c1116
commit b036f3d18e
2 changed files with 9 additions and 5 deletions

File diff suppressed because one or more lines are too long

View File

@ -410,7 +410,7 @@ struct BlindBoxView: View {
VStack(spacing: 20) { VStack(spacing: 20) {
switch animationPhase { switch animationPhase {
case .loading: case .loading:
LottieView(name: "loading", isPlaying: animationPhase == .loading && !showScalingOverlay) LottieView(name: "ready", isPlaying: animationPhase == .loading && !showScalingOverlay)
.frame(width: 300, height: 300) .frame(width: 300, height: 300)
// .onAppear { // .onAppear {
// DispatchQueue.main.asyncAfter(deadline: .now() + 6) { // DispatchQueue.main.asyncAfter(deadline: .now() + 6) {
@ -422,7 +422,7 @@ struct BlindBoxView: View {
case .ready: case .ready:
ZStack { ZStack {
LottieView(name: "data", isPlaying: animationPhase == .ready && !showScalingOverlay) LottieView(name: "ready", isPlaying: animationPhase == .ready && !showScalingOverlay)
.frame(width: 300, height: 300) .frame(width: 300, height: 300)
// Add a transparent overlay to capture taps // Add a transparent overlay to capture taps
@ -454,7 +454,7 @@ struct BlindBoxView: View {
case .opening: case .opening:
ZStack { ZStack {
if !showMedia { if !showMedia {
LottieView(name: "open", loopMode: .playOnce, isPlaying: !showMedia) LottieView(name: "ready", loopMode: .playOnce, isPlaying: !showMedia)
.frame(width: 300, height: 300) .frame(width: 300, height: 300)
.scaleEffect(scale) .scaleEffect(scale)
} }
@ -497,8 +497,11 @@ struct BlindBoxView: View {
case .none: case .none:
// //
Color.clear LottieView(name: "ready", loopMode: .loop, isPlaying: true)
.frame(width: 300, height: 300) .frame(width: 300, height: 300)
.scaleEffect(scale)
// Color.clear
// .frame(width: 300, height: 300)
// SVGImage(svgName: "BlindNone") // SVGImage(svgName: "BlindNone")
// .frame(width: 300, height: 300) // .frame(width: 300, height: 300)
} }