Commit c8b6ee63 authored by Steven杜宇's avatar Steven杜宇

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

parents 40f7d810 4281d277
......@@ -62,6 +62,12 @@
0425E6462BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6452BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift */; };
0425E6482BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6472BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift */; };
0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E63A2C6DA106000511E2 /* CGFloat+Extention.swift */; };
0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */; };
0430E6442C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */; };
0430E6462C73171E000511E2 /* YHAdopterStepTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6452C73171E000511E2 /* YHAdopterStepTableViewCell.swift */; };
0430E6482C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6472C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift */; };
0430E64A2C731E02000511E2 /* YHAdopterIncomeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6492C731E02000511E2 /* YHAdopterIncomeTableViewCell.swift */; };
0430E64C2C732821000511E2 /* YHNoAdopterAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E64B2C732821000511E2 /* YHNoAdopterAlertView.swift */; };
0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; };
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; };
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
......@@ -529,6 +535,9 @@
A567E5B72BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5902BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift */; };
A567E5B82BD7643D00D5D5A0 /* YHSearchItemLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */; };
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */; };
A57BFDE42C732AEF00A78E51 /* YHVisaPaymentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A57BFDE32C732AEF00A78E51 /* YHVisaPaymentVC.swift */; };
A57BFDE62C73332E00A78E51 /* YHVisaPaymentTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A57BFDE52C73332E00A78E51 /* YHVisaPaymentTipsCell.swift */; };
A57BFDE82C73371300A78E51 /* YHVisaPayTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A57BFDE72C73371300A78E51 /* YHVisaPayTypeCell.swift */; };
A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A580371D2BAD784B0031C312 /* YHMySchemeViewModel.swift */; };
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A58037202BAD7B2A0031C312 /* YHMySchemeModel.swift */; };
A582B23D2BB944ED009D098C /* YHHKPlanDoctumentVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A582B23C2BB944ED009D098C /* YHHKPlanDoctumentVC.swift */; };
......@@ -734,6 +743,12 @@
0425E6452BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeHeadTotalScoreView.swift; sourceTree = "<group>"; };
0425E6472BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeHeadScoreItemView.swift; sourceTree = "<group>"; };
0430E63A2C6DA106000511E2 /* CGFloat+Extention.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+Extention.swift"; sourceTree = "<group>"; };
0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddAdoptersViewController.swift; sourceTree = "<group>"; };
0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMainTableViewCell.swift; sourceTree = "<group>"; };
0430E6452C73171E000511E2 /* YHAdopterStepTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterStepTableViewCell.swift; sourceTree = "<group>"; };
0430E6472C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterAddNewTableViewCell.swift; sourceTree = "<group>"; };
0430E6492C731E02000511E2 /* YHAdopterIncomeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterIncomeTableViewCell.swift; sourceTree = "<group>"; };
0430E64B2C732821000511E2 /* YHNoAdopterAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNoAdopterAlertView.swift; sourceTree = "<group>"; };
0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; };
0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; };
0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
......@@ -1210,6 +1225,9 @@
A567E5902BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHkLifeAndIdItemView.swift; sourceTree = "<group>"; };
A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchItemLayout.swift; sourceTree = "<group>"; };
A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractMainItemStatusCell.swift; sourceTree = "<group>"; };
A57BFDE32C732AEF00A78E51 /* YHVisaPaymentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaPaymentVC.swift; sourceTree = "<group>"; };
A57BFDE52C73332E00A78E51 /* YHVisaPaymentTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaPaymentTipsCell.swift; sourceTree = "<group>"; };
A57BFDE72C73371300A78E51 /* YHVisaPayTypeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVisaPayTypeCell.swift; sourceTree = "<group>"; };
A580371D2BAD784B0031C312 /* YHMySchemeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySchemeViewModel.swift; sourceTree = "<group>"; };
A58037202BAD7B2A0031C312 /* YHMySchemeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySchemeModel.swift; sourceTree = "<group>"; };
A582B23C2BB944ED009D098C /* YHHKPlanDoctumentVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKPlanDoctumentVC.swift; sourceTree = "<group>"; };
......@@ -1541,6 +1559,51 @@
path = Model;
sourceTree = "<group>";
};
0430E63C2C72DB48000511E2 /* AddAdopters */ = {
isa = PBXGroup;
children = (
0430E6402C72E0F6000511E2 /* VM */,
0430E63F2C72E0ED000511E2 /* C */,
0430E63E2C72E0E5000511E2 /* V */,
0430E63D2C72E0DA000511E2 /* M */,
);
path = AddAdopters;
sourceTree = "<group>";
};
0430E63D2C72E0DA000511E2 /* M */ = {
isa = PBXGroup;
children = (
);
path = M;
sourceTree = "<group>";
};
0430E63E2C72E0E5000511E2 /* V */ = {
isa = PBXGroup;
children = (
0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */,
0430E6452C73171E000511E2 /* YHAdopterStepTableViewCell.swift */,
0430E6472C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift */,
0430E6492C731E02000511E2 /* YHAdopterIncomeTableViewCell.swift */,
0430E64B2C732821000511E2 /* YHNoAdopterAlertView.swift */,
);
path = V;
sourceTree = "<group>";
};
0430E63F2C72E0ED000511E2 /* C */ = {
isa = PBXGroup;
children = (
0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
0430E6402C72E0F6000511E2 /* VM */ = {
isa = PBXGroup;
children = (
);
path = VM;
sourceTree = "<group>";
};
043BA8762C243477006EF02D /* people_head */ = {
isa = PBXGroup;
children = (
......@@ -2305,6 +2368,8 @@
046A952B2C6EFA710059326A /* Certificate(办证段) */ = {
isa = PBXGroup;
children = (
A57BFDE02C732A4700A78E51 /* VisaPayment(4电子签字缴费) */,
0430E63C2C72DB48000511E2 /* AddAdopters */,
04256DD72C72D9C200A37BA4 /* AppointCertificate(赴港办证预约) */,
049D62C32C6F259D00E811A1 /* FamilyInfoConfirm(家庭信息确认) */,
);
......@@ -3066,6 +3131,32 @@
path = V;
sourceTree = "<group>";
};
A57BFDE02C732A4700A78E51 /* VisaPayment(4电子签字缴费) */ = {
isa = PBXGroup;
children = (
A57BFDE22C732AA700A78E51 /* V */,
A57BFDE12C732A8300A78E51 /* C */,
);
path = "VisaPayment(4电子签字缴费)";
sourceTree = "<group>";
};
A57BFDE12C732A8300A78E51 /* C */ = {
isa = PBXGroup;
children = (
A57BFDE32C732AEF00A78E51 /* YHVisaPaymentVC.swift */,
);
path = C;
sourceTree = "<group>";
};
A57BFDE22C732AA700A78E51 /* V */ = {
isa = PBXGroup;
children = (
A57BFDE52C73332E00A78E51 /* YHVisaPaymentTipsCell.swift */,
A57BFDE72C73371300A78E51 /* YHVisaPayTypeCell.swift */,
);
path = V;
sourceTree = "<group>";
};
A580371C2BAD77DB0031C312 /* VM */ = {
isa = PBXGroup;
children = (
......@@ -3871,6 +3962,7 @@
045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */,
045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */,
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
A57BFDE42C732AEF00A78E51 /* YHVisaPaymentVC.swift in Sources */,
04F5F8682C198372004A463C /* YHHKClassListViewController.swift in Sources */,
A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */,
045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */,
......@@ -3913,6 +4005,7 @@
048787D12BCE61B20036E221 /* YHServiceNoOrderView.swift in Sources */,
A567E5AC2BD7643D00D5D5A0 /* YHAgreementAlertView.swift in Sources */,
04CE1ADD2C2AD91F001CB80A /* YHActivityDetailCell.swift in Sources */,
A57BFDE62C73332E00A78E51 /* YHVisaPaymentTipsCell.swift in Sources */,
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */,
A567E5972BD7643D00D5D5A0 /* YHHomeModel.swift in Sources */,
04AF82D82C291E960028CE2A /* YHMatchUserViewModel.swift in Sources */,
......@@ -3960,6 +4053,7 @@
A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */,
04B360F52C646844001EB053 /* YHPrincipleApprovedMailViewController.swift in Sources */,
049D62C22C6F258700E811A1 /* YHFamilyInfoConfirmViewController.swift in Sources */,
0430E64C2C732821000511E2 /* YHNoAdopterAlertView.swift in Sources */,
04CE1ADE2C2AD91F001CB80A /* YHActivityTravelCell.swift in Sources */,
A5ACE9522B4564F7002C94D2 /* YHServiceCenterMainViewController.swift in Sources */,
045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */,
......@@ -4152,6 +4246,7 @@
044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */,
A567E5B02BD7643D00D5D5A0 /* YHHomeWebBottomView.swift in Sources */,
045EEF0D2B9F171A0022A143 /* YHBasicInfoFillCell.swift in Sources */,
0430E6442C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift in Sources */,
044D0C1A2C22B40B00C5CF5E /* YHEditPersonalProfileViewController.swift in Sources */,
047AA3E82C4A6D69009C4554 /* YHListViewController.swift in Sources */,
048787D92BCF68530036E221 /* YHProgressView.swift in Sources */,
......@@ -4257,6 +4352,7 @@
0445E6B42BEA15C4003C52F9 /* YHAppVersionManager.swift in Sources */,
04CE1AD92C2AD91F001CB80A /* YHActivityDetailBottomView.swift in Sources */,
04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */,
0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */,
044D0C022C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift in Sources */,
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */,
A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */,
......@@ -4288,6 +4384,7 @@
045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */,
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */,
047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */,
0430E64A2C731E02000511E2 /* YHAdopterIncomeTableViewCell.swift in Sources */,
041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */,
044D0C0D2C22876A00C5CF5E /* YHEditBaseUserInfoViewController.swift in Sources */,
04C85DE32C368B45008B20D6 /* YHMyFileListViewController.swift in Sources */,
......@@ -4295,6 +4392,7 @@
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */,
045EEE8B2B9F171A0022A143 /* YHPreviewMainApplicantInfoViewController.swift in Sources */,
045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */,
0430E6482C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift in Sources */,
A5EB6C742C69FB9A0081FB6C /* YHOfficailLetterColledtionCell.swift in Sources */,
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */,
......@@ -4330,6 +4428,7 @@
045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */,
04256DDE2C72DA3B00A37BA4 /* YHCertificateAppointViewController.swift in Sources */,
A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */,
A57BFDE82C73371300A78E51 /* YHVisaPayTypeCell.swift in Sources */,
0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */,
047AA3FC2C61EE7F009C4554 /* YHSignAppendStepView.swift in Sources */,
044D0C1E2C22CFBF00C5CF5E /* YHEditWorkViewController.swift in Sources */,
......@@ -4349,6 +4448,7 @@
049D62C52C6F272800E811A1 /* YHRiskWarningCell.swift in Sources */,
045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */,
043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */,
0430E6462C73171E000511E2 /* YHAdopterStepTableViewCell.swift in Sources */,
04F5F8662C197FFF004A463C /* YHHKControllerHoldViewController.swift in Sources */,
A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */,
04FD85742C219CFD00BEF9C5 /* YHMatchResultListViewController.swift in Sources */,
......
......@@ -173,67 +173,70 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.viewModel.arrDataForSeviceCenterProgress[indexPath.section]
let vc = YHAddAdoptersViewController()
navigationController?.pushViewController(vc)
if model.status == 1 || model.status == 4 {
return
} else {
//1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
if model.type == 1 {
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderID
navigationController?.pushViewController(vc)
} else if model.type == 2 {
let vc = YHInformationPerfectListVC()
vc.orderId = orderID
navigationController?.pushViewController(vc)
} else if model.type == 3 { // 评分
handleRedPointFor(key: kMyScoreRedPointInfoKey, model: model)
let vc = YHScoreDetailViewController()
vc.orderId = orderID
// vc.model = serviceCenterMainReqVM.allInfoScoreModel
navigationController?.pushViewController(vc)
} else if model.type == 4 { // 方案
handleRedPointFor(key: kMyPlanRedPointInfoKey, model: model)
let vc = YHMineSchemeViewController()
navigationController?.pushViewController(vc)
} else if model.type == 5 {
let vc = YHMySignatureListViewController()
vc.orderId = orderID
navigationController?.pushViewController(vc)
} else if model.type == 6 {
let vc = YHMyDocumentsListViewController()
vc.orderId = orderID
vc.mobile = mobile
navigationController?.pushViewController(vc)
} else if model.type == 11 || model.type == 12 || model.type == 14 {
// 11 原则批等待结果
// 12 原则批待补件
// 14 原则批未获批准
let vc = YHPrincipleWaitResultViewController()
vc.status = model.type
vc.orderId = orderID
navigationController?.pushViewController(vc)
} else if model.type == 13 { //原则批已获批~
let vc = YHPrincipleApprovedResultVC()
vc.orderId = orderID
navigationController?.pushViewController(vc)
} else if model.type == 15 {
//正式批已获批~
let vc = YHOfficialApprovalResultVC()
self.navigationController?.pushViewController(vc)
}
}
// if model.status == 1 || model.status == 4 {
// return
// } else {
// //1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
// if model.type == 1 {
// let vc = YHMineCertificateEntryViewController()
// vc.orderId = orderID
// navigationController?.pushViewController(vc)
//
// } else if model.type == 2 {
// let vc = YHInformationPerfectListVC()
// vc.orderId = orderID
// navigationController?.pushViewController(vc)
//
// } else if model.type == 3 { // 评分
//
// handleRedPointFor(key: kMyScoreRedPointInfoKey, model: model)
// let vc = YHScoreDetailViewController()
// vc.orderId = orderID
//// vc.model = serviceCenterMainReqVM.allInfoScoreModel
// navigationController?.pushViewController(vc)
//
// } else if model.type == 4 { // 方案
// handleRedPointFor(key: kMyPlanRedPointInfoKey, model: model)
// let vc = YHMineSchemeViewController()
// navigationController?.pushViewController(vc)
//
// } else if model.type == 5 {
// let vc = YHMySignatureListViewController()
// vc.orderId = orderID
// navigationController?.pushViewController(vc)
//
// } else if model.type == 6 {
// let vc = YHMyDocumentsListViewController()
// vc.orderId = orderID
// vc.mobile = mobile
// navigationController?.pushViewController(vc)
//
// } else if model.type == 11 || model.type == 12 || model.type == 14 {
//
// // 11 原则批等待结果
// // 12 原则批待补件
// // 14 原则批未获批准
//
// let vc = YHPrincipleWaitResultViewController()
// vc.status = model.type
// vc.orderId = orderID
// navigationController?.pushViewController(vc)
//
// } else if model.type == 13 { //原则批已获批~
// let vc = YHPrincipleApprovedResultVC()
// vc.orderId = orderID
// navigationController?.pushViewController(vc)
//
// } else if model.type == 15 {
// //正式批已获批~
// let vc = YHOfficialApprovalResultVC()
// self.navigationController?.pushViewController(vc)
// }
// }
}
func handleRedPointFor(key: String, model: YHServiceCenterProgressModel) {
......
//
// YHAddAdoptersViewController.swift
// galaxy
//
// Created by EDY on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAddAdoptersViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "新增受养人"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1.0
setView()
getData()
}
func getData() {
tableView.reloadData()
let view = YHNoAdopterAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
func setView() {
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterMainTableViewCell.self)
tableView.register(cellWithClass: YHAdopterStepTableViewCell.self)
tableView.register(cellWithClass: YHAdopterAddNewTableViewCell.self)
tableView.register(cellWithClass: YHAdopterIncomeTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
}
// let bottonView = UIView()
// bottonView.backgroundColor = .white
// view.addSubview(bottonView)
// bottonView.snp.makeConstraints { make in
// make.height.equalTo(98)
// make.bottom.left.right.equalTo(view)
// }
//
// nextButton = {
// let button = UIButton(type: .custom)
// button.backgroundColor = UIColor.brandMainColor
// button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
// button.contentHorizontalAlignment = .center
// button.setTitle("下一步,预约赴港办证", for: .normal)
// button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
// button.layer.cornerRadius = kCornerRadius3
// button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
// return button
// }()
// view.addSubview(nextButton)
// nextButton.snp.makeConstraints { make in
// make.left.equalTo(16)
// make.right.equalTo(-16)
// make.bottom.equalTo(-8 - k_Height_safeAreaInsetsBottom())
// make.height.equalTo(48)
// }
}
@objc func nextStep() {
}
@objc func submit() {
}
}
extension YHAddAdoptersViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if clickIndex == -1 || clickIndex == 1 {
return 4
} else {
return 1
}
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterMainTableViewCell.self)
cell.clickBlock = { [weak self] index in
guard let self = self else { return }
self.clickIndex = index
self.tableView.reloadData()
if self.clickIndex == 0 {
let view = YHNoAdopterAlertView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
}
cell.clickIndex = clickIndex
return cell
} else if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterStepTableViewCell.self)
return cell
} else if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterAddNewTableViewCell.self)
return cell
} else {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterIncomeTableViewCell.self)
return cell
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 225
}
if indexPath.row == 1 {
return 136
}
if indexPath.row == 2 {
// count * 52
return 156
}
if indexPath.row == 3 {
return 199
}
return 40
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterAddNewTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterAddNewTableViewCell: UITableViewCell {
typealias ExperienceListBlock = (_ model: YHWorkItemListModel) -> ()
typealias IsMoreBlock = (_ isMore: Bool) -> ()
typealias NewWorkBlock = () -> ()
var clickBlock: ExperienceListBlock?
var deleteBlock: ExperienceListBlock?
var isMoreBlock: IsMoreBlock?
var newWorkBlock: NewWorkBlock?
var centerView: UIView!
var titleLabel: UILabel!
var cannalButton: UIButton!
var moreButton: UIButton!
var mainItemView: UIView!
var lineView: UIView!
var bottomView: YHWorkItemAddView!
var showPrompt: Bool = false
var dataSource: [YHWorkItemListModel]?{
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(14)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.text = "新增受养人"
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(23)
make.height.equalTo(24)
make.right.equalTo(-20)
}
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消操作", for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(cannal), for: .touchUpInside)
button.isHidden = true
return button
}()
centerView.addSubview(cannalButton)
cannalButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(24)
make.height.equalTo(20)
make.width.equalTo(60)
}
moreButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "work_more"), for: .normal)
button.addTarget(self, action: #selector(more), for: .touchUpInside)
return button
}()
centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(24)
make.height.equalTo(24)
make.width.equalTo(24)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(63)
make.height.equalTo(0.5)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-63)
make.top.equalTo(77)
}
bottomView = {
let view = YHWorkItemAddView()
view.addBtn.setTitle("新增受养人".local, for: .normal)
view.clickBlock = {[weak self] in
guard let self = self else { return }
if let block = self.newWorkBlock {
block()
}
}
return view
}()
centerView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.right.bottom.equalTo(-18)
make.left.equalTo(18)
make.height.equalTo(45)
}
}
func updateAllViews() {
mainItemView.removeSubviews()
guard let dataSource = dataSource else {
return
}
var total = 0
for i in 0 ..< dataSource.count {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(1)
make.right.equalTo(-18)
}
total = total + 1
let itemView = YHWorkItemView()
itemView.clickBlock = {[weak self] model in
guard let self = self else { return }
if let block = self.clickBlock {
block(model)
}
}
itemView.deleteBlock = {[weak self] model in
guard let self = self else { return }
if let block = self.deleteBlock {
block(model)
}
}
let model = dataSource[i]
itemView.tag = 4000 + i
itemView.dataSource = dataSource[i]
itemView.showPrompt = showPrompt
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(75)
make.right.equalTo(-18)
}
total = total + 75
}
}
@objc func cannal() {
moreButton.isHidden = false
cannalButton.isHidden = true
for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHWorkItemView
view.isShowDelete(i, isShow: false)
}
if let block = isMoreBlock {
block(false)
}
}
@objc func more() {
moreButton.isHidden = true
cannalButton.isHidden = false
for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHWorkItemView
view.isShowDelete(i, isShow: true)
}
if let block = isMoreBlock {
block(true)
}
}
}
//
// YHAdopterIncomeTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHAdopterIncomeTableViewCell: UITableViewCell {
typealias ClicktBlock = (_ model: Int) -> ()
var clickBlock: ClicktBlock?
var centerView: UIView!
var titleLabel: UILabel!
var alertLabel: UILabel!
var selectLabel: UILabel!
var lineView: UIView!
var moreButton: UIButton!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "主申请人资料"
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
make.right.equalTo(-18)
}
alertLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.mainTextColor50
label.numberOfLines = 0
let a: ASAttributedString = .init("温馨提示:", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("存款证明有效期为3个月", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",并且存款金额为每个成员(包括额外新增受养人)", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let d: ASAttributedString = .init("最低为12万", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
label.attributed.text = a + b + c + d
return label
}()
centerView.addSubview(alertLabel)
alertLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(79)
make.right.equalTo(-18)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(63)
make.height.equalTo(0.5)
}
selectLabel = {
let label = UILabel()
label.text = "上传存款证明"
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(selectLabel)
selectLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.bottom.equalTo(-20)
make.height.equalTo(20)
make.width.equalTo(110)
}
moreButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.contentHorizontalAlignment = .center
button.setTitle("待上传", for: .normal)
button.setImage(UIImage(named: "service_adopter_income_start"), for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(more), for: .touchUpInside)
return button
}()
centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in
make.bottom.equalTo(-16)
make.right.equalTo(-20)
make.height.equalTo(20)
make.width.equalTo(69)
}
moreButton.iconInRight(with: 1)
}
@objc func more() {
if let block = clickBlock {
block(0)
}
}
}
//
// YHAdopterMainTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHAdopterMainTableViewCell: UITableViewCell {
typealias ClicktBlock = (_ model: Int) -> ()
var clickBlock: ClicktBlock?
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var alertLabel: UILabel!
var selectLabel: UILabel!
var lineView: UIView!
var cannalButton: UIButton!
var moreButton: UIButton!
var clickIndex: Int? {
didSet {
if clickIndex == 0 {
moreButton.isSelected = false
cannalButton.isSelected = true
moreButton.layer.borderWidth = 0
cannalButton.layer.borderWidth = 1
}
if clickIndex == 1 {
moreButton.isSelected = true
cannalButton.isSelected = false
moreButton.layer.borderWidth = 1
cannalButton.layer.borderWidth = 0
}
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
let str = "*" + "受养人信息核实"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 17),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
make.right.equalTo(-18)
}
subTitleLabel = {
let label = UILabel()
label.text = "(受养人:与主申共同获得香港身份的配偶或子女)"
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.mainTextColor50
return label
}()
centerView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(42)
make.height.equalTo(17)
make.right.equalTo(-18)
}
alertLabel = {
let label = UILabel()
label.text = "(受养人:与主申共同获得香港身份的配偶或子女)"
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.mainTextColor50
label.numberOfLines = 0
let a: ASAttributedString = .init("备注:如最初递交申请文书时,已全部递交受养人信息与资料,此时", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("无需再新增受养人信息,则选项选择“否”", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
label.attributed.text = a + b
return label
}()
centerView.addSubview(alertLabel)
alertLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(97)
make.right.equalTo(-18)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(71)
make.height.equalTo(0.5)
}
selectLabel = {
let label = UILabel()
label.text = "是否新增受养人"
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(selectLabel)
selectLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.bottom.equalTo(-22)
make.height.equalTo(20)
make.width.equalTo(110)
}
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.contentHorizontalAlignment = .center
button.setTitle("否", for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(cannal), for: .touchUpInside)
button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.setBackgroundColor(color: UIColor(hex: 0xf0f4fb), forState: .selected)
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.layer.borderWidth = 0
button.layer.cornerRadius = 16
return button
}()
centerView.addSubview(cannalButton)
cannalButton.snp.makeConstraints { make in
make.bottom.equalTo(-16)
make.right.equalTo(-18)
make.height.equalTo(32)
make.width.equalTo(69)
}
moreButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.contentHorizontalAlignment = .center
button.setTitle("是", for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.setBackgroundColor(color: UIColor(hex: 0xf0f4fb), forState: .selected)
button.layer.cornerRadius = 16
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.layer.borderWidth = 0
button.addTarget(self, action: #selector(more), for: .touchUpInside)
return button
}()
centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in
make.bottom.equalTo(-16)
make.right.equalTo(-95)
make.height.equalTo(32)
make.width.equalTo(69)
}
}
@objc func cannal() {
moreButton.isSelected = false
cannalButton.isSelected = true
moreButton.layer.borderWidth = 0
cannalButton.layer.borderWidth = 1
if let block = clickBlock {
block(0)
}
}
@objc func more() {
moreButton.isSelected = true
cannalButton.isSelected = false
moreButton.layer.borderWidth = 1
cannalButton.layer.borderWidth = 0
if let block = clickBlock {
block(1)
}
}
}
//
// YHAdopterStepTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterStepTableViewCell: UITableViewCell {
typealias ClicktBlock = (_ model: Int) -> ()
var clickBlock: ClicktBlock?
var centerView: UIView!
var titleLabel: UILabel!
var stepView: YHStepView!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-7)
}
stepView = {
let step = YHStepView()
step.viewWidth = KScreenWidth - 32
step.dataSource = ["收集资料", "递交申请", "跟踪申请结果"]
step.block = { [weak self] (index) in
guard let self = self else { return }
}
return step
}()
centerView.addSubview(stepView)
stepView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(104)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.mainTextColor50
label.text = "受养人申请身份流程"
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(16)
make.right.equalTo(-18)
}
}
}
//
// YHNoAdopterAlertView.swift
// galaxy
//
// Created by EDY on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHNoAdopterAlertView: UIView {
var centerView: UIView!
var topImageView: UIImageView!
var bgImageView: UIImageView!
var titleLabel: UILabel!
var nextButton: UIButton!
var alertLabel: UILabel!
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x000000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.center.equalToSuperview()
make.height.equalTo(299)
make.width.equalTo(307)
}
topImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "service_adopter_no_alert")
return imageView
}()
centerView.addSubview(topImageView)
topImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.height.width.equalTo(53)
make.top.equalTo(30)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "风险预警"
label.textAlignment = .center
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(24)
make.top.equalTo(99)
}
alertLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.mainTextColor50
label.numberOfLines = 0
let a: ASAttributedString = .init("如若在主申请者激活电子签证后才新增受养人,", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("港府将会要求您提供香港的住址证明,可能会导致您产生租房的新增费用", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",请您务必知悉!", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
label.attributed.text = a + b + c
return label
}()
centerView.addSubview(alertLabel)
alertLabel.snp.makeConstraints { make in
make.left.equalTo(21)
make.top.equalTo(131)
make.right.equalTo(-21)
}
nextButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("我已知悉,确认", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(nextStep), for: .touchUpInside)
return button
}()
centerView.addSubview(nextButton)
nextButton.snp.makeConstraints { make in
make.left.equalTo(21)
make.right.equalTo(-21)
make.bottom.equalTo(-21)
make.height.equalTo(45)
}
}
@objc func dismiss() {
removeFromSuperview()
}
@objc func nextStep() {
removeFromSuperview()
}
}
//
// YHVisaPaymentVC.swift
// galaxy
//
// Created by davidhuangA on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaPaymentVC: YHBaseViewController {
var items: [String] = ["1", "1"] //for test hjl
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 = .clear
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHVisaPaymentTipsCell.self, forCellReuseIdentifier: YHVisaPaymentTipsCell.cellReuseIdentifier)
tableView.register(YHVisaPayTypeCell.self, forCellReuseIdentifier: YHVisaPayTypeCell.cellReuseIdentifier)
return tableView
}()
//我已悉知,确认
lazy var rewardBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.contentHorizontalAlignment = .center
button.setTitle("我已全部缴费,下一步", for: .normal)
button.setTitle("缴费结果更新中,请耐心等待", for: .disabled)
button.setTitleColor(UIColor.white, for: .normal)
button.setTitleColor(UIColor.white, for: .disabled)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.addTarget(self, action: #selector(clickNextBtn), for: .touchUpInside)
button.backgroundColor = UIColor.brandMainColor
return button
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .clear
view.addSubview(self.rewardBtn)
self.rewardBtn.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(44)
}
view.layer.zPosition = 10
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
}
private extension YHVisaPaymentVC {
func setupUI() {
gk_navTitle = "签证缴费"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(98)
}
tableView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
}
@objc func clickNextBtn() {
YHHUD.flash(message: "预计会在1个工作日内更新缴费结果")
disableSureButton()
}
func disableSureButton() {
rewardBtn.isEnabled = false
rewardBtn.backgroundColor = UIColor.brandMainColor30
}
}
extension YHVisaPaymentVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if 0 <= indexPath.section && indexPath.section < items.count {
if indexPath.section == 0 {
let warningCell = tableView.dequeueReusableCell(withIdentifier: YHVisaPaymentTipsCell.cellReuseIdentifier, for: indexPath)
return warningCell
}
}
let approveCell = tableView.dequeueReusableCell(withIdentifier: YHVisaPayTypeCell.cellReuseIdentifier, for: indexPath)
return approveCell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
return YHVisaPaymentTipsCell.cellH
}
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < items.count {
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 16.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 0.01
}
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
}
}
//
// YHVisaPayTypeCell.swift
// galaxy
//
// Created by davidhuangA on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
import Photos
class YHVisaPayTypeCell: UITableViewCell {
static let cellReuseIdentifier = "YHVisaPayTypeCell"
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
view.clipsToBounds = true
view.backgroundColor = .white
return view
}()
/// 已添加的长按手势
private lazy var longPress: UILongPressGestureRecognizer = {
return UILongPressGestureRecognizer(target: self, action: #selector(onLongPress(_:)))
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
}
private extension YHVisaPayTypeCell {
func saveImage(_ image: UIImage) {
// 确保应用有权访问相册
PHPhotoLibrary.requestAuthorization { status in
if status == .authorized {
// 保存图片到相册
UIImageWriteToSavedPhotosAlbum(image, nil, nil, nil)
DispatchQueue.main.async {
YHHUD.flash(message: "保存成功")
}
} else {
YHHUD.flash(message: "保存失败,请检查系统权限")
}
}
}
/// 长按
@objc func onLongPress(_ press: UILongPressGestureRecognizer) {
if press.state == .began {
saveImage(UIImage(named: "visaPay_qr") ?? UIImage())
}
}
func setupUI() {
selectionStyle = .none
backgroundColor = .clear
contentView.backgroundColor = .clear
contentView.addSubview(whiteContentView)
whiteContentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
//
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_M(ofSize:17)
label.text = "港府官网缴费方式"
whiteContentView.addSubview(label)
label.snp.makeConstraints { make in
make.top.equalTo(kMargin)
make.left.equalTo(kMargin)
make.height.equalTo(24)
}
let line = UIView()
line.backgroundColor = .separatorColor
whiteContentView.addSubview(line)
line.snp.makeConstraints { make in
make.top.equalTo(label.snp.bottom).offset(12)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(1)
}
let label1 = UILabel()
label1.textColor = UIColor.mainTextColor
label1.font = UIFont.PFSC_M(ofSize:14)
label1.text = "方式一"
whiteContentView.addSubview(label1)
label1.snp.makeConstraints { make in
make.top.equalTo(line.snp.bottom).offset(kMargin)
make.left.equalTo(kMargin)
make.height.equalTo(20)
}
let label2 = UILabel()
label2.textColor = UIColor.mainTextColor50
label2.font = UIFont.PFSC_R(ofSize:12)
label2.text = "点击下方链接,跳转浏览器,进入港府官网操作缴费"
whiteContentView.addSubview(label2)
label2.snp.makeConstraints { make in
make.top.equalTo(label1.snp.bottom).offset(6)
make.left.equalTo(kMargin)
make.height.equalTo(17)
}
let holdView = UIView()
holdView.backgroundColor = .separatorColor
holdView.layer.cornerRadius = kCornerRadius4
holdView.clipsToBounds = true
whiteContentView.addSubview(holdView)
holdView.snp.makeConstraints { make in
make.top.equalTo(label2.snp.bottom).offset(6)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(66)
}
let link = UILabel()
link.numberOfLines = 0
link.textColor = UIColor.brandMainColor
link.font = UIFont.PFSC_R(ofSize:12)
let linkTxt : String = "https://www.gov.hk/tc/residents/immigration/nonpermanent/onlinepaymentforevisa.htm"
let aa: ASAttributedString = .init(NSAttributedString(string: linkTxt), .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor),.underline([.single], color: UIColor.brandMainColor),.action {
if let url = URL(string: linkTxt) {
if UIApplication.shared.canOpenURL(url) {
UIApplication.shared.open(url, options: [:], completionHandler: nil)
} else {
// 显示一个提示,告知用户无法打开链接
print("无法打开链接")
}
}
})
link.attributed.text = aa
holdView.addSubview(link)
link.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
}
let line2 = UIView()
line2.backgroundColor = .separatorColor
whiteContentView.addSubview(line2)
line2.snp.makeConstraints { make in
make.top.equalTo(holdView.snp.bottom).offset(16)
make.left.equalTo(kMargin)
make.right.equalTo(-kMargin)
make.height.equalTo(1)
}
let qrCode : UIImageView = UIImageView(image: UIImage(named: "visaPay_qr"))
qrCode.contentMode = .scaleAspectFill
qrCode.isUserInteractionEnabled = true
qrCode.addGestureRecognizer(longPress)
whiteContentView.addSubview(qrCode)
qrCode.snp.makeConstraints { make in
make.top.equalTo(line2.snp.bottom).offset(18)
make.right.equalTo(-kMargin)
make.height.width.equalTo(86)
make.bottom.equalToSuperview().offset(-kMargin)
}
let label3 = UILabel()
label3.textColor = UIColor.mainTextColor
label3.font = UIFont.PFSC_M(ofSize:14)
label3.text = "方式二"
whiteContentView.addSubview(label3)
label3.snp.makeConstraints { make in
make.top.equalTo(qrCode.snp.top).offset(12)
make.left.equalTo(kMargin)
make.height.equalTo(20)
}
let label4 = UILabel()
label4.numberOfLines = 0
label4.lineBreakMode = .byWordWrapping
label4.textColor = UIColor.mainTextColor50
label4.font = UIFont.PFSC_R(ofSize:12)
label4.text = "用其他设备直接扫码,或长按保存图片,通过微信识别打开"
whiteContentView.addSubview(label4)
label4.snp.makeConstraints { make in
make.top.equalTo(label3.snp.bottom).offset(6)
make.left.equalTo(kMargin)
make.right.equalTo(qrCode.snp.left).offset(-kMargin)
}
}
}
//
// YHVisaPaymentTipsCell.swift
// galaxy
//
// Created by davidhuangA on 2024/8/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHVisaPaymentTipsCell: UITableViewCell {
static let cellReuseIdentifier = "YHVisaPaymentTipsCell"
static let cellH : CGFloat = 184.0 * (KScreenWidth - 16 * 2) / 343.0
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
view.clipsToBounds = true
return view
}()
lazy var bgImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "visalPay_tips"))
view.layer.cornerRadius = kCornerRadius6
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() {
selectionStyle = .none
backgroundColor = .clear
contentView.backgroundColor = .clear
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(bgImgView)
whiteContentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
bgImgView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
}
}
......@@ -11,6 +11,7 @@ import UIKit
class YHStepView: UIScrollView {
static let height = 104.0
var viewWidth = KScreenWidth
typealias Block = (Int) -> ()
var block: Block?
var dataSource: [String]? {
......@@ -30,15 +31,15 @@ class YHStepView: UIScrollView {
let lineCount = dataSource.count - 1
if dataSource.count <= 2 {
let contentWidth = 89 * 2 + Int(stepSpace) * 2 * lineCount + 14 * dataSource.count
let width = (KScreenWidth - CGFloat(contentWidth)) / lineCount.cgFloat
let width = (viewWidth - CGFloat(contentWidth)) / lineCount.cgFloat
return width
} else if dataSource.count <= 4 {
let contentWidth = 43 * 2 + Int(stepSpace) * 2 * lineCount + 14 * dataSource.count
let width = (KScreenWidth - CGFloat(contentWidth)) / lineCount.cgFloat
let width = (viewWidth - CGFloat(contentWidth)) / lineCount.cgFloat
return width
} else {
let contentWidth = 43 * 2 + Int(stepSpace) * 2 * 3 + 14 * 4
let width = (KScreenWidth - CGFloat(contentWidth)) / lineCount.cgFloat
let width = (viewWidth - CGFloat(contentWidth)) / lineCount.cgFloat
return width
}
}
......
......@@ -120,11 +120,14 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
view.likeClick = {
[weak self] in
guard let self = self else { return }
if !checkLogin() { return }
let vc = YHMyLikeActivityViewController()
vc.myDefaultNavItemIndex = 0
self.navigationController?.pushViewController(vc)
// if !checkLogin() { return }
// let vc = YHMyLikeActivityViewController()
// vc.myDefaultNavItemIndex = 0
// self.navigationController?.pushViewController(vc)
print("点赞")
let vc = YHVisaPaymentVC()
self.navigationController?.pushViewController(vc) //for test hjl
}
view.collectClick = {
[weak self] in
......
......@@ -12,7 +12,7 @@ extension CGFloat {
public func scaleSizeFrom375px(size: CGFloat) -> CGFloat {
let screenWidth = UIScreen.main.bounds.width
// 假设设计稿基于375pt宽度,iPhone 6的屏幕宽度
let baseWidth: CGFloat = 375
let baseWidth: CGFloat = 375.0
// 计算换算比例
let scale = screenWidth / baseWidth
// 应用换算比例
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "image 56@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "image 56@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "tips@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "tips@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_adopter_income_fail@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_adopter_income_fail@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_adopter_income_start@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_adopter_income_start@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_adopter_income_success@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_adopter_income_success@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_adopter_no_alert@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_adopter_no_alert@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