Commit 1959e805 authored by Steven杜宇's avatar Steven杜宇

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

parents d931f896 711a9289
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52862B5657B3007EBCEB /* IMAppKey.swift */; }; 041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52862B5657B3007EBCEB /* IMAppKey.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 */; };
044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */; }; 044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */; };
044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */; }; 044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */; };
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */; }; 044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */; };
...@@ -307,6 +308,7 @@ ...@@ -307,6 +308,7 @@
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */; }; A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */; };
A5D6AB1B2B46A1CC001C10A5 /* YHHomeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */; }; A5D6AB1B2B46A1CC001C10A5 /* YHHomeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */; };
A5D6AB1D2B46AAFB001C10A5 /* YHHomePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */; }; A5D6AB1D2B46AAFB001C10A5 /* YHHomePageViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */; };
A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = A5E69D502BA304D400411932 /* DIN Alternate Bold.ttf */; };
A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F8AC072B9F414000A21EFA /* YHCustomTextView.swift */; }; A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F8AC072B9F414000A21EFA /* YHCustomTextView.swift */; };
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */; }; A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */; };
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */; }; A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */; };
...@@ -353,6 +355,7 @@ ...@@ -353,6 +355,7 @@
041B52862B5657B3007EBCEB /* IMAppKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IMAppKey.swift; sourceTree = "<group>"; }; 041B52862B5657B3007EBCEB /* IMAppKey.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IMAppKey.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>"; };
044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterView.swift; sourceTree = "<group>"; }; 044867B32BA1953B00DFAD4A /* YHCertificateFilterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterView.swift; sourceTree = "<group>"; };
044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterItemCell.swift; sourceTree = "<group>"; }; 044867B52BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterItemCell.swift; sourceTree = "<group>"; };
044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadFailTipsView.swift; sourceTree = "<group>"; }; 044867B72BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadFailTipsView.swift; sourceTree = "<group>"; };
...@@ -655,6 +658,7 @@ ...@@ -655,6 +658,7 @@
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBbxCollectionViewCell.swift; sourceTree = "<group>"; }; A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBbxCollectionViewCell.swift; sourceTree = "<group>"; };
A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeModel.swift; sourceTree = "<group>"; }; A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeModel.swift; sourceTree = "<group>"; };
A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomePageViewModel.swift; sourceTree = "<group>"; }; A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomePageViewModel.swift; sourceTree = "<group>"; };
A5E69D502BA304D400411932 /* DIN Alternate Bold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "DIN Alternate Bold.ttf"; sourceTree = "<group>"; };
A5F8AC072B9F414000A21EFA /* YHCustomTextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCustomTextView.swift; sourceTree = "<group>"; }; A5F8AC072B9F414000A21EFA /* YHCustomTextView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCustomTextView.swift; sourceTree = "<group>"; };
A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectListVC.swift; sourceTree = "<group>"; }; A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectListVC.swift; sourceTree = "<group>"; };
A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectCell.swift; sourceTree = "<group>"; }; A5FD63BE2B6250BC00D1D9DA /* YHInformationPerfectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectCell.swift; sourceTree = "<group>"; };
...@@ -1267,6 +1271,7 @@ ...@@ -1267,6 +1271,7 @@
045EEE762B9F171A0022A143 /* YHItemView.swift */, 045EEE762B9F171A0022A143 /* YHItemView.swift */,
045EEE772B9F171A0022A143 /* YHStepView.swift */, 045EEE772B9F171A0022A143 /* YHStepView.swift */,
045EEE782B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift */, 045EEE782B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift */,
0435FA822BA2DEB100024EAE /* YHCardButton.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1630,6 +1635,7 @@ ...@@ -1630,6 +1635,7 @@
A5ACE9142B4564F7002C94D2 /* Res */ = { A5ACE9142B4564F7002C94D2 /* Res */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5E69D4F2BA304D400411932 /* Font */,
A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */, A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */,
04808C022B4686510056D53C /* Frameworks */, 04808C022B4686510056D53C /* Frameworks */,
A5573EDA2B317C0000D98EC0 /* Assets.xcassets */, A5573EDA2B317C0000D98EC0 /* Assets.xcassets */,
...@@ -1802,6 +1808,14 @@ ...@@ -1802,6 +1808,14 @@
path = VM; path = VM;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
A5E69D4F2BA304D400411932 /* Font */ = {
isa = PBXGroup;
children = (
A5E69D502BA304D400411932 /* DIN Alternate Bold.ttf */,
);
path = Font;
sourceTree = "<group>";
};
/* End PBXGroup section */ /* End PBXGroup section */
/* Begin PBXNativeTarget section */ /* Begin PBXNativeTarget section */
...@@ -1920,6 +1934,7 @@ ...@@ -1920,6 +1934,7 @@
045EEF182B9F171A0022A143 /* area.plist in Resources */, 045EEF182B9F171A0022A143 /* area.plist in Resources */,
A51044182B493675006B60BB /* README.md in Resources */, A51044182B493675006B60BB /* README.md in Resources */,
A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */, A5573EDB2B317C0000D98EC0 /* Assets.xcassets in Resources */,
A5E69D512BA304D400411932 /* DIN Alternate Bold.ttf in Resources */,
); );
runOnlyForDeploymentPostprocessing = 0; runOnlyForDeploymentPostprocessing = 0;
}; };
...@@ -2259,6 +2274,7 @@ ...@@ -2259,6 +2274,7 @@
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */, A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */, 045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */,
045EEEA22B9F171A0022A143 /* YHWorkExperienceProjectModel.swift in Sources */, 045EEEA22B9F171A0022A143 /* YHWorkExperienceProjectModel.swift in Sources */,
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */,
045EEECA2B9F171A0022A143 /* YHMyDocumentsListViewController.swift in Sources */, 045EEECA2B9F171A0022A143 /* YHMyDocumentsListViewController.swift in Sources */,
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */, 04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */,
045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */, 045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */,
......
...@@ -44,7 +44,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -44,7 +44,17 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
YHLoginManager.shared.loadLocalUserInfoData() YHLoginManager.shared.loadLocalUserInfoData()
// YHAnalytics.analyticsStart(launchOptions: launchOptions) // YHAnalytics.analyticsStart(launchOptions: launchOptions)
// var i = 0
// for family: String in UIFont.familyNames {
// print("\(i)---项目字体---\(family)")
// for names: String in UIFont.fontNames(forFamilyName: family) {
// print("== \(names)")
// }
// i += 1
// }
return true return true
} }
...@@ -71,7 +81,7 @@ extension AppDelegate { ...@@ -71,7 +81,7 @@ extension AppDelegate {
//1.数据解析 //1.数据解析
#if DEBUG #if DEBUG
// SmartConfig.debugMode = .verbose // SmartConfig.debugMode = .verbose
SmartConfig.debugMode = .none //for test hjl SmartConfig.debugMode = .none //for test hjl
#else #else
SmartConfig.debugMode = .none SmartConfig.debugMode = .none
...@@ -124,7 +134,7 @@ extension AppDelegate { ...@@ -124,7 +134,7 @@ extension AppDelegate {
let tabBarController = YHTabBarViewController() let tabBarController = YHTabBarViewController()
let v0 = YHNavigationController(rootVC:YHHomeViewController()) let v0 = YHNavigationController(rootVC:YHHomeViewController())
// let v0 = YHNavigationController(rootVC:YHPersonInformMainViewController())//for test hjl // let v0 = YHNavigationController(rootVC:YHPersonInformMainViewController())//for test hjl
let v1 = YHNavigationController(rootVC:YHServiceCenterMainViewController()) let v1 = YHNavigationController(rootVC:YHServiceCenterMainViewController())
let v2 = YHNavigationController(rootVC:YHMyViewController()) let v2 = YHNavigationController(rootVC:YHMyViewController())
...@@ -133,7 +143,7 @@ extension AppDelegate { ...@@ -133,7 +143,7 @@ extension AppDelegate {
v1.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "服务中心", image: UIImage(named: "home"), selectedImage: UIImage(named: "home_1")) v1.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "服务中心", image: UIImage(named: "home"), selectedImage: UIImage(named: "home_1"))
v2.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "我的", image: UIImage(named: "find"), selectedImage: UIImage(named: "find_1")) v2.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "我的", image: UIImage(named: "find"), selectedImage: UIImage(named: "find_1"))
tabBarController.viewControllers = [v0,v1,v2] tabBarController.viewControllers = [v0,v1,v2]
// tabBarController.viewControllers = [v1,v2] for test hjl 配合测试同学做自动化测试 Moon 2023.03.12 // tabBarController.viewControllers = [v1,v2] for test hjl 配合测试同学做自动化测试 Moon 2023.03.12
tabBarController.tabBar.backgroundColor = .white tabBarController.tabBar.backgroundColor = .white
window = UIWindow(frame: UIScreen.main.bounds) window = UIWindow(frame: UIScreen.main.bounds)
......
...@@ -21,6 +21,8 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -21,6 +21,8 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
super.viewDidLoad() super.viewDidLoad()
viewModel = YHMainApplicantInformationViewModel() viewModel = YHMainApplicantInformationViewModel()
gk_navTitle = "主申请人信息填写" gk_navTitle = "主申请人信息填写"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1
setView() setView()
getData() getData()
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
...@@ -68,7 +70,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController { ...@@ -68,7 +70,7 @@ class YHMainApplicantInformationViewController: YHBaseViewController {
} }
tableView = { tableView = {
let tableView = UITableView(frame:.zero, style:.plain) let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) { if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never tableView.contentInsetAdjustmentBehavior = .never
} }
...@@ -194,4 +196,21 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable ...@@ -194,4 +196,21 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
return CGFloat(h + 52 + 14) return CGFloat(h + 52 + 14)
} }
} }
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 7))
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 7
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
} }
...@@ -28,7 +28,7 @@ class YHAddressPickView: UIView { ...@@ -28,7 +28,7 @@ class YHAddressPickView: UIView {
case .provinces: case .provinces:
/// 选择省份时,有上面的热门城市view.没有滚动选择type的titleScrollView.没有已选择label. /// 选择省份时,有上面的热门城市view.没有滚动选择type的titleScrollView.没有已选择label.
self.tableView.tableHeaderView = tableViewHeaderView self.tableView.tableHeaderView = tableViewHeaderView
self.tableView.frame = CGRect(x: 0, y: 42, width: UIScreen.main.bounds.width, height: 458) self.tableView.frame = CGRect(x: 0, y: 52, width: UIScreen.main.bounds.width, height: 526)
self.titleSV.isHidden = true self.titleSV.isHidden = true
self.leftLabel.isHidden = true self.leftLabel.isHidden = true
/// 将所有选中数据清空 /// 将所有选中数据清空
...@@ -46,7 +46,7 @@ class YHAddressPickView: UIView { ...@@ -46,7 +46,7 @@ class YHAddressPickView: UIView {
button.isSelected = true button.isSelected = true
} }
} }
self.underLine.center = CGPoint(x: self.buttonArr[1].center.x, y: self.underLine.center.y) // self.underLine.center = CGPoint(x: self.buttonArr[1].center.x, y: self.underLine.center.y)
self.dataArray = locationModel?.provincesArray.map({ model in self.dataArray = locationModel?.provincesArray.map({ model in
model.provincesName model.provincesName
}) })
...@@ -54,7 +54,7 @@ class YHAddressPickView: UIView { ...@@ -54,7 +54,7 @@ class YHAddressPickView: UIView {
case .city: case .city:
/// 选择城市时没有热门城市view,并将titleSV显示出来 /// 选择城市时没有热门城市view,并将titleSV显示出来
self.tableView.tableHeaderView = UIView() self.tableView.tableHeaderView = UIView()
self.tableView.frame = CGRect(x: 0, y: 136, width: UIScreen.main.bounds.width, height: 367) self.tableView.frame = CGRect(x: 0, y: 136, width: UIScreen.main.bounds.width, height: 427)
self.titleSV.isHidden = false self.titleSV.isHidden = false
self.leftLabel.isHidden = false self.leftLabel.isHidden = false
/// 将省份选择保留,将城市与地区数据清空 /// 将省份选择保留,将城市与地区数据清空
...@@ -73,7 +73,7 @@ class YHAddressPickView: UIView { ...@@ -73,7 +73,7 @@ class YHAddressPickView: UIView {
} }
/// 滚动titleSV中button下滚动的Line /// 滚动titleSV中button下滚动的Line
UIView.animate(withDuration: 0.3, animations: {() -> Void in UIView.animate(withDuration: 0.3, animations: {() -> Void in
self.underLine.center = CGPoint(x: self.buttonArr[1].center.x, y: self.underLine.center.y) // self.underLine.center = CGPoint(x: self.buttonArr[1].center.x, y: self.underLine.center.y)
}) })
self.dataArray = provincesModel?.cityArray.map({ model in self.dataArray = provincesModel?.cityArray.map({ model in
model.cityName model.cityName
...@@ -112,41 +112,43 @@ class YHAddressPickView: UIView { ...@@ -112,41 +112,43 @@ class YHAddressPickView: UIView {
/// 当前tableView使用的数据源 /// 当前tableView使用的数据源
private var dataArray: [String]? private var dataArray: [String]?
private let titleLabel: UILabel = { private let titleLabel: UILabel = {
let label = UILabel(frame: CGRect(x: (UIScreen.main.bounds.width - 100) / 2, y: 9, width: 100, height: 24)) let label = UILabel(frame: CGRect(x: (UIScreen.main.bounds.width - 150) / 2, y: 16, width: 150, height: 24))
label.textColor = UIColor(red: 51/255, green: 51/255, blue: 51/255, alpha: 1) label.textColor = UIColor.mainTextColor
label.text = "选择国家地区" label.text = "选择国家地区"
label.textAlignment = .center label.textAlignment = .center
label.font = UIFont.boldSystemFont(ofSize: 16) label.font = UIFont.PFSC_M(ofSize: 17)
return label return label
}() }()
private let rightCancelButton: UIButton = { private let rightCancelButton: UIButton = {
let button = UIButton(frame: CGRect(x: UIScreen.main.bounds.width - 42, y: 11, width: 18, height: 18)) let button = UIButton(frame: CGRect(x: UIScreen.main.bounds.width - 43, y: 16, width: 24, height: 24))
button.setImage(UIImage(named: "BaseVC_cancel"), for: .normal) button.setImage(UIImage(named: "address_close"), for: .normal)
return button return button
}() }()
private let leftLabel: UILabel = { private let leftLabel: UILabel = {
let label = UILabel(frame: CGRect(x: 24, y: 43, width: 40, height: 18)) let label = UILabel(frame: CGRect(x: 24, y: 52, width: 100, height: 18))
label.text = "已选择" label.text = "已选择"
label.textColor = UIColor(red: 102/255, green: 102/255, blue: 102/255, alpha: 1) label.textColor = UIColor.mainTextColor
label.font = UIFont.systemFont(ofSize: 12) label.font = UIFont.PFSC_M(ofSize: 14)
label.isHidden = true label.isHidden = true
return label return label
}() }()
/// 热门城市数组,可修改,若修改数量需要修改下方tableViewHeaderView.frame;若修改城市需要修改onClickHotCity()方法来实现点击跳转功能 /// 热门城市数组,可修改,若修改数量需要修改下方tableViewHeaderView.frame;若修改城市需要修改onClickHotCity()方法来实现点击跳转功能
private let hotCityArray = ["北京","上海","广州","深圳","杭州","南京","苏州","天津","武汉","长沙","重庆","成都"] private let hotCityArray = ["北京","上海","广州","深圳","东莞","杭州","成都","南京"]
private lazy var tableViewHeaderView: UIView = { private lazy var tableViewHeaderView: UIView = {
let view = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 160)) let view = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: 120))
let label = UILabel(frame: CGRect(x: 24, y: 0, width: 50, height: 18)) let label = UILabel(frame: CGRect(x: 24, y: 0, width: 100, height: 18))
label.textColor = UIColor(red: 102/255, green: 102/255, blue: 102/255, alpha: 1) label.textColor = UIColor.mainTextColor
label.font = UIFont.systemFont(ofSize: 12) label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "热门城市" label.text = "热门城市"
view.addSubview(label) view.addSubview(label)
for i in 0..<12 { for i in 0..<8 {
let button: UIButton = UIButton(frame: CGRect(x: CGFloat(24 + 80 * (i % 4)), y: CGFloat(28 + 40 * (i / 4)), width: 80, height: 40)) let button: UIButton = UIButton(frame: CGRect(x: CGFloat(20 + 86 * (i % 4)), y: CGFloat(28 + 40 * (i / 4)), width: 74, height: 32))
button.setTitle(hotCityArray[i], for: .normal) button.setTitle(hotCityArray[i], for: .normal)
button.setTitleColor(UIColor(red: 102/255, green: 102/255, blue: 102/255, alpha: 1), for: .normal) button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.titleLabel?.font = UIFont.systemFont(ofSize: 12) button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.addTarget(self, action: #selector(onClickHotCity(sender:)), for: .touchUpInside) button.addTarget(self, action: #selector(onClickHotCity(sender:)), for: .touchUpInside)
button.layer.cornerRadius = 16
button.backgroundColor = UIColor.contentBkgColor
button.tag = i button.tag = i
view.addSubview(button) view.addSubview(button)
} }
...@@ -155,8 +157,8 @@ class YHAddressPickView: UIView { ...@@ -155,8 +157,8 @@ class YHAddressPickView: UIView {
/// 上方选择省份城市地区的滚动scrollView /// 上方选择省份城市地区的滚动scrollView
private var titleSV: UIScrollView! private var titleSV: UIScrollView!
/// titleSV上button下的滚动线 /// titleSV上button下的滚动线
private var underLine = UIView() // private var underLine = UIView()
private var tableView = UITableView(frame: CGRect(x: 0, y:42 , width: UIScreen.main.bounds.width, height: 458)) private var tableView = UITableView(frame: CGRect(x: 0, y:52 , width: UIScreen.main.bounds.width, height: 526))
init(frame: CGRect, selectColor: UIColor, selectedProvince: String? = nil, selectedCity: String? = nil) { init(frame: CGRect, selectColor: UIColor, selectedProvince: String? = nil, selectedCity: String? = nil) {
self.selectColor = selectColor self.selectColor = selectColor
...@@ -183,27 +185,33 @@ class YHAddressPickView: UIView { ...@@ -183,27 +185,33 @@ class YHAddressPickView: UIView {
titleSV.removeFromSuperview() titleSV.removeFromSuperview()
} }
buttonArr = [] buttonArr = []
titleSV = UIScrollView(frame: CGRect(x: 0, y: 72, width: UIScreen.main.bounds.width, height: 44)) titleSV = UIScrollView(frame: CGRect(x: 0, y: 92, width: UIScreen.main.bounds.width, height: 44))
self.underLine = UIView(frame: CGRect(x: 0, y: 40, width: 30, height: 2)) // self.underLine = UIView(frame: CGRect(x: 0, y: 40, width: 30, height: 2))
self.underLine.backgroundColor = selectColor // self.underLine.backgroundColor = UIColor.brandMainColor
for i in 0..<2 { for i in 0..<2 {
let button = UIButton(frame: CGRect(x: 24 + CGFloat(i) * (UIScreen.main.bounds.width - 47) / 2, y: 0, width: UIScreen.main.bounds.width / 3, height: 44)) let button = UIButton(frame: CGRect(x: 21 + CGFloat(i) * 86, y: 0, width: 74, height: 32))
button.tag = Int(i) button.tag = Int(i)
if i == 1 {
button.isSelected = true
underLine.center.x = button.center.x
}
button.setTitle("请选择", for: .normal) button.setTitle("请选择", for: .normal)
button.setTitleColor(UIColor(red: 51/255, green: 51/255, blue: 51/255, alpha: 1), for: .normal) button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setTitleColor(selectColor, for: .selected) button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.titleLabel?.font = UIFont.systemFont(ofSize: 12) button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.titleLabel?.adjustsFontSizeToFitWidth = true button.titleLabel?.adjustsFontSizeToFitWidth = true
button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.setBackgroundColor(color: UIColor.brandMainColor.withAlphaComponent(0.08), forState: .selected)
button.layer.borderColor = UIColor.brandMainColor.cgColor
button.layer.borderWidth = 0
button.layer.cornerRadius = 16
button.addTarget(self, action: #selector(onClickTitlebutton(sender:)), for: .touchUpInside) button.addTarget(self, action: #selector(onClickTitlebutton(sender:)), for: .touchUpInside)
if i == 1 {
button.isSelected = true
button.layer.borderWidth = 1
// underLine.center.x = button.center.x
}
buttonArr.append(button) buttonArr.append(button)
titleSV.addSubview(button) titleSV.addSubview(button)
} }
titleSV.showsVerticalScrollIndicator = false titleSV.showsVerticalScrollIndicator = false
titleSV.addSubview(self.underLine) // titleSV.addSubview(self.underLine)
titleSV.contentSize = CGSize(width: UIScreen.main.bounds.width, height: 44) titleSV.contentSize = CGSize(width: UIScreen.main.bounds.width, height: 44)
titleSV.isHidden = true titleSV.isHidden = true
self.addSubview(titleSV) self.addSubview(titleSV)
...@@ -225,9 +233,8 @@ class YHAddressPickView: UIView { ...@@ -225,9 +233,8 @@ class YHAddressPickView: UIView {
} }
} }
@objc private func onClickHotCity(sender: UIButton) { @objc private func onClickHotCity(sender: UIButton) {
let hotProvince = ["北京市","上海市","广东省","广东省","广东省","浙江省","四川省","江苏省"]
let hotProvince = ["北京市","上海市","广东省","广东省","浙江省","江苏省","江苏省","天津市","湖北省","湖南省","重庆市","四川省"] let hotCity = ["市辖区","市辖区","广州市","深圳市","东莞市","杭州市","成都市","南京市"]
let hotCity = ["市辖区","市辖区","广州市","深圳市","杭州市","南京市","苏州市","天津市","武汉市","长沙市","市辖区","成都市"]
let tag = sender.tag let tag = sender.tag
setHotCityData(province: hotProvince[tag], city: hotCity[tag]) setHotCityData(province: hotProvince[tag], city: hotCity[tag])
} }
......
...@@ -13,9 +13,9 @@ class YHAddressPickViewTableViewCell: UITableViewCell { ...@@ -13,9 +13,9 @@ class YHAddressPickViewTableViewCell: UITableViewCell {
static let identifier = "YHAddressPickViewTableViewCell" static let identifier = "YHAddressPickViewTableViewCell"
let label: UILabel = { let label: UILabel = {
let label = UILabel(frame: CGRect(x: 42, y: 8, width: 200, height: 24)) let label = UILabel(frame: CGRect(x: 20, y: 8, width: 200, height: 24))
label.font = UIFont.systemFont(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = UIColor(red: 51/255, green: 51/255, blue: 51/255, alpha: 1) label.textColor = UIColor.mainTextColor
return label return label
}() }()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
...@@ -36,9 +36,9 @@ class YHAddressPickViewFirstTableViewCell: UITableViewCell { ...@@ -36,9 +36,9 @@ class YHAddressPickViewFirstTableViewCell: UITableViewCell {
static let identifier = "YHAddressPickViewFirstTableViewCell" static let identifier = "YHAddressPickViewFirstTableViewCell"
let label: UILabel = { let label: UILabel = {
let label = UILabel(frame: CGRect(x: 24, y: 11.5, width: 100, height: 17)) let label = UILabel(frame: CGRect(x: 20, y: 11.5, width: 100, height: 17))
label.font = UIFont.systemFont(ofSize: 12) label.font = UIFont.PFSC_M(ofSize: 14)
label.textColor = UIColor(red: 102/255, green: 102/255, blue: 102/255, alpha: 1) label.textColor = UIColor.mainTextColor
return label return label
}() }()
......
...@@ -32,7 +32,7 @@ class YHAddressViewController: UIViewController { ...@@ -32,7 +32,7 @@ class YHAddressViewController: UIViewController {
public var selectCity: String? public var selectCity: String?
public lazy var containV: YHAddressPickView = { public lazy var containV: YHAddressPickView = {
let view = YHAddressPickView(frame: CGRect(x: 0, y: UIScreen.main.bounds.height - 550, width: UIScreen.main.bounds.width, height: 550),selectColor: selectColor,selectedProvince: selectProvince,selectedCity: selectCity) let view = YHAddressPickView(frame: CGRect(x: 0, y: UIScreen.main.bounds.height - 628, width: UIScreen.main.bounds.width, height: 628),selectColor: selectColor,selectedProvince: selectProvince,selectedCity: selectCity)
view.backOnClickCancel = { view.backOnClickCancel = {
[weak self] in [weak self] in
self?.onClickCancel() self?.onClickCancel()
...@@ -44,6 +44,7 @@ class YHAddressViewController: UIViewController { ...@@ -44,6 +44,7 @@ class YHAddressViewController: UIViewController {
self?.onClickCancel() self?.onClickCancel()
} }
} }
view.layer.cornerRadius = kCornerRadius8
return view return view
}() }()
public var backgroundView:UIView = { public var backgroundView:UIView = {
......
//
// YHCardButton.swift
// galaxy
//
// Created by EDY on 2024/3/14.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHCardButton: UIButton {
var topImageView: UIImageView!
var bottomTitleLabel: UILabel!
override init(frame: CGRect) {
super.init(frame: frame)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
topImageView = {
let view = UIImageView()
return view
}()
addSubview(topImageView)
topImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(22)
make.width.height.equalTo(24)
}
bottomTitleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 12)
label.textAlignment = .center
label.textColor = UIColor.brandMainColor
return label
}()
addSubview(bottomTitleLabel)
bottomTitleLabel.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(20)
make.bottom.equalTo(-15)
}
}
func setContent(_ image: String, _ title: String) {
topImageView.removeFromSuperview()
topImageView = nil
topImageView = {
let view = UIImageView()
return view
}()
addSubview(topImageView)
topImageView.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.top.equalTo(22)
make.width.height.equalTo(24)
}
bottomTitleLabel.text = title
topImageView.image = UIImage(named: image)
}
// 开始旋转动画的函数
func startRotationAnimation() {
let rotationAnimation = CAKeyframeAnimation(keyPath: "transform.rotation")
rotationAnimation.values = [0, Double.pi / 2, Double.pi, 3 * Double.pi / 2, 2 * Double.pi]
rotationAnimation.duration = 1
rotationAnimation.repeatCount = Float.infinity
topImageView.layer.add(rotationAnimation, forKey: "rotationAnimation")
}
// 停止旋转动画的函数
func stopRotationAnimation() {
topImageView.removeFromSuperview()
}
}
...@@ -74,7 +74,7 @@ class YHCardExampleView: UIView { ...@@ -74,7 +74,7 @@ class YHCardExampleView: UIView {
label.text = "身份证示例模板" label.text = "身份证示例模板"
label.font = UIFont.PFSC_M(ofSize: 17) label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.textAlignment = .left label.textAlignment = .center
return label return label
}() }()
centerView.addSubview(titleLabel) centerView.addSubview(titleLabel)
...@@ -130,6 +130,8 @@ class YHCardExampleView: UIView { ...@@ -130,6 +130,8 @@ class YHCardExampleView: UIView {
topImageView = { topImageView = {
let imageView = UIImageView() let imageView = UIImageView()
imageView.image = UIImage(named: "service_card_id_back") imageView.image = UIImage(named: "service_card_id_back")
imageView.layer.cornerRadius = kCornerRadius6
imageView.clipsToBounds = true
return imageView return imageView
}() }()
centerView.addSubview(topImageView) centerView.addSubview(topImageView)
...@@ -143,6 +145,8 @@ class YHCardExampleView: UIView { ...@@ -143,6 +145,8 @@ class YHCardExampleView: UIView {
bottomImageView = { bottomImageView = {
let imageView = UIImageView() let imageView = UIImageView()
imageView.image = UIImage(named: "service_card_passport_back") imageView.image = UIImage(named: "service_card_passport_back")
imageView.layer.cornerRadius = kCornerRadius6
imageView.clipsToBounds = true
return imageView return imageView
}() }()
centerView.addSubview(bottomImageView) centerView.addSubview(bottomImageView)
...@@ -161,6 +165,7 @@ class YHCardExampleView: UIView { ...@@ -161,6 +165,7 @@ class YHCardExampleView: UIView {
button.setTitle("知道了", for: .normal) button.setTitle("知道了", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal) button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius6 button.layer.cornerRadius = kCornerRadius6
button.clipsToBounds = true
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside) button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return button return button
}() }()
...@@ -171,6 +176,9 @@ class YHCardExampleView: UIView { ...@@ -171,6 +176,9 @@ class YHCardExampleView: UIView {
make.bottom.equalTo(-42) make.bottom.equalTo(-42)
make.height.equalTo(48) make.height.equalTo(48)
} }
bottomButton.layoutIfNeeded()
bottomButton.addYinHeGradualLayer()
let array = ["四角完整", "照片清晰", "亮度均匀"] let array = ["四角完整", "照片清晰", "亮度均匀"]
for i in 0 ..< array.count { for i in 0 ..< array.count {
......
...@@ -228,7 +228,7 @@ extension YHImagePickerView: UIGestureRecognizerDelegate { ...@@ -228,7 +228,7 @@ extension YHImagePickerView: UIGestureRecognizerDelegate {
extension YHImagePickerView: UINavigationControllerDelegate, UIImagePickerControllerDelegate { extension YHImagePickerView: UINavigationControllerDelegate, UIImagePickerControllerDelegate {
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) { func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage { if let image = info[UIImagePickerController.InfoKey.originalImage] as? UIImage {
uploadImage(image: image) // uploadImage(image: image)
if let block = backImage { if let block = backImage {
block(image) block(image)
self.dismiss() self.dismiss()
......
...@@ -273,6 +273,14 @@ class YHItemView: UIView { ...@@ -273,6 +273,14 @@ class YHItemView: UIView {
if dataSource.isShowPrompts ?? false { if dataSource.isShowPrompts ?? false {
if dataSource.message?.count != 0 { if dataSource.message?.count != 0 {
showPromptLabel.isHidden = true showPromptLabel.isHidden = true
//特殊处理身份证
if dataSource.id == .id8 {
if let message = dataSource.message,message.count == 18 {
} else {
showPromptLabel.isHidden = false
}
}
} else { } else {
showPromptLabel.isHidden = false showPromptLabel.isHidden = false
} }
...@@ -280,6 +288,7 @@ class YHItemView: UIView { ...@@ -280,6 +288,7 @@ class YHItemView: UIView {
showPromptLabel.isHidden = true showPromptLabel.isHidden = true
} }
if dataSource.id == .id11 || dataSource.id == .id15 || dataSource.id == .id20 { if dataSource.id == .id11 || dataSource.id == .id15 || dataSource.id == .id20 {
longTimeButton.isHidden = false longTimeButton.isHidden = false
nextStepImageView.isHidden = true nextStepImageView.isHidden = true
...@@ -489,7 +498,7 @@ extension YHItemView: UITextFieldDelegate { ...@@ -489,7 +498,7 @@ extension YHItemView: UITextFieldDelegate {
return false return false
} }
if (dataSource?.id == .id8) && newText.count > 20 { if (dataSource?.id == .id8) && newText.count > 18 {
return false return false
} }
...@@ -498,7 +507,9 @@ extension YHItemView: UITextFieldDelegate { ...@@ -498,7 +507,9 @@ extension YHItemView: UITextFieldDelegate {
} }
if dataSource?.id == .id23 { if dataSource?.id == .id23 {
newText = newText.uppercased() let regex = "[^A-Za-z]+"
textField.limitInputWithPattern(pattern:regex, 30)
newText = textField.text!.uppercased()
} }
var data = dataSource ?? YHItemModel() var data = dataSource ?? YHItemModel()
......
...@@ -23,8 +23,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -23,8 +23,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
var exampleButton: UIButton! var exampleButton: UIButton!
var frontLabel: UILabel! var frontLabel: UILabel!
var backSurfaceLabel: UILabel! var backSurfaceLabel: UILabel!
var frontImageButton: UIButton! var frontImageButton: YHCardButton!
var backSurfaceImageButton: UIButton! var backSurfaceImageButton: YHCardButton!
var frontDeleteButton: UIButton! var frontDeleteButton: UIButton!
var backSurfaceDeleteButton: UIButton! var backSurfaceDeleteButton: UIButton!
var activityIndicator: UIActivityIndicatorView! var activityIndicator: UIActivityIndicatorView!
...@@ -35,16 +35,18 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -35,16 +35,18 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_front) {[weak self] success, error in self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_front) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
guard let url = success else { return } guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: success), for: .normal) self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal)
self.frontDeleteButton.isHidden = false self.frontDeleteButton.isHidden = false
self.frontImageButton.setContent("", "")
} }
} }
if viewModel.mainModel.certificates.cn_identity_card.img_back.count != 0 { 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 self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.cn_identity_card.img_back) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
guard let url = success else { return } guard let url = success else { return }
self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: success), for: .normal) self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal)
self.backSurfaceDeleteButton.isHidden = false self.backSurfaceDeleteButton.isHidden = false
self.backSurfaceImageButton.setContent("", "")
} }
} }
} else { } else {
...@@ -52,16 +54,18 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -52,16 +54,18 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.hk_macao_pass.img_front) {[weak self] success, error in self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.hk_macao_pass.img_front) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
guard let url = success else { return } guard let url = success else { return }
self.frontImageButton.kf.setBackgroundImage(with: URL(string: success), for: .normal) self.frontImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal)
self.frontDeleteButton.isHidden = false self.frontDeleteButton.isHidden = false
self.frontImageButton.setContent("", "")
} }
} }
if viewModel.mainModel.certificates.hk_macao_pass.img_back.count != 0 { if viewModel.mainModel.certificates.hk_macao_pass.img_back.count != 0 {
self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.hk_macao_pass.img_back) {[weak self] success, error in self.viewModel.getPublicImageUrl(viewModel.mainModel.certificates.hk_macao_pass.img_back) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
guard let url = success else { return } guard let url = success else { return }
self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: success), for: .normal) self.backSurfaceImageButton.kf.setBackgroundImage(with: URL(string: url), for: .normal)
self.backSurfaceDeleteButton.isHidden = false self.backSurfaceDeleteButton.isHidden = false
self.backSurfaceImageButton.setContent("", "")
} }
} }
} }
...@@ -74,11 +78,14 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -74,11 +78,14 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
titleLabel.text = "中国身份证(选填)" titleLabel.text = "中国身份证(选填)"
frontLabel.text = "身份证人像面" frontLabel.text = "身份证人像面"
backSurfaceLabel.text = "身份证国徽面" backSurfaceLabel.text = "身份证国徽面"
frontImageButton.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_cn_card_back"), for: .normal)
case .passport: case .passport:
titleLabel.text = "港澳通行证(选填)" titleLabel.text = "港澳通行证(选填)"
frontLabel.text = "港澳通行证正面" frontLabel.text = "港澳通行证正面"
backSurfaceLabel.text = "港澳通行证反面" backSurfaceLabel.text = "港澳通行证反面"
frontImageButton.setBackgroundImage(UIImage(named: "service_hk_card_front"), for: .normal)
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_hk_card_back"), for: .normal)
} }
} }
} }
...@@ -149,7 +156,7 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -149,7 +156,7 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
}() }()
centerView.addSubview(exampleButton) centerView.addSubview(exampleButton)
exampleButton.snp.makeConstraints { make in exampleButton.snp.makeConstraints { make in
make.left.equalTo(titleLabel.snp.right) make.left.equalTo(titleLabel.snp.right).offset(8)
make.centerY.equalTo(titleLabel.snp.centerY) make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(14) make.height.equalTo(14)
make.width.equalTo(48) make.width.equalTo(48)
...@@ -199,9 +206,12 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -199,9 +206,12 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
} }
frontImageButton = { frontImageButton = {
let button = UIButton(type: .custom) let button = YHCardButton()
button.setBackgroundImage(UIImage(named: "service_card_front"), for: .normal) button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside) button.addTarget(self, action: #selector(frontImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button return button
}() }()
centerView.addSubview(frontImageButton) centerView.addSubview(frontImageButton)
...@@ -228,9 +238,12 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -228,9 +238,12 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
} }
backSurfaceImageButton = { backSurfaceImageButton = {
let button = UIButton(type: .custom) let button = YHCardButton()
button.setBackgroundImage(UIImage(named: "service_card_back"), for: .normal) button.setContent("card_upload", "点击上传")
button.setBackgroundImage(UIImage(named: "service_cn_card_back"), for: .normal)
button.addTarget(self, action: #selector(backSurfaceImageClick), for: .touchUpInside) button.addTarget(self, action: #selector(backSurfaceImageClick), for: .touchUpInside)
button.layer.cornerRadius = 4
button.clipsToBounds = true
return button return button
}() }()
centerView.addSubview(backSurfaceImageButton) centerView.addSubview(backSurfaceImageButton)
...@@ -294,12 +307,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -294,12 +307,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
} }
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.activityIndicator.snp.remakeConstraints { make in self.frontImageButton.setContent("card_loading", "上传中")
make.center.equalTo(self.frontImageButton.snp.center) self.frontImageButton.startRotationAnimation()
make.height.equalTo(25)
make.width.equalTo(25)
}
self.activityIndicator.startAnimating()
self.viewModel.uploadImage(image) {[weak self] success, error in self.viewModel.uploadImage(image) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
guard let url = success else { return } guard let url = success else { return }
...@@ -312,7 +321,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -312,7 +321,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
if self.type == .identity { if self.type == .identity {
self.viewModel.requestCnIDCardMessage(url, isBack: 0) {[weak self] success, error in self.viewModel.requestCnIDCardMessage(url, isBack: 0) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.activityIndicator.stopAnimating() self.frontImageButton.stopRotationAnimation()
self.frontImageButton.setContent("", "")
if success { if success {
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "") YHHUD.flash(message: error?.errorMsg ?? "")
...@@ -321,7 +331,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -321,7 +331,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
} else { } else {
self.viewModel.requestHkIDCardMessage(url, isBack: 0) {[weak self] success, error in self.viewModel.requestHkIDCardMessage(url, isBack: 0) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.activityIndicator.stopAnimating() self.frontImageButton.stopRotationAnimation()
self.frontImageButton.setContent("", "")
if success { if success {
} else { } else {
...@@ -352,12 +363,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -352,12 +363,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
} }
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.activityIndicator.snp.remakeConstraints { make in self.backSurfaceImageButton.setContent("card_loading", "上传中")
make.center.equalTo(self.backSurfaceImageButton.snp.center) self.backSurfaceImageButton.startRotationAnimation()
make.height.equalTo(25)
make.width.equalTo(25)
}
self.activityIndicator.startAnimating()
self.viewModel.uploadImage(image) {[weak self] success, error in self.viewModel.uploadImage(image) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
guard let url = success else { return } guard let url = success else { return }
...@@ -370,7 +377,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -370,7 +377,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
if self.type == .identity { if self.type == .identity {
self.viewModel.requestCnIDCardMessage(url, isBack: 1) {[weak self] success, error in self.viewModel.requestCnIDCardMessage(url, isBack: 1) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.activityIndicator.stopAnimating() self.backSurfaceImageButton.stopRotationAnimation()
self.backSurfaceImageButton.setContent("", "")
if success { if success {
} else { } else {
...@@ -380,7 +388,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -380,7 +388,8 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
} else { } else {
self.viewModel.requestHkIDCardMessage(url, isBack: 1 ) {[weak self] success, error in self.viewModel.requestHkIDCardMessage(url, isBack: 1 ) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.activityIndicator.stopAnimating() self.backSurfaceImageButton.stopRotationAnimation()
self.backSurfaceImageButton.setContent("", "")
if success { if success {
} else { } else {
...@@ -402,12 +411,24 @@ class YHMainInformationCardTableViewCell: UITableViewCell { ...@@ -402,12 +411,24 @@ class YHMainInformationCardTableViewCell: UITableViewCell {
@objc func frontDeleteClick() { @objc func frontDeleteClick() {
viewModel.updateModel(self.type, isFront: true, url: "") viewModel.updateModel(self.type, isFront: true, url: "")
frontDeleteButton.isHidden = true frontDeleteButton.isHidden = true
frontImageButton.setBackgroundImage(UIImage(named: "service_card_front"), for: .normal) switch type {
case .identity:
frontImageButton.setBackgroundImage(UIImage(named: "service_cn_card_front"), for: .normal)
case .passport:
frontImageButton.setBackgroundImage(UIImage(named: "service_hk_card_front"), for: .normal)
}
frontImageButton.setContent("card_upload", "点击上传")
} }
@objc func backSurfaceDeleteClick() { @objc func backSurfaceDeleteClick() {
viewModel.updateModel(self.type, isFront: false, url: "") viewModel.updateModel(self.type, isFront: false, url: "")
backSurfaceDeleteButton.isHidden = true backSurfaceDeleteButton.isHidden = true
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_card_back"), for: .normal) switch type {
case .identity:
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_cn_card_back"), for: .normal)
case .passport:
backSurfaceImageButton.setBackgroundImage(UIImage(named: "service_hk_card_back"), for: .normal)
}
backSurfaceImageButton.setContent("card_upload", "点击上传")
} }
} }
...@@ -27,14 +27,22 @@ class YHStepView: UIScrollView { ...@@ -27,14 +27,22 @@ class YHStepView: UIScrollView {
var stepSpace: CGFloat = 6 var stepSpace: CGFloat = 6
var lineWidth: CGFloat { var lineWidth: CGFloat {
guard let dataSource = dataSource else { return 0 } guard let dataSource = dataSource else { return 0 }
let lineCount = dataSource.count - 1
if dataSource.count <= 2 { if dataSource.count <= 2 {
return 157 let contentWidth = 89 * 2 + Int(stepSpace) * 2 * lineCount + 14 * dataSource.count
let width = (KScreenWidth - CGFloat(contentWidth)) / lineCount.cgFloat
return width
} else if dataSource.count <= 4 { } else if dataSource.count <= 4 {
return 75 let contentWidth = 43 * 2 + Int(stepSpace) * 2 * lineCount + 14 * dataSource.count
let width = (KScreenWidth - CGFloat(contentWidth)) / lineCount.cgFloat
return width
} else { } else {
return 55 let contentWidth = 43 * 2 + Int(stepSpace) * 2 * 3 + 14 * 4
let width = (KScreenWidth - CGFloat(contentWidth)) / lineCount.cgFloat
return width
} }
} }
var spaceWidth: CGFloat { var spaceWidth: CGFloat {
guard let dataSource = dataSource else { return 0 } guard let dataSource = dataSource else { return 0 }
if dataSource.count <= 2 { if dataSource.count <= 2 {
...@@ -63,9 +71,10 @@ class YHStepView: UIScrollView { ...@@ -63,9 +71,10 @@ class YHStepView: UIScrollView {
button.tag = 1000 + i button.tag = 1000 + i
button.addTarget(self, action: #selector(buttonClick(_:)), for: .touchUpInside) button.addTarget(self, action: #selector(buttonClick(_:)), for: .touchUpInside)
addSubview(button) addSubview(button)
printLog("\(lineWidth)")
button.snp.makeConstraints { make in button.snp.makeConstraints { make in
make.top.equalTo(28) make.top.equalTo(28)
make.left.equalTo(spaceWidth + i.cgFloat * (lineWidth + stepSpace * 2 + 14)) make.left.equalTo(spaceWidth + i.cgFloat * (lineWidth + stepSpace * 2) + 14 * i.cgFloat)
make.width.height.equalTo(14) make.width.height.equalTo(14)
} }
button.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50) button.YH_clickEdgeInsets = UIEdgeInsets(top: 50, left: 50, bottom: 50, right: 50)
......
...@@ -38,7 +38,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -38,7 +38,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let item22 = YHItemModel(id: .id33, isNeed: true, title: "是否在海外居住一年及以上", isUserKeyBoard: false, prompts: "", message: "\(mainModel.is_live_oversea_year)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择是否在海外居住满1年及以上") let item22 = YHItemModel(id: .id33, isNeed: true, title: "是否在海外居住一年及以上", isUserKeyBoard: false, prompts: "", message: "\(mainModel.is_live_oversea_year)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择是否在海外居住满1年及以上")
let section1 = YHSectionItemModel(title: "现居住地址", models: [item4, item1, item2]) let section1 = YHSectionItemModel(title: "现居住地址", models: [item4, item1, item2])
let section11 = YHSectionItemModel(title: "现居住地址", models: [item4, item11, item22]) let section11 = YHSectionItemModel(title: "现居住地址", models: [item4, item11, item22])
let item3 = YHItemModel(id: .id5, isNeed: true, title: "是否办理", isUserKeyBoard: false, prompts: "", message: "\(mainModel.is_handled)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择是否办理过港澳通行证") let item3 = YHItemModel(id: .id5, isNeed: true, title: "是否办理", isUserKeyBoard: false, prompts: "", message: "\(mainModel.is_handled)", leftButtonString: "是", rightButtonString: "否", isShowPrompts: isShowPrompt, alertMessage:"请选择是否办理过港澳通行证")
let section2 = YHSectionItemModel(title: "港澳通行证", models: [item3]) let section2 = YHSectionItemModel(title: "港澳通行证", models: [item3])
let addressCountry = mainModel.address.country let addressCountry = mainModel.address.country
if addressCountry.contains("中国") { if addressCountry.contains("中国") {
...@@ -472,6 +472,8 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -472,6 +472,8 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let passport_issue_date_start_at = mainModel.certificates.passport.issue_date_start_at let passport_issue_date_start_at = mainModel.certificates.passport.issue_date_start_at
let passport_issue_date_end_at = mainModel.certificates.passport.issue_date_end_at let passport_issue_date_end_at = mainModel.certificates.passport.issue_date_end_at
let nationality = mainModel.nationality let nationality = mainModel.nationality
if self.mainModel.is_handled == 1 { if self.mainModel.is_handled == 1 {
guard hk_macao_pass_number.count > 0 else { return false } guard hk_macao_pass_number.count > 0 else { return false }
guard hk_macao_pass_issue_at.count > 0 else { return false } guard hk_macao_pass_issue_at.count > 0 else { return false }
...@@ -479,7 +481,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -479,7 +481,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
guard hk_macao_pass_issue_date_end_at.count > 0 else { return false } guard hk_macao_pass_issue_date_end_at.count > 0 else { return false }
} }
if nationality.contains("中国") { if nationality.contains("中国") {
guard cn_identity_card_number.count > 0 else { return false } guard cn_identity_card_number.count == 18 else { return false }
guard cn_identity_card_issue_at.count > 0 else { return false } guard cn_identity_card_issue_at.count > 0 else { return false }
guard cn_identity_card_issue_date_start_at.count > 0 else { return false } guard cn_identity_card_issue_date_start_at.count > 0 else { return false }
guard cn_identity_card_issue_date_end_at.count > 0 else { return false } guard cn_identity_card_issue_date_end_at.count > 0 else { return false }
...@@ -498,7 +500,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel { ...@@ -498,7 +500,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let birth_place_area = mainModel.birth_place.area let birth_place_area = mainModel.birth_place.area
let birth_place_foreign = mainModel.birth_place.foreign let birth_place_foreign = mainModel.birth_place.foreign
let sex = mainModel.sex let sex = mainModel.sex
let married = mainModel.married _ = mainModel.married
let mobile = mainModel.mobile let mobile = mainModel.mobile
let email = mainModel.email let email = mainModel.email
let has_hk_id = mainModel.has_hk_id let has_hk_id = mainModel.has_hk_id
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "service_card_back@2x.png", "filename" : "address_close@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "service_card_back@3x.png", "filename" : "address_close@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "service_card_front@2x.png", "filename" : "card_loading@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "service_card_front@3x.png", "filename" : "card_loading@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "card_upload@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "card_upload@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_cn_card_back@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_cn_card_back@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_cn_card_front@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_cn_card_front@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_hk_card_back@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_hk_card_back@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "service_hk_card_front@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "service_hk_card_front@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -2,6 +2,10 @@ ...@@ -2,6 +2,10 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0"> <plist version="1.0">
<dict> <dict>
<key>UIAppFonts</key>
<array>
<string>DIN Alternate Bold</string>
</array>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
<dict> <dict>
<key>NSAllowsArbitraryLoads</key> <key>NSAllowsArbitraryLoads</key>
......
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