Commit 06342c5d authored by David黄金龙's avatar David黄金龙

Merge branch 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into develop

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 消息
  案例分享逻辑修改
  在港记录页面完善
parents cd7c6972 da381d2f
......@@ -578,6 +578,15 @@
04F2434D2C9BB72500DF2C74 /* YHHKRecordsDurationItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2434C2C9BB72500DF2C74 /* YHHKRecordsDurationItemCell.swift */; };
04F2434F2C9BB74E00DF2C74 /* YHHKRecordsOccupyingSpaceCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2434E2C9BB74E00DF2C74 /* YHHKRecordsOccupyingSpaceCell.swift */; };
04F243512C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243502C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift */; };
04F243532C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243522C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift */; };
04F243552C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243542C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift */; };
04F243572C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243562C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift */; };
04F243592C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243582C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift */; };
04F2435B2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2435A2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift */; };
04F2435D2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2435C2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift */; };
04F2435F2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F2435E2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift */; };
04F243612C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243602C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift */; };
04F243632C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F243622C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift */; };
04F316442C3568F000024164 /* YHAboutGalaxyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */; };
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */; };
04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */; };
......@@ -1408,6 +1417,15 @@
04F2434C2C9BB72500DF2C74 /* YHHKRecordsDurationItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsDurationItemCell.swift; sourceTree = "<group>"; };
04F2434E2C9BB74E00DF2C74 /* YHHKRecordsOccupyingSpaceCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsOccupyingSpaceCell.swift; sourceTree = "<group>"; };
04F243502C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsSectionItemBaseCell.swift; sourceTree = "<group>"; };
04F243522C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsCustomerItemCell.swift; sourceTree = "<group>"; };
04F243542C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsInfoItemCell.swift; sourceTree = "<group>"; };
04F243562C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsRemarkCell.swift; sourceTree = "<group>"; };
04F243582C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsEditButtonCell.swift; sourceTree = "<group>"; };
04F2435A2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsTitleCell.swift; sourceTree = "<group>"; };
04F2435C2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsTimeSelectCell.swift; sourceTree = "<group>"; };
04F2435E2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsStayingPersonnelCell.swift; sourceTree = "<group>"; };
04F243602C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRecordsPersonnelSelectCell.swift; sourceTree = "<group>"; };
04F243622C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseCornerRadiusBorderView.swift; sourceTree = "<group>"; };
04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutGalaxyViewController.swift; sourceTree = "<group>"; };
04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateSheetView.swift; sourceTree = "<group>"; };
04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherServiceViewController.swift; sourceTree = "<group>"; };
......@@ -3515,6 +3533,14 @@
04F243342C95801B00DF2C74 /* V */ = {
isa = PBXGroup;
children = (
04F243522C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift */,
04F243542C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift */,
04F243562C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift */,
04F243582C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift */,
04F2435A2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift */,
04F2435C2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift */,
04F2435E2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift */,
04F243602C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift */,
04F243422C9BB3F800DF2C74 /* YHHKRecordsHeaderCell.swift */,
04F243442C9BB6A000DF2C74 /* YHHKRecordsExpandedCell.swift */,
04F243502C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift */,
......@@ -4245,6 +4271,7 @@
04AAA8DB2BF5E5A200FE9FD5 /* YHEmptyDataView.swift */,
A59B43CE2C4B5AD100B28379 /* YHShareViewOnTablebarView.swift */,
0418921E2C91BAAC00B9FB94 /* YHBaseDynamicCornerRadiusView.swift */,
04F243622C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift */,
04F2432E2C94704200DF2C74 /* YHPaddedLabel.swift */,
);
path = V;
......@@ -4775,6 +4802,7 @@
A5FF0F3E2C32F2590069852B /* YHActivityDetailCell2.swift in Sources */,
04256DD42C70538400A37BA4 /* YHFamilyInfoUpdateViewController.swift in Sources */,
04FD85702C21646200BEF9C5 /* YHMyInterestTopicCell.swift in Sources */,
04F243592C9C43A100DF2C74 /* YHHKRecordsEditButtonCell.swift in Sources */,
A5CA3F542C744CAB00EB22F5 /* YHUploadCertificateDetailCell.swift in Sources */,
04A7BD172BA43A0F00BD35A2 /* YHMyDocumentsDetailViewModel.swift in Sources */,
04256DF82C73726C00A37BA4 /* YHCerAppointViewModel.swift in Sources */,
......@@ -4813,6 +4841,7 @@
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */,
044EE24C2C94396E00A2FE3A /* YHResignCertificatePassportTableViewCell.swift in Sources */,
04F2435B2C9D140C00DF2C74 /* YHHKRecordsTitleCell.swift in Sources */,
041892242C91BCF100B9FB94 /* YHResignRoundCellType.swift in Sources */,
0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */,
048058392C7F289700502CAA /* YHTravelCertificateItemView.swift in Sources */,
......@@ -4870,12 +4899,14 @@
04B360F32C636525001EB053 /* YHPrincipleWaitResultViewController.swift in Sources */,
04358E0A2C7835B000811928 /* YHMakeCertificatePlaceModel.swift in Sources */,
A582B2412BB95998009D098C /* YHHKPlanTipsCell.swift in Sources */,
04F243552C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift in Sources */,
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */,
0485DFDC2C670C7200B50293 /* YHPrincipleSendMailView.swift in Sources */,
04E41DE82BD240570077EAE3 /* YHOrderDetailViewController.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
04F243632C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift in Sources */,
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */,
F8BAADA32C4FB41F0074D6C3 /* YHUatHelper.swift in Sources */,
0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */,
......@@ -4993,6 +5024,7 @@
0419A09A2C48F87B00A5FCFA /* YHInvitationWithGiftsViewController.swift in Sources */,
04F5F86E2C1AC351004A463C /* YHHKEventCenterViewController.swift in Sources */,
A567E5922BD7643D00D5D5A0 /* YHHomeWebViewModel.swift in Sources */,
04F243572C9C437F00DF2C74 /* YHHKRecordsRemarkCell.swift in Sources */,
A5D5ADEF2BB90FBC0039FA6B /* YHCheckEamilAlertView.swift in Sources */,
04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
......@@ -5115,6 +5147,7 @@
A5EB6C722C69FB9A0081FB6C /* YHOffivialApprovalGuildLineCheckView.swift in Sources */,
04256E272C77127600A37BA4 /* YHWaitAppointMembersCell.swift in Sources */,
047AA3D72C4A4399009C4554 /* YHInvitationWithGiftsShareView.swift in Sources */,
04F243532C9C434100DF2C74 /* YHHKRecordsCustomerItemCell.swift in Sources */,
A58A8C8F2BA6978100632765 /* YHMineCertificateEntryViewController.swift in Sources */,
045EEF1B2B9F171A0022A143 /* YHAddressPickViewTableViewCell.swift in Sources */,
04213B2F2C49154900797900 /* YHHomeInfoDetailContainerViewController.swift in Sources */,
......@@ -5214,6 +5247,7 @@
04A671622BA058DE00C1FB91 /* YHCertificateEditSheetView.swift in Sources */,
04AD317D2C295AE800DF5655 /* YHUserInfoSettingViewModel.swift in Sources */,
045A08C22C37EB8B00BCBABA /* YHMyFileListNoneCell.swift in Sources */,
04F2435F2C9D1C0600DF2C74 /* YHHKRecordsStayingPersonnelCell.swift in Sources */,
A5EB6C732C69FB9A0081FB6C /* YHOffivialApprovalSuccessCheckView.swift in Sources */,
04FD85682C21277800BEF9C5 /* YHMyNameCardAvatarInfoCell.swift in Sources */,
A566A79A2C219FA400980D06 /* YHHomeSalonAreaView.swift in Sources */,
......@@ -5332,6 +5366,7 @@
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */,
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */,
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
04F2435D2C9D153C00DF2C74 /* YHHKRecordsTimeSelectCell.swift in Sources */,
0430E6902C7EC78C000511E2 /* YHCardUploadView.swift in Sources */,
04FA8B2B2C06F59D00ABE43F /* YHAppleLoginManager.swift in Sources */,
048058372C7F03B500502CAA /* YHTravelCertificateUploadCell.swift in Sources */,
......@@ -5402,6 +5437,7 @@
045EEF092B9F171A0022A143 /* YHBasicInfoFillModel.swift in Sources */,
044EE2422C92EF0C00A2FE3A /* YHResignCertificateDetailEVisaViewController.swift in Sources */,
A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */,
04F243612C9D488200DF2C74 /* YHHKRecordsPersonnelSelectCell.swift in Sources */,
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */,
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */,
......
//
// YHBaseCornerRadiusBorderView.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHBaseCornerRadiusBorderView: UIView {
private var radius: CGFloat = 2
private var corner: UIRectCorner = .allCorners
var lineWidth: CGFloat? {
didSet {
if lineWidth != oldValue {
boarderLayers?.forEach {
$0.removeFromSuperlayer()
}
boarderLayers = nil
boarderLayers = createRoundedCornersAndBorder(corners: corner, radii: CGSize(width: radius, height: radius), lineWidth: lineWidth, lineColor: lineColor)
}
}
}
var lineColor: CGColor? {
didSet {
if lineColor != oldValue {
boarderLayers?.forEach {
$0.removeFromSuperlayer()
}
boarderLayers = nil
boarderLayers = createRoundedCornersAndBorder(corners: corner, radii: CGSize(width: radius, height: radius), lineWidth: lineWidth, lineColor: lineColor)
}
}
}
public init(cornerRadius: CGFloat, corner: UIRectCorner, lineWidth: CGFloat?, lineColor: CGColor?) {
self.corner = corner
self.radius = cornerRadius
self.lineWidth = lineWidth
self.lineColor = lineColor
super.init(frame: CGRect.zero)
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private var boarderLayers: [CAShapeLayer]?
private var viewBounds = CGRect.zero {
didSet {
guard viewBounds != oldValue else {
return
}
boarderLayers?.forEach {
$0.removeFromSuperlayer()
}
boarderLayers = nil
boarderLayers = createRoundedCornersAndBorder(corners: corner, radii: CGSize(width: radius, height: radius), lineWidth: lineWidth, lineColor: lineColor)
}
}
override public func layoutSubviews() {
super.layoutSubviews()
viewBounds = bounds
}
}
......@@ -34,6 +34,9 @@ class YHBaseDynamicCornerRadiusView: UIView {
private var viewBounds = CGRect.zero {
didSet {
guard viewBounds != oldValue else {
return
}
boarderLayer?.removeFromSuperlayer()
boarderLayer = nil
if let corner = corner {
......
......@@ -229,11 +229,6 @@ extension YHServiceCenterViewController {
}
@objc func pushOrderView() {
// let vc = YHResignGuidelinesExampleViewController()
// self.navigationController?.pushViewController(vc)
// return
var flag = true
if self.state == 1 || self.state == 3 {
......
......@@ -10,25 +10,31 @@ import UIKit
import JXSegmentedView
class YHHKRecordsContentVC: YHBaseViewController {
private lazy var tableView: UITableView = {
let view = UITableView(frame:.zero, style:.grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.rowHeight = 52
view.tableFooterView = UITableViewHeaderFooterView()
view.register(YHResignDocumentHeaderCell.self, forCellReuseIdentifier: YHResignDocumentHeaderCell.cellReuseIdentifier)
view.register(YHResignDocumentContentCell.self, forCellReuseIdentifier: YHResignDocumentContentCell.cellReuseIdentifier)
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
// Do any additional setup after loading the view.
}
/*
// MARK: - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/
}
extension YHHKRecordsContentVC {
......@@ -36,6 +42,13 @@ extension YHHKRecordsContentVC {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.bottom.equalToSuperview()
}
tableView.tableFooterView = UIView(frame: CGRect.init(x: 0, y: 0, width: KScreenWidth, height: kMargin))
}
}
......@@ -44,3 +57,29 @@ extension YHHKRecordsContentVC: JXSegmentedListContainerViewListDelegate {
return view
}
}
extension YHHKRecordsContentVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
0
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
//
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
}
//
// YHHKRecordsCustomerItemCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsCustomerItemCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsCustomerItemCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize: 14)
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
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?, detail: String?) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
}
}
extension YHHKRecordsCustomerItemCell {
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(1)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-12)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(6)
make.centerY.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(-18)
}
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsDurationItemCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor70
return label
}()
......
//
// YHHKRecordsEditButtonCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsEditButtonCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsEditButtonCell"
private lazy var centerLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
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?) {
centerLabel.text = title
}
}
extension YHHKRecordsEditButtonCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(centerLabel)
subContainerView.addSubview(topLineView)
topLineView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(1)
}
centerLabel.snp.makeConstraints { make in
make.center.equalToSuperview()
}
}
}
......@@ -13,7 +13,7 @@ class YHHKRecordsHeaderCell: UITableViewCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:17)
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
......@@ -55,7 +55,7 @@ extension YHHKRecordsHeaderCell {
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.bottom.equalTo(bottomLineView.snp.top).offset(-12)
make.bottom.equalToSuperview().offset(-12)
}
}
}
//
// YHHKRecordsInfoItemCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsInfoItemCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsInfoItemCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor50
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = .PFSC_R(ofSize: 14)
return label
}()
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?, detail: String?, topMargin: CGFloat = 18, bottomMargin: CGFloat = 18) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
infoTitleLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(topMargin)
make.bottom.equalToSuperview().offset(-bottomMargin)
}
}
}
extension YHHKRecordsInfoItemCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(9)
make.bottom.equalToSuperview().offset(-9)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(6)
make.centerY.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(-18)
}
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsLastStayCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor50
return label
}()
......
//
// YHHKRecordsPersonnelSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsPersonnelSelectCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHHKRecordsPersonnelSelectCell"
static let cellHeight: CGFloat = 32
static let offsetX: CGFloat = 10
static let labelFont = UIFont.PFSC_R(ofSize: 13)
let defaultBgColor: UIColor = .contentBkgColor
let defaultFontColor: UIColor = .mainTextColor
let selectedBgColor: UIColor = .brandMainColor8
let selectedFontColor: UIColor = .brandMainColor
let selectedBorderColor: UIColor = .brandMainColor
private lazy var backCover: YHBaseCornerRadiusBorderView = {
let view = YHBaseCornerRadiusBorderView(cornerRadius: 3, corner: .allCorners, lineWidth: nil, lineColor: selectedBorderColor.cgColor)
view.backgroundColor = defaultBgColor
return view
}()
private lazy var tagLabel: UILabel = {
let label = UILabel(frame: CGRect.zero)
label.textColor = defaultFontColor
label.font = YHHKRecordsPersonnelSelectCell.labelFont
label.textAlignment = .center
label.lineBreakMode = .byTruncatingTail
return label
}()
private lazy var selctedBadgeIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "personnel_selected_badge")
view.isHidden = true
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
configViews()
}
override var isSelected: Bool {
didSet {
if isSelected {
backCover.backgroundColor = selectedBgColor
tagLabel.textColor = selectedFontColor
backCover.lineWidth = 1
selctedBadgeIcon.isHidden = false
} else {
backCover.backgroundColor = defaultBgColor
tagLabel.textColor = defaultFontColor
backCover.lineWidth = nil
selctedBadgeIcon.isHidden = true
}
}
}
@available(*, unavailable)
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func configViews() {
contentView.addSubview(backCover)
backCover.addSubview(tagLabel)
backCover.addSubview(selctedBadgeIcon)
backCover.snp.makeConstraints { maker in
maker.edges.equalToSuperview()
}
tagLabel.snp.makeConstraints { maker in
maker.top.bottom.equalToSuperview()
maker.left.equalToSuperview().offset(YHHKRecordsPersonnelSelectCell.offsetX).priority(.high)
maker.right.equalToSuperview().offset(-YHHKRecordsPersonnelSelectCell.offsetX).priority(.high)
}
selctedBadgeIcon.snp.makeConstraints { make in
make.bottom.right.equalToSuperview()
make.width.height.equalTo(14)
}
}
func setupCellInfo(_ text: String?) {
tagLabel.text = text
}
}
//
// YHHKRecordsRemarkCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsRemarkCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsRemarkCell"
var textViewDidChanged: ((UITextView) -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor50
return label
}()
private lazy var remarkTextView: UITextView = {
let view = UITextView()
view.font = .PFSC_R(ofSize: 14)
view.textColor = .mainTextColor
view.tintColor = .mainTextColor
view.backgroundColor = .contentBkgColor
view.font = UIFont.systemFont(ofSize: 14)
view.returnKeyType = .default
view.enablesReturnKeyAutomatically = true
view.delegate = self
view.addObserver(self, forKeyPath: "attributedText", options: .new, context: nil)
view.textContainerInset = UIEdgeInsets.zero
view.textContainer.lineFragmentPadding = 0
return view
}()
private lazy var editTipsLabel: UILabel = {
let label = UILabel()
label.isHidden = true
label.text = "请输入备注内容"
label.font = UIFont.systemFont(ofSize: 14)
label.textColor = .mainTextColor30
return label
}()
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? = "备注:", titleColor: UIColor = .mainTextColor50, detail: String?, isEditable: Bool = false, cellType: YHResignRoundCellType = .mid) {
updateCellCorner(cellType)
infoTitleLabel.text = title
remarkTextView.isEditable = isEditable
remarkTextView.text = detail
editTipsLabel.isHidden = !isEditable || (detail?.count ?? 0) > 0
}
}
extension YHHKRecordsRemarkCell {
private func setupUI() {
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(remarkTextView)
subContainerView.addSubview(editTipsLabel)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
}
remarkTextView.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel)
make.right.equalToSuperview().offset(18)
make.height.equalTo(88)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(8)
make.bottom.equalToSuperview().offset(-16)
}
editTipsLabel.snp.makeConstraints { make in
make.left.equalTo(remarkTextView.snp.left).offset(12)
make.top.equalTo(remarkTextView.snp.top).offset(10)
}
}
}
extension YHHKRecordsRemarkCell: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
editTipsLabel.isHidden = textView.text.count > 0
textViewDidChanged?(textView)
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsSectionHeaderCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:14)
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
......
//
// YHHKRecordsStayingPersonnelCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsStayingPersonnelCell: YHResignDocumentCell {
private static let offsetX: CGFloat = 18
private static let offsetTop: CGFloat = 8
private static let offsetBottom: CGFloat = 24
private static let minimumLineSpacing: CGFloat = 12
private static let minimumInteritemSpacing: CGFloat = 8
var selectItemAction: ((String?) -> Void)?
var collectionData: [String] = [] {
didSet {
infoCollectionView.reloadData()
}
}
private var minWidth: CGFloat {
return (KScreenWidth - YHHKRecordsStayingPersonnelCell.offsetX * 2 - YHHKRecordsStayingPersonnelCell.minimumLineSpacing * 3) / 4.0
}
private var maxWidth: CGFloat {
return (KScreenWidth - YHHKRecordsStayingPersonnelCell.offsetX * 2)
}
static let cellReuseIdentifier = "YHHKRecordsStayingPersonnelCell"
private lazy var asteriskIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "asterisk_icon_6")
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
private lazy var layout: AlignedCollectionViewFlowLayout = {
return AlignedCollectionViewFlowLayout(horizontalAlignment: .left)
}()
private lazy var infoCollectionView: UICollectionView = {
layout.minimumLineSpacing = YHHKRecordsStayingPersonnelCell.minimumLineSpacing
layout.minimumInteritemSpacing = YHHKRecordsStayingPersonnelCell.minimumInteritemSpacing
layout.scrollDirection = .vertical
layout.sectionInset = UIEdgeInsets(top: YHHKRecordsStayingPersonnelCell.offsetTop, left: YHHKRecordsStayingPersonnelCell.offsetX, bottom: YHHKRecordsStayingPersonnelCell.offsetBottom, right: YHHKRecordsStayingPersonnelCell.offsetX)
let collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
collectionView.backgroundColor = .white
collectionView.delegate = self
collectionView.dataSource = self
collectionView.showsHorizontalScrollIndicator = false
collectionView.register(YHHKRecordsPersonnelSelectCell.self, forCellWithReuseIdentifier: YHHKRecordsPersonnelSelectCell.cellReuseIdentifier)
return collectionView
}()
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?) {
infoTitleLabel.text = title
}
}
extension YHHKRecordsStayingPersonnelCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(asteriskIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(bottomLineView)
asteriskIcon.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.centerY.equalTo(infoTitleLabel)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(asteriskIcon.snp.right).offset(2)
make.top.equalToSuperview().offset(16)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(1)
}
infoCollectionView.snp.makeConstraints { make in
make.top.equalTo(infoTitleLabel.snp.bottom)
make.left.right.equalToSuperview()
make.bottom.equalTo(bottomLineView.snp.top)
}
}
}
extension YHHKRecordsStayingPersonnelCell: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
func numberOfSections(in collectionView: UICollectionView) -> Int {
return collectionData.count > 0 ? 1 : 0
}
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return collectionData.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
if collectionData.count > indexPath.item, let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHKRecordsPersonnelSelectCell.cellReuseIdentifier, for: indexPath) as? YHHKRecordsPersonnelSelectCell {
let data = collectionData[indexPath.item]
cell.setupCellInfo(data)
return cell
}
return UICollectionViewCell()
}
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
if collectionData.count > indexPath.item {
let data = collectionData[indexPath.item]
let attrString = NSAttributedString(string: data, attributes: [.font: YHHKRecordsPersonnelSelectCell.labelFont])
var width = attrString.yh_width(containerHeight: YHHKRecordsPersonnelSelectCell.cellHeight) + 2 * YHHKRecordsPersonnelSelectCell.offsetX
if width < minWidth {
width = minWidth
}
if width > maxWidth {
width = maxWidth
}
return CGSize(width: width, height: YHHKRecordsPersonnelSelectCell.cellHeight)
}
return CGSize.zero
}
func collectionView(_ collectionView: UICollectionView, shouldSelectItemAt indexPath: IndexPath) -> Bool {
if collectionData.count > indexPath.item, let cell = collectionView.cellForItem(at: indexPath) as? YHHKRecordsPersonnelSelectCell {
if cell.isSelected {
collectionView.deselectItem(at: indexPath, animated: true)
selectItemAction?(nil)
return false
}
return true
}
return true
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if collectionData.count > indexPath.item, let cell = collectionView.cellForItem(at: indexPath) as? YHHKRecordsPersonnelSelectCell {
let data = collectionData[indexPath.item]
selectItemAction?(cell.isSelected ? data : nil)
}
}
}
......@@ -14,7 +14,7 @@ class YHHKRecordsSummaryItemCell: YHHKRecordsSectionItemBaseCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
......
//
// YHHKRecordsTimeSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsTimeSelectCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsTimeSelectCell"
private lazy var asteriskIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "asterisk_icon_6")
return view
}()
private lazy var arrowIcon: UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "right_arrow_black_20")
return view
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#222222")
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = .PFSC_M(ofSize: 14)
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
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?, detail: String?) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
}
}
extension YHHKRecordsTimeSelectCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(asteriskIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(arrowIcon)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
asteriskIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
arrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
asteriskIcon.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.centerY.equalToSuperview()
make.width.height.equalTo(6)
}
arrowIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(asteriskIcon.snp.right).offset(2)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
}
infoDetailLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.centerX.equalToSuperview().priority(.high)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(4).priority(.required)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(1)
}
}
}
//
// YHHKRecordsTitleCell.swift
// galaxy
//
// Created by alexzzw on 2024/9/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRecordsTitleCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHHKRecordsHeaderCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
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?) {
infoTitleLabel.text = title
}
}
extension YHHKRecordsTitleCell {
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(bottomLineView)
bottomLineView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(1)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-12)
}
}
}
......@@ -13,7 +13,7 @@ class YHResignDocumentContentCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:14)
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
......@@ -21,7 +21,7 @@ class YHResignDocumentContentCell: YHResignDocumentCell {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize:14)
label.font = .PFSC_R(ofSize: 14)
return label
}()
......
......@@ -13,7 +13,7 @@ class YHResignDocumentHeaderCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:17)
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
return label
}()
......@@ -21,7 +21,7 @@ class YHResignDocumentHeaderCell: YHResignDocumentCell {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize:13)
label.font = .PFSC_R(ofSize: 13)
return label
}()
......
......@@ -26,7 +26,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:17)
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor(hexString: "#222222")
label.text = "文书稿件"
return label
......@@ -34,7 +34,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private lazy var infoStatusLabel: YHPaddedLabel = {
let label = YHPaddedLabel(padding: UIEdgeInsets(top: 0, left: 4, bottom: 0, right: 4))
label.font = .PFSC_M(ofSize:10)
label.font = .PFSC_M(ofSize: 10)
label.layer.cornerRadius = 2
label.layer.masksToBounds = true
return label
......@@ -59,7 +59,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
private lazy var fileNameLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString: "#222222")
label.font = .PFSC_M(ofSize:14)
label.font = .PFSC_M(ofSize: 14)
label.numberOfLines = 0
return label
}()
......@@ -79,7 +79,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
let button = UIButton(type: .custom)
button.isHidden = true
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize:14)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(leftButtonDidClick(_:)), for: .touchUpInside)
return button
}()
......@@ -88,7 +88,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
let button = UIButton(type: .custom)
button.isHidden = true
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize:14)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(midButtonDidClick(_:)), for: .touchUpInside)
return button
}()
......@@ -97,7 +97,7 @@ class YHResignDocumentStatusCell: YHResignDocumentCell {
let button = UIButton(type: .custom)
button.isHidden = true
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.titleLabel?.font = .PFSC_R(ofSize:14)
button.titleLabel?.font = .PFSC_R(ofSize: 14)
button.addTarget(self, action: #selector(rightButtonDidClick(_:)), for: .touchUpInside)
return button
}()
......
......@@ -26,7 +26,7 @@ class YHResignDocumentTipsCell: YHResignDocumentCell {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize:13)
label.font = .PFSC_M(ofSize: 13)
label.textColor = .brandMainColor
label.text = "填写指引"
return label
......@@ -35,7 +35,7 @@ class YHResignDocumentTipsCell: YHResignDocumentCell {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor50
label.font = .PFSC_R(ofSize:12)
label.font = .PFSC_R(ofSize: 12)
label.numberOfLines = 0
return label
}()
......
......@@ -94,7 +94,6 @@ extension YHResignGuidelinesExampleShareViewController {
centerImageView = {
let view = UIImageView()
view.image = UIImage(named: centerImageName)
return view
}()
view.addSubview(centerImageView)
......@@ -126,6 +125,7 @@ extension YHResignGuidelinesExampleShareViewController {
make.center.equalToSuperview()
make.width.height.equalTo(21)
}
centerImageView.kf.setImage(with: URL(string: centerImageName))
let qrString = url
if let qrCode = qrString.generateQRCode() {
// 可以将qrCode设置为UIImageView的image属性来显示二维码
......
......@@ -7,6 +7,7 @@
//
import UIKit
import Kingfisher
enum YHResignGuidelinesExampleType: Int {
case house
......@@ -23,6 +24,9 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
var type: YHResignGuidelinesExampleType = .house
// var viewModel = YHResignCertificateListViewModel()
var viewModel = YHResignGuidelinesViewModel()
var height: CGFloat = 0
var id = 3473
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "银河续签案例分享"
......@@ -37,21 +41,21 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
}
func getData() {
if type == .house {
imageName = "resign_guidelines_example_house"
} else if type == .work {
imageName = "resign_guidelines_example_work"
} else if type == .taxation {
imageName = "resign_guidelines_example_taxation"
} else {
imageName = "resign_guidelines_example_nowork"
}
// if type == .house {
// imageName = "resign_guidelines_example_house"
// } else if type == .work {
// imageName = "resign_guidelines_example_work"
// } else if type == .taxation {
// imageName = "resign_guidelines_example_taxation"
// } else {
// imageName = "resign_guidelines_example_nowork"
// }
viewModel.getResignDetail(Id: 3473) {[weak self] success, error in
viewModel.getResignDetail(Id: id) {[weak self] success, error in
guard let self = self else { return }
self.imageName = self.viewModel.mainModel.content_url
self.getImageSizeFromURL(urlString: self.imageName)
}
tableView.reloadData()
}
func setView() {
......@@ -104,21 +108,41 @@ class YHResignGuidelinesExampleViewController: YHBaseViewController {
}
@objc func nextStep() {
var imageName = ""
if type == .house {
imageName = "resign_guidelines_example_house_share"
} else if type == .work {
imageName = "resign_guidelines_example_work_share"
} else if type == .taxation {
imageName = "resign_guidelines_example_taxation_share"
} else {
imageName = "resign_guidelines_example_nowork_share"
}
// var imageName = ""
// if type == .house {
// imageName = "resign_guidelines_example_house_share"
// } else if type == .work {
// imageName = "resign_guidelines_example_work_share"
// } else if type == .taxation {
// imageName = "resign_guidelines_example_taxation_share"
// } else {
// imageName = "resign_guidelines_example_nowork_share"
// }
let vc = YHResignGuidelinesExampleShareViewController()
vc.centerImageName = imageName
vc.centerImageName = self.viewModel.mainModel.share_url
vc.url = "https://baidu.com"
self.navigationController?.pushViewController(vc)
}
func getImageSizeFromURL(urlString: String) {
let imageURL = URL(string: urlString)!
// 使用Kingfisher的ImageDownloader下载图片数据
ImageDownloader.default.downloadImage(with: imageURL, options: [], progressBlock: nil) { (result) in
switch result {
case .success(let response):
// 使用UIImage初始化图片数据
let image = response.image
let size = image.size
let scale = size.width > 0 ? Double(size.height / size.width) : 0.0
// 获取图片的宽度和高度
self.height = KScreenWidth * scale
self.tableView.reloadData()
case .failure(let error):
print(error)
}
}
}
}
extension YHResignGuidelinesExampleViewController: UITableViewDelegate, UITableViewDataSource {
......@@ -133,15 +157,17 @@ extension YHResignGuidelinesExampleViewController: UITableViewDelegate, UITableV
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if type == .house {
return 986.fix
} else if type == .work {
return 925.fix
} else if type == .taxation {
return 946.fix
} else {
return 1069.fix
}
// if type == .house {
// return 986.fix
// } else if type == .work {
// return 925.fix
// } else if type == .taxation {
// return 946.fix
// } else {
// return 1069.fix
// }
return height
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
......@@ -154,7 +180,7 @@ class YHResignGuidelinesExampleTableViewCell: UITableViewCell {
var bgImageView: UIImageView!
var imageName: String? {
didSet {
bgImageView.image = UIImage(named: imageName ?? "")
bgImageView.kf.setImage(with: URL(string: imageName))
}
}
override func awakeFromNib() {
......
......@@ -21,6 +21,8 @@ class YHResignGuidelinesModel: SmartCodable {
var is_finished_transcode: Int = 0
var img_url_compress: String = ""
var clue_classify_img_url: String = ""
var share_url: String = ""
var content_url: String = ""
required init() {
}
......
......@@ -18,10 +18,11 @@ class YHResignGuidelinesViewModel: YHBaseViewModel {
//1. json字符串 转 对象
guard self != nil else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let data = dic["data"] as? [String: Any], let result = YHResignGuidelinesModel.deserialize(from: data) else {
guard let dic = json.data?.peel as? [String : Any], let result = YHResignGuidelinesModel.deserialize(from: dic) else {
callBackBlock(false,nil)
return
}
self?.mainModel = result
callBackBlock(true, nil)
} else {
......
......@@ -9,6 +9,49 @@
import UIKit
import SafariServices
enum YHOrderStage: Int {
case apply = 1 // 申请阶段
case certificate = 2 // 办证阶段
case resign = 3 // 续签
}
enum YHRedirectPage: String {
// 通用
case serviceTab = "service_tab" // 服务tab
case lifeTab = "life_tab" // 首页-生活tab
case newsTab = "news_tab" // 首页-资讯tab
// stage = 1 (申请阶段) 可以进入的路由页面
case myInfo = "my_info" // 我的信息
case myCertificate = "my_certificate" // 我的证件
case myScore = "my_score" // 我的评分
case myPlan = "my_plan" // 我的方案
case myDocument = "my_document" // 我的文书
case mySignature = "my_signature" // 我的签字
// stage = 2 (办证阶段) 可以进入的路由页面
case approveResult = "approve_result" // 港府获批结果
case familyInfoConfirm = "family_info_confirm" // 家庭信息确认
case addDependent = "add_dependent" // 新增受养人
case appointForIdCard = "appoint_for_id_card" // 赴港办证预约
case payElectronicVisa = "pay_electronic_visa" // 电子签证缴费
case travelGuide = "travel_guide" // 赴港行程指引
case prepareTravelCertificate = "prepare_travel_certificate" // 旅行证件准备
case uploadPassCertificate = "upload_pass_certificate" // 上传过关证件
case principalApprovalSuccess = "principal_approval_success" // 原则批获批成功
// stage = 3 (续签阶段) 可以进入的路由页面 续签阶段可以进入 办证阶段能进入的路由界面
case renewalGuide = "renewal_guide" // 身份续签指引
case renewalPlan = "renewal_plan" // 我的续签方案
case stayInHKRecord = "stay_in_hk_record" // 添加在港记录
case renewalCertificate = "renewal_certificate" // 续签证件管理
case renewalMaterial = "renewal_material" // 续签资料管理
case renewalDocument = "renewal_document" // 续签文书管理
}
class YHMessageDetailListVC: YHBaseViewController {
var type:Int = -1
......@@ -26,6 +69,53 @@ class YHMessageDetailListVC: YHBaseViewController {
let principleViewModel: YHPrincleViewModel = YHPrincleViewModel()
let serviceCenterViewModel = YHServiceCenterViewModel()
func getRoutersForOrderStage(_ stage: Int) -> [YHRedirectPage] {
if stage == YHOrderStage.apply.rawValue {
return [.myInfo,
.myCertificate,
.myScore,
.myPlan,
.myDocument,
.mySignature,]
}
if stage == YHOrderStage.certificate.rawValue {
return [.approveResult,
.familyInfoConfirm,
.addDependent,
.appointForIdCard,
.payElectronicVisa,
.travelGuide,
.prepareTravelCertificate,
.uploadPassCertificate,
.principalApprovalSuccess,]
}
if stage == YHOrderStage.resign.rawValue {
return [.approveResult,
.familyInfoConfirm,
.addDependent,
.appointForIdCard,
.payElectronicVisa,
.travelGuide,
.prepareTravelCertificate,
.uploadPassCertificate,
.principalApprovalSuccess,
.renewalGuide,
.renewalPlan,
.stayInHKRecord,
.renewalCertificate,
.renewalMaterial,
.renewalDocument,]
}
return []
}
lazy var navBar: YHCustomNavigationBar = {
......@@ -229,16 +319,16 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
printLog("redirectPage:\(item.redirectPage)")
if item.redirectPage == "service_tab" { // 服务tab页
if item.redirectPage == YHRedirectPage.serviceTab.rawValue { // 服务tab页
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .service)
} else if item.redirectPage == "life_tab" { // 首页-生活tab
} else if item.redirectPage == YHRedirectPage.lifeTab.rawValue { // 首页-生活tab
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .home)
NotificationCenter.default.post(name: YhConstant.YhNotification.didJumpToHomePageLifeTabNotification, object: nil)
} else if item.redirectPage == "news_tab" { // 首页-资讯tab
} else if item.redirectPage == YHRedirectPage.newsTab.rawValue { // 首页-资讯tab
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .home)
NotificationCenter.default.post(name: YhConstant.YhNotification.didJumpToHomePageNewsTabNotification, object: nil)
......@@ -250,7 +340,7 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
self.requestOrderStatus(orderId: orderId) {
status in
// status 1 申请阶段 2办证阶段 3续期阶段
self.handleRouter(msgDetailModel: item, status: status) {
self.handleRouter(message: item, stage: status) {
// 没有满足相应跳转条件默认跳转到服务页
goTabBarBy(tabType: .service)
}
......@@ -307,12 +397,12 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
printLog("visiblemsgIdSet:/n \(visibleUnreadMsgIdSet)")
}
func handleRouter(msgDetailModel:YHDetailMessageModel, status: Int, defaultRouterBlock:(()->())?) {
func handleRouter(message:YHDetailMessageModel, stage: Int, defaultRouterBlock:(()->())?) {
// status 1 申请阶段 2办证阶段 3续期阶段
if status == 1 { // 申请阶段
if stage == YHOrderStage.apply.rawValue { // 申请阶段
if self.type == YHMessageType.infoSubmit.rawValue { // 资料递交
if !msgDetailModel.url.isEmpty {
if let url = URL(string: msgDetailModel.url) {
if !message.url.isEmpty {
if let url = URL(string: message.url) {
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen
......@@ -323,156 +413,161 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
return
}
}
if msgDetailModel.redirectPage == "my_info" { // 我的信息
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "my_certificate" { // 我的证件
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "my_score" { // 我的评分
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHScoreDetailViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "my_plan" { // 我的方案
let vc = YHMineSchemeViewController()
navigationController?.pushViewController(vc)
} else if msgDetailModel.redirectPage == "my_document" { // 我的文书
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHMyDocumentsListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "my_signature" { // 我的签字
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHMySignatureListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else {
defaultRouterBlock?()
}
return
}
// 非申请阶段
// 根据订单状态获取其可以进入的路由数组
let routers = self.getRoutersForOrderStage(stage)
var routerStringArr = routers.map { page in
return page.rawValue
}
if routerStringArr.contains(message.redirectPage) {
self.routeToPage(message)
} else {
defaultRouterBlock?()
}
}
func routeToPage(_ msg:YHDetailMessageModel) {
if msgDetailModel.redirectPage == "approve_result" { // 港府获批结果(正式批)
let vc = YHOfficialApprovalResultVC()
navigationController?.pushViewController(vc)
} else if msgDetailModel.redirectPage == "family_info_confirm" { // 家庭信息确认
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHFamilyInfoConfirmViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "add_dependent" { // 新增受养人
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHAddAdoptersViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "appoint_for_id_card" { // 赴港办证预约
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "pay_electronic_visa" { // 电子签证缴费
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHVisaPaymentVC()
vc.orderID = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "travel_guide" { // 赴港行程指引
if let orderId = Int(msgDetailModel.orderId), var token = YHLoginManager.shared.userModel?.token {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/tohkList"
let addtionString = String.randomAlphaNumericStringT(6)//随机6个字母或者数字
let indexToInsert = token.index(token.startIndex, offsetBy: 6) //插入位置,这里以第六个字符后面为例
token.insert(contentsOf: addtionString, at: indexToInsert)
url = url + "?paramO=\(orderId)" + "&param=" + token
url = url + "&app_platform=ios" + "&app_version=" + UIDevice.appVersion()
printLog("UURL: \(url)")
let vc = YHH5WebViewVC()
vc.url = url
vc.isFullScreenFlag = false
vc.navTitle = "赴港行程指引"
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "prepare_travel_certificate" { // 旅行证件准备
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHTravelDocsPreparationListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "upload_pass_certificate" { // 上传过关证件
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHUploadCertificateVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "principal_approval_success" { // 原则批获批成功
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHPrincipleApprovedWaitSubmitVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "renewal_guide" { // 身份续签指引 H5
YHHUD.flash(message: "跳转至 身份续签指引")
if msg.redirectPage == YHRedirectPage.myInfo.rawValue { // 我的信息
if let orderId = Int(msg.orderId) {
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.myCertificate.rawValue { // 我的证件
if let orderId = Int(msg.orderId) {
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "renewal_plan" { // 我的续签方案 H5
YHHUD.flash(message: "跳转至 我的续签方案")
} else if msg.redirectPage == YHRedirectPage.myScore.rawValue { // 我的评分
if let orderId = Int(msg.orderId) {
let vc = YHScoreDetailViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.myPlan.rawValue { // 我的方案
let vc = YHMineSchemeViewController()
navigationController?.pushViewController(vc)
} else if msg.redirectPage == YHRedirectPage.myDocument.rawValue { // 我的文书
if let orderId = Int(msg.orderId) {
let vc = YHMyDocumentsListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "stay_in_hk_record" { // 添加在港记录
let vc = YHHKImmigrationRecordsVC()
navigationController?.pushViewController(vc)
} else if msg.redirectPage == YHRedirectPage.mySignature.rawValue { // 我的签字
if let orderId = Int(msg.orderId) {
let vc = YHMySignatureListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.approveResult.rawValue { // 港府获批结果(正式批)
let vc = YHOfficialApprovalResultVC()
navigationController?.pushViewController(vc)
} else if msg.redirectPage == YHRedirectPage.familyInfoConfirm.rawValue { // 家庭信息确认
if let orderId = Int(msg.orderId) {
let vc = YHFamilyInfoConfirmViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.addDependent.rawValue { // 新增受养人
if let orderId = Int(msg.orderId) {
let vc = YHAddAdoptersViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "renewal_certificate" { // 续签证件管理
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHResignCertificateListViewController()
} else if msg.redirectPage == YHRedirectPage.appointForIdCard.rawValue { // 赴港办证预约
if let orderId = Int(msg.orderId) {
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.payElectronicVisa.rawValue { // 电子签证缴费
if let orderId = Int(msg.orderId) {
let vc = YHVisaPaymentVC()
vc.orderID = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.travelGuide.rawValue { // 赴港行程指引
if let orderId = Int(msg.orderId), var token = YHLoginManager.shared.userModel?.token {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/tohkList"
let addtionString = String.randomAlphaNumericStringT(6)//随机6个字母或者数字
let indexToInsert = token.index(token.startIndex, offsetBy: 6) //插入位置,这里以第六个字符后面为例
token.insert(contentsOf: addtionString, at: indexToInsert)
url = url + "?paramO=\(orderId)" + "&param=" + token
url = url + "&app_platform=ios" + "&app_version=" + UIDevice.appVersion()
printLog("UURL: \(url)")
let vc = YHH5WebViewVC()
vc.url = url
vc.isFullScreenFlag = false
vc.navTitle = "赴港行程指引"
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "renewal_material" { // 续签资料管理
if let orderId = Int(msgDetailModel.orderId) {
let vc = YHResinMaterialManageContainerVC()
} else if msg.redirectPage == YHRedirectPage.prepareTravelCertificate.rawValue { // 旅行证件准备
if let orderId = Int(msg.orderId) {
let vc = YHTravelDocsPreparationListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msgDetailModel.redirectPage == "renewal_document" { // 续签文书管理
let vc = YHResignDocumentManagementVC()
navigationController?.pushViewController(vc)
} else if msg.redirectPage == YHRedirectPage.uploadPassCertificate.rawValue { // 上传过关证件
if let orderId = Int(msg.orderId) {
let vc = YHUploadCertificateVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else {
defaultRouterBlock?()
}
} else if msg.redirectPage == YHRedirectPage.principalApprovalSuccess.rawValue { // 原则批获批成功
if let orderId = Int(msg.orderId) {
let vc = YHPrincipleApprovedWaitSubmitVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.renewalGuide.rawValue { // 身份续签指引 H5
YHHUD.flash(message: "跳转至 身份续签指引")
} else if msg.redirectPage == YHRedirectPage.renewalPlan.rawValue { // 我的续签方案 H5
YHHUD.flash(message: "跳转至 我的续签方案")
} else if msg.redirectPage == YHRedirectPage.stayInHKRecord.rawValue { // 添加在港记录
let vc = YHHKImmigrationRecordsVC()
navigationController?.pushViewController(vc)
} else if msg.redirectPage == YHRedirectPage.renewalCertificate.rawValue { // 续签证件管理
if let orderId = Int(msg.orderId) {
let vc = YHResignCertificateListViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.renewalMaterial.rawValue { // 续签资料管理
if let orderId = Int(msg.orderId) {
let vc = YHResinMaterialManageContainerVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
} else if msg.redirectPage == YHRedirectPage.renewalDocument.rawValue { // 续签文书管理
let vc = YHResignDocumentManagementVC()
navigationController?.pushViewController(vc)
}
}
func requestOrderStatus(orderId:Int, callback:((_ status:Int)->())?) {
......
......@@ -100,3 +100,19 @@ extension NSMutableAttributedString {
}
}
extension NSAttributedString {
func yh_height(containerWidth: CGFloat) -> CGFloat {
let rect = boundingRect(with: CGSize(width: containerWidth, height: CGFloat.greatestFiniteMagnitude),
options: [.usesLineFragmentOrigin, .usesFontLeading],
context: nil)
return ceil(rect.size.height)
}
func yh_width(containerHeight: CGFloat) -> CGFloat {
let rect = boundingRect(with: CGSize(width: CGFloat.greatestFiniteMagnitude, height: containerHeight),
options: [.usesLineFragmentOrigin, .usesFontLeading],
context: nil)
return ceil(rect.size.width)
}
}
......@@ -89,5 +89,25 @@ extension UIView {
self.layer.mask = layer
return layer
}
@discardableResult
public func createRoundedCornersAndBorder(corners: UIRectCorner, radii: CGSize, lineWidth: CGFloat?, lineColor: CGColor?) -> [CAShapeLayer] {
var shapeLayers: [CAShapeLayer] = []
let path = UIBezierPath(roundedRect: bounds, byRoundingCorners: corners, cornerRadii: radii)
let shape = CAShapeLayer()
shape.path = path.cgPath
layer.mask = shape
shapeLayers.append(shape)
if let lineWidth = lineWidth, let lineColor = lineColor {
let bordLayer = CAShapeLayer()
bordLayer.lineWidth = lineWidth
bordLayer.strokeColor = lineColor
bordLayer.fillColor = UIColor.clear.cgColor
bordLayer.path = path.cgPath
layer.insertSublayer(bordLayer, at: 0)
shapeLayers.append(bordLayer)
}
return shapeLayers
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "asterisk_icon_6@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "asterisk_icon_6@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "personnel_selected_badge@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "personnel_selected_badge@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "right_arrow_black_20@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "right_arrow_black_20@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