Commit 42b165cc authored by pete谢兆麟's avatar pete谢兆麟

新增受养人UI

parent 75425af6
...@@ -51,6 +51,12 @@ ...@@ -51,6 +51,12 @@
0425E6462BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6452BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift */; }; 0425E6462BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6452BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift */; };
0425E6482BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6472BA96B4100A5E763 /* YHSchemeHeadScoreItemView.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 */; }; 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 */; }; 0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; };
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; }; 0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; };
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; }; 0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
...@@ -712,6 +718,12 @@ ...@@ -712,6 +718,12 @@
0425E6452BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeHeadTotalScoreView.swift; sourceTree = "<group>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
...@@ -1469,6 +1481,51 @@ ...@@ -1469,6 +1481,51 @@
path = Model; path = Model;
sourceTree = "<group>"; 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 */ = { 043BA8762C243477006EF02D /* people_head */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -2233,6 +2290,7 @@ ...@@ -2233,6 +2290,7 @@
046A952B2C6EFA710059326A /* Certificate(办证段) */ = { 046A952B2C6EFA710059326A /* Certificate(办证段) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0430E63C2C72DB48000511E2 /* AddAdopters */,
049D62C32C6F259D00E811A1 /* FamilyInfoConfirm(家庭信息确认) */, 049D62C32C6F259D00E811A1 /* FamilyInfoConfirm(家庭信息确认) */,
); );
path = "Certificate(办证段)"; path = "Certificate(办证段)";
...@@ -3883,6 +3941,7 @@ ...@@ -3883,6 +3941,7 @@
A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */, A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */,
04B360F52C646844001EB053 /* YHPrincipleApprovedMailViewController.swift in Sources */, 04B360F52C646844001EB053 /* YHPrincipleApprovedMailViewController.swift in Sources */,
049D62C22C6F258700E811A1 /* YHFamilyInfoConfirmViewController.swift in Sources */, 049D62C22C6F258700E811A1 /* YHFamilyInfoConfirmViewController.swift in Sources */,
0430E64C2C732821000511E2 /* YHNoAdopterAlertView.swift in Sources */,
04CE1ADE2C2AD91F001CB80A /* YHActivityTravelCell.swift in Sources */, 04CE1ADE2C2AD91F001CB80A /* YHActivityTravelCell.swift in Sources */,
A5ACE9522B4564F7002C94D2 /* YHServiceCenterMainViewController.swift in Sources */, A5ACE9522B4564F7002C94D2 /* YHServiceCenterMainViewController.swift in Sources */,
045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */, 045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */,
...@@ -4073,6 +4132,7 @@ ...@@ -4073,6 +4132,7 @@
044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */, 044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */,
A567E5B02BD7643D00D5D5A0 /* YHHomeWebBottomView.swift in Sources */, A567E5B02BD7643D00D5D5A0 /* YHHomeWebBottomView.swift in Sources */,
045EEF0D2B9F171A0022A143 /* YHBasicInfoFillCell.swift in Sources */, 045EEF0D2B9F171A0022A143 /* YHBasicInfoFillCell.swift in Sources */,
0430E6442C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift in Sources */,
044D0C1A2C22B40B00C5CF5E /* YHEditPersonalProfileViewController.swift in Sources */, 044D0C1A2C22B40B00C5CF5E /* YHEditPersonalProfileViewController.swift in Sources */,
047AA3E82C4A6D69009C4554 /* YHListViewController.swift in Sources */, 047AA3E82C4A6D69009C4554 /* YHListViewController.swift in Sources */,
048787D92BCF68530036E221 /* YHProgressView.swift in Sources */, 048787D92BCF68530036E221 /* YHProgressView.swift in Sources */,
...@@ -4176,6 +4236,7 @@ ...@@ -4176,6 +4236,7 @@
0445E6B42BEA15C4003C52F9 /* YHAppVersionManager.swift in Sources */, 0445E6B42BEA15C4003C52F9 /* YHAppVersionManager.swift in Sources */,
04CE1AD92C2AD91F001CB80A /* YHActivityDetailBottomView.swift in Sources */, 04CE1AD92C2AD91F001CB80A /* YHActivityDetailBottomView.swift in Sources */,
04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */, 04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */,
0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */,
044D0C022C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift in Sources */, 044D0C022C216AAF00C5CF5E /* YHInformationAuthorizeViewModel.swift in Sources */,
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */, A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */,
A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */, A59B43CB2C4A151200B28379 /* YHStatusAdvantageVC.swift in Sources */,
...@@ -4206,6 +4267,7 @@ ...@@ -4206,6 +4267,7 @@
045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */, 045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */,
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */, 049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */,
047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */, 047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */,
0430E64A2C731E02000511E2 /* YHAdopterIncomeTableViewCell.swift in Sources */,
041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */, 041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */,
044D0C0D2C22876A00C5CF5E /* YHEditBaseUserInfoViewController.swift in Sources */, 044D0C0D2C22876A00C5CF5E /* YHEditBaseUserInfoViewController.swift in Sources */,
04C85DE32C368B45008B20D6 /* YHMyFileListViewController.swift in Sources */, 04C85DE32C368B45008B20D6 /* YHMyFileListViewController.swift in Sources */,
...@@ -4213,6 +4275,7 @@ ...@@ -4213,6 +4275,7 @@
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */, 0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */,
045EEE8B2B9F171A0022A143 /* YHPreviewMainApplicantInfoViewController.swift in Sources */, 045EEE8B2B9F171A0022A143 /* YHPreviewMainApplicantInfoViewController.swift in Sources */,
045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */, 045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */,
0430E6482C731B0A000511E2 /* YHAdopterAddNewTableViewCell.swift in Sources */,
A5EB6C742C69FB9A0081FB6C /* YHOfficailLetterColledtionCell.swift in Sources */, A5EB6C742C69FB9A0081FB6C /* YHOfficailLetterColledtionCell.swift in Sources */,
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */, 045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */, A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */,
...@@ -4265,6 +4328,7 @@ ...@@ -4265,6 +4328,7 @@
049D62C52C6F272800E811A1 /* YHRiskWarningCell.swift in Sources */, 049D62C52C6F272800E811A1 /* YHRiskWarningCell.swift in Sources */,
045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */, 045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */,
043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */, 043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */,
0430E6462C73171E000511E2 /* YHAdopterStepTableViewCell.swift in Sources */,
04F5F8662C197FFF004A463C /* YHHKControllerHoldViewController.swift in Sources */, 04F5F8662C197FFF004A463C /* YHHKControllerHoldViewController.swift in Sources */,
A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */, A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */,
04FD85742C219CFD00BEF9C5 /* YHMatchResultListViewController.swift in Sources */, 04FD85742C219CFD00BEF9C5 /* YHMatchResultListViewController.swift in Sources */,
......
...@@ -173,67 +173,70 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource { ...@@ -173,67 +173,70 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let model = self.viewModel.arrDataForSeviceCenterProgress[indexPath.section] let model = self.viewModel.arrDataForSeviceCenterProgress[indexPath.section]
let vc = YHAddAdoptersViewController()
navigationController?.pushViewController(vc)
if model.status == 1 || model.status == 4 {
return // if model.status == 1 || model.status == 4 {
} else { // return
//1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书 // } else {
if model.type == 1 { // //1 证件 2 信息完善 3 我的评分 4 我的方案 5 我的签字 6我的文书
let vc = YHMineCertificateEntryViewController() // if model.type == 1 {
vc.orderId = orderID // let vc = YHMineCertificateEntryViewController()
navigationController?.pushViewController(vc) // vc.orderId = orderID
// navigationController?.pushViewController(vc)
} else if model.type == 2 { //
let vc = YHInformationPerfectListVC() // } else if model.type == 2 {
vc.orderId = orderID // let vc = YHInformationPerfectListVC()
navigationController?.pushViewController(vc) // vc.orderId = orderID
// navigationController?.pushViewController(vc)
} else if model.type == 3 { // 评分 //
// } else if model.type == 3 { // 评分
handleRedPointFor(key: kMyScoreRedPointInfoKey, model: model) //
let vc = YHScoreDetailViewController() // handleRedPointFor(key: kMyScoreRedPointInfoKey, model: model)
vc.orderId = orderID // let vc = YHScoreDetailViewController()
// vc.model = serviceCenterMainReqVM.allInfoScoreModel // vc.orderId = orderID
navigationController?.pushViewController(vc) //// vc.model = serviceCenterMainReqVM.allInfoScoreModel
// navigationController?.pushViewController(vc)
} else if model.type == 4 { // 方案 //
handleRedPointFor(key: kMyPlanRedPointInfoKey, model: model) // } else if model.type == 4 { // 方案
let vc = YHMineSchemeViewController() // handleRedPointFor(key: kMyPlanRedPointInfoKey, model: model)
navigationController?.pushViewController(vc) // let vc = YHMineSchemeViewController()
// navigationController?.pushViewController(vc)
} else if model.type == 5 { //
let vc = YHMySignatureListViewController() // } else if model.type == 5 {
vc.orderId = orderID // let vc = YHMySignatureListViewController()
navigationController?.pushViewController(vc) // vc.orderId = orderID
// navigationController?.pushViewController(vc)
} else if model.type == 6 { //
let vc = YHMyDocumentsListViewController() // } else if model.type == 6 {
vc.orderId = orderID // let vc = YHMyDocumentsListViewController()
vc.mobile = mobile // vc.orderId = orderID
navigationController?.pushViewController(vc) // vc.mobile = mobile
// navigationController?.pushViewController(vc)
} else if model.type == 11 || model.type == 12 || model.type == 14 { //
// } else if model.type == 11 || model.type == 12 || model.type == 14 {
// 11 原则批等待结果 //
// 12 原则批待补件 // // 11 原则批等待结果
// 14 原则批未获批准 // // 12 原则批待补件
// // 14 原则批未获批准
let vc = YHPrincipleWaitResultViewController() //
vc.status = model.type // let vc = YHPrincipleWaitResultViewController()
vc.orderId = orderID // vc.status = model.type
navigationController?.pushViewController(vc) // vc.orderId = orderID
// navigationController?.pushViewController(vc)
} else if model.type == 13 { //原则批已获批~ //
let vc = YHPrincipleApprovedResultVC() // } else if model.type == 13 { //原则批已获批~
vc.orderId = orderID // let vc = YHPrincipleApprovedResultVC()
navigationController?.pushViewController(vc) // vc.orderId = orderID
// navigationController?.pushViewController(vc)
} else if model.type == 15 { //
//正式批已获批~ // } else if model.type == 15 {
let vc = YHOfficialApprovalResultVC() // //正式批已获批~
self.navigationController?.pushViewController(vc) // let vc = YHOfficialApprovalResultVC()
} // self.navigationController?.pushViewController(vc)
} // }
// }
} }
func handleRedPointFor(key: String, model: YHServiceCenterProgressModel) { 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()
}
}
...@@ -11,6 +11,7 @@ import UIKit ...@@ -11,6 +11,7 @@ import UIKit
class YHStepView: UIScrollView { class YHStepView: UIScrollView {
static let height = 104.0 static let height = 104.0
var viewWidth = KScreenWidth
typealias Block = (Int) -> () typealias Block = (Int) -> ()
var block: Block? var block: Block?
var dataSource: [String]? { var dataSource: [String]? {
...@@ -30,15 +31,15 @@ class YHStepView: UIScrollView { ...@@ -30,15 +31,15 @@ class YHStepView: UIScrollView {
let lineCount = dataSource.count - 1 let lineCount = dataSource.count - 1
if dataSource.count <= 2 { if dataSource.count <= 2 {
let contentWidth = 89 * 2 + Int(stepSpace) * 2 * lineCount + 14 * dataSource.count 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 return width
} else if dataSource.count <= 4 { } else if dataSource.count <= 4 {
let contentWidth = 43 * 2 + Int(stepSpace) * 2 * lineCount + 14 * dataSource.count 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 return width
} else { } else {
let contentWidth = 43 * 2 + Int(stepSpace) * 2 * 3 + 14 * 4 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 return width
} }
} }
......
{
"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