feat: 接下来开始改bug

This commit is contained in:
jinyaqiu 2025-08-27 15:08:39 +08:00
parent abb82b72d1
commit 112912a6d3
4 changed files with 19 additions and 5 deletions

View File

@ -0,0 +1 @@
{"v":"5.12.2","fr":25,"ip":0,"op":77,"w":1080,"h":1080,"nm":"合成 1","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":4,"nm":"方","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[561,635,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":2,"d":1,"pt":{"a":0,"k":4,"ix":3},"p":{"a":1,"k":[{"i":{"x":0.053,"y":1},"o":{"x":0.333,"y":0},"t":50,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.918,"y":0},"t":63,"s":[0,-365],"to":[0,0],"ti":[0,0]},{"t":75,"s":[0,0]}],"ix":4},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":50,"s":[0]},{"t":63,"s":[360]}],"ix":5},"or":{"a":0,"k":180.325,"ix":7},"os":{"a":0,"k":49,"ix":9},"ix":1,"nm":"多边星形路径 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.713725507259,0.270588248968,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-21,24],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"多边星形 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":50,"op":76,"st":50,"ct":1,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"圆","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[561,635,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":2,"d":1,"pt":{"a":0,"k":50,"ix":3},"p":{"a":1,"k":[{"i":{"x":0.053,"y":1},"o":{"x":0.333,"y":0},"t":25,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.918,"y":0},"t":38,"s":[0,-365],"to":[0,0],"ti":[0,0]},{"t":50,"s":[0,0]}],"ix":4},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":25,"s":[0]},{"t":38,"s":[360]}],"ix":5},"or":{"a":0,"k":180.325,"ix":7},"os":{"a":0,"k":49,"ix":9},"ix":1,"nm":"多边星形路径 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,0.905882358551,0.760784327984,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-21,24],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"多边星形 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":25,"op":51,"st":25,"ct":1,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"三角","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[561,635,0],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"sr","sy":2,"d":1,"pt":{"a":0,"k":3,"ix":3},"p":{"a":1,"k":[{"i":{"x":0.053,"y":1},"o":{"x":0.333,"y":0},"t":0,"s":[0,0],"to":[0,0],"ti":[0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.918,"y":0},"t":13,"s":[0,-365],"to":[0,0],"ti":[0,0]},{"t":25,"s":[0,0]}],"ix":4},"r":{"a":1,"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"t":0,"s":[0]},{"t":13,"s":[360]}],"ix":5},"or":{"a":0,"k":180.325,"ix":7},"os":{"a":0,"k":49,"ix":9},"ix":1,"nm":"多边星形路径 1","mn":"ADBE Vector Shape - Star","hd":false},{"ty":"st","c":{"a":0,"k":[1,1,1,1],"ix":3},"o":{"a":0,"k":100,"ix":4},"w":{"a":0,"k":0,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"描边 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[0.045751713216,0.045751713216,0.045751713216,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"填充 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-21,24],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"变换"}],"nm":"多边星形 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":26,"st":0,"ct":1,"bm":0}],"markers":[],"props":{}}

View File

@ -41,7 +41,7 @@ struct BlindBoxView: View {
.position(x: UIScreen.main.bounds.width / 2,
y: UIScreen.main.bounds.height * 0.325)
LottieView(name: "loading", loopMode: .loop)
LottieView(name: "data", loopMode: .loop)
.frame(width: 200, height: 200)
.position(x: UIScreen.main.bounds.width / 2,
y: UIScreen.main.bounds.height * 0.325)
@ -51,8 +51,9 @@ struct BlindBoxView: View {
URLSession.shared.dataTask(with: url) { data, response, error in
if let data = data, let image = UIImage(data: data) {
let media = MediaType.image(image)
DispatchQueue.main.async {
// Navigate to the outcome view using router
// Add 5-second delay before navigating
DispatchQueue.main.asyncAfter(deadline: .now() + 5) {
// Navigate to the outcome view using router after delay
Router.shared.navigate(to: .blindOutcome(media: media))
}
}

View File

@ -97,7 +97,8 @@ struct BlindOutcomeView: View {
Button(action: {
// Navigate to the desired view
// Replace with your navigation logic
print("Button tapped!")
// print("Button tapped!")
Router.shared.navigate(to: .mediaUpload)
}) {
Text("Go to Next View")
.font(.headline)

View File

@ -115,7 +115,18 @@ struct MediaUploadView: View {
private var continueButton: some View {
Button(action: {
//
// Router.shared.navigate(to: .avatarBox)
if let url = URL(string: "https://cdn.fairclip.cn/files/7348219809961742336/c5ca6151-91d3-483e-b7e7-c37f2cb69dc0.png") {
URLSession.shared.dataTask(with: url) { data, response, error in
if let data = data, let image = UIImage(data: data) {
let media = MediaType.image(image)
// Add 5-second delay before navigating
DispatchQueue.main.async {
// Navigate to the outcome view using router after delay
Router.shared.navigate(to: .blindOutcome(media: media))
}
}
}.resume()
}
}) {
Text("Continue")
.font(.headline)