Commit 07bba4c0 authored by pete谢兆麟's avatar pete谢兆麟

部分上传证件页面

parent ec24856c
...@@ -88,6 +88,15 @@ ...@@ -88,6 +88,15 @@
0430E6622C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */; }; 0430E6622C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */; };
0430E6642C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */; }; 0430E6642C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */; };
0430E6662C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */; }; 0430E6662C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */; };
0430E6682C749128000511E2 /* YHAdopterChinaViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6672C749128000511E2 /* YHAdopterChinaViewController.swift */; };
0430E66A2C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6692C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift */; };
0430E66C2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E66B2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift */; };
0430E66E2C749AAF000511E2 /* YHAdopterResidentViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E66D2C749AAF000511E2 /* YHAdopterResidentViewController.swift */; };
0430E6702C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E66F2C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift */; };
0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6712C749E74000511E2 /* YHAdopterBirthViewController.swift */; };
0430E6742C74A02B000511E2 /* YHAdopterIdCardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6732C74A02B000511E2 /* YHAdopterIdCardViewController.swift */; };
0430E6762C74A4BE000511E2 /* YHAdopterMarryViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6752C74A4BE000511E2 /* YHAdopterMarryViewController.swift */; };
0430E6782C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6772C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.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 */; };
...@@ -797,6 +806,15 @@ ...@@ -797,6 +806,15 @@
0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterTravelCardTableViewCell.swift; sourceTree = "<group>"; }; 0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterTravelCardTableViewCell.swift; sourceTree = "<group>"; };
0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHYHAdopterTravelViewModel.swift; sourceTree = "<group>"; }; 0430E6632C7482DD000511E2 /* YHYHAdopterTravelViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHYHAdopterTravelViewModel.swift; sourceTree = "<group>"; };
0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterTravelItemTableViewCell.swift; sourceTree = "<group>"; }; 0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterTravelItemTableViewCell.swift; sourceTree = "<group>"; };
0430E6672C749128000511E2 /* YHAdopterChinaViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterChinaViewController.swift; sourceTree = "<group>"; };
0430E6692C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterExampleTableViewCell.swift; sourceTree = "<group>"; };
0430E66B2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterCardExplainTableViewCell.swift; sourceTree = "<group>"; };
0430E66D2C749AAF000511E2 /* YHAdopterResidentViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterResidentViewController.swift; sourceTree = "<group>"; };
0430E66F2C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterResidentTableViewCell.swift; sourceTree = "<group>"; };
0430E6712C749E74000511E2 /* YHAdopterBirthViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterBirthViewController.swift; sourceTree = "<group>"; };
0430E6732C74A02B000511E2 /* YHAdopterIdCardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterIdCardViewController.swift; sourceTree = "<group>"; };
0430E6752C74A4BE000511E2 /* YHAdopterMarryViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMarryViewController.swift; sourceTree = "<group>"; };
0430E6772C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMarryCardTableViewCell.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>"; };
...@@ -1652,6 +1670,10 @@ ...@@ -1652,6 +1670,10 @@
0430E65D2C74624E000511E2 /* YHAdopterCardTableViewCell.swift */, 0430E65D2C74624E000511E2 /* YHAdopterCardTableViewCell.swift */,
0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */, 0430E6612C7473A7000511E2 /* YHAdopterTravelCardTableViewCell.swift */,
0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */, 0430E6652C7487B8000511E2 /* YHAdopterTravelItemTableViewCell.swift */,
0430E6692C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift */,
0430E66B2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift */,
0430E66F2C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift */,
0430E6772C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1663,6 +1685,11 @@ ...@@ -1663,6 +1685,11 @@
0430E64D2C733477000511E2 /* YHAdopterIncomeDetailViewController.swift */, 0430E64D2C733477000511E2 /* YHAdopterIncomeDetailViewController.swift */,
0430E6572C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift */, 0430E6572C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift */,
0430E65F2C7470AD000511E2 /* YHAdopterTravelViewController.swift */, 0430E65F2C7470AD000511E2 /* YHAdopterTravelViewController.swift */,
0430E6672C749128000511E2 /* YHAdopterChinaViewController.swift */,
0430E66D2C749AAF000511E2 /* YHAdopterResidentViewController.swift */,
0430E6712C749E74000511E2 /* YHAdopterBirthViewController.swift */,
0430E6732C74A02B000511E2 /* YHAdopterIdCardViewController.swift */,
0430E6752C74A4BE000511E2 /* YHAdopterMarryViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4047,6 +4074,7 @@ ...@@ -4047,6 +4074,7 @@
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */, A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */, 045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
047AA3E22C4A66CE009C4554 /* YHLifeItemTableViewCell.swift in Sources */, 047AA3E22C4A66CE009C4554 /* YHLifeItemTableViewCell.swift in Sources */,
0430E6782C74A53F000511E2 /* YHAdopterMarryCardTableViewCell.swift in Sources */,
048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */, 048FA0362BFDE04000AD3BA9 /* YHSubmitAllInfoSuccessAlertView.swift in Sources */,
04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */, 04B360ED2C61F157001EB053 /* YHPrincipleEnvelopeCell.swift in Sources */,
04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */, 04B9EE5B2C06CC3100A4018D /* YHOtherLoginViewController.swift in Sources */,
...@@ -4103,6 +4131,7 @@ ...@@ -4103,6 +4131,7 @@
04C85DE52C369AB5008B20D6 /* YHMyFileListCell.swift in Sources */, 04C85DE52C369AB5008B20D6 /* YHMyFileListCell.swift in Sources */,
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */, 045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */, 04EC2F812C22888E002907D7 /* YHFriendRequestView.swift in Sources */,
0430E6722C749E74000511E2 /* YHAdopterBirthViewController.swift in Sources */,
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */, 045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */,
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */, A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */,
044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */, 044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */,
...@@ -4280,6 +4309,7 @@ ...@@ -4280,6 +4309,7 @@
0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */, 0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */,
0419A09E2C48FC6F00A5FCFA /* YHInvitationWithGiftsFirstTableViewCell.swift in Sources */, 0419A09E2C48FC6F00A5FCFA /* YHInvitationWithGiftsFirstTableViewCell.swift in Sources */,
045EEEC42B9F171A0022A143 /* YHOtherInfoFillCell.swift in Sources */, 045EEEC42B9F171A0022A143 /* YHOtherInfoFillCell.swift in Sources */,
0430E6682C749128000511E2 /* YHAdopterChinaViewController.swift in Sources */,
045EEE9F2B9F171A0022A143 /* YHWorkExperienceModel.swift in Sources */, 045EEE9F2B9F171A0022A143 /* YHWorkExperienceModel.swift in Sources */,
A5FF0F3C2C32F2460069852B /* YHActivityDetailCell1.swift in Sources */, A5FF0F3C2C32F2460069852B /* YHActivityDetailCell1.swift in Sources */,
045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */, 045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */,
...@@ -4293,12 +4323,15 @@ ...@@ -4293,12 +4323,15 @@
04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */, 04256DE82C7314B500A37BA4 /* YHSelectApplicantCell.swift in Sources */,
045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */, 045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */,
A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */, A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */,
0430E66E2C749AAF000511E2 /* YHAdopterResidentViewController.swift in Sources */,
04CE1AD02C2AD91F001CB80A /* YHActivityListModel.swift in Sources */, 04CE1AD02C2AD91F001CB80A /* YHActivityListModel.swift in Sources */,
0430E66C2C749573000511E2 /* YHAdopterCardExplainTableViewCell.swift in Sources */,
045EEEE82B9F171A0022A143 /* YHFamilyMemberViewModel.swift in Sources */, 045EEEE82B9F171A0022A143 /* YHFamilyMemberViewModel.swift in Sources */,
045EEED02B9F171A0022A143 /* YHScoreResultView.swift in Sources */, 045EEED02B9F171A0022A143 /* YHScoreResultView.swift in Sources */,
044D0BFA2C215C6F00C5CF5E /* YHSettingItem.swift in Sources */, 044D0BFA2C215C6F00C5CF5E /* YHSettingItem.swift in Sources */,
0425E6442BA95FE100A5E763 /* YHSchemeTableHeadView.swift in Sources */, 0425E6442BA95FE100A5E763 /* YHSchemeTableHeadView.swift in Sources */,
045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */, 045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */,
0430E66A2C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift in Sources */,
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */, 045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */, 044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */, 0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
...@@ -4307,6 +4340,7 @@ ...@@ -4307,6 +4340,7 @@
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */, A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */, 045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */,
04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */, 04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */,
0430E6762C74A4BE000511E2 /* YHAdopterMarryViewController.swift in Sources */,
A5B6ED782C27FC0B001B6732 /* Int+Extension.swift in Sources */, A5B6ED782C27FC0B001B6732 /* Int+Extension.swift in Sources */,
04CE1AE02C2AD91F001CB80A /* YHActivityTwoItemView.swift in Sources */, 04CE1AE02C2AD91F001CB80A /* YHActivityTwoItemView.swift in Sources */,
045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */, 045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */,
...@@ -4534,6 +4568,7 @@ ...@@ -4534,6 +4568,7 @@
045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */, 045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */,
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */, 045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */,
04174D782BCD5B74000BA46D /* YHMessageListVC.swift in Sources */, 04174D782BCD5B74000BA46D /* YHMessageListVC.swift in Sources */,
0430E6742C74A02B000511E2 /* YHAdopterIdCardViewController.swift in Sources */,
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */, A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */,
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */, A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */,
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */, 0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
...@@ -4569,6 +4604,7 @@ ...@@ -4569,6 +4604,7 @@
045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */, 045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */,
04256DE22C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift in Sources */, 04256DE22C72E1EA00A37BA4 /* YHCertificateAppointOptionCell.swift in Sources */,
A57BFDEC2C73629100A78E51 /* YHPayMemberItemsView.swift in Sources */, A57BFDEC2C73629100A78E51 /* YHPayMemberItemsView.swift in Sources */,
0430E6702C749BCF000511E2 /* YHAdopterResidentTableViewCell.swift in Sources */,
045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */, 045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */,
047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */, 047AA3E42C4A6ADC009C4554 /* YHLifeHeadView.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */, A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
......
//
// YHAdopterBirthViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterBirthViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传出生医学证明"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterResidentTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
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 YHAdopterBirthViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterResidentTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 58
}
if indexPath.row == 2 {
return 173
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterChinaViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterChinaViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传中国身份证"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterTravelCardTableViewCell.self)
tableView.register(cellWithClass: YHAdopterTravelItemTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
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 YHAdopterChinaViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 3
}
return data.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelCardTableViewCell.self)
return cell
}
}
let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelItemTableViewCell.self)
cell.dataSource = data[indexPath.row]
cell.informationBlock = {[weak self] model in
guard let self = self else { return }
// self.viewModel.updateModel(model)
// let id = model.id
// if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id17 && id != .id18 && id != .id21 && id != .id22 && id != .id23 && id != .id34 && id != .id29 && id != .id30 && id != .id35 {
// self.updateDataSource()
// }
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 58
}
if indexPath.row == 2 {
return 173
}
}
let model = data[indexPath.row]
let isShow = model.isShowPrompts ?? false
let message = model.message ?? ""
let isNeed = model.isNeed ?? false
if isShow && message.count == 0 && isNeed {
return 52 + 20
} else {
return 52
}
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterIdCardViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterIdCardViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传证件照片"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterResidentTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
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 YHAdopterIdCardViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.alertLabel.text = "要求:2寸白底照"
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterResidentTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 84
}
if indexPath.row == 1 {
return 173
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHAdopterMarryViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterMarryViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传结婚证"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterMarryCardTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
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 YHAdopterMarryViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.alertLabel.text = "提供主申人的信息页,复婚情况提供最新的结婚证"
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterMarryCardTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 84
}
if indexPath.row == 2 {
return 318
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
...@@ -211,17 +211,22 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData ...@@ -211,17 +211,22 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData
let vc = YHAdopterTravelViewController() let vc = YHAdopterTravelViewController()
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
case .china: case .china:
break let vc = YHAdopterChinaViewController()
self.navigationController?.pushViewController(vc)
case .resident: case .resident:
break let vc = YHAdopterResidentViewController()
self.navigationController?.pushViewController(vc)
case .birth: case .birth:
break let vc = YHAdopterBirthViewController()
self.navigationController?.pushViewController(vc)
case .id: case .id:
break let vc = YHAdopterIdCardViewController()
self.navigationController?.pushViewController(vc)
case .other: case .other:
break break
case .marry: case .marry:
break let vc = YHAdopterMarryViewController()
self.navigationController?.pushViewController(vc)
} }
} }
} }
......
//
// YHAdopterResidentViewController.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterResidentViewController: YHBaseViewController {
var tableView: UITableView!
var nextButton: UIButton!
var clickIndex = -1
var data: [YHItemModel] = []
var viewModel = YHYHAdopterTravelViewModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "上传户口信息页"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView()
getData()
}
func getData() {
data = viewModel.getChinaDataSource(false)
tableView.reloadData()
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .white
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHAdopterExampleTableViewCell.self)
tableView.register(cellWithClass: YHAdopterResidentTableViewCell.self)
tableView.register(cellWithClass: YHAdopterCardExplainTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
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 YHAdopterResidentViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
return cell
}
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.alertLabel.text = "要求:提供户口的个人页,无需户口本首页"
return cell
}
if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterResidentTableViewCell.self)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 118
}
if indexPath.row == 1 {
return 84
}
if indexPath.row == 2 {
return 173
}
return 0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
...@@ -18,7 +18,7 @@ class YHAdopterTravelViewController: YHBaseViewController { ...@@ -18,7 +18,7 @@ class YHAdopterTravelViewController: YHBaseViewController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
gk_navTitle = "上传存款证明" gk_navTitle = "上传旅行证件"
gk_navBackgroundColor = .white gk_navBackgroundColor = .white
gk_navBarAlpha = 1 gk_navBarAlpha = 1
setView() setView()
......
...@@ -16,6 +16,8 @@ enum YHAdopterCardType { ...@@ -16,6 +16,8 @@ enum YHAdopterCardType {
case id case id
case other case other
case marry case marry
case chinaTravel
case chinaLife
} }
struct YHAdopterCardModel { struct YHAdopterCardModel {
......
//
// YHAdopterCardExplainTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterCardExplainTableViewCell: UITableViewCell {
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var alertLabel: UILabel!
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
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "中国身份证"
return label
}()
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(34)
make.height.equalTo(24)
}
subTitleLabel = {
let label = UILabel()
label.text = "已完成"
label.font = UIFont.PFSC_R(ofSize: 10)
label.textColor = UIColor(hex: 0x3cc694)
label.backgroundColor = UIColor(hex: 0xf0fbf7)
//带上传
// label.textColor = UIColor.brandMainColor
// label.backgroundColor = UIColor(hex: 0xf0f4fb)
//审核中
// label.textColor = UIColor(hex: 0xff8000)
// label.backgroundColor = UIColor(hex: 0xfff5eb)
//已驳回
// label.textColor = UIColor(hex: 0xf81d22)
// label.backgroundColor = UIColor(hex: 0xfff2f2)
return label
}()
contentView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(titleLabel.snp.right).offset(4)
make.width.equalTo(38)
make.height.equalTo(16)
make.centerY.equalTo(titleLabel.snp.centerY)
}
alertLabel = {
let label = UILabel()
// label.text = "存款证明有效期为3个月,并且存款金额为每个成员(包括额外新增受养人)最低为12万"
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor50
label.numberOfLines = 0
return label
}()
contentView.addSubview(alertLabel)
alertLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(64)
make.right.equalTo(-18)
}
}
}
//
// YHAdopterExampleTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterExampleTableViewCell: UITableViewCell {
typealias ExampleBlock = () -> ()
var exampleBlock: ExampleBlock?
var titleLabel: UILabel!
var templateView: YHCertificateSampleTemplateView!
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() {
contentView.backgroundColor = .clear
backgroundColor = .clear
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "中国身份证示例模版"
return label
}()
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.top.equalTo(16)
make.height.equalTo(24)
}
templateView = {
let view = YHCertificateSampleTemplateView()
return view
}()
contentView.addSubview(templateView)
templateView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.top.equalTo(56)
make.height.equalTo(62)
}
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(tapAction))
// 给视图添加手势识别器
templateView.addGestureRecognizer(tapGesture)
}
@objc func tapAction(gesture: UITapGestureRecognizer) {
if let block = exampleBlock {
block()
}
}
}
//
// YHAdopterMarryCardTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterMarryCardTableViewCell: UITableViewCell {
typealias InformationBlock = (_ type: YHCardType, _ image: UIImage, _ isleft: Bool) -> ()
var informationBlock: InformationBlock?
var frontLabel: UILabel!
var backSurfaceLabel: UILabel!
var thirdLabel: UILabel!
var frontImageButton: YHCardButton!
var backSurfaceImageButton: YHCardButton!
var thirdImageButton: YHCardButton!
var frontDeleteButton: UIButton!
var backSurfaceDeleteButton: UIButton!
var thirdDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView!
var viewModel: YHMainApplicantInformationViewModel! {
didSet {
if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_front) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.frontDeleteButton.isHidden = false
})
self.frontImageButton.setContent("", "")
}
}
if viewModel.mainModel.certificates.cn_identity_card.img_back.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_back) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.backSurfaceDeleteButton.isHidden = false
})
self.backSurfaceImageButton.setContent("", "")
}
}
}
}
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() {
contentView.backgroundColor = .clear
backgroundColor = .clear
let lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(1)
make.right.equalTo(-18)
}
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.text = "证件页1"
label.textAlignment = .center
return label
}()
contentView.addSubview(frontLabel)
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
backSurfaceLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textAlignment = .center
label.text = "证件页2"
return label
}()
contentView.addSubview(backSurfaceLabel)
backSurfaceLabel.snp.makeConstraints { make in
make.right.equalTo(-18)
make.left.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
thirdLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.text = "证件页3"
label.textAlignment = .center
return label
}()
contentView.addSubview(thirdLabel)
thirdLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(185)
make.height.equalTo(20)
}
frontImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
frontDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(frontDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(frontDeleteButton)
frontDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(frontImageButton.snp.right)
make.centerY.equalTo(frontImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
backSurfaceImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_back"), for: .normal)
button.addTarget(self, action: #selector(backSurfaceImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(backSurfaceImageButton)
backSurfaceImageButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
backSurfaceDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(backSurfaceDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(backSurfaceDeleteButton)
backSurfaceDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(backSurfaceImageButton.snp.right)
make.centerY.equalTo(backSurfaceImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
thirdImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(thirdImageButton)
thirdImageButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(219)
make.height.equalTo(99)
make.width.equalTo(160)
}
thirdDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(frontDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(thirdDeleteButton)
thirdDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(thirdImageButton.snp.right)
make.centerY.equalTo(thirdImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
activityIndicator = {
let view = UIActivityIndicatorView()
view.style = .medium
return view
}()
contentView.addSubview(activityIndicator)
activityIndicator.snp.makeConstraints { make in
make.center.equalTo(backSurfaceImageButton.snp.center)
make.height.equalTo(25)
make.width.equalTo(25)
}
}
@objc func frontImageClick() {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.frontImageButton.setContent("card_loading", "上传中")
// self.frontImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.frontImageButton.stopRotationAnimation()
// self.frontImageButton.setContent("", "")
//
// guard let url = success else { return }
//// self.viewModel.updateModel(self.type, isFront: true, url: url)
// self.frontImageButton.setBackgroundImage(image, for: .normal)
// self.frontDeleteButton.isHidden = false
//
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
//
//
// self.viewModel.requestHkIDCardMessage(url, isBack: 0) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func backSurfaceImageClick() {
// if viewModel.mainModel.certificates.hk_macao_pass.img_back.count != 0 {
// if viewModel.mainModel.certificates.hk_macao_pass.img_back.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.hk_macao_pass.img_back
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.backSurfaceImageButton.setContent("card_loading", "上传中")
// self.backSurfaceImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.backSurfaceImageButton.stopRotationAnimation()
// self.backSurfaceImageButton.setContent("", "")
//
// guard let url = success else { return }
// self.backSurfaceImageButton.setBackgroundImage(image, for: .normal)
//// self.viewModel.updateModel(self.type, isFront: false, url: url)
// self.backSurfaceDeleteButton.isHidden = false
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
// self.viewModel.requestHkIDCardMessage(url, isBack: 1 ) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func frontDeleteClick() {
frontDeleteButton.isHidden = true
frontImageButton.setBackgroundImage(UIImage(named: "service_hk_card_front"), for: .normal)
frontImageButton.setContent("card_upload", "点击上传")
}
@objc func backSurfaceDeleteClick() {
backSurfaceDeleteButton.isHidden = true
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_hk_card_back"), for: .normal)
backSurfaceImageButton.setContent("card_upload", "点击上传")
}
}
//
// YHAdopterResidentTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/8/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAdopterResidentTableViewCell: UITableViewCell {
typealias InformationBlock = (_ type: YHCardType, _ image: UIImage, _ isleft: Bool) -> ()
var informationBlock: InformationBlock?
var frontLabel: UILabel!
var frontImageButton: YHCardButton!
var frontDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView!
var viewModel: YHMainApplicantInformationViewModel! {
didSet {
if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_front) {[weak self] success, error in
guard let self = self else { return }
guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal, completionHandler: { _ in
self.frontDeleteButton.isHidden = false
})
self.frontImageButton.setContent("", "")
}
}
}
}
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() {
contentView.backgroundColor = .clear
backgroundColor = .clear
let lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(1)
make.right.equalTo(-18)
}
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.text = "证件页1"
label.textAlignment = .center
return label
}()
contentView.addSubview(frontLabel)
frontLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(self.snp.centerX)
make.top.equalTo(28)
make.height.equalTo(20)
}
frontImageButton = {
let button = YHCardButton()
button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button
}()
contentView.addSubview(frontImageButton)
frontImageButton.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(60)
make.height.equalTo(99)
make.width.equalTo(160)
}
frontDeleteButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "service_card_delete"), for: .normal)
button.addTarget(self, action: #selector(frontDeleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
contentView.addSubview(frontDeleteButton)
frontDeleteButton.snp.makeConstraints { make in
make.centerX.equalTo(frontImageButton.snp.right)
make.centerY.equalTo(frontImageButton.snp.top)
make.height.equalTo(21)
make.width.equalTo(21)
}
activityIndicator = {
let view = UIActivityIndicatorView()
view.style = .medium
return view
}()
contentView.addSubview(activityIndicator)
activityIndicator.snp.makeConstraints { make in
make.center.equalTo(frontImageButton.snp.center)
make.height.equalTo(25)
make.width.equalTo(25)
}
}
@objc func frontImageClick() {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.count != 0 {
// if viewModel.mainModel.certificates.cn_identity_card.img_front.isEmpty == false {
// let vc = YHImageViewController()
// vc.imgString = viewModel.mainModel.certificates.cn_identity_card.img_front
// UIViewController.current?.navigationController?.pushViewController(vc)
// }
// return
// }
// YHImagePickerView.show() {[weak self] image in
// guard let self = self else { return }
// self.frontImageButton.setContent("card_loading", "上传中")
// self.frontImageButton.startRotationAnimation()
// self.viewModel.uploadImage(image) {[weak self] success, error in
// guard let self = self else { return }
// self.frontImageButton.stopRotationAnimation()
// self.frontImageButton.setContent("", "")
//
// guard let url = success else { return }
//// self.viewModel.updateModel(self.type, isFront: true, url: url)
// self.frontImageButton.setBackgroundImage(image, for: .normal)
// self.frontDeleteButton.isHidden = false
//
// self.viewModel.getPublicImageUrl(url) {[weak self] success, error in
// guard let self = self else { return }
// guard let url = success else { return }
//
//
// self.viewModel.requestHkIDCardMessage(url, isBack: 0) {[weak self] success, error in
// }
// }
// }
// }
}
@objc func frontDeleteClick() {
frontDeleteButton.isHidden = true
frontImageButton.setBackgroundImage(UIImage(named: "service_hk_card_front"), for: .normal)
frontImageButton.setContent("card_upload", "点击上传")
}
}
...@@ -30,7 +30,9 @@ class YHAdopterNewPeopleViewModel: YHBaseViewModel { ...@@ -30,7 +30,9 @@ class YHAdopterNewPeopleViewModel: YHBaseViewModel {
let item4 = YHAdopterCardModel(type: .id, title: "2寸白底证件照片", state: 0) let item4 = YHAdopterCardModel(type: .id, title: "2寸白底证件照片", state: 0)
let item5 = YHAdopterCardModel(type: .other, title: "其他相关证件", state: 0) let item5 = YHAdopterCardModel(type: .other, title: "其他相关证件", state: 0)
let item6 = YHAdopterCardModel(type: .marry, title: "结婚证", state: 0) let item6 = YHAdopterCardModel(type: .marry, title: "结婚证", state: 0)
return [item, item1, item2, item3, item4, item5, item6] let item7 = YHAdopterCardModel(type: .chinaTravel, title: "中国旅行证", state: 0)
let item8 = YHAdopterCardModel(type: .chinaLife, title: "中国居留许可证", state: 0)
return [item, item1, item2, item3, item4, item5, item6, item7, item8]
} }
} }
...@@ -24,4 +24,13 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel { ...@@ -24,4 +24,13 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel {
let item5 = YHItemModel(id: .id1, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: "", type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期") let item5 = YHItemModel(id: .id1, isNeed: true, title: "届满日期", isUserKeyBoard: false, prompts: "请选择", message: "", type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择届满日期")
return [item, item1, item2, item3, item4, item5] return [item, item1, item2, item3, item4, item5]
} }
func getChinaDataSource(_ isShowPrompt: Bool) -> [YHItemModel] {
let item = YHItemModel(id: .id1, isNeed: true, title: "姓名", isUserKeyBoard: true, prompts: "请输入", message: "", type: .id, isShowPrompts: isShowPrompt, alertMessage:"请输入姓名")
let item1 = YHItemModel(id: .id1, isNeed: true, title: "身份证号码", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请输入身份证号码")
let item2 = YHItemModel(id: .id1, isNeed: true, title: "出生日期", isUserKeyBoard: false, prompts: "请选择", message: "", type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择出生日期")
let item3 = YHItemModel(id: .id1, isNeed: true, title: "出生地点", isUserKeyBoard: true, prompts: "请输入", message: "", isShowPrompts: isShowPrompt, alertMessage:"请输入出生地点")
let item4 = YHItemModel(id: .id1, isNeed: true, title: "性别", isUserKeyBoard: false, prompts: "请选择", message: "", type: .sex, isShowPrompts: isShowPrompt, alertMessage:"请选择性别")
return [item, item1, item2, item3, item4]
}
} }
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