Commit 7e80a1f8 authored by pete谢兆麟's avatar pete谢兆麟

查看续签结果 三种状态 两个弹窗

parent ccc88569
......@@ -588,6 +588,12 @@
04CA2C1F2CBA0CC700F36DE7 /* YHLookResignResultFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */; };
04CA2C202CBA0CC700F36DE7 /* YHLookResignResultViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C152CBA0CC700F36DE7 /* YHLookResignResultViewController.swift */; };
04CA2C212CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */; };
04CA2C272CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C262CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift */; };
04CA2C292CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C282CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift */; };
04CA2C2B2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C2A2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift */; };
04CA2C2D2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C2C2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift */; };
04CA2C2F2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C2E2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift */; };
04CA2C312CBA653E00F36DE7 /* YHLookResignAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CA2C302CBA653E00F36DE7 /* YHLookResignAlertView.swift */; };
04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */; };
04CCEDF72CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CCEDF62CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift */; };
04CCEDF92CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CCEDF82CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift */; };
......@@ -1516,6 +1522,12 @@
04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultFootView.swift; sourceTree = "<group>"; };
04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultHeadView.swift; sourceTree = "<group>"; };
04CA2C1A2CBA0CC700F36DE7 /* YHLookResignResultStateOneTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateOneTableViewCell.swift; sourceTree = "<group>"; };
04CA2C262CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateTwoTableViewCell.swift; sourceTree = "<group>"; };
04CA2C282CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateThreeTableViewCell.swift; sourceTree = "<group>"; };
04CA2C2A2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultStateThreePeopleTableViewCell.swift; sourceTree = "<group>"; };
04CA2C2C2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignResultPrivateView.swift; sourceTree = "<group>"; };
04CA2C2E2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignGuideLineView.swift; sourceTree = "<group>"; };
04CA2C302CBA653E00F36DE7 /* YHLookResignAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLookResignAlertView.swift; sourceTree = "<group>"; };
04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceBannerView.swift; sourceTree = "<group>"; };
04CCEDF62CA0FCB10026EA70 /* YHHKImmigrationRecordsViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKImmigrationRecordsViewModel.swift; sourceTree = "<group>"; };
04CCEDF82CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKImmigrationRecordsSummaryModel.swift; sourceTree = "<group>"; };
......@@ -3861,6 +3873,12 @@
04CA2C182CBA0CC700F36DE7 /* YHLookResignResultFootView.swift */,
04CA2C192CBA0CC700F36DE7 /* YHLookResignResultHeadView.swift */,
04CA2C1A2CBA0CC700F36DE7 /* YHLookResignResultStateOneTableViewCell.swift */,
04CA2C262CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift */,
04CA2C282CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift */,
04CA2C2A2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift */,
04CA2C2C2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift */,
04CA2C2E2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift */,
04CA2C302CBA653E00F36DE7 /* YHLookResignAlertView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -5643,6 +5661,7 @@
04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */,
04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
04CA2C2F2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift in Sources */,
044F393E2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift in Sources */,
045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */,
04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */,
......@@ -5745,6 +5764,7 @@
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */,
042092B72C9D6719001184F0 /* YHSignatureWebViewController.swift in Sources */,
A5CA3F5A2C74B64A00EB22F5 /* YHSmallWhiteNoteTemplateView.swift in Sources */,
04CA2C312CBA653E00F36DE7 /* YHLookResignAlertView.swift in Sources */,
045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */,
04CE1AD62C2AD91F001CB80A /* YHApplyActivityResultViewController.swift in Sources */,
044D0BF82C21572B00C5CF5E /* YHAllowSettingTableViewCell.swift in Sources */,
......@@ -5758,6 +5778,7 @@
04912F8C2CB907F200CC3105 /* YHResignAppointTimeMultipleCell.swift in Sources */,
04A6715E2B9FFCA700C1FB91 /* YHCertificateNameCell.swift in Sources */,
047AA3F02C4F912D009C4554 /* YHListViewModel.swift in Sources */,
04CA2C292CBA45ED00F36DE7 /* YHLookResignResultStateThreeTableViewCell.swift in Sources */,
A567E5AF2BD7643D00D5D5A0 /* YHHomeWebViewBottomForSavePicView.swift in Sources */,
045A7E672C2ACB1A008F995B /* YHLoginOneLeadView.swift in Sources */,
048787D72BCE96F50036E221 /* YHServiceOrderProgressTableViewCell.swift in Sources */,
......@@ -5887,6 +5908,8 @@
A51D14EB2C75E98500E2820C /* UINavigationController+Extension.swift in Sources */,
A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */,
047AA3D52C4A3643009C4554 /* YHInvitationWithGiftsDetailView.swift in Sources */,
04CA2C272CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift in Sources */,
04CA2C2B2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift in Sources */,
A5DF3D462BF72BA1003D5F03 /* YHTestViewController.swift in Sources */,
A566A79C2C227C9B00980D06 /* YHOrderTipsItemView.swift in Sources */,
A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */,
......@@ -5942,6 +5965,7 @@
04256E162C75BD2700A37BA4 /* YHPayMemberSectionItem.swift in Sources */,
042092B52C9D48FC001184F0 /* YHRealNameHelper.swift in Sources */,
045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */,
04CA2C2D2CBA537C00F36DE7 /* YHLookResignResultPrivateView.swift in Sources */,
0430E6482C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift in Sources */,
A5EB6C742C69FB9A0081FB6C /* YHOfficailLetterColledtionCell.swift in Sources */,
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
......
......@@ -13,13 +13,14 @@ class YHLookResignResultViewController: YHBaseViewController {
var orderId: Int = 0
// 批次id
var batchId: Int = 0
var state = 1
var state = 2
lazy var viewModel: YHResignUploadDocListViewModel = {
let vm = YHResignUploadDocListViewModel()
return vm
}()
var headView: YHLookResignResultHeadView!
var privacyView: YHLookResignResultPrivateView!
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
......@@ -32,7 +33,9 @@ class YHLookResignResultViewController: YHBaseViewController {
tableView.dataSource = self
tableView.backgroundColor = .clear
tableView.register(YHLookResignResultStateOneTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier)
tableView.register(YHTravelDocsPreparationTipsCell.self, forCellReuseIdentifier: YHTravelDocsPreparationTipsCell.cellReuseIdentifier)
tableView.register(YHLookResignResultStateTwoTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateTwoTableViewCell.cellReuseIdentifier)
tableView.register(YHLookResignResultStateThreeTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateThreeTableViewCell.cellReuseIdentifier)
tableView.register(YHLookResignResultStateThreePeopleTableViewCell.self, forCellReuseIdentifier: YHLookResignResultStateThreePeopleTableViewCell.cellReuseIdentifier)
return tableView
}()
......@@ -134,6 +137,23 @@ private extension YHLookResignResultViewController {
} else {
bottomView.isHidden = false
rewardBtn.setTitle("去缴费", for: .normal)
tableView.snp.remakeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalToSuperview()
make.bottom.equalTo(-138)
}
privacyView = {
let view = YHLookResignResultPrivateView()
return view
}()
view.addSubview(privacyView)
privacyView.snp.makeConstraints { make in
make.bottom.equalTo(-98)
make.left.equalTo(0)
make.height.equalTo(40)
make.right.equalTo(0)
}
}
}
......@@ -149,21 +169,64 @@ private extension YHLookResignResultViewController {
extension YHLookResignResultViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 3
if state == 0 {
return 3
} else if state == 1 {
return 1
} else {
return 2
}
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if state == 2 {
if section == 1 {
return 1
}
return 2
}
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateOneTableViewCell
approveCell.title = "第" + convertNumberToChineseText(indexPath.section + 1) + "批"
return approveCell
if state == 0 {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateOneTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateOneTableViewCell
approveCell.title = "第" + convertNumberToChineseText(indexPath.section + 1) + "批"
return approveCell
} else if state == 1 {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateTwoTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateTwoTableViewCell
approveCell.dataSource = [1,2,3,4,5,6]
return approveCell
} else {
if indexPath.section == 0 {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreePeopleTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateThreePeopleTableViewCell
approveCell.title = "第" + convertNumberToChineseText(indexPath.section + 1) + "批"
return approveCell
} else {
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHLookResignResultStateThreeTableViewCell.cellReuseIdentifier, for: indexPath) as! YHLookResignResultStateThreeTableViewCell
approveCell.dataSource = [1,2,3,4,5,6]
return approveCell
}
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 140
if state == 0 {
return 140
}
if state == 1 {
// return 258
let number = (6 - 1) / 2
return CGFloat(208 + 116 * number)
}
if indexPath.section == 0 {
return 126
}
// return 242
let number = (6 - 1) / 2
return CGFloat(192 + 116 * number)
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......
//
// YHLookResignAlertView.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignAlertView: UIView {
var dismissBlock: (() -> Void)?
var centerView: UIView!
var titleLabel: UILabel!
var messageLabel: UILabel!
var closeButton: UIButton!
var sureButton: UIButton!
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tap.delegate = self
addGestureRecognizer(tap)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x0000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(497)
}
titleLabel = {
let label = UILabel()
label.text = "缴费须知"
label.font = UIFont.PFSC_M(ofSize: 26)
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.top.equalTo(20)
make.height.equalTo(36)
make.left.equalTo(20)
}
closeButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "service_card_close"), for: .normal)
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return button
}()
centerView.addSubview(closeButton)
closeButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.height.equalTo(24)
make.width.equalTo(24)
make.top.equalTo(26)
}
sureButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("我已阅读并同意", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.backgroundColor = UIColor.brandMainColor
button.addTarget(self, action: #selector(sure), for: .touchUpInside)
return button
}()
centerView.addSubview(sureButton)
sureButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.left.equalTo(20)
make.width.equalTo(30)
make.bottom.equalTo(-42)
}
messageLabel = {
let label = UILabel()
label.numberOfLines = 0
let a = ASAttributedString.init("根据港府政策,获批后缴费领取新电子签证时,申请人应身在香港;", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor70))
let b = ASAttributedString.init("请勿在香港境外点击缴费链接", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.failColor))
let c = ASAttributedString.init(",避免签证被锁,导致需重发签证,对您造成时间、费用成本损失,甚至身份失效\n\n建议入境香港后,远离海关,", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor70))
let d = ASAttributedString.init("至少2个小时后再进行缴费", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.failColor))
let e = ASAttributedString.init(",避免香港海关系统还未识别到入境记录!", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor70))
label.attributed.text = a+b+c+d+e
return label
}()
centerView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.top.equalTo(68)
make.left.equalTo(20)
make.right.equalTo(-20)
}
centerView.layoutIfNeeded()
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(kCornerRadius6, kCornerRadius6))
let layer = CAShapeLayer()
layer.frame = centerView.bounds
layer.path = path.cgPath
centerView.layer.mask = layer
}
@objc private func handleTap(_ sender: AnyObject?) {
dismiss()
}
static func show(dismiss: (() -> Void)? = nil) {
let view = YHLookResignAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.dismissBlock = dismiss
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
@objc func dismiss() {
removeFromSuperview()
}
@objc func sure() {
if self.dismissBlock != nil {
self.dismissBlock!()
}
dismiss()
}
}
extension YHLookResignAlertView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
//
// YHLookResignGuideLineView.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHLookResignGuideLineView: UIView {
typealias Block = () -> ()
var block: Block?
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x0F1214, alpha: 0.5)
// let tap = UITapGestureRecognizer(target: self, action: #selector(dismiss))
// view.addGestureRecognizer(tap)
return view
}()
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .clear
view.addSubview(self.rewardBtn)
self.rewardBtn.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(44)
}
view.layer.zPosition = 10
return view
}()
//我已知悉,确认
lazy var rewardBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("我已知悉,确认", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.addTarget(self, action: #selector(clickSureBtn), for: .touchUpInside)
button.backgroundColor = UIColor.brandMainColor
return button
}()
lazy var myScrollView: UIScrollView = {
let view = UIScrollView()
view.backgroundColor = .clear
view.showsVerticalScrollIndicator = false
view.delegate = self
return view
}()
lazy var bkgImageV: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "look_resign_guide_line")
imageV.contentMode = .scaleToFill
imageV.clipsToBounds = true
return imageV
}()
lazy var bkgImageV2: UIImageView = {
let imageV = UIImageView()
imageV.image = UIImage(named: "look_resign_guide_line_bg")
imageV.contentMode = .scaleToFill
imageV.clipsToBounds = true
return imageV
}()
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private var timer : Timer?
private var maxCount : Int = 5
//之前是否展示过
var ischeckBeforeFlag : Bool = false {
didSet {
if ischeckBeforeFlag {
setButtonEnable(true)
} else {
setButtonEnable(false)
startTimer()
}
}
}
}
extension YHLookResignGuideLineView {
static func sheetView() -> YHLookResignGuideLineView {
let view = YHLookResignGuideLineView(frame:UIScreen.main.bounds)
return view
}
func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
UIView.animate(withDuration: 0.5) {
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
self.whiteContentView.frame = CGRect(x: 0, y: KScreenHeight - whiteHeight, width: KScreenWidth, height: whiteHeight)
}
}
@objc func dismiss() {
self.removeFromSuperview()
}
@objc func clickSureBtn() {
self.block?()
dismiss()
}
}
private extension YHLookResignGuideLineView {
@objc func timerFired() {
// 定时器触发时执行的代码
print("Timer fired")
self.maxCount = self.maxCount - 1
if self.maxCount < 0 {
self.stopTimer()
self.setButtonEnable(true)
} else {
rewardBtn.setTitle("请上滑看完指引后操作(\(maxCount)s)", for: .normal)
}
}
func startTimer() {
stopTimer()
timer = Timer.scheduledTimer(timeInterval: 1.0, target: self, selector: #selector(timerFired), userInfo: nil, repeats: true)
RunLoop.current.add(timer!, forMode: .common)
}
func stopTimer() {
maxCount = 5
timer?.invalidate()
timer = nil
}
func setButtonEnable(_ enable : Bool) {
rewardBtn.isEnabled = enable
if enable {
rewardBtn.setTitle("我已知悉,确认", for: .normal)
rewardBtn.backgroundColor = UIColor.brandMainColor
} else {
rewardBtn.setTitle("请上滑看完指引后操作(5s)", for: .normal)
rewardBtn.backgroundColor = UIColor(hex: 0xB7C0CC, alpha: 1.0)
}
}
func setupUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteContentView)
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(kCornerRadius6, kCornerRadius6));
let layer = CAShapeLayer();
layer.frame = whiteContentView.bounds;
layer.path = path.cgPath;
whiteContentView.layer.mask = layer;
whiteContentView.clipsToBounds = true
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
let whiteHeight = KScreenHeight - k_Height_NavigationtBarAndStatuBar
// whiteContentView.snp.makeConstraints { make in
// make.left.right.bottom.equalToSuperview()
// make.height.equalTo(whiteHeight)
// }
whiteContentView.frame = CGRect(x: 0, y: KScreenHeight, width: KScreenWidth, height: whiteHeight)
whiteContentView.addSubview(bkgImageV2)
bkgImageV2.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(375)
}
whiteContentView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(98)
}
whiteContentView.addSubview(myScrollView)
myScrollView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(20)
make.right.equalToSuperview()
make.width.equalTo(KScreenWidth)
make.height.equalTo(whiteHeight-98 - 20)
}
if let tmpImage = UIImage(named:"look_resign_guide_line") {
myScrollView.addSubview(bkgImageV)
bkgImageV.snp.makeConstraints { make in
make.top.centerX.equalToSuperview()
make.width.equalTo(335.fix)
make.height.equalTo(1435.fix)
}
myScrollView.contentSize = CGSize(width: KScreenWidth, height: 1435.fix)
}
}
}
extension YHLookResignGuideLineView : UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
if !ischeckBeforeFlag {
let scrollViewContentHeight = scrollView.contentSize.height
let scrollOffsetThreshold = scrollViewContentHeight - scrollView.bounds.size.height
// 当前滚动位置
let currentOffset = scrollView.contentOffset.y
if currentOffset > scrollOffsetThreshold { // 接近底部
// 滚动到了底部
ischeckBeforeFlag = true
stopTimer()
setButtonEnable(true)
} else {
// 没有滚动到底部
}
}
}
}
//
// YHLookResignResultPrivateView.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultPrivateView: UIView {
var agreeButton: UIButton!
var messageLabel: UILabel!
var isAgree: Bool = false {
didSet{
agreeButton.isSelected = isAgree
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = .white
agreeButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "login_privacy_disagree_glay"), for: .normal)
button.setBackgroundImage(UIImage(named: "login_privacy_agree"), for: .selected)
button.addTarget(self, action: #selector(agreeClick), for: .touchUpInside)
return button
}()
addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(16)
make.height.equalTo(13)
make.width.equalTo(13)
}
messageLabel = {
let label = UILabel()
let a = ASAttributedString.init("已阅读并同意", .font(UIFont.PFSC_M(ofSize:13)), .foreground(UIColor.mainTextColor50))
let c = ASAttributedString.init("缴费须知", .font(UIFont.PFSC_M(ofSize:13)),.foreground(UIColor.brandMainColor), .underline(.single), .action {
// 跳转引导
YHLookResignAlertView.show()
})
let e = ASAttributedString.init(",请勿在香港境外点击缴费链接", .font(UIFont.PFSC_M(ofSize:13)), .foreground(UIColor.mainTextColor50))
label.attributed.text = a+c+e
return label
}()
addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(agreeButton.snp.right).offset(10)
make.centerY.equalToSuperview()
make.height.equalTo(20)
}
agreeButton.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
}
@objc func agreeClick() {
agreeButton.isSelected = !agreeButton.isSelected
isAgree = agreeButton.isSelected
}
}
//
// YHLookResignResultStateThreePeopleTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHLookResignResultStateThreePeopleTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHLookResignResultStateThreePeopleTableViewCell"
typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var flagView: UIView!
var titleLabel: UILabel!
var peopleLabel: UILabel!
var peopleValueLabel: UILabel!
var docLabel: UILabel!
var docValueLabel: UILabel!
var lineView: UIView!
var title: String = "" {
didSet {
titleLabel.text = title
}
}
var dataSource: [YHResignUploadDocModel]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
flagView = {
let view = UIView()
view.backgroundColor = UIColor.brandMainColor
return view
}()
centerView.addSubview(flagView)
flagView.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(18)
make.height.equalTo(16)
make.width.equalTo(4)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 15)
label.text = "第一批"
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(16)
make.height.equalTo(20)
make.right.equalTo(-20)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-4)
make.height.equalTo(0.5)
}
peopleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "获批时间:"
label.textColor = UIColor.mainTextColor50
return label
}()
centerView.addSubview(peopleLabel)
peopleLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(52)
make.height.equalTo(20)
make.right.equalTo(-18)
}
peopleValueLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "2024年06月01日"
label.textColor = UIColor.mainTextColor50
label.textAlignment = .right
return label
}()
centerView.addSubview(peopleValueLabel)
peopleValueLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(52)
make.height.equalTo(20)
make.right.equalTo(-16)
}
docLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "缴费截止时间:"
label.textColor = UIColor.mainTextColor50
return label
}()
centerView.addSubview(docLabel)
docLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(84)
make.height.equalTo(20)
make.right.equalTo(-16)
}
peopleValueLabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor50
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "2024年06月01日"
label.textAlignment = .right
return label
}()
centerView.addSubview(peopleValueLabel)
peopleValueLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(84)
make.height.equalTo(20)
make.right.equalTo(-16)
}
}
func updateAllViews() {
}
}
//
// YHLookResignResultStateThreeTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultStateThreeTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHLookResignResultStateThreeTableViewCell"
typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var flagView: UIView!
var flagImageView: UIImageView!
var flagLabel: UILabel!
var mainItemView: UIView!
var dataSource: [Int]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
flagView = {
let view = UIView()
view.backgroundColor = UIColor.contentBkgColor
return view
}()
centerView.addSubview(flagView)
flagView.snp.makeConstraints { make in
make.left.top.equalTo(12)
make.right.equalTo(-12)
make.height.equalTo(44)
}
flagLabel = {
let label = UILabel()
let a = ASAttributedString.init("请查看", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
let b = ASAttributedString.init("《", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor))
let c = ASAttributedString.init("领取续签签证指引", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor), .underline(.single), .action {
// 跳转引导
let view = YHLookResignGuideLineView.sheetView()
view.ischeckBeforeFlag = false
view.block = {
}
view.show()
})
let d = ASAttributedString.init(" 》", .font(UIFont.PFSC_M(ofSize:14)),.foreground(UIColor.brandMainColor))
let e = ASAttributedString.init("根据指引操作", .font(UIFont.PFSC_M(ofSize:14)), .foreground(UIColor.mainTextColor50))
label.attributed.text = a+b+c+d+e
return label
}()
flagView.addSubview(flagLabel)
flagLabel.snp.makeConstraints { make in
make.left.equalTo(12)
make.top.bottom.equalToSuperview()
make.right.equalTo(-12)
}
mainItemView = {
let view = UIView()
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(56)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
mainItemView.removeSubviews()
if dataSource.count == 1 {
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(20)
make.width.equalTo(197)
make.height.equalTo(142)
}
} else {
var count = 0
for item in dataSource {
let y: Int = count / 2
let x: Int = count % 2
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
if x == 0 {
make.left.equalTo(20)
} else {
make.right.equalTo(-20)
}
make.top.equalTo(y * 116 + 15)
make.width.equalTo(140.fix)
make.height.equalTo(101)
}
count = count + 1
}
}
}
}
//
// YHLookResignResultStateTwoTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/10/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHLookResignResultStateTwoTableViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHLookResignResultStateTwoTableViewCell"
typealias ExperienceListBlock = (_ model: YHResignUploadDocModel, _ section: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var flagView: UIView!
var flagImageView: UIImageView!
var flagLabel: UILabel!
var mainItemView: UIView!
var dataSource: [Int]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(0)
}
flagView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xfff5eb)
return view
}()
centerView.addSubview(flagView)
flagView.snp.makeConstraints { make in
make.left.top.equalTo(12)
make.right.equalTo(-12)
make.height.equalTo(60)
}
flagImageView = {
let view = UIImageView()
view.image = UIImage(named: "resign_upload_doc_flag")
return view
}()
flagView.addSubview(flagImageView)
flagImageView.snp.makeConstraints { make in
make.left.equalTo(12)
make.top.equalTo(15)
make.width.height.equalTo(14)
}
flagLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 13)
label.text = "如无及时递交,可能导致身份丢失!请及时查看补件清单并上传资料!"
label.textColor = UIColor(hex: 0xff8000)
label.numberOfLines = 0
return label
}()
flagView.addSubview(flagLabel)
flagLabel.snp.makeConstraints { make in
make.left.equalTo(34)
make.top.equalTo(12)
make.right.equalTo(-12)
}
mainItemView = {
let view = UIView()
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(72)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
mainItemView.removeSubviews()
if dataSource.count == 1 {
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(20)
make.width.equalTo(197)
make.height.equalTo(142)
}
} else {
var count = 0
for item in dataSource {
let y: Int = count / 2
let x: Int = count % 2
let view = YHLookResignResultItemView(frame: .zero)
mainItemView.addSubview(view)
view.snp.makeConstraints { make in
if x == 0 {
make.left.equalTo(20)
} else {
make.right.equalTo(-20)
}
make.top.equalTo(y * 116 + 15)
make.width.equalTo(140.fix)
make.height.equalTo(101)
}
count = count + 1
}
}
}
}
class YHLookResignResultItemView: UIImageView {
var titleLabel: UILabel!
override init(frame: CGRect) {
super.init(frame:frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.image = UIImage(named: "look_resign_result_mail_two")
titleLabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.font = UIFont.PFSC_B(ofSize:17)
label.text = "欧阳唯一欧阳"
label.numberOfLines = 0
return label
}()
self.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.right.equalTo(-10)
make.left.equalTo(10)
make.top.equalTo(20)
make.bottom.equalTo(self.snp.centerY)
}
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_guide_line@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_guide_line@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_guide_line_bg@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_guide_line_bg@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_four@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_four@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_one@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_one@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_three@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_three@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "look_resign_result_mail_two@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "look_resign_result_mail_two@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "resign_upload_doc_flag@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "resign_upload_doc_flag@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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