Commit 9b21e39b authored by Steven杜宇's avatar Steven杜宇

// 旅行证件头部

parent e5b267aa
...@@ -386,6 +386,9 @@ ...@@ -386,6 +386,9 @@
047AA3FA2C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */; }; 047AA3FA2C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */; };
047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */; }; 047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */; };
0480582F2C7CA77900502CAA /* YHDisappointHKAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */; }; 0480582F2C7CA77900502CAA /* YHDisappointHKAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */; };
048058312C7DBDC900502CAA /* YHTravelCertificateTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */; };
048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */; };
048058352C7DC7AC00502CAA /* YHMyTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058342C7DC7AC00502CAA /* YHMyTestViewController.swift */; };
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; }; 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; }; 0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; }; 048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
...@@ -1152,6 +1155,9 @@ ...@@ -1152,6 +1155,9 @@
047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInvitationWithGiftsSelectItemView.swift; sourceTree = "<group>"; }; 047AA3F92C60739E009C4554 /* YHInvitationWithGiftsSelectItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInvitationWithGiftsSelectItemView.swift; sourceTree = "<group>"; };
047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSignAppendStepView.swift; sourceTree = "<group>"; }; 047AA3FB2C61EE7F009C4554 /* YHSignAppendStepView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSignAppendStepView.swift; sourceTree = "<group>"; };
0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDisappointHKAlertView.swift; sourceTree = "<group>"; }; 0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDisappointHKAlertView.swift; sourceTree = "<group>"; };
048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsView.swift; sourceTree = "<group>"; };
048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsCell.swift; sourceTree = "<group>"; };
048058342C7DC7AC00502CAA /* YHMyTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyTestViewController.swift; sourceTree = "<group>"; };
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; }; 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; }; 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; };
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; }; 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
...@@ -3476,6 +3482,7 @@ ...@@ -3476,6 +3482,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A598E9D62C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift */, A598E9D62C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift */,
048058342C7DC7AC00502CAA /* YHMyTestViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3485,6 +3492,8 @@ ...@@ -3485,6 +3492,8 @@
children = ( children = (
A598E9D92C7CA28200F84739 /* YHTravelDocsPreparationListCell.swift */, A598E9D92C7CA28200F84739 /* YHTravelDocsPreparationListCell.swift */,
A598E9DB2C7CA52300F84739 /* YHTravelDocsPreparationTipsCell.swift */, A598E9DB2C7CA52300F84739 /* YHTravelDocsPreparationTipsCell.swift */,
048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */,
048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4304,6 +4313,7 @@ ...@@ -4304,6 +4313,7 @@
04AD317B2C2428CB00DF5655 /* YHPeopleSuccessView.swift in Sources */, 04AD317B2C2428CB00DF5655 /* YHPeopleSuccessView.swift in Sources */,
045EEE862B9F171A0022A143 /* YHPreviewWorkExpViewController.swift in Sources */, 045EEE862B9F171A0022A143 /* YHPreviewWorkExpViewController.swift in Sources */,
045EEED22B9F171A0022A143 /* YHScoreTitleView.swift in Sources */, 045EEED22B9F171A0022A143 /* YHScoreTitleView.swift in Sources */,
048058352C7DC7AC00502CAA /* YHMyTestViewController.swift in Sources */,
045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */, 045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */,
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */, A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */, 045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
...@@ -4604,6 +4614,7 @@ ...@@ -4604,6 +4614,7 @@
A5EB6C712C69FB9A0081FB6C /* YHOffivialApprovalSuccessView.swift in Sources */, A5EB6C712C69FB9A0081FB6C /* YHOffivialApprovalSuccessView.swift in Sources */,
A567E5AD2BD7643D00D5D5A0 /* YHSearchInfoHistoryCell.swift in Sources */, A567E5AD2BD7643D00D5D5A0 /* YHSearchInfoHistoryCell.swift in Sources */,
04CE1ADC2C2AD91F001CB80A /* YHActivityTipsItemView.swift in Sources */, 04CE1ADC2C2AD91F001CB80A /* YHActivityTipsItemView.swift in Sources */,
048058312C7DBDC900502CAA /* YHTravelCertificateTipsView.swift in Sources */,
A5EF21332BA6E030005027E6 /* YHFileListViewController.swift in Sources */, A5EF21332BA6E030005027E6 /* YHFileListViewController.swift in Sources */,
045EEF1E2B9F171A0022A143 /* YHBottomNextView.swift in Sources */, 045EEF1E2B9F171A0022A143 /* YHBottomNextView.swift in Sources */,
A567E59E2BD7643D00D5D5A0 /* YHHomePageViewController.swift in Sources */, A567E59E2BD7643D00D5D5A0 /* YHHomePageViewController.swift in Sources */,
...@@ -4854,6 +4865,7 @@ ...@@ -4854,6 +4865,7 @@
A5F886B62C61F76200B63CF5 /* YHLongtapPictureSheetView.swift in Sources */, A5F886B62C61F76200B63CF5 /* YHLongtapPictureSheetView.swift in Sources */,
045EEF1C2B9F171A0022A143 /* YHAddressPresentAnimated.swift in Sources */, 045EEF1C2B9F171A0022A143 /* YHAddressPresentAnimated.swift in Sources */,
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */, 04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */,
048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */,
04256E252C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift in Sources */, 04256E252C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift in Sources */,
A5EF21312BA6DF94005027E6 /* YHMineSchemeViewController.swift in Sources */, A5EF21312BA6DF94005027E6 /* YHMineSchemeViewController.swift in Sources */,
045EEE872B9F171A0022A143 /* YHPreviewControllerHoldViewController.swift in Sources */, 045EEE872B9F171A0022A143 /* YHPreviewControllerHoldViewController.swift in Sources */,
......
//
// YHTestViewController.swift
// galaxy
//
// Created by edy on 2024/8/27.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHMyTestViewController: YHBaseViewController {
lazy var sectionItems:[[ASAttributedString]] = {
return [
[self.getTextWithType(type: 0),
self.getTextWithType(type: 1)],
[self.getTextWithType(type: 2)],
[self.getTextWithType(type: 3),
self.getTextWithType(type: 4)],
]
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionHeaderHeight = 16.0
tableView.estimatedSectionFooterHeight = 0.01
tableView.contentInsetAdjustmentBehavior = .never
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor(hex: 0xF8F9FB)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHTravelCertificateTipsCell.self, forCellReuseIdentifier: YHTravelCertificateTipsCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "旅行证件准本"
self.view.backgroundColor = .white
self.view.addSubview(self.tableView)
self.tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(0)
}
}
func getTextWithType(type: Int) -> ASAttributedString {
if type == 0 {
return .init("上传《港澳通行证》(需有效期≥dd-mm-yyyy)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 1 {
let a = ASAttributedString.init("办理逗留D签注", .font(UIFont.PFSC_R(ofSize:14)), .foreground(UIColor.mainTextColor(alpha: 0.5)))
let b = ASAttributedString.init("《港澳通行证逗留 (D) -办理操作指引》", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.brandMainColor))
let c = ASAttributedString.init("点击查看", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
return a+b+c
}
if type == 2 {
return .init("上传《护照》(需有效期≥签证时长+3个月)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 3 {
return .init("上传《护照》(需有效期≥dd-mm-yyyy)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
if type == 4 {
return .init("上传中国居留许可签证", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
return .init("", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
}
extension YHMyTestViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return sectionItems.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHTravelCertificateTipsCell.cellReuseIdentifier, for: indexPath) as! YHTravelCertificateTipsCell
if 0 <= indexPath.section && indexPath.section < sectionItems.count {
let arr = sectionItems[indexPath.section]
cell.tipsArr = arr
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < sectionItems.count {
}
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 16.0
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
}
//
// YHTravelCertificateTipsCell.swift
// galaxy
//
// Created by edy on 2024/8/27.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHTravelCertificateTipsCell: UITableViewCell {
static let cellReuseIdentifier = "YHTravelCertificateTipsCell"
var tipsArr: [ASAttributedString] = [] {
didSet {
grayView.removeSubviews()
var lastTipsView: YHTravelCertificateTipsView? = nil
for (index, text) in tipsArr.enumerated() {
let tipsView = YHTravelCertificateTipsView(frame: .zero)
tipsView.text = text
grayView.addSubview(tipsView)
tipsView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
if let lastTipsView = lastTipsView {
make.top.equalTo(lastTipsView.snp.bottom).offset(12)
} else {
make.top.equalTo(16)
}
if index == tipsArr.count-1 {
make.bottom.equalTo(-16)
}
}
lastTipsView = tipsView
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
var markView: UIView = {
let view = UIView()
view.backgroundColor = .brandMainColor
return view
}()
var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_M(ofSize:17)
label.text = "张山 需准备证件清单"
label.numberOfLines = 0
return label
}()
var grayView: UIView = {
let view = UIView()
view.backgroundColor = .init(hex: 0xF8F9FB)
view.layer.cornerRadius = 4.0
view.clipsToBounds = true
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.selectionStyle = .none
contentView.backgroundColor = .white
contentView.addSubview(markView)
contentView.addSubview(titleLabel)
contentView.addSubview(grayView)
markView.snp.makeConstraints { make in
make.width.equalTo(3)
make.height.equalTo(14)
make.left.equalTo(16)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(20)
make.left.equalTo(markView.snp.right).offset(8)
make.right.equalTo(-16)
}
grayView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(titleLabel.snp.bottom).offset(16)
make.bottom.equalTo(-20)
}
}
}
//
// YHTravelCertificateTipsView.swift
// galaxy
//
// Created by edy on 2024/8/27.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHTravelCertificateTipsView: UIView {
var text: ASAttributedString = .init("") {
didSet {
tipsLabel.attributed.text = text
}
}
var dotView: UIView = {
let view = UIView()
view.backgroundColor = .brandMainColor(alpha: 0.16)
view.layer.cornerRadius = 1.0
view.clipsToBounds = true
return view
}()
var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.mainTextColor(alpha: 0.5)
label.font = UIFont.PFSC_R(ofSize:14)
label.numberOfLines = 0
return label
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func createUI() {
self.addSubview(dotView)
self.addSubview(tipsLabel)
dotView.snp.makeConstraints { make in
make.width.height.equalTo(4)
make.left.equalTo(0)
make.top.equalTo(8)
}
tipsLabel.snp.makeConstraints { make in
make.top.equalTo(0)
make.left.equalTo(dotView.snp.right).offset(7.0)
make.right.equalTo(0)
make.bottom.equalTo(0)
}
}
}
...@@ -336,6 +336,11 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -336,6 +336,11 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
return return
} }
if true {
let vc = YHMyTestViewController()
self.navigationController?.pushViewController(vc)
}
// if true { // if true {
// let vc = YHCertificateAppointViewController() // let vc = YHCertificateAppointViewController()
// vc.orderId = 151090 // vc.orderId = 151090
......
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