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

续签在港缴费异常错误处理指引页

parent e6ef2048
...@@ -227,6 +227,9 @@ ...@@ -227,6 +227,9 @@
044F393A2CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39392CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift */; }; 044F393A2CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39392CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift */; };
044F393C2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F393B2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift */; }; 044F393C2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F393B2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift */; };
044F393E2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F393D2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift */; }; 044F393E2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F393D2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift */; };
044F39402CB7CB6B007CA277 /* YHVisaRenewalTroubleshootingGuideVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F393F2CB7CB6B007CA277 /* YHVisaRenewalTroubleshootingGuideVC.swift */; };
044F39422CB7CCBB007CA277 /* YHVisaRenewalTroubleshootingGuideHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39412CB7CCBB007CA277 /* YHVisaRenewalTroubleshootingGuideHeaderCell.swift */; };
044F39442CB7D72C007CA277 /* YHVisaRenewalWorkflowCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044F39432CB7D72C007CA277 /* YHVisaRenewalWorkflowCell.swift */; };
04506F552C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */; }; 04506F552C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */; };
045A08C02C37ABF500BCBABA /* YHSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */; }; 045A08C02C37ABF500BCBABA /* YHSegmentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */; };
045A08C22C37EB8B00BCBABA /* YHMyFileListNoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */; }; 045A08C22C37EB8B00BCBABA /* YHMyFileListNoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */; };
...@@ -1102,6 +1105,9 @@ ...@@ -1102,6 +1105,9 @@
044F39392CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalGuideRemarkCell.swift; sourceTree = "<group>"; }; 044F39392CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalGuideRemarkCell.swift; sourceTree = "<group>"; };
044F393B2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalGuideIndentCell.swift; sourceTree = "<group>"; }; 044F393B2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalGuideIndentCell.swift; sourceTree = "<group>"; };
044F393D2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalGuideTipsCell.swift; sourceTree = "<group>"; }; 044F393D2CB7827B007CA277 /* YHVisaRenewalGuideTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalGuideTipsCell.swift; sourceTree = "<group>"; };
044F393F2CB7CB6B007CA277 /* YHVisaRenewalTroubleshootingGuideVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalTroubleshootingGuideVC.swift; sourceTree = "<group>"; };
044F39412CB7CCBB007CA277 /* YHVisaRenewalTroubleshootingGuideHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalTroubleshootingGuideHeaderCell.swift; sourceTree = "<group>"; };
044F39432CB7D72C007CA277 /* YHVisaRenewalWorkflowCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaRenewalWorkflowCell.swift; sourceTree = "<group>"; };
04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyMemberInfoCell.swift; sourceTree = "<group>"; }; 04506F542C6F57E600738EA1 /* YHFamilyMemberInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyMemberInfoCell.swift; sourceTree = "<group>"; };
045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSegmentView.swift; sourceTree = "<group>"; }; 045A08BF2C37ABF500BCBABA /* YHSegmentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSegmentView.swift; sourceTree = "<group>"; };
045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileListNoneCell.swift; sourceTree = "<group>"; }; 045A08C12C37EB8B00BCBABA /* YHMyFileListNoneCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileListNoneCell.swift; sourceTree = "<group>"; };
...@@ -2446,6 +2452,7 @@ ...@@ -2446,6 +2452,7 @@
children = ( children = (
044F392B2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift */, 044F392B2CB54C5E007CA277 /* YHHKVisaRenewalPaymentVC.swift */,
044F39332CB6507D007CA277 /* YHVisaRenewalGuideVC.swift */, 044F39332CB6507D007CA277 /* YHVisaRenewalGuideVC.swift */,
044F393F2CB7CB6B007CA277 /* YHVisaRenewalTroubleshootingGuideVC.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2464,6 +2471,8 @@ ...@@ -2464,6 +2471,8 @@
044F39312CB64CC0007CA277 /* YHBottomPresentationController.swift */, 044F39312CB64CC0007CA277 /* YHBottomPresentationController.swift */,
044F392F2CB55D5E007CA277 /* YHDashLineView.swift */, 044F392F2CB55D5E007CA277 /* YHDashLineView.swift */,
044F39352CB6574D007CA277 /* YHVisaRenewalGuideHeaderCell.swift */, 044F39352CB6574D007CA277 /* YHVisaRenewalGuideHeaderCell.swift */,
044F39432CB7D72C007CA277 /* YHVisaRenewalWorkflowCell.swift */,
044F39412CB7CCBB007CA277 /* YHVisaRenewalTroubleshootingGuideHeaderCell.swift */,
044F39372CB77359007CA277 /* YHVisaRenewalGuideParagraphCell.swift */, 044F39372CB77359007CA277 /* YHVisaRenewalGuideParagraphCell.swift */,
044F39392CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift */, 044F39392CB7772D007CA277 /* YHVisaRenewalGuideRemarkCell.swift */,
044F393B2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift */, 044F393B2CB777D3007CA277 /* YHVisaRenewalGuideIndentCell.swift */,
...@@ -5365,6 +5374,7 @@ ...@@ -5365,6 +5374,7 @@
044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */, 044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */,
A5CA3F562C74850200EB22F5 /* YHUploadCertificateDetailVC.swift in Sources */, A5CA3F562C74850200EB22F5 /* YHUploadCertificateDetailVC.swift in Sources */,
A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */, A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */,
044F39422CB7CCBB007CA277 /* YHVisaRenewalTroubleshootingGuideHeaderCell.swift in Sources */,
04912F622CB66E6300CC3105 /* YHResignInfoConfirmViewController.swift in Sources */, 04912F622CB66E6300CC3105 /* YHResignInfoConfirmViewController.swift in Sources */,
04EFC8E92C903F1100FC680F /* YHResignMaterialViewModel.swift in Sources */, 04EFC8E92C903F1100FC680F /* YHResignMaterialViewModel.swift in Sources */,
04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */, 04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */,
...@@ -5448,6 +5458,7 @@ ...@@ -5448,6 +5458,7 @@
045EEE9E2B9F171A0022A143 /* YHWorkExampleModel.swift in Sources */, 045EEE9E2B9F171A0022A143 /* YHWorkExampleModel.swift in Sources */,
045EEE8A2B9F171A0022A143 /* YHPreviewOtherInformationViewController.swift in Sources */, 045EEE8A2B9F171A0022A143 /* YHPreviewOtherInformationViewController.swift in Sources */,
04F2433B2C9ACED700DF2C74 /* YHHKRecordsSummaryVC.swift in Sources */, 04F2433B2C9ACED700DF2C74 /* YHHKRecordsSummaryVC.swift in Sources */,
044F39402CB7CB6B007CA277 /* YHVisaRenewalTroubleshootingGuideVC.swift in Sources */,
A5FD63C72B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift in Sources */, A5FD63C72B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift in Sources */,
043D2C8A2C0EEF3F00172438 /* YHOrderSearchViewController.swift in Sources */, 043D2C8A2C0EEF3F00172438 /* YHOrderSearchViewController.swift in Sources */,
04C85DE12C3677CB008B20D6 /* YHConsultantQRCodeView.swift in Sources */, 04C85DE12C3677CB008B20D6 /* YHConsultantQRCodeView.swift in Sources */,
...@@ -5593,6 +5604,7 @@ ...@@ -5593,6 +5604,7 @@
047AA3E02C4A63B2009C4554 /* YHLifeSectionView.swift in Sources */, 047AA3E02C4A63B2009C4554 /* YHLifeSectionView.swift in Sources */,
0430E67E2C75872E000511E2 /* YHAdopterOtherViewController.swift in Sources */, 0430E67E2C75872E000511E2 /* YHAdopterOtherViewController.swift in Sources */,
044F39302CB55D5E007CA277 /* YHDashLineView.swift in Sources */, 044F39302CB55D5E007CA277 /* YHDashLineView.swift in Sources */,
044F39442CB7D72C007CA277 /* YHVisaRenewalWorkflowCell.swift in Sources */,
04174D772BCD5B74000BA46D /* YHMessageDetailListVC.swift in Sources */, 04174D772BCD5B74000BA46D /* YHMessageDetailListVC.swift in Sources */,
044D0BFE2C21649A00C5CF5E /* YHUserInformationModel.swift in Sources */, 044D0BFE2C21649A00C5CF5E /* YHUserInformationModel.swift in Sources */,
0430E67A2C757F13000511E2 /* YHAdoptedChinaTravelViewController.swift in Sources */, 0430E67A2C757F13000511E2 /* YHAdoptedChinaTravelViewController.swift in Sources */,
......
...@@ -55,7 +55,6 @@ class YHHKVisaRenewalPaymentVC: YHBaseViewController { ...@@ -55,7 +55,6 @@ class YHHKVisaRenewalPaymentVC: YHBaseViewController {
} }
} }
} }
} }
extension YHHKVisaRenewalPaymentVC { extension YHHKVisaRenewalPaymentVC {
...@@ -92,6 +91,17 @@ extension YHHKVisaRenewalPaymentVC { ...@@ -92,6 +91,17 @@ extension YHHKVisaRenewalPaymentVC {
} }
present(vc, animated: true, completion: nil) present(vc, animated: true, completion: nil)
} }
private func showTroubleshootingGuideVC() {
let vc = YHVisaRenewalTroubleshootingGuideVC()
let pc = YHBottomPresentationController(presentedViewController: vc, presenting: self)
pc.customRadius = 16.0
vc.transitioningDelegate = pc
vc.sureButtonEvent = { [weak vc] in
vc?.dismiss(animated: true)
}
present(vc, animated: true, completion: nil)
}
} }
extension YHHKVisaRenewalPaymentVC: UITableViewDelegate, UITableViewDataSource { extension YHHKVisaRenewalPaymentVC: UITableViewDelegate, UITableViewDataSource {
......
//
// YHVisaRenewalTroubleshootingGuideVC.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHVisaRenewalTroubleshootingGuideVC: YHBaseViewController {
enum TableRow {
case header
case tips(_ title: String, _ detail: ASAttributedString)
case workflow(_ title: String, _ workflows: [String])
}
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .plain)
view.backgroundColor = .clear
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
view.estimatedRowHeight = 52.0
view.dataSource = self
view.delegate = self
view.showsVerticalScrollIndicator = false
view.register(YHVisaRenewalTroubleshootingGuideHeaderCell.self, forCellReuseIdentifier: YHVisaRenewalTroubleshootingGuideHeaderCell.cellReuseIdentifier)
view.register(YHVisaRenewalWorkflowCell.self, forCellReuseIdentifier: YHVisaRenewalWorkflowCell.cellReuseIdentifier)
view.register(YHVisaRenewalGuideTipsCell.self, forCellReuseIdentifier: YHVisaRenewalGuideTipsCell.cellReuseIdentifier)
return view
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.setTitle("我知道了", for: .normal)
button.setTitle("我知道了", for: .highlighted)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .highlighted)
button.setTitleColor( UIColor(hex:0xffffff), for: .disabled)
button.addTarget(self, action: #selector(clickSureButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
var sureButtonEvent: (() -> Void)?
private lazy var datas: [TableRow] = []
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setupDatas()
}
}
extension YHVisaRenewalTroubleshootingGuideVC {
@objc private func clickSureButton() {
sureButtonEvent?()
}
private func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor.white
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(sureButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.right.equalToSuperview()
make.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom)
make.height.equalTo(64)
}
sureButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.centerY.equalToSuperview()
make.height.equalTo(48)
}
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalToSuperview()
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect.init(x: 0, y: 0, width: KScreenWidth, height: 24))
preferredContentSize = CGSize(width: KScreenWidth, height: KScreenHeight - k_Height_NavigationtBarAndStatuBar)
}
private func setupDatas() {
datas.append(.header)
let firstAtt: ASAttributedString = .init(string: "将军澳出入境大厅(将军澳宝邑路61号,港铁将军澳B出口,或调景岭A2出口)", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor.mainTextColor70), .paragraph(.lineHeightMultiple(1.07)))
datas.append(.tips("办理地址:", firstAtt))
let secAtt: ASAttributedString = .init(string: "有效旅行证件原件、香港身份证原件、获批函", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor.mainTextColor70), .paragraph(.lineHeightMultiple(1.07)))
datas.append(.tips("携带资料:", secAtt))
datas.append(.workflow("操作流程:", ["将军澳出入境6楼接待窗口取号", "等待叫号,告知主任需要缴费查看签证,等待主任核实", "若核实是以访客身份入境,现场写一份声明解释为何没有及时回港", "等待重发,预计3-6周,重发期间可以先离开香港", "重发后再持有效申请旅行证件入境香港后线上缴费"]))
let fourthAtt: ASAttributedString = .init(string: "1、可尝试现场和主任说明为何不能长期待在香港的原因,争取能够直接签证缴费,比如两地都有业务需要自己处理\n\n2、如验证码失效、网页加载无法接入确认缴费页面,请退出后检查网络后重新操作\n\n3、如缴费提示正在有一笔付款进行中要隔1个小时后再重新进到网页操作", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor.mainTextColor70), .paragraph(.lineHeightMultiple(1.07)))
datas.append(.tips("注意事项:", fourthAtt))
tableView.reloadData()
}
}
extension YHVisaRenewalTroubleshootingGuideVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count > 0 ? 1 : 0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = datas[indexPath.row]
switch tableRow {
case .header:
if let cell = tableView.dequeueReusableCell(withIdentifier: YHVisaRenewalTroubleshootingGuideHeaderCell.cellReuseIdentifier) as? YHVisaRenewalTroubleshootingGuideHeaderCell {
return cell
}
case let .tips(title, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHVisaRenewalGuideTipsCell.cellReuseIdentifier) as? YHVisaRenewalGuideTipsCell {
cell.setupCellInfo(title: title, detail: detail)
return cell
}
case let .workflow(title, workflows):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHVisaRenewalWorkflowCell.cellReuseIdentifier) as? YHVisaRenewalWorkflowCell {
cell.setupCellInfo(title: title, workflows: workflows)
return cell
}
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
}
...@@ -12,11 +12,13 @@ class YHDashLineView: UIView { ...@@ -12,11 +12,13 @@ class YHDashLineView: UIView {
private var strokeColor: CGColor = UIColor(hex: 0x121A26, alpha: 0.12).cgColor private var strokeColor: CGColor = UIColor(hex: 0x121A26, alpha: 0.12).cgColor
private var lineWidth: CGFloat = 1 private var lineWidth: CGFloat = 1
private var lineDashPattern: [NSNumber] = [2, 2] private var lineDashPattern: [NSNumber] = [2, 2]
private var isHorizontal: Bool = true
init(strokeColor: CGColor = UIColor(hex: 0x121A26, alpha: 0.12).cgColor, lineWidth: CGFloat = 1, lineDashPattern: [NSNumber] = [2, 2]) { init(strokeColor: CGColor = UIColor(hex: 0x121A26, alpha: 0.12).cgColor, lineWidth: CGFloat = 1, lineDashPattern: [NSNumber] = [2, 2], isHorizontal: Bool = true) {
self.strokeColor = strokeColor self.strokeColor = strokeColor
self.lineWidth = lineWidth self.lineWidth = lineWidth
self.lineDashPattern = lineDashPattern self.lineDashPattern = lineDashPattern
self.isHorizontal = isHorizontal
super.init(frame: CGRect.zero) super.init(frame: CGRect.zero)
} }
...@@ -36,9 +38,13 @@ class YHDashLineView: UIView { ...@@ -36,9 +38,13 @@ class YHDashLineView: UIView {
shapeLayer.lineDashPattern = lineDashPattern // 实线长度,间隔长度 shapeLayer.lineDashPattern = lineDashPattern // 实线长度,间隔长度
let path = CGMutablePath() let path = CGMutablePath()
path.move(to: CGPoint(x: 0, y: bounds.midY)) if isHorizontal {
path.addLine(to: CGPoint(x: bounds.width, y: bounds.midY)) path.move(to: CGPoint(x: 0, y: bounds.midY))
path.addLine(to: CGPoint(x: bounds.width, y: bounds.midY))
} else {
path.move(to: CGPoint(x: bounds.midX, y: 0)) // 从顶部中间开始
path.addLine(to: CGPoint(x: bounds.midX, y: bounds.height)) // 到底部中间结束
}
shapeLayer.path = path shapeLayer.path = path
layer.addSublayer(shapeLayer) layer.addSublayer(shapeLayer)
} }
......
//
// YHVisaRenewalTroubleshootingGuideHeaderCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalTroubleshootingGuideHeaderCell: UITableViewCell {
static let cellReuseIdentifier = "YHVisaRenewalTroubleshootingGuideHeaderCell"
private lazy var infoTitleIcon: UIImageView = {
let view = UIImageView()
view.contentMode = .scaleAspectFit
view.image = UIImage(named: "resign_visa_guide_error_title")
return view
}()
private lazy var bgIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "resign_visa_guide_bg")
return view
}()
private lazy var paragraphDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor70
label.numberOfLines = 0
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineHeightMultiple = 1.07
let attributedText = NSAttributedString(
string: "如缴费页面最终出现“不符合使用網上付款服務的资格”字样,请亲自前往将军澳入境处人工处理,以下是办理指引:",
attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]
)
label.attributedText = attributedText
return label
}()
private lazy var errorIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "resign_visa_guide_error_content")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension YHVisaRenewalTroubleshootingGuideHeaderCell {
private func setupUI() {
selectionStyle = .none
contentView.addSubview(bgIcon)
contentView.addSubview(infoTitleIcon)
contentView.addSubview(paragraphDetailLabel)
contentView.addSubview(errorIcon)
bgIcon.snp.makeConstraints { make in
make.left.top.right.equalToSuperview()
make.width.equalTo(bgIcon.snp.height)
}
infoTitleIcon.snp.makeConstraints { make in
make.top.equalToSuperview().offset(25)
make.left.equalToSuperview().offset(22)
make.height.equalTo(25)
make.width.equalTo(202)
}
paragraphDetailLabel.snp.makeConstraints { make in
make.top.equalTo(infoTitleIcon.snp.bottom).offset(34)
make.left.equalToSuperview().offset(20)
make.right.lessThanOrEqualToSuperview().offset(-20)
}
let whR = 335.0 / 300.0
errorIcon.snp.makeConstraints { make in
make.top.equalTo(paragraphDetailLabel.snp.bottom).offset(12)
make.left.equalTo(paragraphDetailLabel)
make.right.equalToSuperview().offset(-20)
make.width.equalTo(errorIcon.snp.height).multipliedBy(whR)
make.bottom.equalToSuperview()
}
}
}
//
// YHVisaRenewalWorkflowCell.swift
// galaxy
//
// Created by alexzzw on 2024/10/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaRenewalWorkflowCell: UITableViewCell {
static let cellReuseIdentifier = "YHVisaRenewalWorkflowCell"
private let circleWidth: CGFloat = 8
private var stepLabels: [UILabel] = []
private var circleViews: [UIView] = []
private var dashLines: [YHDashLineView] = []
private lazy var iconView: UIView = {
let view = UIView()
view.backgroundColor = .brandMainColor
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
private lazy var subContainerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 6, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, workflows: [String]) {
infoTitleLabel.text = title
stepLabels.removeAll()
circleViews.removeAll()
dashLines.removeAll()
let count = workflows.count
workflows.enumerated().forEach { [weak self] index, title in
guard let self = self else {
return
}
let circleView = self.getCircleView()
let label = self.getStepLabel(title)
self.stepLabels.append(label)
self.circleViews.append(circleView)
self.subContainerView.addSubview(label)
self.subContainerView.addSubview(circleView)
label.snp.makeConstraints { make in
if index == 0 {
make.top.equalTo(self.infoTitleLabel.snp.bottom).offset(12)
} else {
make.top.equalTo(self.stepLabels[index - 1].snp.bottom).offset(16)
}
make.left.equalTo(circleView.snp.right).offset(8)
make.right.lessThanOrEqualToSuperview().offset(-16)
if index == count - 1 {
make.bottom.equalToSuperview().offset(-20)
}
}
circleView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalTo(label.snp.top).offset(6)
make.width.height.equalTo(self.circleWidth)
}
if index != count - 1 {
let dashLine = self.getDashLineView()
self.dashLines.append(dashLine)
self.subContainerView.addSubview(dashLine)
}
}
guard dashLines.count > 0 else {
return
}
dashLines.enumerated().forEach { [weak self] index, line in
guard let self = self else {
return
}
guard self.circleViews.count > index + 1 else {
return
}
line.snp.makeConstraints { make in
make.width.equalTo(1)
make.centerX.equalTo(self.circleViews[index])
make.top.equalTo(self.circleViews[index].snp.bottom).offset(1)
make.bottom.equalTo(self.circleViews[index + 1].snp.top).offset(-1)
}
}
}
}
extension YHVisaRenewalWorkflowCell {
private func setupUI() {
selectionStyle = .none
contentView.addSubview(subContainerView)
subContainerView.addSubview(iconView)
subContainerView.addSubview(infoTitleLabel)
subContainerView.setContentHuggingPriority(.defaultLow, for: .vertical)
subContainerView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(20)
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.bottom.equalToSuperview()
}
iconView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(18)
make.left.equalToSuperview()
make.width.equalTo(4)
make.height.equalTo(14)
}
infoTitleLabel.snp.makeConstraints { make in
make.centerY.equalTo(iconView)
make.left.equalTo(iconView.snp.right).offset(12)
make.right.lessThanOrEqualToSuperview().offset(-16)
make.bottom.lessThanOrEqualToSuperview().offset(-20)
}
}
private func getStepLabel(_ title: String) -> UILabel {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = .mainTextColor70
label.numberOfLines = 0
let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineHeightMultiple = 1.1
let attributedText = NSAttributedString(
string: title,
attributes: [NSAttributedString.Key.paragraphStyle: paragraphStyle]
)
label.attributedText = attributedText
return label
}
private func getDashLineView() -> YHDashLineView {
let view = YHDashLineView(strokeColor: UIColor.brandMainColor30.cgColor, lineWidth: 1, lineDashPattern: [2, 2], isHorizontal: false)
return view
}
private func getCircleView() -> UIView {
let view = UIView()
view.layer.cornerRadius = circleWidth / 2.0
view.clipsToBounds = true
view.layer.borderColor = UIColor.brandMainColor30.cgColor
view.layer.borderWidth = 1.5
return view
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "resign_visa_guide_error_content@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "resign_visa_guide_error_content@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "resign_visa_guide_error_title@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "resign_visa_guide_error_title@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