Compare commits

...

2 Commits

Author SHA1 Message Date
8f97b0c544 feat: 配置token用于preview 2025-09-06 22:13:22 +08:00
685e694134 chore: 调整盲盒页面位置 2025-09-06 22:08:47 +08:00
2 changed files with 31 additions and 11 deletions

View File

@ -108,6 +108,11 @@ struct BlindBoxView: View {
init(mediaType: BlindBoxMediaType) { init(mediaType: BlindBoxMediaType) {
self.mediaType = mediaType self.mediaType = mediaType
// First/Second
if mediaType == BlindBoxMediaType.all {
print("获取盲盒列表")
}
} }
// //
@ -850,16 +855,27 @@ struct BlindBoxView: View {
// MARK: - // MARK: -
#Preview { #Preview {
BlindBoxView(mediaType: .video) BlindBoxView(mediaType: .all)
.onAppear {
// Preview使
#if DEBUG
if ProcessInfo.processInfo.environment["XCODE_RUNNING_FOR_PREVIEWS"] == "1" {
// Preview
let previewToken = "eyJ0eXAiOiJKV1QiLCJhbGciOiJFZERTQSJ9.eyJqdGkiOjczNzAwMTY5NzMzODE1NzA1NjAsImlkZW50aXR5IjoiNzM1MDQzOTY2MzExNjYxOTc3NyIsImV4cCI6MTc1Nzc1Mzc3NH0.tZ8p5sW4KX6HFoJpJN0e4VmJOAGhTrYD2yTwQwilKpufzqOAfXX4vpGYBurgBIcHj2KmXKX2PQMOeeAtvAypDA"
KeychainHelper.saveAccessToken(previewToken)
print("🔑 Preview token set for testing")
}
#endif
}
} }
struct TransparentVideoPlayer: UIViewRepresentable { // struct TransparentVideoPlayer: UIViewRepresentable {
func makeUIView(context: Context) -> UIView { // func makeUIView(context: Context) -> UIView {
let view = UIView() // let view = UIView()
view.backgroundColor = .clear // view.backgroundColor = .clear
view.isOpaque = false // view.isOpaque = false
return view // return view
} // }
func updateUIView(_ uiView: UIView, context: Context) {} // func updateUIView(_ uiView: UIView, context: Context) {}
} // }

View File

@ -180,6 +180,10 @@ struct UserInfo: View {
if let userData = response.data { if let userData = response.data {
self.userName = userData.username self.userName = userData.username
} }
//
//
Router.shared.navigate(to: .blindBox(mediaType: .image)) Router.shared.navigate(to: .blindBox(mediaType: .image))
case .failure(let error): case .failure(let error):