feat: 倒计时从30秒开始

This commit is contained in:
Junhui Chen 2025-09-12 16:19:51 +08:00
parent 3dc171aefe
commit c5a314f72b
2 changed files with 9 additions and 3 deletions

View File

@ -196,14 +196,14 @@ final class BlindBoxViewModel: ObservableObject {
if status == "preparing" {
// 36:50
if countdownTask == nil || remainingSeconds <= 0 {
startCountdown(minutes: 36, seconds: 50)
startCountdown(minutes: 30, seconds: 0)
}
} else {
stopCountdown()
}
}
func startCountdown(minutes: Int = 36, seconds: Int = 50) {
func startCountdown(minutes: Int = 30, seconds: Int = 0) {
stopCountdown()
remainingSeconds = max(0, minutes * 60 + seconds)
countdownText = String(format: "%02d:%02d", remainingSeconds / 60, remainingSeconds % 60)

View File

@ -6,6 +6,8 @@ struct SettingsView: View {
/// - dismiss
@Environment(\.dismiss) private var dismiss
/// - URL
@Environment(\.openURL) private var openURL
/// - /
@Binding var isPresented: Bool
@ -59,7 +61,11 @@ struct SettingsView: View {
settingRow(
icon: "Suport",
title: "Support & Service",
action: {}
action: {
if let url = URL(string: "https://work.weixin.qq.com/kfid/kfca0ac87f4e05e8bfd") {
openURL(url)
}
}
)
//