Commit d2ba4d8a authored by Alex朱枝文's avatar Alex朱枝文

续签在港签证缴费测试bug修复

parent 994a4c75
...@@ -170,11 +170,7 @@ extension YHVisaRenewalGuideVC { ...@@ -170,11 +170,7 @@ extension YHVisaRenewalGuideVC {
DispatchQueue.main.async { DispatchQueue.main.async {
countDown -= 1 countDown -= 1
if countDown == 0 { if countDown == 0 {
self.cancelTimer() self.didReadGuide()
self.sureButton.isEnabled = true
self.sureButton.backgroundColor = .brandMainColor
UserDefaults.standard.set(true, forKey: YHVisaRenewalGuideVC.showCardGuideKey)
UserDefaults.standard.synchronize()
return return
} }
self.sureButton.isEnabled = false self.sureButton.isEnabled = false
...@@ -192,6 +188,14 @@ extension YHVisaRenewalGuideVC { ...@@ -192,6 +188,14 @@ extension YHVisaRenewalGuideVC {
timer = nil timer = nil
} }
} }
private func didReadGuide() {
cancelTimer()
sureButton.isEnabled = true
sureButton.backgroundColor = .brandMainColor
UserDefaults.standard.set(true, forKey: YHVisaRenewalGuideVC.showCardGuideKey)
UserDefaults.standard.synchronize()
}
} }
extension YHVisaRenewalGuideVC: UITableViewDelegate, UITableViewDataSource { extension YHVisaRenewalGuideVC: UITableViewDelegate, UITableViewDataSource {
...@@ -240,4 +244,19 @@ extension YHVisaRenewalGuideVC: UITableViewDelegate, UITableViewDataSource { ...@@ -240,4 +244,19 @@ extension YHVisaRenewalGuideVC: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension return UITableView.automaticDimension
} }
func scrollViewDidScroll(_ scrollView: UIScrollView) {
guard !YHVisaRenewalGuideVC.didShowGuide else {
return
}
let offsetY = scrollView.contentOffset.y
let contentHeight = scrollView.contentSize.height
let height = scrollView.frame.size.height
if offsetY > contentHeight - height {
printLog("Reached bottom!")
// 在这里执行到达底部时的操作
didReadGuide()
}
}
} }
...@@ -57,7 +57,7 @@ class YHVisaRenewalPayConfirmingPresenceAlertView: UIView { ...@@ -57,7 +57,7 @@ class YHVisaRenewalPayConfirmingPresenceAlertView: UIView {
label.numberOfLines = 0 label.numberOfLines = 0
let a: ASAttributedString = .init("建议入境香港后,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7))) let a: ASAttributedString = .init("建议入境香港后,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
let b: ASAttributedString = .init("远离海关,并延迟20分钟后再进行确认", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor)) let b: ASAttributedString = .init("远离海关,并延迟20分钟后再进行确认", .font(UIFont.PFSC_B(ofSize: 14)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",避免香港海关系统还未识别到已入境!", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7))) let c: ASAttributedString = .init(",避免香港海关系统还未识别到入境记录!", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor(alpha: 0.7)))
label.attributed.text = a+b+c label.attributed.text = a+b+c
return label return label
}() }()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment