Commit 47024c9e authored by David黄金龙's avatar David黄金龙

Merge commit '7845195c' into davidhuang

* commit '7845195c':
  列表
  工作经验列表UI
  // 专业资格
  // 学历信息
  // 我的设置
  // 我的设置

# Conflicts:
#	galaxy/galaxy/Classes/Tools/NetWork/YHNetRequest.swift
parents db6cafb9 7845195c
......@@ -72,11 +72,23 @@
04A7BC8F2B6B2BC2000E8D47 /* YHFamilyRequestViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BC8E2B6B2BC2000E8D47 /* YHFamilyRequestViewModel.swift */; };
04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */; };
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04AF58C32B4FC51C0066011A /* YHLocalizable.swift */; };
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; };
04C693692B73191A004C1758 /* YHEducationalQualificationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693682B73191A004C1758 /* YHEducationalQualificationVC.swift */; };
04C6936B2B7329E7004C1758 /* YHEducationInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C6936A2B7329E7004C1758 /* YHEducationInfoCell.swift */; };
04C6936F2B7350E7004C1758 /* YHEducationDetailVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C6936E2B7350E7004C1758 /* YHEducationDetailVC.swift */; };
04C693712B735C6F004C1758 /* YHProfessionalQualificationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693702B735C6F004C1758 /* YHProfessionalQualificationVC.swift */; };
04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */; };
04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E082B707ACE00A35F4B /* YHPhoneLoginViewController.swift */; };
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; };
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */; };
04E86E0F2B70DE9400A35F4B /* YHSpouseInfoContainerVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0E2B70DE9400A35F4B /* YHSpouseInfoContainerVC.swift */; };
04E86E2D2B81EA1000A35F4B /* YHWorkItemListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E242B81EA1000A35F4B /* YHWorkItemListViewModel.swift */; };
04E86E2E2B81EA1000A35F4B /* YHWorkItemListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E262B81EA1000A35F4B /* YHWorkItemListModel.swift */; };
04E86E2F2B81EA1000A35F4B /* YHWorkExperienceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E282B81EA1000A35F4B /* YHWorkExperienceListViewController.swift */; };
04E86E302B81EA1000A35F4B /* YHWorkExperienceListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E2A2B81EA1000A35F4B /* YHWorkExperienceListTableViewCell.swift */; };
04E86E312B81EA1000A35F4B /* YHWorkItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E2B2B81EA1000A35F4B /* YHWorkItemView.swift */; };
04E86E322B81EA1000A35F4B /* YHWorkItemAddView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E2C2B81EA1000A35F4B /* YHWorkItemAddView.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A50AB89B2B81E96E00C227DE /* YHOtherInfoFillModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50AB89A2B81E96E00C227DE /* YHOtherInfoFillModel.swift */; };
A50AB89D2B81F1FB00C227DE /* YHOtherInfoFillViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50AB89C2B81F1FB00C227DE /* YHOtherInfoFillViewModel.swift */; };
......@@ -305,11 +317,23 @@
04A7BC8E2B6B2BC2000E8D47 /* YHFamilyRequestViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFamilyRequestViewModel.swift; sourceTree = "<group>"; };
04A7BC902B6B7B89000E8D47 /* YHTwoOptionAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTwoOptionAlertView.swift; sourceTree = "<group>"; };
04AF58C32B4FC51C0066011A /* YHLocalizable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLocalizable.swift; sourceTree = "<group>"; };
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.swift; sourceTree = "<group>"; };
04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
04C693682B73191A004C1758 /* YHEducationalQualificationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEducationalQualificationVC.swift; sourceTree = "<group>"; };
04C6936A2B7329E7004C1758 /* YHEducationInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEducationInfoCell.swift; sourceTree = "<group>"; };
04C6936E2B7350E7004C1758 /* YHEducationDetailVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEducationDetailVC.swift; sourceTree = "<group>"; };
04C693702B735C6F004C1758 /* YHProfessionalQualificationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHProfessionalQualificationVC.swift; sourceTree = "<group>"; };
04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserInfoHeaderView.swift; sourceTree = "<group>"; };
04E86E082B707ACE00A35F4B /* YHPhoneLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPhoneLoginViewController.swift; sourceTree = "<group>"; };
04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
04E86E0C2B70D51D00A35F4B /* YHWebViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebViewViewController.swift; sourceTree = "<group>"; };
04E86E0E2B70DE9400A35F4B /* YHSpouseInfoContainerVC.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSpouseInfoContainerVC.swift; sourceTree = "<group>"; };
04E86E242B81EA1000A35F4B /* YHWorkItemListViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkItemListViewModel.swift; sourceTree = "<group>"; };
04E86E262B81EA1000A35F4B /* YHWorkItemListModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkItemListModel.swift; sourceTree = "<group>"; };
04E86E282B81EA1000A35F4B /* YHWorkExperienceListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceListViewController.swift; sourceTree = "<group>"; };
04E86E2A2B81EA1000A35F4B /* YHWorkExperienceListTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceListTableViewCell.swift; sourceTree = "<group>"; };
04E86E2B2B81EA1000A35F4B /* YHWorkItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkItemView.swift; sourceTree = "<group>"; };
04E86E2C2B81EA1000A35F4B /* YHWorkItemAddView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkItemAddView.swift; sourceTree = "<group>"; };
58C2405158A4A6632D0E7460 /* Pods-galaxy.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.debug.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.debug.xcconfig"; sourceTree = "<group>"; };
987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A50AB89A2B81E96E00C227DE /* YHOtherInfoFillModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherInfoFillModel.swift; sourceTree = "<group>"; };
......@@ -497,12 +521,12 @@
children = (
041B52D72B5F8ADA007EBCEB /* M */,
041B52962B5E8E3B007EBCEB /* C */,
041B52892B5E14EB007EBCEB /* View */,
041B52892B5E14EB007EBCEB /* V */,
);
path = "FamilyMember(家庭成员信息表)";
sourceTree = "<group>";
};
041B52892B5E14EB007EBCEB /* View */ = {
041B52892B5E14EB007EBCEB /* V */ = {
isa = PBXGroup;
children = (
042FBBD22B67A2F900F9DE23 /* PickerView */,
......@@ -518,7 +542,7 @@
042FBBC82B64DC8900F9DE23 /* YHFormItemExpireDateCell.swift */,
04010B942B6A1DE90093F3BB /* YHSaveAndSubmitView.swift */,
);
path = View;
path = V;
sourceTree = "<group>";
};
041B52962B5E8E3B007EBCEB /* C */ = {
......@@ -670,6 +694,33 @@
path = Localized;
sourceTree = "<group>";
};
04C693652B73183E004C1758 /* 学历专业资格填写 */ = {
isa = PBXGroup;
children = (
04C693672B7318D3004C1758 /* V */,
04C693662B7318CD004C1758 /* C */,
);
path = "学历专业资格填写";
sourceTree = "<group>";
};
04C693662B7318CD004C1758 /* C */ = {
isa = PBXGroup;
children = (
04C693682B73191A004C1758 /* YHEducationalQualificationVC.swift */,
04C693702B735C6F004C1758 /* YHProfessionalQualificationVC.swift */,
04C6936E2B7350E7004C1758 /* YHEducationDetailVC.swift */,
);
path = C;
sourceTree = "<group>";
};
04C693672B7318D3004C1758 /* V */ = {
isa = PBXGroup;
children = (
04C6936A2B7329E7004C1758 /* YHEducationInfoCell.swift */,
);
path = V;
sourceTree = "<group>";
};
04C8F4802B720DAB00ADF59B /* Spouse(配偶) */ = {
isa = PBXGroup;
children = (
......@@ -690,6 +741,58 @@
path = "Child(子女)";
sourceTree = "<group>";
};
04E86E212B81E9FA00A35F4B /* Recovered References */ = {
isa = PBXGroup;
children = (
);
name = "Recovered References";
sourceTree = "<group>";
};
04E86E222B81EA1000A35F4B /* WorkExperience */ = {
isa = PBXGroup;
children = (
04E86E232B81EA1000A35F4B /* ViewModel */,
04E86E252B81EA1000A35F4B /* Model */,
04E86E272B81EA1000A35F4B /* C */,
04E86E292B81EA1000A35F4B /* V */,
);
path = WorkExperience;
sourceTree = "<group>";
};
04E86E232B81EA1000A35F4B /* ViewModel */ = {
isa = PBXGroup;
children = (
04E86E242B81EA1000A35F4B /* YHWorkItemListViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
04E86E252B81EA1000A35F4B /* Model */ = {
isa = PBXGroup;
children = (
04E86E262B81EA1000A35F4B /* YHWorkItemListModel.swift */,
);
path = Model;
sourceTree = "<group>";
};
04E86E272B81EA1000A35F4B /* C */ = {
isa = PBXGroup;
children = (
04E86E282B81EA1000A35F4B /* YHWorkExperienceListViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
04E86E292B81EA1000A35F4B /* V */ = {
isa = PBXGroup;
children = (
04E86E2A2B81EA1000A35F4B /* YHWorkExperienceListTableViewCell.swift */,
04E86E2B2B81EA1000A35F4B /* YHWorkItemView.swift */,
04E86E2C2B81EA1000A35F4B /* YHWorkItemAddView.swift */,
);
path = V;
sourceTree = "<group>";
};
4758815B24BAF3CAA24EC6A8 /* Pods */ = {
isa = PBXGroup;
children = (
......@@ -857,6 +960,7 @@
A5573ECF2B317BFF00D98EC0 /* Products */,
4758815B24BAF3CAA24EC6A8 /* Pods */,
8D4DE9CA401A76BB1ECBE46E /* Frameworks */,
04E86E212B81E9FA00A35F4B /* Recovered References */,
);
sourceTree = "<group>";
};
......@@ -1015,6 +1119,7 @@
isa = PBXGroup;
children = (
A5ACE8EA2B4564F7002C94D2 /* YHMyViewController.swift */,
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */,
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */,
);
path = C;
......@@ -1027,6 +1132,7 @@
04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */,
A5ACE8ED2B4564F7002C94D2 /* YHPersonalCenterCell.swift */,
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */,
04C693632B723B56004C1758 /* YHMySettingCell.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -1262,6 +1368,8 @@
A5C382C82B5E101E00C5E65C /* ServiceProcess(流程) */ = {
isa = PBXGroup;
children = (
04E86E222B81EA1000A35F4B /* WorkExperience */,
04C693652B73183E004C1758 /* 学历专业资格填写 */,
A5234E382B72346A00A33433 /* OtherInformation(其他信息) */,
A58556BB2B6BD81C003746B2 /* BaseInformation(基本资料) */,
A5167B2D2B6A23D10084C08F /* PersonInfoList(个人信息表) */,
......@@ -1540,7 +1648,9 @@
A5FD63E82B67D8EA00D1D9DA /* YHMainApplicantInfoViewController.swift in Sources */,
A5FD63F82B68D78B00D1D9DA /* YHPersonInfoCellModel1.swift in Sources */,
A5FD63CD2B64E2D600D1D9DA /* YHScoreDetailViewController.swift in Sources */,
04E86E2D2B81EA1000A35F4B /* YHWorkItemListViewModel.swift in Sources */,
A5FD63ED2B688A7000D1D9DA /* YHPersonInfoSessionView.swift in Sources */,
04E86E322B81EA1000A35F4B /* YHWorkItemAddView.swift in Sources */,
A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */,
A5F78C822B68F39600EEA170 /* YHPersonInfoCommonCell.swift in Sources */,
A5ACE94B2B4564F7002C94D2 /* YHHUDRotatingImageView.swift in Sources */,
......@@ -1550,10 +1660,13 @@
A5ACE94F2B4564F7002C94D2 /* YhOverlayView.swift in Sources */,
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */,
0468D44F2B634E8B00CFB916 /* YHMainApplicantInformationViewModel.swift in Sources */,
04C693692B73191A004C1758 /* YHEducationalQualificationVC.swift in Sources */,
0468D44D2B62643700CFB916 /* YHMainInformationTableViewCell.swift in Sources */,
A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */,
04C6936F2B7350E7004C1758 /* YHEducationDetailVC.swift in Sources */,
A5ACE94E2B4564F7002C94D2 /* AlignedCollectionViewFlowLayout.swift in Sources */,
A5ACE93B2B4564F7002C94D2 /* UIFont+Extension.swift in Sources */,
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */,
A5FD63C92B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift in Sources */,
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */,
0468D4432B61F76800CFB916 /* YHMainApplicantInformationViewController.swift in Sources */,
......@@ -1561,6 +1674,7 @@
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */,
A50AB89D2B81F1FB00C227DE /* YHOtherInfoFillViewModel.swift in Sources */,
0468D47C2B68A08600CFB916 /* YHAddressPickView.swift in Sources */,
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */,
A5FD63D82B6603A500D1D9DA /* YHScoreResultView.swift in Sources */,
A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */,
A5ACE9502B4564F7002C94D2 /* YhCacheTool.swift in Sources */,
......@@ -1569,6 +1683,7 @@
0468D4862B6A41F300CFB916 /* YHMainInformationModel.swift in Sources */,
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */,
A5FD63EA2B67D95100D1D9DA /* YHFamilyMemberViewController.swift in Sources */,
04E86E2F2B81EA1000A35F4B /* YHWorkExperienceListViewController.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
042FBBD62B67BDD500F9DE23 /* YHBrotherInfoVC.swift in Sources */,
A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */,
......@@ -1580,6 +1695,7 @@
042FBBC32B63DA4C00F9DE23 /* YHParentInfoVC.swift in Sources */,
A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */,
041B52912B5E67F3007EBCEB /* YHFormItemEnterDetailCell.swift in Sources */,
04C6936B2B7329E7004C1758 /* YHEducationInfoCell.swift in Sources */,
04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */,
A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
......@@ -1599,6 +1715,7 @@
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */,
0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */,
A5234E282B6E2EED00A33433 /* YHBasicInfoFillViewController.swift in Sources */,
04E86E312B81EA1000A35F4B /* YHWorkItemView.swift in Sources */,
0468D4492B6258A900CFB916 /* YHItemView.swift in Sources */,
041B528F2B5E620E007EBCEB /* YHFormItemInputTextCell.swift in Sources */,
A5FD63C72B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift in Sources */,
......@@ -1646,14 +1763,17 @@
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */,
04E86E2E2B81EA1000A35F4B /* YHWorkItemListModel.swift in Sources */,
A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */,
0468D4552B6889A500CFB916 /* YHDatePickView.swift in Sources */,
A5C5B3272B57C8D500A7C5D1 /* YHDavidCell2.swift in Sources */,
A5FD63D62B65FCA400D1D9DA /* YHScoreTitleView.swift in Sources */,
04E86E302B81EA1000A35F4B /* YHWorkExperienceListTableViewCell.swift in Sources */,
A5FD63DA2B66060800D1D9DA /* YHScoreOptionsView.swift in Sources */,
A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */,
A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */,
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
04C693712B735C6F004C1758 /* YHProfessionalQualificationVC.swift in Sources */,
A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
......
......@@ -333,9 +333,13 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
navigationController?.pushViewController(vc)
} else if indexPath.row == 3 {
//学历/专业资格
let vc = YHEducationalQualificationVC()
navigationController?.pushViewController(vc)
} else if indexPath.row == 4 {
//工作经历
let vc = YHWorkExperienceListViewController()
navigationController?.pushViewController(vc)
} else if indexPath.row == 5 {
//其他信息
let vc = YHOtherInfoFillViewController()
......
......@@ -64,6 +64,14 @@ enum YHFormTitleItemType:Int, CaseIterable {
case isPreviousMarriageChild
// 兄弟姐妹信息
case brotherInfo
// 主申请人学历
case mainApplicantEducation
// 主申请人专业资格及会员资格
case mainApplicantProfessionalQualification
// 学历证书姓名及出生日期正确性
case edutionalCertificateNameAndBirthday
}
......@@ -160,7 +168,37 @@ enum YHFormDetailItemType:Int {
// 兄弟姐妹姓名
case brotherName
// 学历信息相关
case educationInfo
// 学校全称
case universityFullName
// 授课形式
case educationStyle
// 入学年月
case educationTime
// 毕业年月
case graduateTime
// 专业
case educationMajor
// 学位
case educationDegree
// 学位类型
case degreeType
// 上课国家/地区
case educationCountry
// 上课城市
case educationCity
// 资格证书名称
case qualificationCertificateName
// 颁授机构全称
case conferAgencyFullName
// 颁授年份
case conferTime
// 颁授国家/地区
case conferCountry
// 颁授城市
case conferCity
}
//添加item
......@@ -242,6 +280,12 @@ class YHFormTitleItem : YHFormItemProtocol {
return "是否前次婚姻子女".local
case .brotherInfo:
return "兄弟姐妹信息".local
case .mainApplicantEducation:
return "主申请人学历".local
case .mainApplicantProfessionalQualification:
return "主申请人专业资格及会员资格".local
case .edutionalCertificateNameAndBirthday:
return "学历证书姓名及出生日期正确性".local
}
}
......@@ -256,6 +300,12 @@ class YHFormTitleItem : YHFormItemProtocol {
return String(format: "(%@)", "如无可不填".local)
case .child:
return String(format: "(%@)", "如无可不填".local)
case .mainApplicantEducation:
return "(请从大专开始写起)".local
case .mainApplicantProfessionalQualification:
return "(如有,非必填)".local
case .edutionalCertificateNameAndBirthday:
return "".local
case .isPreviousMarriageChild:
return "".local
case .accompany:
......@@ -429,6 +479,39 @@ class YHFormDetailItem : YHFormItemProtocol {
case .onlyDoubleChoice:
return "".local
case .educationInfo:
return "".local
case .universityFullName:
return "学校全称".local
case .educationStyle:
return "授课形式".local
case .educationTime:
return "入学年月".local
case .graduateTime:
return "毕业年月".local
case .educationMajor:
return "专业".local
case .educationDegree:
return "学位".local
case .degreeType:
return "学位类型".local
case .educationCountry:
return "上课国家/地区".local
case .educationCity:
return "上课城市".local
case .qualificationCertificateName:
return "资格证书名称".local
case .conferAgencyFullName:
return "颁授机构全称".local
case .conferTime:
return "颁授年份".local
case .conferCountry:
return "颁授国家/地区".local
case .conferCity:
return "颁授城市".local
}
}
......@@ -879,8 +962,6 @@ class YHCertificates: SmartCodable {
// MARK: - YHCNIdentityCard
class YHCNIdentityCard: SmartCodable {
var id: Int = 0
var number: String?
var issueAt: String?
......
//
// YHWorkExperienceListViewController.swift
// galaxy
//
// Created by EDY on 2024/2/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkExperienceListViewController: YHBaseViewController {
var bottomView: UIView!
var bottomButton: UIButton!
var tableView: UITableView!
var dataSource: [YHWorkItemListModel]?
var viewModel: YHWorkItemListViewModel?
override func viewDidLoad() {
super.viewDidLoad()
viewModel = YHWorkItemListViewModel()
gk_navTitle = "工作经验信息填写"
setView()
getData()
// Do any additional setup after loading the view.
}
func getData() {
dataSource = viewModel?.getBaseDataSource()
updateDataSource()
}
func updateDataSource() {
self.tableView.reloadData()
}
func setView() {
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHWorkExperienceListTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.bottom.equalTo(view)
}
bottomView = {
let bottom = UIView()
bottom.backgroundColor = .white
return bottom
}()
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
}
bottomButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor(hex:0x2274ee)
button.titleLabel?.font = kBoldFont(size: 16)
button.contentHorizontalAlignment = .center
button.setTitle("提交", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = 6
button.addTarget(self, action: #selector(submit), for: .touchUpInside)
return button
}()
bottomView.addSubview(bottomButton)
bottomButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.top.equalTo(8)
make.height.equalTo(48)
make.left.equalTo(16)
}
}
@objc func submit() {
}
}
extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceListTableViewCell.self)
cell.dataSource = dataSource
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let number = dataSource?.count ?? 0
if number == 0 {
return CGFloat(16 + 216)
} else {
return CGFloat(16 + 154 + 76 * number)
}
}
}
//
// YHWorkItemListModel.swift
// galaxy
//
// Created by EDY on 2024/2/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
struct YHWorkItemListModel {
var title: String?
var subTitle: String?
var message: String?
var isShowDelete: Bool?
init(title: String? = nil, subTitle: String? = nil, message: String? = nil, isShowDelete: Bool? = nil) {
self.title = title
self.subTitle = subTitle
self.message = message
self.isShowDelete = isShowDelete
}
}
//
// YHWorkExperienceListTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/2/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkExperienceListTableViewCell: UITableViewCell {
typealias ExperienceListBlock = (_ model: YHItemModel) -> ()
var experienceListBlock: ExperienceListBlock?
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var cannalButton: UIButton!
var moreButton: UIButton!
var mainItemView: UIView!
var bottomView: YHWorkItemAddView!
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 = UIColor(hex: 0xe9e9e9)
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 12
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 = kFont(size: 16)
label.text = "主申请人工作经历"
label.textColor = UIColor(hex:0x222222)
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(23)
make.height.equalTo(24)
make.right.equalTo(-20)
}
subTitleLabel = {
let label = UILabel()
label.font = kFont(size: 12)
label.text = "(从最近一份全职工作开始,直至毕业后的第一份工作)"
label.textColor = UIColor(hex:0x888f98)
return label
}()
centerView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(50)
make.height.equalTo(20)
make.right.equalTo(-20)
}
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kBoldFont(size: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消操作", for: .normal)
button.setTitleColor( UIColor(hex:0x2f7ef6), 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)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 12
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-65)
make.top.equalTo(85)
}
bottomView = {
let view = YHWorkItemAddView()
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 {
let line = UIView()
line.backgroundColor = UIColor(hex: 0xf0f0f0)
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalToSuperview()
make.height.equalTo(1)
make.right.equalTo(-18)
}
let itemView = YHWorkItemView()
itemView.dataSource = YHWorkItemListModel(title: "工作经历1", subTitle: "", message: "有16项未填写", isShowDelete: false)
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.experienceListBlock {
block(model)
}
}
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(1)
make.height.equalTo(51)
make.right.equalTo(-18)
}
return
}
for i in 0 ..< dataSource.count {
let line = UIView()
line.backgroundColor = UIColor(hex: 0xf0f0f0)
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(76 * i)
make.height.equalTo(1)
make.right.equalTo(-18)
}
let itemView = YHWorkItemView()
itemView.dataSource = dataSource[i]
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.experienceListBlock {
block(model)
}
}
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(76 * i + 1)
make.height.equalTo(75)
make.right.equalTo(-18)
}
}
}
@objc func cannal() {
}
@objc func more() {
}
}
//
// YHWorkItemAddView.swift
// galaxy
//
// Created by EDY on 2024/2/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkItemAddView: UIView {
let btnTitleColor:UIColor = .brandMainColor
let btnHeight = 44.0
let cornerRadius = 4.0
var clickBlock:(()->Void)?
var title:String? {
didSet {
addBtn.setTitle(title, for: .normal)
}
}
lazy var addBtn: UIButton = {
let btn = UIButton()
btn.setTitle("新增信息".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
btn.setTitleColor(btnTitleColor, for: .normal)
btn.iconInLeft(spacing: 6)
btn.setImage(UIImage(named: "form_add_info"), for: .normal)
btn.addTarget(self, action: #selector(didClickAddBtn), for: .touchUpInside)
return btn
}()
lazy var dotLineLayer:CAShapeLayer = {
let borderLayer = CAShapeLayer()
borderLayer.position = CGPoint(x: addBtn.bounds.midX, y: addBtn.bounds.midY);
borderLayer.path = UIBezierPath(roundedRect: borderLayer.bounds, cornerRadius: addBtn.layer.cornerRadius).cgPath
borderLayer.lineWidth = 1
//[数组第一个数字表示单个虚线长度,第二个数字表示间隔]
borderLayer.lineDashPattern = [3,1] as [NSNumber]?
//前边是虚线的长度,后边是虚线之间空隙的长度
borderLayer.lineDashPhase = 0.1
//实线边框
borderLayer.fillColor = UIColor.clear.cgColor
borderLayer.strokeColor = btnTitleColor.cgColor
return borderLayer
}()
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
addSubview(addBtn)
addBtn.layer.addSublayer(dotLineLayer)
addBtn.snp.makeConstraints { make in
make.left.top.equalToSuperview()
make.right.bottom.equalToSuperview()
}
}
override func layoutSubviews() {
super.layoutSubviews()
print(addBtn.bounds)
dotLineLayer.path = UIBezierPath(roundedRect: addBtn.bounds, cornerRadius: cornerRadius).cgPath
}
@objc func didClickAddBtn() {
if let clickBlock = clickBlock {
clickBlock()
}
}
}
//
// YHWorkItemView.swift
// galaxy
//
// Created by EDY on 2024/2/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkItemView: UIView {
typealias ItemBlock = (_ model: YHItemModel) -> ()
var block: ItemBlock?
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var explainLabel: UILabel!
var nextStepImageView: UIImageView!
var deleteButton: UIButton!
var centerButton: UIButton!
var dataSource: YHWorkItemListModel? {
didSet {
updateAllViews()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
titleLabel = {
let label = UILabel()
label.font = kBoldFont(size: 14)
label.textAlignment = .left
label.textColor = UIColor(hex:0x222222)
return label
}()
addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview()
make.top.equalTo(16)
make.width.equalTo(112)
make.height.equalTo(20)
}
subTitleLabel = {
let label = UILabel()
label.font = kBoldFont(size: 12)
label.textAlignment = .left
label.textColor = UIColor(hex:0x888f98)
return label
}()
addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(20)
make.top.equalTo(40)
}
explainLabel = {
let label = UILabel()
label.font = kBoldFont(size: 14)
label.textAlignment = .right
label.textColor = UIColor(hex:0x888f98)
return label
}()
addSubview(explainLabel)
explainLabel.snp.makeConstraints { make in
make.right.equalTo(-24)
make.left.equalTo(titleLabel.snp.right)
make.height.equalTo(20)
make.centerY.equalTo(titleLabel.snp.centerY)
}
nextStepImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "form_right_arrow")
return imageView
}()
addSubview(nextStepImageView)
nextStepImageView.snp.makeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalToSuperview()
make.height.width.equalTo(20)
}
centerButton = {
let button = UIButton(type: .custom)
button.addTarget(self, action: #selector(centerClick), for: .touchUpInside)
return button
}()
addSubview(centerButton)
centerButton.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview()
make.left.equalTo(112)
}
deleteButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = kFont(size: 14)
button.contentHorizontalAlignment = .center
button.setTitle("删除", for: .normal)
button.setTitleColor( UIColor(hex:0xf81d22), for: .normal)
button.addTarget(self, action: #selector(centerClick), for: .touchUpInside)
button.isHidden = true
return button
}()
addSubview(deleteButton)
deleteButton.snp.makeConstraints { make in
make.right.equalTo(-24)
make.height.equalTo(20)
make.width.equalTo(28)
make.centerY.equalTo(titleLabel.snp.centerY)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
titleLabel.text = dataSource.title
subTitleLabel.text = dataSource.subTitle
explainLabel.text = dataSource.message
if dataSource.isShowDelete ?? false {
deleteButton.isHidden = false
explainLabel.isHidden = true
} else {
deleteButton.isHidden = true
explainLabel.isHidden = false
}
}
@objc func centerClick() {
}
}
//
// YHWorkItemListViewModel.swift
// galaxy
//
// Created by EDY on 2024/2/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkItemListViewModel: YHBaseViewModel {
var mainModel: YHMainInformationModel = YHMainInformationModel()
override init() {
super.init()
}
func getBaseDataSource() -> [YHWorkItemListModel] {
let item = YHWorkItemListModel(title: "华为有限公司", subTitle: "后端开发工程师", message: "2019.07-至今", isShowDelete: false)
return [item]
}
}
//
// YHEducationDetailVC.swift
// galaxy
//
// Created by edy on 2024/2/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHEducationDetailVC: YHBaseViewController {
let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel()
var familyMemberInfo: YHFamilyMemberGroupInfo?
var isChildsEditMode: YHFormTitleItemEditType = .none
var isBrothersEditMode: YHFormTitleItemEditType = .none
var items:[[YHFormItemProtocol]] = []
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
tableView.register(YHFormItemInputTextCell.self, forCellReuseIdentifier: YHFormItemInputTextCell.cellReuseIdentifier)
tableView.register(YHFormItemSelectSheetCell.self, forCellReuseIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier)
return tableView
}()
var bottomView: YHSaveAndSubmitView = {
let view = YHSaveAndSubmitView.createView()
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "学历X".local
view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
func createUI() {
view.addSubview(tableView);
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_safeAreaInsetsBottom())
make.height.equalTo(YHSaveAndSubmitView.height)
}
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
}
loadInfo()
}
func loadInfo() {
items.removeAll()
let title0 = YHFormTitleItem(type: .mainApplicantEducation)
let item00 = YHFormDetailItem(type: .universityFullName)
item00.placeHolder = "请输入学校全称,例:清华,需填全称“清华大学".local
let item01 = YHFormDetailItem(type: .educationStyle)
item01.placeHolder = "请选择授课形式".local
let item02 = YHFormDetailItem(type: .educationTime)
item02.placeHolder = "请选择年月".local
let item03 = YHFormDetailItem(type: .graduateTime)
item03.placeHolder = "请选择年月".local
let item04 = YHFormDetailItem(type: .educationMajor)
item04.placeHolder = "请输入专业".local
let item05 = YHFormDetailItem(type: .educationDegree)
item05.placeHolder = "请选择学位".local
let item06 = YHFormDetailItem(type: .degreeType)
item06.placeHolder = "请输入学位类型,如管理学".local
let item07 = YHFormDetailItem(type: .educationCountry)
item07.placeHolder = "请输入国家及地区".local
let item08 = YHFormDetailItem(type: .educationCity)
item08.placeHolder = "请选择城市".local
let arr0:[YHFormItemProtocol] = [title0, item00, item01, item02, item03, item04, item05, item06, item07, item08]
items.append(arr0)
self.tableView.reloadData()
}
}
extension YHEducationDetailVC : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section >= items.count { return 0 }
let arr = items[section]
return arr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section >= items.count { return createDefaultCell(indexPath) }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return createDefaultCell(indexPath) }
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
let formItem = item as! YHFormTitleItem
// 配偶父母子女兄妹title
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
cell.titleLabel.text = formItem.getTitle()
cell.subTitleLabel.text = formItem.getSubTitle()
return cell
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
let cellType = getCellType(detailItem)
if cellType == .inputText {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as! YHFormItemInputTextCell
cell.placeHolder = detailItem.placeHolder
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
return cell
} else if cellType == .selectSheet {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell
cell.placeHolder = detailItem.placeHolder
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = ""
return cell
}
}
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if indexPath.section >= items.count { return }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return }
createCorner(cell: cell, arr: arr, indexPath: indexPath)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
return 52.0
}
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 14.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHProfessionalQualificationVC()
self.navigationController?.pushViewController(vc)
return
/*
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
// 标题
if item is YHFormTitleItem {
return
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .educationStyle { // 授课形式
YHFormPickerView.show(type: .edution, selectType: .education(.fullTime)) {
[weak self] selectType in
guard let self = self else { return }
}
} else if detailItem.type == .educationTime || detailItem.type == .graduateTime { // 入学及毕业年月
YHDatePickView.show(type: .yyyymm) {
[weak self] date in
guard let self = self else { return }
}
} else if detailItem.type == .educationDegree { // 学位
YHFormPickerView.show(type: .degree, selectType: .degree(.bachelor)) {
[weak self] selectType in
guard let self = self else { return }
}
} else if detailItem.type == .educationCountry { // 上课国家/地区
let vc = YHSelectCountryViewController()
vc.backLocationStringController = {
[weak self] country in
guard let self = self else { return }
}
self.navigationController?.pushViewController(vc)
} else if detailItem.type == .educationCity { // 上课城市
let vc = YHAddressViewController()
vc.backLocationStringController = {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
}
self.present(vc, animated: true)
}
}
*/
}
func createDefaultCell(_ indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
// 设置每块section圆角
if (indexPath.row == 0) {
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else if (indexPath.row == arr.count-1) {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else {
cell.layer.mask = nil
}
}
func getCellType(_ item: Any) ->HKFormItemCellType {
if item is YHFormTitleItem {
return .title
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .universityFullName
|| detailItem.type == .degreeType
|| detailItem.type == .educationMajor {
return .inputText
}
if detailItem.type == .educationStyle
|| detailItem.type == .educationTime
|| detailItem.type == .graduateTime
|| detailItem.type == .educationDegree
|| detailItem.type == .educationCountry
|| detailItem.type == .educationCity {
return .selectSheet
}
}
return .defaultType
}
}
//
// YHEducationalQualificationVC.swift
// galaxy
//
// Created by edy on 2024/2/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHEducationalQualificationVC: YHBaseViewController {
let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel()
var familyMemberInfo: YHFamilyMemberGroupInfo?
var isChildsEditMode: YHFormTitleItemEditType = .none
var isBrothersEditMode: YHFormTitleItemEditType = .none
var items:[[YHFormItemProtocol]] = []
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHEducationInfoCell.self, forCellReuseIdentifier: YHEducationInfoCell.cellReuseIdentifier)
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
return tableView
}()
var bottomView: YHSaveAndSubmitView = {
let view = YHSaveAndSubmitView.createView()
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "学历/专业资格填写".local
view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
func createUI() {
view.addSubview(tableView);
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_safeAreaInsetsBottom())
make.height.equalTo(YHSaveAndSubmitView.height)
}
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
}
loadInfo()
}
func loadInfo() {
items.removeAll()
let title0 = YHFormTitleItem(type: .mainApplicantEducation)
let item00 = YHFormDetailItem(type: .educationInfo)
let arr0:[YHFormItemProtocol] = [title0, item00]
items.append(arr0)
self.tableView.reloadData()
}
}
extension YHEducationalQualificationVC : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section >= items.count { return 0 }
let arr = items[section]
return arr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section >= items.count { return createDefaultCell(indexPath) }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return createDefaultCell(indexPath) }
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
let formItem = item as! YHFormTitleItem
// 配偶父母子女兄妹title
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
cell.titleLabel.text = formItem.getTitle()
cell.subTitleLabel.text = formItem.getSubTitle()
// 决定右边按钮显示样式
cell.showEditType(type: .none)
// if formItem.type == .child {
// cell.showEditType(type: isChildsEditMode)
//
// } else if formItem.type == .brother {
// cell.showEditType(type: isBrothersEditMode)
// }
// 右边按钮点击事件处理
cell.rightClickBlock = { [weak self] type in
guard let self = self else { return }
}
return cell
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .educationInfo {
let cell = tableView.dequeueReusableCell(withIdentifier: YHEducationInfoCell.cellReuseIdentifier, for: indexPath) as! YHEducationInfoCell
return cell
}
}
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if indexPath.section >= items.count { return }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return }
createCorner(cell: cell, arr: arr, indexPath: indexPath)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
return 52.0
} else if item is YHFormAddItem { // 新增子女兄妹
return 70.0
}
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 14.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
// 标题
if item is YHFormTitleItem {
return
}
let vc = YHEducationDetailVC()
self.navigationController?.pushViewController(vc)
}
func createDefaultCell(_ indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
// 设置每块section圆角
if (indexPath.row == 0) {
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else if (indexPath.row == arr.count-1) {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else {
cell.layer.mask = nil
}
}
}
//
// YHProfessionalQualificationVC.swift
// galaxy
//
// Created by edy on 2024/2/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHProfessionalQualificationVC: YHBaseViewController {
let familyRequest:YHFamilyRequestViewModel = YHFamilyRequestViewModel()
var familyMemberInfo: YHFamilyMemberGroupInfo?
var isChildsEditMode: YHFormTitleItemEditType = .none
var isBrothersEditMode: YHFormTitleItemEditType = .none
var items:[[YHFormItemProtocol]] = []
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHFormItemTitleCell.self, forCellReuseIdentifier: YHFormItemTitleCell.cellReuseIdentifier)
tableView.register(YHFormItemAddCell.self, forCellReuseIdentifier: YHFormItemAddCell.cellReuseIdentifier)
tableView.register(YHFormItemInputTextCell.self, forCellReuseIdentifier: YHFormItemInputTextCell.cellReuseIdentifier)
tableView.register(YHFormItemSelectSheetCell.self, forCellReuseIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier)
return tableView
}()
var bottomView: YHSaveAndSubmitView = {
let view = YHSaveAndSubmitView.createView()
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.gk_navTitle = "学历X".local
view.backgroundColor = UIColor(hexString:"#F8F8F8")
createUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
func createUI() {
view.addSubview(tableView);
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_safeAreaInsetsBottom())
make.height.equalTo(YHSaveAndSubmitView.height)
}
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
}
loadInfo()
}
func loadInfo() {
items.removeAll()
let title0 = YHFormTitleItem(type: .mainApplicantEducation)
let item00 = YHFormDetailItem(type: .qualificationCertificateName)
item00.placeHolder = "请输入资格证书名称".local
let item01 = YHFormDetailItem(type: .conferAgencyFullName)
item01.placeHolder = "请输入颁授机构全称".local
let item02 = YHFormDetailItem(type: .conferTime)
item02.placeHolder = "请选择颁授年份".local
let item03 = YHFormDetailItem(type: .conferCountry)
item03.placeHolder = "请选择颁授国家/地区".local
let item04 = YHFormDetailItem(type: .conferCity)
item04.placeHolder = "请选择颁授城市".local
let arr0:[YHFormItemProtocol] = [title0, item00, item01, item02, item03, item04]
items.append(arr0)
self.tableView.reloadData()
}
}
extension YHProfessionalQualificationVC : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section >= items.count { return 0 }
let arr = items[section]
return arr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section >= items.count { return createDefaultCell(indexPath) }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return createDefaultCell(indexPath) }
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
let formItem = item as! YHFormTitleItem
// 配偶父母子女兄妹title
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemTitleCell.cellReuseIdentifier, for: indexPath) as! YHFormItemTitleCell
cell.titleLabel.text = formItem.getTitle()
cell.subTitleLabel.text = formItem.getSubTitle()
return cell
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
let cellType = getCellType(detailItem)
if cellType == .inputText {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemInputTextCell.cellReuseIdentifier, for: indexPath) as! YHFormItemInputTextCell
cell.placeHolder = detailItem.placeHolder
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
return cell
} else if cellType == .selectSheet {
let cell = tableView.dequeueReusableCell(withIdentifier: YHFormItemSelectSheetCell.cellReuseIdentifier, for: indexPath) as! YHFormItemSelectSheetCell
cell.placeHolder = detailItem.placeHolder
cell.isMust = detailItem.isNeed
cell.title = detailItem.getTitle()
cell.detail = ""
return cell
}
}
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if indexPath.section >= items.count { return }
let arr:[YHFormItemProtocol] = items[indexPath.section]
if indexPath.row >= arr.count { return }
createCorner(cell: cell, arr: arr, indexPath: indexPath)
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
if item is YHFormTitleItem { // 是标题
return 52.0
}
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 14.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let arr = items[indexPath.section]
let item:YHFormItemProtocol = arr[indexPath.row]
// 标题
if item is YHFormTitleItem {
return
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .conferTime { // 授权年份
YHDatePickView.show(type: .yyyy) {
[weak self] date in
guard let self = self else { return }
}
} else if detailItem.type == .conferCountry { // 授权国家/地区
let vc = YHSelectCountryViewController()
vc.backLocationStringController = {
[weak self] country in
guard let self = self else { return }
}
self.navigationController?.pushViewController(vc)
} else if detailItem.type == .conferCity { // 授权城市
let vc = YHAddressViewController()
vc.backLocationStringController = {
[weak self] (string1, string2, string3, string4) in
guard let self = self else { return }
}
self.present(vc, animated: true)
}
}
}
func createDefaultCell(_ indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return cell
}
func createCorner(cell:UITableViewCell, arr:Array<Any>, indexPath:IndexPath) {
// 设置每块section圆角
if (indexPath.row == 0) {
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else if (indexPath.row == arr.count-1) {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(12.0, 12.0), corner)
} else {
cell.layer.mask = nil
}
}
func getCellType(_ item: Any) ->HKFormItemCellType {
if item is YHFormTitleItem {
return .title
}
if item is YHFormDetailItem {
let detailItem = item as! YHFormDetailItem
if detailItem.type == .conferAgencyFullName
|| detailItem.type == .qualificationCertificateName {
return .inputText
}
if detailItem.type == .conferTime
|| detailItem.type == .conferCountry
|| detailItem.type == .conferCity {
return .selectSheet
}
}
return .defaultType
}
}
//
// YHEducationInfoCell.swift
// galaxy
//
// Created by edy on 2024/2/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHEducationInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHEducationInfoCell"
let horizonalGap = 18.0
private lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.textAlignment = .left
label.font = UIFont.PFSC_B(ofSize: 14)
return label
}()
private lazy var subTitleLabel: UILabel = {
let label = UILabel()
label.textColor = .labelTextColor2
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
private lazy var timeLabel: UILabel = {
let label = UILabel()
label.textColor = .labelTextColor2
label.textAlignment = .right
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
private lazy var tipsLabel: UILabel = {
let label = UILabel()
label.textColor = .failColor
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 12)
label.isHidden = true
return label
}()
private lazy var arrowImgView: UIImageView = {
let imgView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imgView
}()
private lazy var bottomLine:UIView = {
let view = UIView()
view.backgroundColor = .separatorColor
view.isHidden = true
return view
}()
// 是否展示底部分割线
var isShowBottomLine:Bool = false {
didSet {
bottomLine.isHidden = !isShowBottomLine
}
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.selectionStyle = .none
contentView.addSubview(titleLabel)
contentView.addSubview(subTitleLabel)
contentView.addSubview(timeLabel)
contentView.addSubview(arrowImgView)
contentView.addSubview(tipsLabel)
contentView.addSubview(bottomLine)
titleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
titleLabel.text = "啊发沙发沙发"
subTitleLabel.text = "法术法"
timeLabel.text = "2141234124214123412421412341242141234124"
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalTo(timeLabel.snp.left).offset(-8)
make.top.equalToSuperview().offset(16)
}
timeLabel.snp.makeConstraints { make in
make.right.equalTo(arrowImgView.snp.left)
make.centerY.equalTo(titleLabel)
}
arrowImgView.snp.makeConstraints { make in
make.width.height.equalTo(20.0)
make.centerY.equalTo(titleLabel)
make.right.equalToSuperview().offset(-horizonalGap)
}
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(titleLabel)
make.top.equalTo(titleLabel.snp.bottom).offset(4)
make.right.equalToSuperview().offset(-horizonalGap)
}
bottomLine.snp.makeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.height.equalTo(1.0)
make.bottom.equalToSuperview()
}
setTips("asdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfaasdfafasdfasfa", isShow: true)
}
func setTips(_ tips:String?, isShow:Bool) {
tipsLabel.text = tips
tipsLabel.isHidden = !isShow
if isShow {
tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalTo(subTitleLabel.snp.bottom)
make.bottom.equalToSuperview().offset(-16)
}
} else {
tipsLabel.snp.remakeConstraints { make in
make.left.equalToSuperview().offset(horizonalGap)
make.right.equalToSuperview().offset(-horizonalGap)
make.top.equalTo(subTitleLabel.snp.bottom)
make.height.equalTo(0)
make.bottom.equalToSuperview().offset(-16)
}
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
//
// YHMySettingViewController.swift
// galaxy
//
// Created by edy on 2024/2/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SnapKit
import NEConversationUIKit
class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget {
lazy var tableView: UITableView = {
let tableView = UITableView(frame: CGRect.zero, style:.plain)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.register(YHMySettingCell.self, forCellReuseIdentifier: YHMySettingCell.cellReuseIdentifier)
tableView.delegate = self
tableView.dataSource = self
return tableView
}()
lazy var items: [PersonalModuleItem] = {
return [PersonalModuleItem(title: "调整颜色".local.local),
PersonalModuleItem(title: "深色模式".local),
PersonalModuleItem(title: "个人信息收集清单".local),
PersonalModuleItem(title: "第三方信息共享清单".local),
PersonalModuleItem(title: "关于我们".local)]
}()
override func viewDidLoad() {
super.viewDidLoad()
initView()
}
func initView() {
self.gk_navTitle = "设置".local
self.view.backgroundColor = .white
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.left.right.bottom.equalToSuperview()
}
}
}
extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHMySettingCell.cellReuseIdentifier, for: indexPath) as! YHMySettingCell
let item : PersonalModuleItem = items[indexPath.row];
cell.titleLabel.text = item.title
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 53.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if (indexPath.row >= items.count) { return }
}
}
......@@ -10,8 +10,12 @@ import SnapKit
import NEConversationUIKit
struct PersonalModuleItem {
var icon: String
var icon: String?
var title: String
init(icon: String? = nil, title: String) {
self.icon = icon
self.title = title
}
}
class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
......@@ -41,7 +45,14 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
}()
lazy var headerView: YHUserInfoHeaderView = {
return YHUserInfoHeaderView.createView()
let view = YHUserInfoHeaderView.createView()
view.settingBlock = {
[weak self] in
guard let self = self else { return }
let vc = YHMySettingViewController()
self.navigationController?.pushViewController(vc)
}
return view
}()
private lazy var bgImgView:UIImageView = {
......@@ -56,8 +67,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
func initView() {
self.title = "个人中心"
gk_navigationBar.isHidden = true
view.addSubview(bgImgView)
view.addSubview(tableView)
......
//
// YHMySettingCell.swift
// galaxy
//
// Created by edy on 2024/2/6.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMySettingCell: UITableViewCell {
static let cellReuseIdentifier = "YHMySettingCell"
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor(hexString:"#141414")
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 15)
return label
}()
lazy var arrowImgView:UIImageView = {
let arrowImgView = UIImageView(image: UIImage(named: "mine_arrow_right"))
return arrowImgView
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
self.selectionStyle = .none
contentView.addSubview(titleLabel)
contentView.addSubview(arrowImgView)
titleLabel.snp.makeConstraints { make in
make.centerY.equalTo(contentView)
make.left.equalToSuperview().offset(20)
make.right.equalTo(arrowImgView.snp.left)
}
arrowImgView.snp.makeConstraints { make in
make.width.equalTo(20)
make.height.equalTo(20)
make.centerY.equalTo(contentView)
make.right.equalTo(contentView).offset(-20)
}
}
}
......@@ -40,7 +40,11 @@ class YHPersonalCenterCell: UITableViewCell {
}
func updateItem(item : PersonalModuleItem) {
iconImgView.image = UIImage(named: item.icon)
if let icon = item.icon, !icon.isEmpty {
iconImgView.image = UIImage(named:icon)
} else {
iconImgView.image = nil
}
titleLabel.text = item.title;
}
......
......@@ -12,6 +12,11 @@ class YHUserInfoHeaderView: UIView {
static let bgRatio = 312.0/375.0 // 背景图高宽比
static let height = (KScreenWidth*bgRatio + 24)
var settingBlock:(()->Void)?
var evaluateBlock:(()->Void)?
private lazy var avarImgView:UIImageView = {
let img = UIImageView(image: UIImage(named: "mine_head_default"))
return img
......@@ -73,7 +78,7 @@ class YHUserInfoHeaderView: UIView {
private lazy var settingBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named: "mine_btn_setting"), for: .normal)
btn.addTarget(self, action: #selector(didClickEvaluateBtn(btn:)), for: .touchUpInside)
btn.addTarget(self, action: #selector(didClickSettingBtn(btn:)), for: .touchUpInside)
return btn
}()
......@@ -178,7 +183,16 @@ class YHUserInfoHeaderView: UIView {
@objc func didClickEvaluateBtn(btn: UIButton) {
if let evaluateBlock = evaluateBlock {
evaluateBlock()
}
}
@objc func didClickSettingBtn(btn: UIButton) {
if let settingBlock = settingBlock {
settingBlock()
}
}
}
......@@ -93,8 +93,9 @@ class YHNetRequest: NSObject {
print("sign = \(sign)")
requestHeader.add(name:"sign",value:sign)
requestHeader.add(name: "token", value: "eyJpdiI6IkduSzJuR09VZFB6azU2OU9FRXZcL2JRPT0iLCJ2YWx1ZSI6IkZ1VWZjY1NoZVRHdnh1R2pjZUZ2eGdyU0JVWFJcL1hFemhWYlR3QzA5TnRLVkVCaEREbmpLNk5HenZCVERlaFdXY0J0czFxUlpwTFdkQnV3ckVMU01neDhERlwvSUc4bGprQk9QdzlIaGJaVGd4TjZcL1VMelFidmhrTklhbXZCSkpVVFp1KzQ1VnRYbDByaGwwV0lSNmtpRnJza29aSFJ6Wis4MXFVRWRQSElNNWRFbjF5bTdINlpKTlFhXC9LNExhQ2k0RzNyTFhxR3JKcjB2YzhMaW85WVhhU0dPNmhhUmhRbHVzTXh1Vjd0anc4NjdYWGdWWFBiMm15WGJCR0IyZlJ5NjFGQ0UyaVdXNjB6bXNScFpJXC81SVQ3ZFZkVWlcL1dJV09iMFhtUjBuSSt3NllSMER2aTNmVXNCa1NqWGZQTnBXRmVHaStpSHRhK2lYRHNyRXBzWE9kSE9BMkcwcWFHTzcwYjlNVlwvN2xoallsSVwvbkxkYzVQdUhCcW84K3FsQ25VakRJUXRIUHk3NHQ5ZGpETWRNUVlZOFduV01ZVDZBVGJnMm1RcTRuR0pJU24rN1c1YW05UFJGTXI3Z0xETnlVQWRQTlpvK2IrZlY5bGFIbUpGaHBuUnJkMlU0NGg3Kys1SGlaZENBZTdQXC9YVTM4MW9ONkVvVVg4QzYzVmRNT3l2QTE3U3JpamJzRFFTYlplbUE1VlRjYkNsaVhUdUczdTgxamhQVm1cL0RYZzBFeDQ0R1U1YjFBYXhkWmNWSDc2MXlrQlYzMjJzK0FoMnFyWWxKRVhZaTN0NTVkVm5QcFd2TTdaMUloVjA1TDNKVWN0eUo5QTZGcHJuenpNeFwvSnNpTFJjQW1YbUNvNUJmRHRKXC9ldnFET2JTYVFlSlgwNkF5dmpOOG9ZdW1VSGZtWnlFbzhQQURGc01DclhEM2NoYjVqd0lOb3hIMUcxcmVDdzhQZGdGc1dNSUtsWUpKR081SGtFUmpDWElkcXlaR21rbktWRkV4V0lwNDRrSFNOcnpzRkw2N2ZuS0RVT1wvWTk4TUo5dktaSCtYeENzRjM0c1Z3MGtjVXBzVGxxMGlUVVVDMTFldGlxREVzV2ZLRkNnWVZMWTRsSGFtNHZMSWJ3ZlBXSzA3c0FnWXp0Z2VKY1wvYm9IYkI0WWVUZVQ4OG1KMXZQaFJmMXc3Mjdqc1N1dFNjYkJNYVhjN1AwNmtJcXlVMTYxK1BoRVIrUFwvVTVRVWdvc3kwR1AzdHdlQXIzUzFyb1NBbXFlakxaV21uYmZ0Y29LQW1RVEJrZXpueWtnWE1hMkthY3F3Z0FOYjVFaDZZVFhJZ0VnVzhNOFVJYVZWR3RjNGp3cUUxdGdxR25rbGt4RUZjb1wvbEdiVVZ1d2l1UExjU1RWMVBGbXd1cWo0and0M1U5aGtHWm1RUGoranpjTjd5cUR3Z05cL25pUG5lY1wvUmgrbFRzXC9qZVZwVlNiM0FmK1Y0bTVHYk93OGtHMitUTzdSOWFHQlFnZXhqWmRwR2trZ1ZIZjJDNVFITnNXRm5jNmJzK1lqRFFwWWxEQnhFR2FLUStiZEJsbDV4Vit2dDc0cURiVVwvS2ExVkE4RmMxZEpJMkNJK01kWm9aajJjOUJaUGkzTjRNOVpTeHdQZW1UOUlCSTNacDlUSHNDOVwvN1B0U1dSUWFyalJqTis2SW5GckUrT0cxN2pmSDZ3RlJ4bDdSVVhBMWdocjM1RlVaOCtHYkw0RVoyYXVEOFhNNEpVa2Rzd3prM0hKSjFqQnlQYUsyaTJNNmVsbE1HbXZwR1RGNmxlK2ltU3Jka2lVN3VEeGtwQ0NYWlZEOFFOaHgzWHQ0YjdnMU1yeVhNMFwvRm1FSFhVMmpxZ2p2TlpYQitPZGxrS2s4dmoyWnhRMGg5d0Vld2x5MVIrZz09IiwibWFjIjoiMGNjNWM2OWIzMmJlZGNjZGRjNDBkY2RhMGQzMTk2ODg4MmRlNWEwNzZlNDc5MGVkMWRmNDBmOWVkMDA4YzQzZCJ9")
requestHeader.add(name: "token", value: "eyJpdiI6IkduSzJuR09VZFB6azU2OU9FRXZcL2JRPT0iLCJ2YWx1ZSI6IkZ1VWZjY1NoZVRHdnh1R2pjZUZ2eGdyU0JVWFJcL1hFemhWYlR3QzA5TnRLVkVCaEREbmpLNk5HenZCVERlaFdXY0J0czFxUlpwTFdkQnV3ckVMU01neDhERlwvSUc4bGprQk9QdzlIaGJaVGd4TjZcL1VMelFidmhrTklhbXZCSkpVVFp1KzQ1VnRYbDByaGwwV0lSNmtpRnJza29aSFJ6Wis4MXFVRWRQSElNNWRFbjF5bTdINlpKTlFhXC9LNExhQ2k0RzNyTFhxR3JKcjB2YzhMaW85WVhhU0dPNmhhUmhRbHVzTXh1Vjd0anc4NjdYWGdWWFBiMm15WGJCR0IyZlJ5NjFGQ0UyaVdXNjB6bXNScFpJXC81SVQ3ZFZkVWlcL1dJV09iMFhtUjBuSSt3NllSMER2aTNmVXNCa1NqWGZQTnBXRmVHaStpSHRhK2lYRHNyRXBzWE9kSE9BMkcwcWFHTzcwYjlNVlwvN2xoallsSVwvbkxkYzVQdUhCcW84K3FsQ25VakRJUXRIUHk3NHQ5ZGpETWRNUVlZOFduV01ZVDZBVGJnMm1RcTRuR0pJU24rN1c1YW05UFJGTXI3Z0xETnlVQWRQTlpvK2IrZlY5bGFIbUpGaHBuUnJkMlU0NGg3Kys1SGlaZENBZTdQXC9YVTM4MW9ONkVvVVg4QzYzVmRNT3l2QTE3U3JpamJzRFFTYlplbUE1VlRjYkNsaVhUdUczdTgxamhQVm1cL0RYZzBFeDQ0R1U1YjFBYXhkWmNWSDc2MXlrQlYzMjJzK0FoMnFyWWxKRVhZaTN0NTVkVm5QcFd2TTdaMUloVjA1TDNKVWN0eUo5QTZGcHJuenpNeFwvSnNpTFJjQW1YbUNvNUJmRHRKXC9ldnFET2JTYVFlSlgwNkF5dmpOOG9ZdW1VSGZtWnlFbzhQQURGc01DclhEM2NoYjVqd0lOb3hIMUcxcmVDdzhQZGdGc1dNSUtsWUpKR081SGtFUmpDWElkcXlaR21rbktWRkV4V0lwNDRrSFNOcnpzRkw2N2ZuS0RVT1wvWTk4TUo5dktaSCtYeENzRjM0c1Z3MGtjVXBzVGxxMGlUVVVDMTFldGlxREVzV2ZLRkNnWVZMWTRsSGFtNHZMSWJ3ZlBXSzA3c0FnWXp0Z2VKY1wvYm9IYkI0WWVUZVQ4OG1KMXZQaFJmMXc3Mjdqc1N1dFNjYkJNYVhjN1AwNmtJcXlVMTYxK1BoRVIrUFwvVTVRVWdvc3kwR1AzdHdlQXIzUzFyb1NBbXFlakxaV21uYmZ0Y29LQW1RVEJrZXpueWtnWE1hMkthY3F3Z0FOYjVFaDZZVFhJZ0VnVzhNOFVJYVZWR3RjNGp3cUUxdGdxR25rbGt4RUZjb1wvbEdiVVZ1d2l1UExjU1RWMVBGbXd1cWo0and0M1U5aGtHWm1RUGoranpjTjd5cUR3Z05cL25pUG5lY1wvUmgrbFRzXC9qZVZwVlNiM0FmK1Y0bTVHYk93OGtHMitUTzdSOWFHQlFnZXhqWmRwR2trZ1ZIZjJDNVFITnNXRm5jNmJzK1lqRFFwWWxEQnhFR2FLUStiZEJsbDV4Vit2dDc0cURiVVwvS2ExVkE4RmMxZEpJMkNJK01kWm9aajJjOUJaUGkzTjRNOVpTeHdQZW1UOUlCSTNacDlUSHNDOVwvN1B0U1dSUWFyalJqTis2SW5GckUrT0cxN2pmSDZ3RlJ4bDdSVVhBMWdocjM1RlVaOCtHYkw0RVoyYXVEOFhNNEpVa2Rzd3prM0hKSjFqQnlQYUsyaTJNNmVsbE1HbXZwR1RGNmxlK2ltU3Jka2lVN3VEeGtwQ0NYWlZEOFFOaHgzWHQ0YjdnMU1yeVhNMFwvRm1FSFhVMmpxZ2p2TlpYQitPZGxrS2s4dmoyWnhRMGg5d0Vld2x5MVIrZz09IiwibWFjIjoiMGNjNWM2OWIzMmJlZGNjZGRjNDBkY2RhMGQzMTk2ODg4MmRlNWEwNzZlNDc5MGVkMWRmNDBmOWVkMDA4YzQzZCJ9")
headers = requestHeader
}
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "work_more@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "work_more@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