Commit 433d3320 authored by David黄金龙's avatar David黄金龙

Merge branch 'develop'

* develop: (106 commits)
  修改版本号
  首页 置顶
  1、处理 首页的数据刷新 2、处理 数据一致性
  // tag:0.2.9.
  多页每次请求  6 控制 banner 不超过6
  修改 版本号 0.2.3
  跳转逻辑
  //  我的
  处理一处 视频播放的问题
  //  点赞收藏最近浏览
  加载更多
  首页刷新逻辑
  // 消息
  处理第一张选择
  首页 指示器
  // 权限设置
  // 搜索
  加载更多
  // 搜索
  // 搜索
  ...
parents a240dcc1 1edd0e45
...@@ -17,8 +17,8 @@ target 'galaxy' do ...@@ -17,8 +17,8 @@ target 'galaxy' do
# pod 'RxSwift','6.6.0' # pod 'RxSwift','6.6.0'
# pod 'RxCocoa','6.6.0' # pod 'RxCocoa','6.6.0'
# pod 'RxAlamofire','6.1.1' # pod 'RxAlamofire','6.1.1'
#数据存储 # #数据存储
pod 'SwiftyUserDefaults','5.3.0' # pod 'SwiftyUserDefaults','5.3.0'
#数据加、解密 #数据加、解密
pod 'CryptoSwift','1.8.0' pod 'CryptoSwift','1.8.0'
#手动布局 #手动布局
...@@ -31,21 +31,21 @@ target 'galaxy' do ...@@ -31,21 +31,21 @@ target 'galaxy' do
pod 'ESPullToRefresh',"2.9.3" pod 'ESPullToRefresh',"2.9.3"
# #Toast # #Toast
# pod 'Toast-Swift', '5.0.1' # pod 'Toast-Swift', '5.0.1'
#富文本 UILabel # #富文本 UILabel
pod 'Nantes','0.1.2' # pod 'Nantes','0.1.2'
#提示框 #提示框
pod 'PKHUD','5.3.0' pod 'PKHUD','5.3.0'
#日志 调试 #日志 调试
# pod 'CocoaDebug', '1.7.7' # pod 'CocoaDebug', '1.7.7'
#date分类 # #date分类
pod 'SwiftDate','7.0.0' # pod 'SwiftDate','7.0.0'
#定时器 # #定时器
pod 'SwiftyTimer','2.1.0' # pod 'SwiftyTimer','2.1.0'
#UIColor 的扩展 #UIColor 的扩展
# pod 'Hue','5.0.0' # pod 'Hue','5.0.0'
# #内存泄漏 # #内存泄漏
# pod 'LifetimeTracker','1.8.1' # pod 'LifetimeTracker','1.8.1'
#控制台转换成中文 # #控制台转换成中文
pod 'ByebyeUnicode','1.1.0' pod 'ByebyeUnicode','1.1.0'
#轮播图 #轮播图
pod 'FSPagerView','0.8.3' pod 'FSPagerView','0.8.3'
...@@ -65,8 +65,8 @@ target 'galaxy' do ...@@ -65,8 +65,8 @@ target 'galaxy' do
pod 'JXSegmentedView','1.3.0' pod 'JXSegmentedView','1.3.0'
#UI调试组件 #UI调试组件
pod 'LookinServer','1.2.6',:subspecs => ['Swift'], :configurations => ['Debug'] pod 'LookinServer','1.2.6',:subspecs => ['Swift'], :configurations => ['Debug']
#阿里云OOS # #阿里云OOS
pod 'AliyunOSSiOS','2.10.18' # pod 'AliyunOSSiOS','2.10.18'
#极光推送 #极光推送
pod 'JPush', '5.2.0' pod 'JPush', '5.2.0'
pod 'JCore', '4.6.0-noidfa' pod 'JCore', '4.6.0-noidfa'
......
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
objects = { objects = {
/* Begin PBXBuildFile section */ /* Begin PBXBuildFile section */
0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDA82BC7E81500225367 /* YHMyPermissionSettingVC.swift */; };
0414BDAB2BC7E9C200225367 /* YHMyPermissionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */; };
0414BDAD2BC7F02C00225367 /* YHMyNotifySettingVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */; };
041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52862B5657B3007EBCEB /* IMAppKey.swift */; }; 041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041B52862B5657B3007EBCEB /* IMAppKey.swift */; };
0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */; }; 0425E63D2BA9345200A5E763 /* YHSchemeTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */; };
0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */; }; 0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */; };
...@@ -17,14 +20,31 @@ ...@@ -17,14 +20,31 @@
0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; }; 0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */; };
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; }; 0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */; };
0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; }; 0435FA832BA2DEB100024EAE /* YHCardButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0435FA822BA2DEB100024EAE /* YHCardButton.swift */; };
043F0AB22BC781F5006CB887 /* YHMessageSessionCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043F0AB12BC781F5006CB887 /* YHMessageSessionCell.swift */; };
043F0AB42BC7B80F006CB887 /* YHTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043F0AB32BC7B80F006CB887 /* YHTestViewController.swift */; };
043F0AB62BC7CE1B006CB887 /* YHInformationFillVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043F0AB52BC7CE1B006CB887 /* YHInformationFillVC.swift */; };
043F0AB82BC7CE5C006CB887 /* YHInformationFillCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043F0AB72BC7CE5C006CB887 /* YHInformationFillCell.swift */; };
044413F72BC2786200784A14 /* YHHomeWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413F62BC2786200784A14 /* YHHomeWebViewController.swift */; }; 044413F72BC2786200784A14 /* YHHomeWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413F62BC2786200784A14 /* YHHomeWebViewController.swift */; };
044413F92BC279D200784A14 /* YHHomeWebBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413F82BC279D200784A14 /* YHHomeWebBottomView.swift */; }; 044413F92BC279D200784A14 /* YHHomeWebBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413F82BC279D200784A14 /* YHHomeWebBottomView.swift */; };
044413FB2BC27E6F00784A14 /* YHHomeWebBottomButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413FA2BC27E6F00784A14 /* YHHomeWebBottomButton.swift */; }; 044413FB2BC27E6F00784A14 /* YHHomeWebBottomButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413FA2BC27E6F00784A14 /* YHHomeWebBottomButton.swift */; };
044413FD2BC386DA00784A14 /* YHServiceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413FC2BC386DA00784A14 /* YHServiceViewController.swift */; };
044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413FE2BC391F000784A14 /* YHServiceListViewController.swift */; };
044414012BC3979800784A14 /* YHServerHKLifeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */; };
044414032BC39B8D00784A14 /* YHServerTableHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */; };
044414052BC3B9DE00784A14 /* YHServiceTableFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */; };
044414072BC3C54B00784A14 /* YHHomeCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414062BC3C54B00784A14 /* YHHomeCollectionViewCell.swift */; };
044414092BC3CE8500784A14 /* YHHomeCollectionLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414082BC3CE8500784A14 /* YHHomeCollectionLayout.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 */; };
044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044CF8D32BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift */; }; 044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044CF8D32BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift */; };
044CF8D62BBA57DC00008CE8 /* YHFailPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044CF8D52BBA57DC00008CE8 /* YHFailPromptView.swift */; }; 044CF8D62BBA57DC00008CE8 /* YHFailPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044CF8D52BBA57DC00008CE8 /* YHFailPromptView.swift */; };
044E1E812BC3BBC200A3B4AF /* YHSearchInfomationVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044E1E802BC3BBC200A3B4AF /* YHSearchInfomationVC.swift */; };
044E1E832BC3BBFC00A3B4AF /* YHSearchInfoHistoryView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044E1E822BC3BBFC00A3B4AF /* YHSearchInfoHistoryView.swift */; };
044E1E852BC3BEC300A3B4AF /* YHSearchInfoHistoryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044E1E842BC3BEC300A3B4AF /* YHSearchInfoHistoryCell.swift */; };
044E1E872BC3D00E00A3B4AF /* YHSearchItemLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044E1E862BC3D00E00A3B4AF /* YHSearchItemLayout.swift */; };
044E1E892BC3D7DF00A3B4AF /* YHSearchInfoBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044E1E882BC3D7DF00A3B4AF /* YHSearchInfoBar.swift */; };
044E1E8B2BC3E1CE00A3B4AF /* YHSearchInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044E1E8A2BC3E1CE00A3B4AF /* YHSearchInfoCell.swift */; };
045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */; }; 045EEE792B9F171A0022A143 /* YHPreviewViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */; };
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */; }; 045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */; };
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */; }; 045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */; };
...@@ -204,7 +224,6 @@ ...@@ -204,7 +224,6 @@
0468D42E2B5654A500CFB916 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0468D42D2B5654A500CFB916 /* CoreTelephony.framework */; }; 0468D42E2B5654A500CFB916 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0468D42D2B5654A500CFB916 /* CoreTelephony.framework */; };
0468D4302B5654B500CFB916 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0468D42F2B5654B500CFB916 /* SystemConfiguration.framework */; }; 0468D4302B5654B500CFB916 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0468D42F2B5654B500CFB916 /* SystemConfiguration.framework */; };
0468D4312B5654C100CFB916 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0468D42C2B56549200CFB916 /* libresolv.tbd */; }; 0468D4312B5654C100CFB916 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 0468D42C2B56549200CFB916 /* libresolv.tbd */; };
0468D4342B56587B00CFB916 /* YHOSSManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4332B56587B00CFB916 /* YHOSSManager.swift */; };
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4352B57752F00CFB916 /* YHUserModel.swift */; }; 0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4352B57752F00CFB916 /* YHUserModel.swift */; };
0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4392B579EAC00CFB916 /* YHLoginViewModel.swift */; }; 0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0468D4392B579EAC00CFB916 /* YHLoginViewModel.swift */; };
047294E82B988A19008E0B84 /* YHNewWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047294E72B988A19008E0B84 /* YHNewWebViewController.swift */; }; 047294E82B988A19008E0B84 /* YHNewWebViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047294E72B988A19008E0B84 /* YHNewWebViewController.swift */; };
...@@ -219,11 +238,23 @@ ...@@ -219,11 +238,23 @@
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; }; 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */; };
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; }; 0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */; };
048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; }; 048097712BA18D66000B9DCA /* YHCertificateSearchBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */; };
048B2A442BC7901900A93BF0 /* YHHomeWebViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A432BC7901900A93BF0 /* YHHomeWebViewModel.swift */; };
048B2A462BC7912400A93BF0 /* YHWebModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A452BC7912400A93BF0 /* YHWebModel.swift */; };
048B2A482BC7CE4800A93BF0 /* YHFourKingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A472BC7CE4800A93BF0 /* YHFourKingViewController.swift */; };
048B2A4A2BC7D9DC00A93BF0 /* YHMyLikeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */; };
048B2A4D2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A4C2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift */; };
048B2A4F2BC8031500A93BF0 /* YHHKEventViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A4E2BC8031500A93BF0 /* YHHKEventViewController.swift */; };
048B2A512BC8063F00A93BF0 /* YHHKEventModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048B2A502BC8063F00A93BF0 /* YHHKEventModel.swift */; };
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; }; 0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */; };
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; }; 0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */; };
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; }; 049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */; };
049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; }; 049A48A82B49417300D0C641 /* YHAboutUsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */; };
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; }; 049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */; };
049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */; };
049AC4C82BC513AB00F857F4 /* YHOrderListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C72BC513AB00F857F4 /* YHOrderListView.swift */; };
049AC4CA2BC5141600F857F4 /* YHServerNoOrderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4C92BC5141600F857F4 /* YHServerNoOrderView.swift */; };
049AC4CC2BC6615500F857F4 /* YHHomeListModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4CB2BC6615500F857F4 /* YHHomeListModel.swift */; };
049AC4CE2BC674A700F857F4 /* YHHomeClassifyModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 049AC4CD2BC674A700F857F4 /* YHHomeClassifyModel.swift */; };
04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */; }; 04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */; };
04A271252BAC33BB00652B1B /* YHFilePreviewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */; }; 04A271252BAC33BB00652B1B /* YHFilePreviewTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */; };
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; }; 04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */; };
...@@ -243,6 +274,7 @@ ...@@ -243,6 +274,7 @@
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; }; 04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */; };
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; }; 04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C693632B723B56004C1758 /* YHMySettingCell.swift */; };
04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */; }; 04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */; };
04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */; };
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D5C5652B8ED92600190021 /* YHBaseModel.swift */; }; 04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04D5C5652B8ED92600190021 /* YHBaseModel.swift */; };
04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E082B707ACE00A35F4B /* YHPhoneLoginViewController.swift */; }; 04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E082B707ACE00A35F4B /* YHPhoneLoginViewController.swift */; };
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; }; 04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */; };
...@@ -254,19 +286,27 @@ ...@@ -254,19 +286,27 @@
04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EA230D2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift */; }; 04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04EA230D2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift */; };
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */; }; 04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */; };
6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; }; 6203A87EDC96313BBE789D9C /* Pods_galaxy.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */; };
A501BE662BC2B76200C4F1FB /* YHHomeHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A501BE652BC2B76200C4F1FB /* YHHomeHeadView.swift */; };
A501BE682BC2B85F00C4F1FB /* YHHomeSearchView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A501BE672BC2B85F00C4F1FB /* YHHomeSearchView.swift */; };
A50A747C2BC8EC86003D28D9 /* YHHomeBannerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50A747B2BC8EC86003D28D9 /* YHHomeBannerCollectionViewCell.swift */; };
A50A747E2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A50A747D2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift */; };
A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; }; A51044182B493675006B60BB /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = A51044172B493675006B60BB /* README.md */; };
A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; }; A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51044192B495DD0006B60BB /* UIView+Extension.swift */; };
A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */; }; A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */; };
A5173D682BC399B9007D4E74 /* YHHomePageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5173D672BC399B9007D4E74 /* YHHomePageViewController.swift */; };
A5173D6A2BC3C187007D4E74 /* YHHkLifeAndIdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5173D692BC3C187007D4E74 /* YHHkLifeAndIdView.swift */; };
A5173D6C2BC3C273007D4E74 /* YHHomeKingKongBlockView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5173D6B2BC3C273007D4E74 /* YHHomeKingKongBlockView.swift */; };
A517A4DF2BB53BE8000DEECD /* YHDocListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4DE2BB53BE8000DEECD /* YHDocListBottomView.swift */; }; A517A4DF2BB53BE8000DEECD /* YHDocListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4DE2BB53BE8000DEECD /* YHDocListBottomView.swift */; };
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E02BB573EB000DEECD /* YHDocListCell.swift */; }; A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E02BB573EB000DEECD /* YHDocListCell.swift */; };
A517A4E42BB6C4BB000DEECD /* YHDocumentUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E22BB6C4BB000DEECD /* YHDocumentUploadView.swift */; }; A517A4E42BB6C4BB000DEECD /* YHDocumentUploadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E22BB6C4BB000DEECD /* YHDocumentUploadView.swift */; };
A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E32BB6C4BB000DEECD /* YHDocumentFileItemView.swift */; }; A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A517A4E32BB6C4BB000DEECD /* YHDocumentFileItemView.swift */; };
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; }; A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; };
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; }; A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; }; A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; };
A53D381E2BC23794006AE6F7 /* YHMsgViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */; }; A53D381E2BC23794006AE6F7 /* YHMsgViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */; };
A53D38202BC243F1006AE6F7 /* YHStartPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */; }; A53D38202BC243F1006AE6F7 /* YHStartPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */; };
A53F42B92BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53F42B82BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift */; };
A53F42BB2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53F42BA2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift */; };
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; }; A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; };
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; }; A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; };
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; }; A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; };
...@@ -295,6 +335,8 @@ ...@@ -295,6 +335,8 @@
A592FE932BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */; }; A592FE932BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */; };
A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */; }; A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */; };
A592FE972BA6DB340062FACA /* YHCertificateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE962BA6DB340062FACA /* YHCertificateViewModel.swift */; }; A592FE972BA6DB340062FACA /* YHCertificateViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A592FE962BA6DB340062FACA /* YHCertificateViewModel.swift */; };
A5A4FD632BC79901001EF9F7 /* YHConfigManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5A4FD622BC79901001EF9F7 /* YHConfigManager.swift */; };
A5A4FD652BC799A9001EF9F7 /* YHConfigModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5A4FD642BC799A9001EF9F7 /* YHConfigModel.swift */; };
A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */; }; A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */; };
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */; }; A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */; };
A5ACE9292B4564F7002C94D2 /* YHSmsCodeInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */; }; A5ACE9292B4564F7002C94D2 /* YHSmsCodeInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */; };
...@@ -319,7 +361,6 @@ ...@@ -319,7 +361,6 @@
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8FF2B4564F7002C94D2 /* UIViewController+Extension.swift */; }; A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8FF2B4564F7002C94D2 /* UIViewController+Extension.swift */; };
A5ACE9402B4564F7002C94D2 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9002B4564F7002C94D2 /* String+Extension.swift */; }; A5ACE9402B4564F7002C94D2 /* String+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9002B4564F7002C94D2 /* String+Extension.swift */; };
A5ACE9412B4564F7002C94D2 /* Dictionary+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9012B4564F7002C94D2 /* Dictionary+Extension.swift */; }; A5ACE9412B4564F7002C94D2 /* Dictionary+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9012B4564F7002C94D2 /* Dictionary+Extension.swift */; };
A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9022B4564F7002C94D2 /* AppDelegate+Extension.swift */; };
A5ACE9432B4564F7002C94D2 /* UILable+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9032B4564F7002C94D2 /* UILable+Extension.swift */; }; A5ACE9432B4564F7002C94D2 /* UILable+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9032B4564F7002C94D2 /* UILable+Extension.swift */; };
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9042B4564F7002C94D2 /* Array+Extension.swift */; }; A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9042B4564F7002C94D2 /* Array+Extension.swift */; };
A5ACE9452B4564F7002C94D2 /* YHHUDContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9072B4564F7002C94D2 /* YHHUDContainerView.swift */; }; A5ACE9452B4564F7002C94D2 /* YHHUDContainerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9072B4564F7002C94D2 /* YHHUDContainerView.swift */; };
...@@ -341,27 +382,14 @@ ...@@ -341,27 +382,14 @@
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */; }; A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */; };
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */; }; A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */; };
A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */; }; A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */; };
A5ACE95E2B4571BF002C94D2 /* YHHomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE95D2B4571BF002C94D2 /* YHHomeViewController.swift */; };
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */; }; A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */; };
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */; }; A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */; };
A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */; }; A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */; };
A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382D02B5FAAB300C5E65C /* YHContactItemModel.swift */; }; A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C382D02B5FAAB300C5E65C /* YHContactItemModel.swift */; };
A5C5B2E62B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E52B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift */; };
A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */; };
A5C5B2EA2B4ECA4D00A7C5D1 /* YHDavidModel0.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E92B4ECA4D00A7C5D1 /* YHDavidModel0.swift */; };
A5C5B2EE2B4F9B8800A7C5D1 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */; }; A5C5B2EE2B4F9B8800A7C5D1 /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */; };
A5C5B2F92B5515CE00A7C5D1 /* YHPageContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2F82B5515CE00A7C5D1 /* YHPageContentView.swift */; };
A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */; }; A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */; };
A5C5B2FD2B55361700A7C5D1 /* YHBannerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */; }; A5C5B2FD2B55361700A7C5D1 /* YHBannerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */; };
A5C5B3002B55623800A7C5D1 /* YHMainContentBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */; };
A5C5B3102B57677300A7C5D1 /* YHGestureTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */; }; A5C5B3102B57677300A7C5D1 /* YHGestureTableView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */; };
A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3112B57B47D00A7C5D1 /* YHDavidCell0.swift */; };
A5C5B3232B57BF8F00A7C5D1 /* YHDavidCell1.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3222B57BF8F00A7C5D1 /* YHDavidCell1.swift */; };
A5C5B3252B57C74900A7C5D1 /* YHDavidCell3.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3242B57C74900A7C5D1 /* YHDavidCell3.swift */; };
A5C5B3272B57C8D500A7C5D1 /* YHDavidCell2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3262B57C8D500A7C5D1 /* YHDavidCell2.swift */; };
A5C5B3292B57CCBE00A7C5D1 /* YHDavidCell4.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B3282B57CCBE00A7C5D1 /* YHDavidCell4.swift */; };
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */; };
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */; };
A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */; }; A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */; };
A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */; }; A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */; };
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001292BABC84A001F003C /* YHFileListBottomView.swift */; }; A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5D001292BABC84A001F003C /* YHFileListBottomView.swift */; };
...@@ -376,6 +404,7 @@ ...@@ -376,6 +404,7 @@
A5EF21372BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EF21362BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift */; }; A5EF21372BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EF21362BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift */; };
A5EF213B2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EF213A2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift */; }; A5EF213B2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5EF213A2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift */; };
A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F8AC072B9F414000A21EFA /* YHCustomTextView.swift */; }; A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F8AC072B9F414000A21EFA /* YHCustomTextView.swift */; };
A5F9AD332BC3CD66000323F8 /* YHHkLifeAndIdItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5F9AD322BC3CD66000323F8 /* YHHkLifeAndIdItemView.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 */; };
A5FD63C12B62616D00D1D9DA /* YHInformationPerfectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */; }; A5FD63C12B62616D00D1D9DA /* YHInformationPerfectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */; };
...@@ -418,6 +447,9 @@ ...@@ -418,6 +447,9 @@
/* End PBXCopyFilesBuildPhase section */ /* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */ /* Begin PBXFileReference section */
0414BDA82BC7E81500225367 /* YHMyPermissionSettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionSettingVC.swift; sourceTree = "<group>"; };
0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyPermissionCell.swift; sourceTree = "<group>"; };
0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNotifySettingVC.swift; sourceTree = "<group>"; };
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>"; };
0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableViewCell.swift; sourceTree = "<group>"; }; 0425E63C2BA9345200A5E763 /* YHSchemeTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableViewCell.swift; sourceTree = "<group>"; };
0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScemeItemModel.swift; sourceTree = "<group>"; }; 0425E63F2BA9357D00A5E763 /* YHScemeItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHScemeItemModel.swift; sourceTree = "<group>"; };
...@@ -428,14 +460,31 @@ ...@@ -428,14 +460,31 @@
0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; }; 0435FA7E2BA178C100024EAE /* YHCommonAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCommonAlertView.swift; sourceTree = "<group>"; };
0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; }; 0435FA802BA186D600024EAE /* YHMyFileMethodTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyFileMethodTableViewCell.swift; sourceTree = "<group>"; };
0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; }; 0435FA822BA2DEB100024EAE /* YHCardButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCardButton.swift; sourceTree = "<group>"; };
043F0AB12BC781F5006CB887 /* YHMessageSessionCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = YHMessageSessionCell.swift; path = galaxy/Classes/Base/C/YHMessageSessionCell.swift; sourceTree = SOURCE_ROOT; };
043F0AB32BC7B80F006CB887 /* YHTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTestViewController.swift; sourceTree = "<group>"; };
043F0AB52BC7CE1B006CB887 /* YHInformationFillVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationFillVC.swift; sourceTree = "<group>"; };
043F0AB72BC7CE5C006CB887 /* YHInformationFillCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = YHInformationFillCell.swift; path = "galaxy/Classes/Modules/Message(消息)/C/YHInformationFillCell.swift"; sourceTree = SOURCE_ROOT; };
044413F62BC2786200784A14 /* YHHomeWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebViewController.swift; sourceTree = "<group>"; }; 044413F62BC2786200784A14 /* YHHomeWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebViewController.swift; sourceTree = "<group>"; };
044413F82BC279D200784A14 /* YHHomeWebBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebBottomView.swift; sourceTree = "<group>"; }; 044413F82BC279D200784A14 /* YHHomeWebBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebBottomView.swift; sourceTree = "<group>"; };
044413FA2BC27E6F00784A14 /* YHHomeWebBottomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebBottomButton.swift; sourceTree = "<group>"; }; 044413FA2BC27E6F00784A14 /* YHHomeWebBottomButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebBottomButton.swift; sourceTree = "<group>"; };
044413FC2BC386DA00784A14 /* YHServiceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceViewController.swift; sourceTree = "<group>"; };
044413FE2BC391F000784A14 /* YHServiceListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceListViewController.swift; sourceTree = "<group>"; };
044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerHKLifeViewController.swift; sourceTree = "<group>"; };
044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerTableHeadView.swift; sourceTree = "<group>"; };
044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceTableFootView.swift; sourceTree = "<group>"; };
044414062BC3C54B00784A14 /* YHHomeCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCollectionViewCell.swift; sourceTree = "<group>"; };
044414082BC3CE8500784A14 /* YHHomeCollectionLayout.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCollectionLayout.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>"; };
044CF8D32BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSignatureUploadTableViewCell.swift; sourceTree = "<group>"; }; 044CF8D32BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSignatureUploadTableViewCell.swift; sourceTree = "<group>"; };
044CF8D52BBA57DC00008CE8 /* YHFailPromptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFailPromptView.swift; sourceTree = "<group>"; }; 044CF8D52BBA57DC00008CE8 /* YHFailPromptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFailPromptView.swift; sourceTree = "<group>"; };
044E1E802BC3BBC200A3B4AF /* YHSearchInfomationVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSearchInfomationVC.swift; sourceTree = "<group>"; };
044E1E822BC3BBFC00A3B4AF /* YHSearchInfoHistoryView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSearchInfoHistoryView.swift; sourceTree = "<group>"; };
044E1E842BC3BEC300A3B4AF /* YHSearchInfoHistoryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSearchInfoHistoryCell.swift; sourceTree = "<group>"; };
044E1E862BC3D00E00A3B4AF /* YHSearchItemLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchItemLayout.swift; sourceTree = "<group>"; };
044E1E882BC3D7DF00A3B4AF /* YHSearchInfoBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSearchInfoBar.swift; sourceTree = "<group>"; };
044E1E8A2BC3E1CE00A3B4AF /* YHSearchInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSearchInfoCell.swift; sourceTree = "<group>"; };
045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewViewModel.swift; sourceTree = "<group>"; }; 045EED9A2B9F171A0022A143 /* YHPreviewViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewViewModel.swift; sourceTree = "<group>"; };
045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewForOtherInfoModel.swift; sourceTree = "<group>"; }; 045EED9C2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewForOtherInfoModel.swift; sourceTree = "<group>"; };
045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPersonInfoCellModel2.swift; sourceTree = "<group>"; }; 045EED9D2B9F171A0022A143 /* YHPersonInfoCellModel2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPersonInfoCellModel2.swift; sourceTree = "<group>"; };
...@@ -615,7 +664,6 @@ ...@@ -615,7 +664,6 @@
0468D42C2B56549200CFB916 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; }; 0468D42C2B56549200CFB916 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
0468D42D2B5654A500CFB916 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; 0468D42D2B5654A500CFB916 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
0468D42F2B5654B500CFB916 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; }; 0468D42F2B5654B500CFB916 /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
0468D4332B56587B00CFB916 /* YHOSSManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOSSManager.swift; sourceTree = "<group>"; };
0468D4352B57752F00CFB916 /* YHUserModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = YHUserModel.swift; path = "galaxy/Classes/Modules/Login(登录)/M/YHUserModel.swift"; sourceTree = SOURCE_ROOT; }; 0468D4352B57752F00CFB916 /* YHUserModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; name = YHUserModel.swift; path = "galaxy/Classes/Modules/Login(登录)/M/YHUserModel.swift"; sourceTree = SOURCE_ROOT; };
0468D4392B579EAC00CFB916 /* YHLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginViewModel.swift; sourceTree = "<group>"; }; 0468D4392B579EAC00CFB916 /* YHLoginViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginViewModel.swift; sourceTree = "<group>"; };
047294E72B988A19008E0B84 /* YHNewWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNewWebViewController.swift; sourceTree = "<group>"; }; 047294E72B988A19008E0B84 /* YHNewWebViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHNewWebViewController.swift; sourceTree = "<group>"; };
...@@ -630,11 +678,23 @@ ...@@ -630,11 +678,23 @@
0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; }; 0480976A2BA15269000B9DCA /* YHCertificateInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateInfoCell.swift; sourceTree = "<group>"; };
0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; }; 0480976C2BA158A1000B9DCA /* YHCertificateListVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateListVC.swift; sourceTree = "<group>"; };
048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; }; 048097702BA18D66000B9DCA /* YHCertificateSearchBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchBar.swift; sourceTree = "<group>"; };
048B2A432BC7901900A93BF0 /* YHHomeWebViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeWebViewModel.swift; sourceTree = "<group>"; };
048B2A452BC7912400A93BF0 /* YHWebModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWebModel.swift; sourceTree = "<group>"; };
048B2A472BC7CE4800A93BF0 /* YHFourKingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFourKingViewController.swift; sourceTree = "<group>"; };
048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyLikeViewController.swift; sourceTree = "<group>"; };
048B2A4C2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyLikeViewModel.swift; sourceTree = "<group>"; };
048B2A4E2BC8031500A93BF0 /* YHHKEventViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKEventViewController.swift; sourceTree = "<group>"; };
048B2A502BC8063F00A93BF0 /* YHHKEventModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKEventModel.swift; sourceTree = "<group>"; };
0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; }; 0493B3DB2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateSearchViewController.swift; sourceTree = "<group>"; };
0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; }; 0493B3DD2BA80C2300AF9393 /* YHCertificateFilterButton.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateFilterButton.swift; sourceTree = "<group>"; };
049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; }; 049537842BA9B28500AF7E59 /* YHCertificateTemplateCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateCell.swift; sourceTree = "<group>"; };
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; }; 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsViewController.swift; sourceTree = "<group>"; };
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; }; 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutUsAdvantageCell.swift; sourceTree = "<group>"; };
049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceSectionView.swift; sourceTree = "<group>"; };
049AC4C72BC513AB00F857F4 /* YHOrderListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderListView.swift; sourceTree = "<group>"; };
049AC4C92BC5141600F857F4 /* YHServerNoOrderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServerNoOrderView.swift; sourceTree = "<group>"; };
049AC4CB2BC6615500F857F4 /* YHHomeListModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeListModel.swift; sourceTree = "<group>"; };
049AC4CD2BC674A700F857F4 /* YHHomeClassifyModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeClassifyModel.swift; sourceTree = "<group>"; };
04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadTypeCell.swift; sourceTree = "<group>"; }; 04A271222BABFF3200652B1B /* YHCertificateUploadTypeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadTypeCell.swift; sourceTree = "<group>"; };
04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFilePreviewTool.swift; sourceTree = "<group>"; }; 04A271242BAC33BB00652B1B /* YHFilePreviewTool.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFilePreviewTool.swift; sourceTree = "<group>"; };
04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; }; 04A671582B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateUploadSheetView.swift; sourceTree = "<group>"; };
...@@ -655,6 +715,7 @@ ...@@ -655,6 +715,7 @@
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingViewController.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>"; }; 04C693632B723B56004C1758 /* YHMySettingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMySettingCell.swift; sourceTree = "<group>"; };
04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserInfoHeaderView.swift; sourceTree = "<group>"; }; 04C8F4822B7216D800ADF59B /* YHUserInfoHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHUserInfoHeaderView.swift; sourceTree = "<group>"; };
04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceBannerView.swift; sourceTree = "<group>"; };
04D5C5652B8ED92600190021 /* YHBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseModel.swift; sourceTree = "<group>"; }; 04D5C5652B8ED92600190021 /* YHBaseModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseModel.swift; sourceTree = "<group>"; };
04E86E082B707ACE00A35F4B /* YHPhoneLoginViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPhoneLoginViewController.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>"; }; 04E86E0A2B70C13300A35F4B /* YHCodeSueecssViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCodeSueecssViewController.swift; sourceTree = "<group>"; };
...@@ -668,19 +729,27 @@ ...@@ -668,19 +729,27 @@
19B28612265782F9DC1BE0B0 /* Pods-galaxy.testenv.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.testenv.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.testenv.xcconfig"; sourceTree = "<group>"; }; 19B28612265782F9DC1BE0B0 /* Pods-galaxy.testenv.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-galaxy.testenv.xcconfig"; path = "Target Support Files/Pods-galaxy/Pods-galaxy.testenv.xcconfig"; 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>"; }; 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; }; 987C69D43AE8D85DC1930DCF /* Pods_galaxy.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_galaxy.framework; sourceTree = BUILT_PRODUCTS_DIR; };
A501BE652BC2B76200C4F1FB /* YHHomeHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeHeadView.swift; sourceTree = "<group>"; };
A501BE672BC2B85F00C4F1FB /* YHHomeSearchView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeSearchView.swift; sourceTree = "<group>"; };
A50A747B2BC8EC86003D28D9 /* YHHomeBannerCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeBannerCollectionViewCell.swift; sourceTree = "<group>"; };
A50A747D2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeBannerIndicatorView.swift; sourceTree = "<group>"; };
A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; }; A51044172B493675006B60BB /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
A51044192B495DD0006B60BB /* UIView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Extension.swift"; sourceTree = "<group>"; }; A51044192B495DD0006B60BB /* UIView+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIView+Extension.swift"; sourceTree = "<group>"; };
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterSecondViewController.swift; sourceTree = "<group>"; }; A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterSecondViewController.swift; sourceTree = "<group>"; };
A5173D672BC399B9007D4E74 /* YHHomePageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomePageViewController.swift; sourceTree = "<group>"; };
A5173D692BC3C187007D4E74 /* YHHkLifeAndIdView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHkLifeAndIdView.swift; sourceTree = "<group>"; };
A5173D6B2BC3C273007D4E74 /* YHHomeKingKongBlockView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeKingKongBlockView.swift; sourceTree = "<group>"; };
A517A4DE2BB53BE8000DEECD /* YHDocListBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocListBottomView.swift; sourceTree = "<group>"; }; A517A4DE2BB53BE8000DEECD /* YHDocListBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocListBottomView.swift; sourceTree = "<group>"; };
A517A4E02BB573EB000DEECD /* YHDocListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocListCell.swift; sourceTree = "<group>"; }; A517A4E02BB573EB000DEECD /* YHDocListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocListCell.swift; sourceTree = "<group>"; };
A517A4E22BB6C4BB000DEECD /* YHDocumentUploadView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDocumentUploadView.swift; sourceTree = "<group>"; }; A517A4E22BB6C4BB000DEECD /* YHDocumentUploadView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDocumentUploadView.swift; sourceTree = "<group>"; };
A517A4E32BB6C4BB000DEECD /* YHDocumentFileItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDocumentFileItemView.swift; sourceTree = "<group>"; }; A517A4E32BB6C4BB000DEECD /* YHDocumentFileItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDocumentFileItemView.swift; sourceTree = "<group>"; };
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; }; A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; };
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; }; A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; }; A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; };
A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMsgViewController.swift; sourceTree = "<group>"; }; A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMsgViewController.swift; sourceTree = "<group>"; };
A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHStartPageViewController.swift; sourceTree = "<group>"; }; A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHStartPageViewController.swift; sourceTree = "<group>"; };
A53F42B82BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeKingKongBlockModel.swift; sourceTree = "<group>"; };
A53F42BA2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeKingKongBlockItem.swift; sourceTree = "<group>"; };
A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; }; A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; };
A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; }; A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; };
A5573ECE2B317BFF00D98EC0 /* galaxy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = galaxy.app; sourceTree = BUILT_PRODUCTS_DIR; }; A5573ECE2B317BFF00D98EC0 /* galaxy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = galaxy.app; sourceTree = BUILT_PRODUCTS_DIR; };
...@@ -712,6 +781,8 @@ ...@@ -712,6 +781,8 @@
A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEntryBottomView.swift; sourceTree = "<group>"; }; A592FE922BA6CFFC0062FACA /* YHCertificateEntryBottomView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEntryBottomView.swift; sourceTree = "<group>"; };
A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEntryCell.swift; sourceTree = "<group>"; }; A592FE942BA6D23C0062FACA /* YHCertificateEntryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateEntryCell.swift; sourceTree = "<group>"; };
A592FE962BA6DB340062FACA /* YHCertificateViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateViewModel.swift; sourceTree = "<group>"; }; A592FE962BA6DB340062FACA /* YHCertificateViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCertificateViewModel.swift; sourceTree = "<group>"; };
A5A4FD622BC79901001EF9F7 /* YHConfigManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConfigManager.swift; sourceTree = "<group>"; };
A5A4FD642BC799A9001EF9F7 /* YHConfigModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConfigModel.swift; sourceTree = "<group>"; };
A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHLoginViewController.swift; sourceTree = "<group>"; }; A5ACE8DB2B4564F7002C94D2 /* YHLoginViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHLoginViewController.swift; sourceTree = "<group>"; };
A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeView.swift; sourceTree = "<group>"; }; A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeView.swift; sourceTree = "<group>"; };
A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeInputView.swift; sourceTree = "<group>"; }; A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeInputView.swift; sourceTree = "<group>"; };
...@@ -736,7 +807,6 @@ ...@@ -736,7 +807,6 @@
A5ACE8FF2B4564F7002C94D2 /* UIViewController+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+Extension.swift"; sourceTree = "<group>"; }; A5ACE8FF2B4564F7002C94D2 /* UIViewController+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIViewController+Extension.swift"; sourceTree = "<group>"; };
A5ACE9002B4564F7002C94D2 /* String+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; }; A5ACE9002B4564F7002C94D2 /* String+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Extension.swift"; sourceTree = "<group>"; };
A5ACE9012B4564F7002C94D2 /* Dictionary+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Dictionary+Extension.swift"; sourceTree = "<group>"; }; A5ACE9012B4564F7002C94D2 /* Dictionary+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Dictionary+Extension.swift"; sourceTree = "<group>"; };
A5ACE9022B4564F7002C94D2 /* AppDelegate+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "AppDelegate+Extension.swift"; sourceTree = "<group>"; };
A5ACE9032B4564F7002C94D2 /* UILable+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UILable+Extension.swift"; sourceTree = "<group>"; }; A5ACE9032B4564F7002C94D2 /* UILable+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UILable+Extension.swift"; sourceTree = "<group>"; };
A5ACE9042B4564F7002C94D2 /* Array+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Array+Extension.swift"; sourceTree = "<group>"; }; A5ACE9042B4564F7002C94D2 /* Array+Extension.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Array+Extension.swift"; sourceTree = "<group>"; };
A5ACE9072B4564F7002C94D2 /* YHHUDContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHUDContainerView.swift; sourceTree = "<group>"; }; A5ACE9072B4564F7002C94D2 /* YHHUDContainerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHUDContainerView.swift; sourceTree = "<group>"; };
...@@ -759,27 +829,14 @@ ...@@ -759,27 +829,14 @@
A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBouncesContentView.swift; sourceTree = "<group>"; }; A5ACE9242B4564F7002C94D2 /* YHBouncesContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBouncesContentView.swift; sourceTree = "<group>"; };
A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBasicContentView.swift; sourceTree = "<group>"; }; A5ACE9252B4564F7002C94D2 /* YHBasicContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBasicContentView.swift; sourceTree = "<group>"; };
A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHNoDataTipView.swift; sourceTree = "<group>"; }; A5ACE9262B4564F7002C94D2 /* YHNoDataTipView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHNoDataTipView.swift; sourceTree = "<group>"; };
A5ACE95D2B4571BF002C94D2 /* YHHomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeViewController.swift; sourceTree = "<group>"; };
A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginTipsView.swift; sourceTree = "<group>"; }; A5C382C92B5E1F4C00C5E65C /* YHLoginTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHLoginTipsView.swift; sourceTree = "<group>"; };
A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractCell.swift; sourceTree = "<group>"; }; A5C382CB2B5EA11800C5E65C /* YHContractCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractCell.swift; sourceTree = "<group>"; };
A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterMainViewModel.swift; sourceTree = "<group>"; }; A5C382CE2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterMainViewModel.swift; sourceTree = "<group>"; };
A5C382D02B5FAAB300C5E65C /* YHContactItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContactItemModel.swift; sourceTree = "<group>"; }; A5C382D02B5FAAB300C5E65C /* YHContactItemModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContactItemModel.swift; sourceTree = "<group>"; };
A5C5B2E52B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidTestViewController.swift; sourceTree = "<group>"; };
A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidTestCollectionViewCell.swift; sourceTree = "<group>"; };
A5C5B2E92B4ECA4D00A7C5D1 /* YHDavidModel0.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidModel0.swift; sourceTree = "<group>"; };
A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; }; A5C5B2ED2B4F9B8800A7C5D1 /* Localizable.xcstrings */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json.xcstrings; path = Localizable.xcstrings; sourceTree = "<group>"; };
A5C5B2F82B5515CE00A7C5D1 /* YHPageContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPageContentView.swift; sourceTree = "<group>"; };
A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeBannerView.swift; sourceTree = "<group>"; }; A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeBannerView.swift; sourceTree = "<group>"; };
A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBannerModel.swift; sourceTree = "<group>"; }; A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHBannerModel.swift; sourceTree = "<group>"; };
A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMainContentBaseViewController.swift; sourceTree = "<group>"; };
A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHGestureTableView.swift; sourceTree = "<group>"; }; A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHGestureTableView.swift; sourceTree = "<group>"; };
A5C5B3112B57B47D00A7C5D1 /* YHDavidCell0.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidCell0.swift; sourceTree = "<group>"; };
A5C5B3222B57BF8F00A7C5D1 /* YHDavidCell1.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell1.swift; sourceTree = "<group>"; };
A5C5B3242B57C74900A7C5D1 /* YHDavidCell3.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell3.swift; sourceTree = "<group>"; };
A5C5B3262B57C8D500A7C5D1 /* YHDavidCell2.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell2.swift; sourceTree = "<group>"; };
A5C5B3282B57CCBE00A7C5D1 /* YHDavidCell4.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell4.swift; sourceTree = "<group>"; };
A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHDavidCell5.swift; sourceTree = "<group>"; };
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBbxCollectionViewCell.swift; sourceTree = "<group>"; };
A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHChoiceButtonHoldView.swift; sourceTree = "<group>"; }; A5D001202BAA9D99001F003C /* YHChoiceButtonHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHChoiceButtonHoldView.swift; sourceTree = "<group>"; };
A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListHeaerView.swift; sourceTree = "<group>"; }; A5D001272BABC84A001F003C /* YHFileListHeaerView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListHeaerView.swift; sourceTree = "<group>"; };
A5D001292BABC84A001F003C /* YHFileListBottomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListBottomView.swift; sourceTree = "<group>"; }; A5D001292BABC84A001F003C /* YHFileListBottomView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListBottomView.swift; sourceTree = "<group>"; };
...@@ -794,6 +851,7 @@ ...@@ -794,6 +851,7 @@
A5EF21362BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHQuestionAndAnswerModel.swift; sourceTree = "<group>"; }; A5EF21362BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHQuestionAndAnswerModel.swift; sourceTree = "<group>"; };
A5EF213A2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHQuestionAndAnswerCell.swift; sourceTree = "<group>"; }; A5EF213A2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHQuestionAndAnswerCell.swift; 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>"; };
A5F9AD322BC3CD66000323F8 /* YHHkLifeAndIdItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHkLifeAndIdItemView.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>"; };
A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectModel.swift; sourceTree = "<group>"; }; A5FD63C02B62616D00D1D9DA /* YHInformationPerfectModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInformationPerfectModel.swift; sourceTree = "<group>"; };
...@@ -1459,14 +1517,6 @@ ...@@ -1459,14 +1517,6 @@
path = Analytics; path = Analytics;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
0468D4322B56581000CFB916 /* YHOOS */ = {
isa = PBXGroup;
children = (
0468D4332B56587B00CFB916 /* YHOSSManager.swift */,
);
path = YHOOS;
sourceTree = "<group>";
};
0468D4372B57756300CFB916 /* M */ = { 0468D4372B57756300CFB916 /* M */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1502,6 +1552,14 @@ ...@@ -1502,6 +1552,14 @@
path = Frameworks; path = Frameworks;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
048B2A4B2BC7DACF00A93BF0 /* ViewModel */ = {
isa = PBXGroup;
children = (
048B2A4C2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
};
04A671562B9F18C800C1FB91 /* MyCertificates(我的证书) */ = { 04A671562B9F18C800C1FB91 /* MyCertificates(我的证书) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1682,7 +1740,7 @@ ...@@ -1682,7 +1740,7 @@
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
A53D38172BC23745006AE6F7 /* Message */ = { A53D38172BC23745006AE6F7 /* Message(消息) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
041B52852B565798007EBCEB /* IM */, 041B52852B565798007EBCEB /* IM */,
...@@ -1691,7 +1749,7 @@ ...@@ -1691,7 +1749,7 @@
A53D38192BC23757006AE6F7 /* V */, A53D38192BC23757006AE6F7 /* V */,
A53D38182BC23752006AE6F7 /* M */, A53D38182BC23752006AE6F7 /* M */,
); );
path = Message; path = "Message(消息)";
sourceTree = "<group>"; sourceTree = "<group>";
}; };
A53D38182BC23752006AE6F7 /* M */ = { A53D38182BC23752006AE6F7 /* M */ = {
...@@ -1704,6 +1762,8 @@ ...@@ -1704,6 +1762,8 @@
A53D38192BC23757006AE6F7 /* V */ = { A53D38192BC23757006AE6F7 /* V */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
043F0AB12BC781F5006CB887 /* YHMessageSessionCell.swift */,
043F0AB72BC7CE5C006CB887 /* YHInformationFillCell.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1712,6 +1772,7 @@ ...@@ -1712,6 +1772,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */, A53D381D2BC23794006AE6F7 /* YHMsgViewController.swift */,
043F0AB52BC7CE1B006CB887 /* YHInformationFillVC.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1863,6 +1924,7 @@ ...@@ -1863,6 +1924,7 @@
A5ACE8E72B4564F7002C94D2 /* Mine(我的) */ = { A5ACE8E72B4564F7002C94D2 /* Mine(我的) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
048B2A4B2BC7DACF00A93BF0 /* ViewModel */,
A5ACE8EB2B4564F7002C94D2 /* V */, A5ACE8EB2B4564F7002C94D2 /* V */,
A5ACE8E92B4564F7002C94D2 /* C */, A5ACE8E92B4564F7002C94D2 /* C */,
); );
...@@ -1874,7 +1936,10 @@ ...@@ -1874,7 +1936,10 @@
children = ( children = (
A5ACE8EA2B4564F7002C94D2 /* YHMyViewController.swift */, A5ACE8EA2B4564F7002C94D2 /* YHMyViewController.swift */,
04C693612B723AB8004C1758 /* YHMySettingViewController.swift */, 04C693612B723AB8004C1758 /* YHMySettingViewController.swift */,
0414BDA82BC7E81500225367 /* YHMyPermissionSettingVC.swift */,
0414BDAC2BC7F02C00225367 /* YHMyNotifySettingVC.swift */,
049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */, 049A48A72B49417300D0C641 /* YHAboutUsViewController.swift */,
048B2A492BC7D9DC00A93BF0 /* YHMyLikeViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1887,6 +1952,7 @@ ...@@ -1887,6 +1952,7 @@
A5ACE8ED2B4564F7002C94D2 /* YHPersonalCenterCell.swift */, A5ACE8ED2B4564F7002C94D2 /* YHPersonalCenterCell.swift */,
049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */, 049A48A92B49536000D0C641 /* YHAboutUsAdvantageCell.swift */,
04C693632B723B56004C1758 /* YHMySettingCell.swift */, 04C693632B723B56004C1758 /* YHMySettingCell.swift */,
0414BDAA2BC7E9C200225367 /* YHMyPermissionCell.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -1894,7 +1960,6 @@ ...@@ -1894,7 +1960,6 @@
A5ACE8EE2B4564F7002C94D2 /* Tools */ = { A5ACE8EE2B4564F7002C94D2 /* Tools */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
0468D4322B56581000CFB916 /* YHOOS */,
0468D4292B55017400CFB916 /* Analytics */, 0468D4292B55017400CFB916 /* Analytics */,
04AF58BA2B4FB71C0066011A /* Localized */, 04AF58BA2B4FB71C0066011A /* Localized */,
A5ACE8F12B4564F7002C94D2 /* NetWork */, A5ACE8F12B4564F7002C94D2 /* NetWork */,
...@@ -1930,7 +1995,6 @@ ...@@ -1930,7 +1995,6 @@
A5ACE8FF2B4564F7002C94D2 /* UIViewController+Extension.swift */, A5ACE8FF2B4564F7002C94D2 /* UIViewController+Extension.swift */,
A5ACE9002B4564F7002C94D2 /* String+Extension.swift */, A5ACE9002B4564F7002C94D2 /* String+Extension.swift */,
A5ACE9012B4564F7002C94D2 /* Dictionary+Extension.swift */, A5ACE9012B4564F7002C94D2 /* Dictionary+Extension.swift */,
A5ACE9022B4564F7002C94D2 /* AppDelegate+Extension.swift */,
A5ACE9032B4564F7002C94D2 /* UILable+Extension.swift */, A5ACE9032B4564F7002C94D2 /* UILable+Extension.swift */,
A5ACE9042B4564F7002C94D2 /* Array+Extension.swift */, A5ACE9042B4564F7002C94D2 /* Array+Extension.swift */,
04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */, 04754A942B96FF3D00F8ADCA /* UITextField+Extension.swift */,
...@@ -2014,6 +2078,9 @@ ...@@ -2014,6 +2078,9 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5ACE9192B4564F7002C94D2 /* YHServiceCenterMainViewController.swift */, A5ACE9192B4564F7002C94D2 /* YHServiceCenterMainViewController.swift */,
044413FC2BC386DA00784A14 /* YHServiceViewController.swift */,
044413FE2BC391F000784A14 /* YHServiceListViewController.swift */,
044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */,
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */, A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */,
A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */, A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */,
); );
...@@ -2031,6 +2098,14 @@ ...@@ -2031,6 +2098,14 @@
A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */, A5FD63C62B638CA000D1D9DA /* YHSubmintAllInfoSuccessTipView.swift */,
A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */, A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */,
A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */, A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */,
044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */,
049AC4C52BC3E55300F857F4 /* YHServiceSectionView.swift */,
044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */,
044414062BC3C54B00784A14 /* YHHomeCollectionViewCell.swift */,
044414082BC3CE8500784A14 /* YHHomeCollectionLayout.swift */,
04CC2EEF2BC3DDB2000305DD /* YHServiceBannerView.swift */,
049AC4C72BC513AB00F857F4 /* YHOrderListView.swift */,
049AC4C92BC5141600F857F4 /* YHServerNoOrderView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2038,7 +2113,7 @@ ...@@ -2038,7 +2113,7 @@
A5ACE91B2B4564F7002C94D2 /* Modules */ = { A5ACE91B2B4564F7002C94D2 /* Modules */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A53D38172BC23745006AE6F7 /* Message */, A53D38172BC23745006AE6F7 /* Message(消息) */,
A5ACE9592B457113002C94D2 /* Home(首页) */, A5ACE9592B457113002C94D2 /* Home(首页) */,
A5ACE8D82B4564F7002C94D2 /* Login(登录) */, A5ACE8D82B4564F7002C94D2 /* Login(登录) */,
A5ACE9162B4564F7002C94D2 /* IntelligentService(服务中心) */, A5ACE9162B4564F7002C94D2 /* IntelligentService(服务中心) */,
...@@ -2061,6 +2136,7 @@ ...@@ -2061,6 +2136,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5ACE9202B4564F7002C94D2 /* YHBaseViewController.swift */, A5ACE9202B4564F7002C94D2 /* YHBaseViewController.swift */,
043F0AB32BC7B80F006CB887 /* YHTestViewController.swift */,
A5ACE9212B4564F7002C94D2 /* YHNavigationController.swift */, A5ACE9212B4564F7002C94D2 /* YHNavigationController.swift */,
A5ACE9222B4564F7002C94D2 /* YHTabBarViewController.swift */, A5ACE9222B4564F7002C94D2 /* YHTabBarViewController.swift */,
A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */, A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */,
...@@ -2095,7 +2171,12 @@ ...@@ -2095,7 +2171,12 @@
children = ( children = (
A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */, A5C5B2FC2B55361700A7C5D1 /* YHBannerModel.swift */,
A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */, A5D6AB1A2B46A1CC001C10A5 /* YHHomeModel.swift */,
A5C5B2E92B4ECA4D00A7C5D1 /* YHDavidModel0.swift */, A53F42B82BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift */,
049AC4CB2BC6615500F857F4 /* YHHomeListModel.swift */,
049AC4CD2BC674A700F857F4 /* YHHomeClassifyModel.swift */,
A5A4FD642BC799A9001EF9F7 /* YHConfigModel.swift */,
048B2A452BC7912400A93BF0 /* YHWebModel.swift */,
048B2A502BC8063F00A93BF0 /* YHHKEventModel.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2103,20 +2184,23 @@ ...@@ -2103,20 +2184,23 @@
A5ACE95B2B45712D002C94D2 /* V */ = { A5ACE95B2B45712D002C94D2 /* V */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */,
A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */,
A5C5B2F82B5515CE00A7C5D1 /* YHPageContentView.swift */,
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */,
A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */,
A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */,
A5C5B3282B57CCBE00A7C5D1 /* YHDavidCell4.swift */,
A5C5B3242B57C74900A7C5D1 /* YHDavidCell3.swift */,
A5C5B3262B57C8D500A7C5D1 /* YHDavidCell2.swift */,
A5C5B3222B57BF8F00A7C5D1 /* YHDavidCell1.swift */,
A5C5B3112B57B47D00A7C5D1 /* YHDavidCell0.swift */,
A5C5B32C2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift */,
044413F82BC279D200784A14 /* YHHomeWebBottomView.swift */, 044413F82BC279D200784A14 /* YHHomeWebBottomView.swift */,
044413FA2BC27E6F00784A14 /* YHHomeWebBottomButton.swift */, 044413FA2BC27E6F00784A14 /* YHHomeWebBottomButton.swift */,
A501BE652BC2B76200C4F1FB /* YHHomeHeadView.swift */,
A5C5B2FA2B5535DF00A7C5D1 /* YHHomeBannerView.swift */,
A501BE672BC2B85F00C4F1FB /* YHHomeSearchView.swift */,
A5C5B30F2B57677300A7C5D1 /* YHGestureTableView.swift */,
044E1E862BC3D00E00A3B4AF /* YHSearchItemLayout.swift */,
044E1E822BC3BBFC00A3B4AF /* YHSearchInfoHistoryView.swift */,
044E1E842BC3BEC300A3B4AF /* YHSearchInfoHistoryCell.swift */,
044E1E8A2BC3E1CE00A3B4AF /* YHSearchInfoCell.swift */,
044E1E882BC3D7DF00A3B4AF /* YHSearchInfoBar.swift */,
A5173D692BC3C187007D4E74 /* YHHkLifeAndIdView.swift */,
A5173D6B2BC3C273007D4E74 /* YHHomeKingKongBlockView.swift */,
A5F9AD322BC3CD66000323F8 /* YHHkLifeAndIdItemView.swift */,
A53F42BA2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift */,
A50A747B2BC8EC86003D28D9 /* YHHomeBannerCollectionViewCell.swift */,
A50A747D2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2124,11 +2208,13 @@ ...@@ -2124,11 +2208,13 @@
A5ACE95C2B457133002C94D2 /* C */ = { A5ACE95C2B457133002C94D2 /* C */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5ACE95D2B4571BF002C94D2 /* YHHomeViewController.swift */,
A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */,
A5C5B2E52B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift */,
044413F62BC2786200784A14 /* YHHomeWebViewController.swift */, 044413F62BC2786200784A14 /* YHHomeWebViewController.swift */,
A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */, A53D381F2BC243F1006AE6F7 /* YHStartPageViewController.swift */,
A5173D672BC399B9007D4E74 /* YHHomePageViewController.swift */,
044E1E802BC3BBC200A3B4AF /* YHSearchInfomationVC.swift */,
A5A4FD622BC79901001EF9F7 /* YHConfigManager.swift */,
048B2A472BC7CE4800A93BF0 /* YHFourKingViewController.swift */,
048B2A4E2BC8031500A93BF0 /* YHHKEventViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2158,6 +2244,7 @@ ...@@ -2158,6 +2244,7 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */, A5D6AB1C2B46AAFB001C10A5 /* YHHomePageViewModel.swift */,
048B2A432BC7901900A93BF0 /* YHHomeWebViewModel.swift */,
); );
path = VM; path = VM;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2370,23 +2457,26 @@ ...@@ -2370,23 +2457,26 @@
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */, 044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */,
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */, 045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */, A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */,
043F0AB82BC7CE5C006CB887 /* YHInformationFillCell.swift in Sources */,
A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */, A5D0012A2BABC84A001F003C /* YHFileListHeaerView.swift in Sources */,
044414052BC3B9DE00784A14 /* YHServiceTableFootView.swift in Sources */,
045EEEEF2B9F171A0022A143 /* YHCertificateInfoController.swift in Sources */, 045EEEEF2B9F171A0022A143 /* YHCertificateInfoController.swift in Sources */,
045EEEDA2B9F171A0022A143 /* YHEducationInfoListVC.swift in Sources */, 045EEEDA2B9F171A0022A143 /* YHEducationInfoListVC.swift in Sources */,
A5ACE92C2B4564F7002C94D2 /* YHLoginStyleButton.swift in Sources */, A5ACE92C2B4564F7002C94D2 /* YHLoginStyleButton.swift in Sources */,
045EEF012B9F171A0022A143 /* YHFormItemSelectSheetCell.swift in Sources */, 045EEF012B9F171A0022A143 /* YHFormItemSelectSheetCell.swift in Sources */,
045EEEE52B9F171A0022A143 /* YHMySignatureDetailViewController.swift in Sources */, 045EEEE52B9F171A0022A143 /* YHMySignatureDetailViewController.swift in Sources */,
A5ACE92F2B4564F7002C94D2 /* YHMyViewController.swift in Sources */, A5ACE92F2B4564F7002C94D2 /* YHMyViewController.swift in Sources */,
A5C5B2E62B4EC0BF00A7C5D1 /* YHDavidTestViewController.swift in Sources */,
A5ACE9332B4564F7002C94D2 /* NetBaseModel.swift in Sources */, A5ACE9332B4564F7002C94D2 /* NetBaseModel.swift in Sources */,
044E1E892BC3D7DF00A3B4AF /* YHSearchInfoBar.swift in Sources */,
045EEE9B2B9F171A0022A143 /* YHWorkExperienceViewModel.swift in Sources */, 045EEE9B2B9F171A0022A143 /* YHWorkExperienceViewModel.swift in Sources */,
045EEEC22B9F171A0022A143 /* YHOtherInfoFillViewController.swift in Sources */, 045EEEC22B9F171A0022A143 /* YHOtherInfoFillViewController.swift in Sources */,
045EEE7C2B9F171A0022A143 /* YHPreviewInfoSessionModel.swift in Sources */, 045EEE7C2B9F171A0022A143 /* YHPreviewInfoSessionModel.swift in Sources */,
049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */, 049A48AA2B49536000D0C641 /* YHAboutUsAdvantageCell.swift in Sources */,
A5C5B3002B55623800A7C5D1 /* YHMainContentBaseViewController.swift in Sources */,
045EEF112B9F171A0022A143 /* YHMainInformationModel.swift in Sources */, 045EEF112B9F171A0022A143 /* YHMainInformationModel.swift in Sources */,
A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */, A58AC09D2BABD59600A30FA9 /* YHFileListModel.swift in Sources */,
045EEEFF2B9F171A0022A143 /* YHSaveAndSubmitView.swift in Sources */, 045EEEFF2B9F171A0022A143 /* YHSaveAndSubmitView.swift in Sources */,
A5A4FD632BC79901001EF9F7 /* YHConfigManager.swift in Sources */,
A5173D682BC399B9007D4E74 /* YHHomePageViewController.swift in Sources */,
045EEF0E2B9F171A0022A143 /* YHBasicInfoFillView.swift in Sources */, 045EEF0E2B9F171A0022A143 /* YHBasicInfoFillView.swift in Sources */,
045EEEA12B9F171A0022A143 /* YHWorkExperienceDetailModel.swift in Sources */, 045EEEA12B9F171A0022A143 /* YHWorkExperienceDetailModel.swift in Sources */,
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */, A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */,
...@@ -2394,12 +2484,14 @@ ...@@ -2394,12 +2484,14 @@
045EEF252B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift in Sources */, 045EEF252B9F171A0022A143 /* YHMainInformationCardTableViewCell.swift in Sources */,
045EEE862B9F171A0022A143 /* YHPreviewWorkExpViewController.swift in Sources */, 045EEE862B9F171A0022A143 /* YHPreviewWorkExpViewController.swift in Sources */,
045EEED22B9F171A0022A143 /* YHScoreTitleView.swift in Sources */, 045EEED22B9F171A0022A143 /* YHScoreTitleView.swift in Sources */,
A5ACE95E2B4571BF002C94D2 /* YHHomeViewController.swift in Sources */,
045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */, 045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */,
044E1E8B2BC3E1CE00A3B4AF /* YHSearchInfoCell.swift in Sources */,
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */, A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
048B2A4F2BC8031500A93BF0 /* YHHKEventViewController.swift in Sources */,
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */, 045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */, 045EEF0C2B9F171A0022A143 /* YHBasicInfoFillBottomView.swift in Sources */,
A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */, A5ACE93D2B4564F7002C94D2 /* UIButton+Extension.swift in Sources */,
04CC2EF02BC3DDB2000305DD /* YHServiceBannerView.swift in Sources */,
045EEEA32B9F171A0022A143 /* YHCompanyModel.swift in Sources */, 045EEEA32B9F171A0022A143 /* YHCompanyModel.swift in Sources */,
045EEEC62B9F171A0022A143 /* YHOtherTextViewItemView.swift in Sources */, 045EEEC62B9F171A0022A143 /* YHOtherTextViewItemView.swift in Sources */,
044413F72BC2786200784A14 /* YHHomeWebViewController.swift in Sources */, 044413F72BC2786200784A14 /* YHHomeWebViewController.swift in Sources */,
...@@ -2411,13 +2503,17 @@ ...@@ -2411,13 +2503,17 @@
044413FB2BC27E6F00784A14 /* YHHomeWebBottomButton.swift in Sources */, 044413FB2BC27E6F00784A14 /* YHHomeWebBottomButton.swift in Sources */,
045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */, 045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */,
045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */, 045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */,
049AC4C82BC513AB00F857F4 /* YHOrderListView.swift in Sources */,
049AC4CC2BC6615500F857F4 /* YHHomeListModel.swift in Sources */,
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */, 045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */, A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */,
045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */, 045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */,
045EEED72B9F171A0022A143 /* YHEducationInfo.swift in Sources */, 045EEED72B9F171A0022A143 /* YHEducationInfo.swift in Sources */,
045EEEDE2B9F171A0022A143 /* YHEducationInfoCell.swift in Sources */, 045EEEDE2B9F171A0022A143 /* YHEducationInfoCell.swift in Sources */,
A5ACE93A2B4564F7002C94D2 /* NSAttributedString+Extension.swift in Sources */, A5ACE93A2B4564F7002C94D2 /* NSAttributedString+Extension.swift in Sources */,
A53F42BB2BC3DE6F009CAC70 /* YHHomeKingKongBlockItem.swift in Sources */,
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */, 04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */,
048B2A442BC7901900A93BF0 /* YHHomeWebViewModel.swift in Sources */,
04A7BD112BA4218B00BD35A2 /* YHMyDocumentsListViewModel.swift in Sources */, 04A7BD112BA4218B00BD35A2 /* YHMyDocumentsListViewModel.swift in Sources */,
A5EF21352BA6E05E005027E6 /* YHQuestionAndAnswerViewController.swift in Sources */, A5EF21352BA6E05E005027E6 /* YHQuestionAndAnswerViewController.swift in Sources */,
A5EF213B2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift in Sources */, A5EF213B2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift in Sources */,
...@@ -2434,7 +2530,6 @@ ...@@ -2434,7 +2530,6 @@
045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */, 045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */,
045EEEA42B9F171A0022A143 /* YHImageResultViewController.swift in Sources */, 045EEEA42B9F171A0022A143 /* YHImageResultViewController.swift in Sources */,
045EEE812B9F171A0022A143 /* YHPreviewQuestionAndAnswerModel.swift in Sources */, 045EEE812B9F171A0022A143 /* YHPreviewQuestionAndAnswerModel.swift in Sources */,
A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */,
045EEEB02B9F171A0022A143 /* YHWorkItemView.swift in Sources */, 045EEEB02B9F171A0022A143 /* YHWorkItemView.swift in Sources */,
0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */, 0468D4222B493A5E00CFB916 /* YHPhoneMessageView.swift in Sources */,
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */, 04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */,
...@@ -2447,6 +2542,9 @@ ...@@ -2447,6 +2542,9 @@
045EEEDB2B9F171A0022A143 /* YHCollegeSearchViewController.swift in Sources */, 045EEEDB2B9F171A0022A143 /* YHCollegeSearchViewController.swift in Sources */,
045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */, 045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */,
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */, 045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */,
A501BE682BC2B85F00C4F1FB /* YHHomeSearchView.swift in Sources */,
0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */,
044E1E872BC3D00E00A3B4AF /* YHSearchItemLayout.swift in Sources */,
A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */, A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */,
04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */, 04A271232BABFF3200652B1B /* YHCertificateUploadTypeCell.swift in Sources */,
A582B2412BB95998009D098C /* YHHKPlanTipsCell.swift in Sources */, A582B2412BB95998009D098C /* YHHKPlanTipsCell.swift in Sources */,
...@@ -2455,11 +2553,11 @@ ...@@ -2455,11 +2553,11 @@
045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */, 045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */, A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */, 0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */,
A5F9AD332BC3CD66000323F8 /* YHHkLifeAndIdItemView.swift in Sources */,
0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */, 0468D4282B50D4AF00CFB916 /* YHPrivacyAlertView.swift in Sources */,
045EEEB22B9F171A0022A143 /* YHWorkActionView.swift in Sources */, 045EEEB22B9F171A0022A143 /* YHWorkActionView.swift in Sources */,
A58AC09F2BAC05BA00A30FA9 /* YHFileListItemsView.swift in Sources */, A58AC09F2BAC05BA00A30FA9 /* YHFileListItemsView.swift in Sources */,
045EEE8C2B9F171A0022A143 /* YHPreviewMainViewController.swift in Sources */, 045EEE8C2B9F171A0022A143 /* YHPreviewMainViewController.swift in Sources */,
0468D4342B56587B00CFB916 /* YHOSSManager.swift in Sources */,
A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */, A5C382D12B5FAAB300C5E65C /* YHContactItemModel.swift in Sources */,
A5ACE9522B4564F7002C94D2 /* YHServiceCenterMainViewController.swift in Sources */, A5ACE9522B4564F7002C94D2 /* YHServiceCenterMainViewController.swift in Sources */,
045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */, 045EEF072B9F171A0022A143 /* YHBasicInfoFillViewModel.swift in Sources */,
...@@ -2467,19 +2565,18 @@ ...@@ -2467,19 +2565,18 @@
045EEF212B9F171A0022A143 /* YHMainInformationTableViewCell.swift in Sources */, 045EEF212B9F171A0022A143 /* YHMainInformationTableViewCell.swift in Sources */,
A5ACE9462B4564F7002C94D2 /* YHHUDSquareBaseView.swift in Sources */, A5ACE9462B4564F7002C94D2 /* YHHUDSquareBaseView.swift in Sources */,
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */, A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */,
A5C5B2F92B5515CE00A7C5D1 /* YHPageContentView.swift in Sources */, 048B2A4A2BC7D9DC00A93BF0 /* YHMyLikeViewController.swift in Sources */,
045EEED92B9F171A0022A143 /* YHEducationDetailVC.swift in Sources */, 045EEED92B9F171A0022A143 /* YHEducationDetailVC.swift in Sources */,
045EEF1A2B9F171A0022A143 /* YHAddressViewController.swift in Sources */, 045EEF1A2B9F171A0022A143 /* YHAddressViewController.swift in Sources */,
A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */, A5C382CA2B5E1F4C00C5E65C /* YHLoginTipsView.swift in Sources */,
045EEEE92B9F171A0022A143 /* YHFamilyRequestViewModel.swift in Sources */, 045EEEE92B9F171A0022A143 /* YHFamilyRequestViewModel.swift in Sources */,
044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */, 044867B42BA1953B00DFAD4A /* YHCertificateFilterView.swift in Sources */,
A5C5B3232B57BF8F00A7C5D1 /* YHDavidCell1.swift in Sources */,
045EEEDF2B9F171A0022A143 /* YHCollegeSearchBar.swift in Sources */, 045EEEDF2B9F171A0022A143 /* YHCollegeSearchBar.swift in Sources */,
A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */, A5C5B2FB2B5535DF00A7C5D1 /* YHHomeBannerView.swift in Sources */,
A5ACE94B2B4564F7002C94D2 /* YHHUDRotatingImageView.swift in Sources */, A5ACE94B2B4564F7002C94D2 /* YHHUDRotatingImageView.swift in Sources */,
A5ACE94F2B4564F7002C94D2 /* YhOverlayView.swift in Sources */, A5ACE94F2B4564F7002C94D2 /* YhOverlayView.swift in Sources */,
045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */, 045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */,
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */, 044E1E812BC3BBC200A3B4AF /* YHSearchInfomationVC.swift in Sources */,
04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */, 04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */,
A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */, A5ACE92E2B4564F7002C94D2 /* YHValidateCodeInputView.swift in Sources */,
045EEED82B9F171A0022A143 /* YHQuestionInfo.swift in Sources */, 045EEED82B9F171A0022A143 /* YHQuestionInfo.swift in Sources */,
...@@ -2490,12 +2587,14 @@ ...@@ -2490,12 +2587,14 @@
04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */, 04C693642B723B56004C1758 /* YHMySettingCell.swift in Sources */,
A5FD63C92B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift in Sources */, A5FD63C92B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift in Sources */,
045EEEE32B9F171A0022A143 /* YHMySignatureListModel.swift in Sources */, 045EEEE32B9F171A0022A143 /* YHMySignatureListModel.swift in Sources */,
049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */,
A582B2432BB95E20009D098C /* YHHKPlanCell.swift in Sources */, A582B2432BB95E20009D098C /* YHHKPlanCell.swift in Sources */,
045EEEC52B9F171A0022A143 /* YHOtherPickerView.swift in Sources */, 045EEEC52B9F171A0022A143 /* YHOtherPickerView.swift in Sources */,
045EEE842B9F171A0022A143 /* YHPreviewBasiceInformationViewController.swift in Sources */, 045EEE842B9F171A0022A143 /* YHPreviewBasiceInformationViewController.swift in Sources */,
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */, A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */,
0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */, 0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */,
A5C5B32D2B57D66000A7C5D1 /* YHBbxCollectionViewCell.swift in Sources */, 043F0AB42BC7B80F006CB887 /* YHTestViewController.swift in Sources */,
048B2A4D2BC7DAE800A93BF0 /* YHMyLikeViewModel.swift in Sources */,
04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */, 04C693622B723AB8004C1758 /* YHMySettingViewController.swift in Sources */,
045EEECD2B9F171A0022A143 /* YHScoreDataModel.swift in Sources */, 045EEECD2B9F171A0022A143 /* YHScoreDataModel.swift in Sources */,
A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */, A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */,
...@@ -2510,8 +2609,10 @@ ...@@ -2510,8 +2609,10 @@
0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */, 0468D4242B494BEA00CFB916 /* YHCodeResultViewController.swift in Sources */,
A5D5ADEF2BB90FBC0039FA6B /* YHCheckEamilAlertView.swift in Sources */, A5D5ADEF2BB90FBC0039FA6B /* YHCheckEamilAlertView.swift in Sources */,
04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */, 04A671602BA0280800C1FB91 /* YHFileRenameInputView.swift in Sources */,
A53F42B92BC3DCA9009CAC70 /* YHHomeKingKongBlockModel.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */, A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */, A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */,
048B2A482BC7CE4800A93BF0 /* YHFourKingViewController.swift in Sources */,
045EEF082B9F171A0022A143 /* YHBasicInfoCellModel.swift in Sources */, 045EEF082B9F171A0022A143 /* YHBasicInfoCellModel.swift in Sources */,
A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */, A592FE952BA6D23C0062FACA /* YHCertificateEntryCell.swift in Sources */,
A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */, A5ACE9472B4564F7002C94D2 /* YHHUD.swift in Sources */,
...@@ -2521,26 +2622,30 @@ ...@@ -2521,26 +2622,30 @@
045EEF152B9F171A0022A143 /* YHHKIDCardModel.swift in Sources */, 045EEF152B9F171A0022A143 /* YHHKIDCardModel.swift in Sources */,
0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */, 0477E17E2BA4362A00436346 /* YHCustomNavigationBar.swift in Sources */,
045EEEC42B9F171A0022A143 /* YHOtherInfoFillCell.swift in Sources */, 045EEEC42B9F171A0022A143 /* YHOtherInfoFillCell.swift in Sources */,
043F0AB62BC7CE1B006CB887 /* YHInformationFillVC.swift in Sources */,
045EEE9F2B9F171A0022A143 /* YHWorkExperienceModel.swift in Sources */, 045EEE9F2B9F171A0022A143 /* YHWorkExperienceModel.swift in Sources */,
045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */, 045EEF232B9F171A0022A143 /* YHItemView.swift in Sources */,
04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */, 04754A952B96FF3D00F8ADCA /* UITextField+Extension.swift in Sources */,
A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */, A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */,
045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */, 045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */,
A50A747E2BC91308003D28D9 /* YHHomeBannerIndicatorView.swift in Sources */,
A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */, A5ACE9532B4564F7002C94D2 /* YHBaseViewController.swift in Sources */,
045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */, 045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */,
A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */, A5ACE9392B4564F7002C94D2 /* UIDevice+Extension.swift in Sources */,
045EEEE82B9F171A0022A143 /* YHFamilyMemberViewModel.swift in Sources */, 045EEEE82B9F171A0022A143 /* YHFamilyMemberViewModel.swift in Sources */,
04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */, 04E86E092B707ACE00A35F4B /* YHPhoneLoginViewController.swift in Sources */,
045EEED02B9F171A0022A143 /* YHScoreResultView.swift in Sources */, 045EEED02B9F171A0022A143 /* YHScoreResultView.swift in Sources */,
A5ACE9422B4564F7002C94D2 /* AppDelegate+Extension.swift in Sources */, 048B2A512BC8063F00A93BF0 /* YHHKEventModel.swift in Sources */,
0425E6442BA95FE100A5E763 /* YHSchemeTableHeadView.swift in Sources */, 0425E6442BA95FE100A5E763 /* YHSchemeTableHeadView.swift in Sources */,
045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */, 045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */,
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */, 045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */, 0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */, A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */, 045EEE942B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemView.swift in Sources */,
045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */, 045EEED32B9F171A0022A143 /* YHScoreItemCell.swift in Sources */,
045EEEEE2B9F171A0022A143 /* YHCertificateUploadVC.swift in Sources */, 045EEEEE2B9F171A0022A143 /* YHCertificateUploadVC.swift in Sources */,
A5A4FD652BC799A9001EF9F7 /* YHConfigModel.swift in Sources */,
A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */, A510441A2B495DD0006B60BB /* UIView+Extension.swift in Sources */,
A5ACE93E2B4564F7002C94D2 /* UIImage+Extension.swift in Sources */, A5ACE93E2B4564F7002C94D2 /* UIImage+Extension.swift in Sources */,
A587F7C02BBADBE1002D9781 /* YHHKPlanItemView.swift in Sources */, A587F7C02BBADBE1002D9781 /* YHHKPlanItemView.swift in Sources */,
...@@ -2553,12 +2658,13 @@ ...@@ -2553,12 +2658,13 @@
A5ACE9552B4564F7002C94D2 /* YHTabBarViewController.swift in Sources */, A5ACE9552B4564F7002C94D2 /* YHTabBarViewController.swift in Sources */,
045EEF0A2B9F171A0022A143 /* YHBasicInfoSessionModel.swift in Sources */, 045EEF0A2B9F171A0022A143 /* YHBasicInfoSessionModel.swift in Sources */,
045EEF022B9F171A0022A143 /* YHFormItemDegreeInfoCell.swift in Sources */, 045EEF022B9F171A0022A143 /* YHFormItemDegreeInfoCell.swift in Sources */,
049AC4CA2BC5141600F857F4 /* YHServerNoOrderView.swift in Sources */,
045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */, 045EEEF72B9F171A0022A143 /* YHFormItemAddCell.swift in Sources */,
045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */, 045EEEC82B9F171A0022A143 /* YHOtherSelecteItemView.swift in Sources */,
A5C5B3122B57B47D00A7C5D1 /* YHDavidCell0.swift in Sources */,
0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */, 0480976B2BA15269000B9DCA /* YHCertificateInfoCell.swift in Sources */,
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */, A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */,
045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */, 045EEECF2B9F171A0022A143 /* YHScoreOptionsView.swift in Sources */,
044414072BC3C54B00784A14 /* YHHomeCollectionViewCell.swift in Sources */,
045EEEC12B9F171A0022A143 /* YHOtherInfoFillModel.swift in Sources */, 045EEEC12B9F171A0022A143 /* YHOtherInfoFillModel.swift in Sources */,
0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */, 0468D43A2B579EAC00CFB916 /* YHLoginViewModel.swift in Sources */,
045EEE9E2B9F171A0022A143 /* YHWorkExampleModel.swift in Sources */, 045EEE9E2B9F171A0022A143 /* YHWorkExampleModel.swift in Sources */,
...@@ -2574,6 +2680,7 @@ ...@@ -2574,6 +2680,7 @@
045EEED12B9F171A0022A143 /* YHScorePersonInfoCell.swift in Sources */, 045EEED12B9F171A0022A143 /* YHScorePersonInfoCell.swift in Sources */,
044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */, 044CF8D42BB6BCF700008CE8 /* YHSignatureUploadTableViewCell.swift in Sources */,
045EEF0D2B9F171A0022A143 /* YHBasicInfoFillCell.swift in Sources */, 045EEF0D2B9F171A0022A143 /* YHBasicInfoFillCell.swift in Sources */,
048B2A462BC7912400A93BF0 /* YHWebModel.swift in Sources */,
045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */, 045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */,
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */, 0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */,
045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */, 045EEF242B9F171A0022A143 /* YHStepView.swift in Sources */,
...@@ -2585,13 +2692,14 @@ ...@@ -2585,13 +2692,14 @@
04EA23082BB50753009DA928 /* YHDocumentMessageTableViewCell.swift in Sources */, 04EA23082BB50753009DA928 /* YHDocumentMessageTableViewCell.swift in Sources */,
045EEE8E2B9F171A0022A143 /* YHPreviewInfoWorkSummaryView.swift in Sources */, 045EEE8E2B9F171A0022A143 /* YHPreviewInfoWorkSummaryView.swift in Sources */,
045EEECE2B9F171A0022A143 /* YHScoreDetailViewController.swift in Sources */, 045EEECE2B9F171A0022A143 /* YHScoreDetailViewController.swift in Sources */,
A5C5B3252B57C74900A7C5D1 /* YHDavidCell3.swift in Sources */,
045EEE852B9F171A0022A143 /* YHPreviewFamilyMemberViewController.swift in Sources */, 045EEE852B9F171A0022A143 /* YHPreviewFamilyMemberViewController.swift in Sources */,
045EEE7F2B9F171A0022A143 /* YHWorkExpInfoPreviewModel.swift in Sources */, 045EEE7F2B9F171A0022A143 /* YHWorkExpInfoPreviewModel.swift in Sources */,
045EEEE72B9F171A0022A143 /* YHMySignatureListTableViewCell.swift in Sources */, 045EEEE72B9F171A0022A143 /* YHMySignatureListTableViewCell.swift in Sources */,
044E1E852BC3BEC300A3B4AF /* YHSearchInfoHistoryCell.swift in Sources */,
A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */, A5C382CC2B5EA11800C5E65C /* YHContractCell.swift in Sources */,
0477E17C2BA4238400436346 /* YHCertificateListContainerVC.swift in Sources */, 0477E17C2BA4238400436346 /* YHCertificateListContainerVC.swift in Sources */,
A517A4DF2BB53BE8000DEECD /* YHDocListBottomView.swift in Sources */, A517A4DF2BB53BE8000DEECD /* YHDocListBottomView.swift in Sources */,
0414BDAB2BC7E9C200225367 /* YHMyPermissionCell.swift in Sources */,
04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */, 04C8F4832B7216D800ADF59B /* YHUserInfoHeaderView.swift in Sources */,
045EEEAF2B9F171A0022A143 /* YHWorkExperienceTextItemView.swift in Sources */, 045EEEAF2B9F171A0022A143 /* YHWorkExperienceTextItemView.swift in Sources */,
A5ACE9492B4564F7002C94D2 /* YHHUDSuccessView.swift in Sources */, A5ACE9492B4564F7002C94D2 /* YHHUDSuccessView.swift in Sources */,
...@@ -2602,6 +2710,7 @@ ...@@ -2602,6 +2710,7 @@
045EEE7D2B9F171A0022A143 /* YHWorkExpDataModel.swift in Sources */, 045EEE7D2B9F171A0022A143 /* YHWorkExpDataModel.swift in Sources */,
045EEE832B9F171A0022A143 /* YHMainInfoPreviewModel.swift in Sources */, 045EEE832B9F171A0022A143 /* YHMainInfoPreviewModel.swift in Sources */,
045EEEAB2B9F171A0022A143 /* YHImageClipperViewController.swift in Sources */, 045EEEAB2B9F171A0022A143 /* YHImageClipperViewController.swift in Sources */,
044414032BC39B8D00784A14 /* YHServerTableHeadView.swift in Sources */,
045EEECB2B9F171A0022A143 /* YHScoreResultBaseModel.swift in Sources */, 045EEECB2B9F171A0022A143 /* YHScoreResultBaseModel.swift in Sources */,
04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */, 04A7BD192BA441D400BD35A2 /* YHMyDocumentsUrlModel.swift in Sources */,
045EEEA62B9F171A0022A143 /* YHCompanySelectViewController.swift in Sources */, 045EEEA62B9F171A0022A143 /* YHCompanySelectViewController.swift in Sources */,
...@@ -2616,9 +2725,11 @@ ...@@ -2616,9 +2725,11 @@
A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */, A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */,
041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */, 041B52872B5657B3007EBCEB /* IMAppKey.swift in Sources */,
0468D42B2B55019900CFB916 /* YHAnalytics.swift in Sources */, 0468D42B2B55019900CFB916 /* YHAnalytics.swift in Sources */,
A5173D6A2BC3C187007D4E74 /* YHHkLifeAndIdView.swift in Sources */,
045EEEBE2B9F171A0022A143 /* YHResultBottomView.swift in Sources */, 045EEEBE2B9F171A0022A143 /* YHResultBottomView.swift in Sources */,
045EEEEB2B9F171A0022A143 /* YHTest.swift in Sources */, 045EEEEB2B9F171A0022A143 /* YHTest.swift in Sources */,
045EEEAC2B9F171A0022A143 /* YHWorkExperienceTableViewCell.swift in Sources */, 045EEEAC2B9F171A0022A143 /* YHWorkExperienceTableViewCell.swift in Sources */,
A5173D6C2BC3C273007D4E74 /* YHHomeKingKongBlockView.swift in Sources */,
A5ACE93C2B4564F7002C94D2 /* UIColor+Extension.swift in Sources */, A5ACE93C2B4564F7002C94D2 /* UIColor+Extension.swift in Sources */,
045EEEC02B9F171A0022A143 /* YHOtherInfoFillViewModel.swift in Sources */, 045EEEC02B9F171A0022A143 /* YHOtherInfoFillViewModel.swift in Sources */,
045EEEF22B9F171A0022A143 /* YHChildBasicInfoVC.swift in Sources */, 045EEEF22B9F171A0022A143 /* YHChildBasicInfoVC.swift in Sources */,
...@@ -2630,9 +2741,9 @@ ...@@ -2630,9 +2741,9 @@
045EEEA52B9F171A0022A143 /* YHImageViewController.swift in Sources */, 045EEEA52B9F171A0022A143 /* YHImageViewController.swift in Sources */,
045EEEF32B9F171A0022A143 /* YHFamilyMemberInfoListVC.swift in Sources */, 045EEEF32B9F171A0022A143 /* YHFamilyMemberInfoListVC.swift in Sources */,
04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */, 04EA230C2BB5199D009DA928 /* YHDocumentToActionTableViewCell.swift in Sources */,
A5C5B2EA2B4ECA4D00A7C5D1 /* YHDavidModel0.swift in Sources */,
A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */, A5ACE9572B4564F7002C94D2 /* YHBasicContentView.swift in Sources */,
A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */, A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */,
044414092BC3CE8500784A14 /* YHHomeCollectionLayout.swift in Sources */,
045EEEFE2B9F171A0022A143 /* YHFormItemInputTextCell.swift in Sources */, 045EEEFE2B9F171A0022A143 /* YHFormItemInputTextCell.swift in Sources */,
045EEEDD2B9F171A0022A143 /* YHCollegeNameCell.swift in Sources */, 045EEEDD2B9F171A0022A143 /* YHCollegeNameCell.swift in Sources */,
045EEF162B9F171A0022A143 /* YHMainApplicantInformationViewController.swift in Sources */, 045EEF162B9F171A0022A143 /* YHMainApplicantInformationViewController.swift in Sources */,
...@@ -2643,10 +2754,10 @@ ...@@ -2643,10 +2754,10 @@
044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */, 044867B62BA1A03800DFAD4A /* YHCertificateFilterItemCell.swift in Sources */,
045EEEE62B9F171A0022A143 /* YHMySignatureListViewController.swift in Sources */, 045EEEE62B9F171A0022A143 /* YHMySignatureListViewController.swift in Sources */,
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */, 049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */,
A5C5B3292B57CCBE00A7C5D1 /* YHDavidCell4.swift in Sources */,
A582B23D2BB944ED009D098C /* YHHKPlanDoctumentVC.swift in Sources */, A582B23D2BB944ED009D098C /* YHHKPlanDoctumentVC.swift in Sources */,
045EEEE12B9F171A0022A143 /* YHMySignatureListViewModel.swift in Sources */, 045EEEE12B9F171A0022A143 /* YHMySignatureListViewModel.swift in Sources */,
04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */, 04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */,
044E1E832BC3BBFC00A3B4AF /* YHSearchInfoHistoryView.swift in Sources */,
045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */, 045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */,
04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */, 04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */,
045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */, 045EEEAD2B9F171A0022A143 /* YHWorkExperienceListTableViewCell.swift in Sources */,
...@@ -2654,11 +2765,14 @@ ...@@ -2654,11 +2765,14 @@
047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */, 047619E92BA9867100F45358 /* YHCountryHotView.swift in Sources */,
045EEEF82B9F171A0022A143 /* YHFormItemOnlyDoubleChoiceCell.swift in Sources */, 045EEEF82B9F171A0022A143 /* YHFormItemOnlyDoubleChoiceCell.swift in Sources */,
0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */, 0480976D2BA158A1000B9DCA /* YHCertificateListVC.swift in Sources */,
043F0AB22BC781F5006CB887 /* YHMessageSessionCell.swift in Sources */,
045EEE8B2B9F171A0022A143 /* YHPreviewMainApplicantInfoViewController.swift in Sources */, 045EEE8B2B9F171A0022A143 /* YHPreviewMainApplicantInfoViewController.swift in Sources */,
045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */, 045EEE922B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemView.swift in Sources */,
045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */, 045EEEF92B9F171A0022A143 /* YHFormItemTitleCell.swift in Sources */,
A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */, A580371E2BAD784B0031C312 /* YHMySchemeViewModel.swift in Sources */,
0425E6482BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift in Sources */, 0425E6482BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift in Sources */,
A50A747C2BC8EC86003D28D9 /* YHHomeBannerCollectionViewCell.swift in Sources */,
A501BE662BC2B76200C4F1FB /* YHHomeHeadView.swift in Sources */,
04A271252BAC33BB00652B1B /* YHFilePreviewTool.swift in Sources */, 04A271252BAC33BB00652B1B /* YHFilePreviewTool.swift in Sources */,
044413F92BC279D200784A14 /* YHHomeWebBottomView.swift in Sources */, 044413F92BC279D200784A14 /* YHHomeWebBottomView.swift in Sources */,
045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */, 045EEEC32B9F171A0022A143 /* YHOtherResidenceFillView.swift in Sources */,
...@@ -2668,6 +2782,7 @@ ...@@ -2668,6 +2782,7 @@
0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */, 0493B3DE2BA80C2300AF9393 /* YHCertificateFilterButton.swift in Sources */,
045EEE822B9F171A0022A143 /* YHPersonInfoIdentityCardModel.swift in Sources */, 045EEE822B9F171A0022A143 /* YHPersonInfoIdentityCardModel.swift in Sources */,
045EEE952B9F171A0022A143 /* YHPreviewInfoCertificateInformationItemsView.swift in Sources */, 045EEE952B9F171A0022A143 /* YHPreviewInfoCertificateInformationItemsView.swift in Sources */,
044413FD2BC386DA00784A14 /* YHServiceViewController.swift in Sources */,
045EEEBB2B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift in Sources */, 045EEEBB2B9F171A0022A143 /* YHWorkIntroductionTableViewCell.swift in Sources */,
045EEEED2B9F171A0022A143 /* YHParentInfoVC.swift in Sources */, 045EEEED2B9F171A0022A143 /* YHParentInfoVC.swift in Sources */,
A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */, A5ACE9582B4564F7002C94D2 /* YHNoDataTipView.swift in Sources */,
...@@ -2680,6 +2795,7 @@ ...@@ -2680,6 +2795,7 @@
044CF8D62BBA57DC00008CE8 /* YHFailPromptView.swift in Sources */, 044CF8D62BBA57DC00008CE8 /* YHFailPromptView.swift in Sources */,
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */, A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */,
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */, A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */,
049AC4CE2BC674A700F857F4 /* YHHomeClassifyModel.swift in Sources */,
045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */, 045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */,
A53D381E2BC23794006AE6F7 /* YHMsgViewController.swift in Sources */, A53D381E2BC23794006AE6F7 /* YHMsgViewController.swift in Sources */,
A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */, A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */,
...@@ -2687,7 +2803,6 @@ ...@@ -2687,7 +2803,6 @@
A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */, A5ACE9302B4564F7002C94D2 /* Algorithm.swift in Sources */,
045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */, 045EEED52B9F171A0022A143 /* YHEducationRequestViewModel.swift in Sources */,
045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */, 045EEEB62B9F171A0022A143 /* YHWorkExperienceItemView.swift in Sources */,
A5C5B32B2B57D17600A7C5D1 /* YHDavidCell5.swift in Sources */,
A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */, A58A8C942BA6C7C600632765 /* YHCertificateEntryModel.swift in Sources */,
045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */, 045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */,
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */, 04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */,
...@@ -2697,7 +2812,6 @@ ...@@ -2697,7 +2812,6 @@
04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */, 04E86E0B2B70C13300A35F4B /* YHCodeSueecssViewController.swift in Sources */,
045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */, 045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */,
A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */, A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */,
A5C5B3272B57C8D500A7C5D1 /* YHDavidCell2.swift in Sources */,
045EEEB72B9F171A0022A143 /* YHWorkItemAddView.swift in Sources */, 045EEEB72B9F171A0022A143 /* YHWorkItemAddView.swift in Sources */,
A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */, A5ACE9372B4564F7002C94D2 /* YHBaseUrlManager.swift in Sources */,
04EA230A2BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift in Sources */, 04EA230A2BB5172F009DA928 /* YHDocumentPromptTableViewCell.swift in Sources */,
...@@ -2706,8 +2820,10 @@ ...@@ -2706,8 +2820,10 @@
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */, A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */, 045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */,
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */, 045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */,
044414012BC3979800784A14 /* YHServerHKLifeViewController.swift in Sources */,
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */, 04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */,
A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */, A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */,
0414BDAD2BC7F02C00225367 /* YHMyNotifySettingVC.swift in Sources */,
A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */, A5ACE9272B4564F7002C94D2 /* YHLoginViewController.swift in Sources */,
0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */, 0425E6402BA9357D00A5E763 /* YHScemeItemModel.swift in Sources */,
045EEECC2B9F171A0022A143 /* YHScoreResultModel.swift in Sources */, 045EEECC2B9F171A0022A143 /* YHScoreResultModel.swift in Sources */,
...@@ -2816,7 +2932,7 @@ ...@@ -2816,7 +2932,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -2836,7 +2952,7 @@ ...@@ -2836,7 +2952,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 0.2.8; MARKETING_VERSION = 0.2.9;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -3017,7 +3133,7 @@ ...@@ -3017,7 +3133,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -3037,7 +3153,7 @@ ...@@ -3037,7 +3153,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 0.2.8; MARKETING_VERSION = 0.2.9;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -3059,7 +3175,7 @@ ...@@ -3059,7 +3175,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 3; CURRENT_PROJECT_VERSION = 2;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -3079,7 +3195,7 @@ ...@@ -3079,7 +3195,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 0.2.8; MARKETING_VERSION = 0.2.9;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
......
...@@ -15,7 +15,6 @@ import DeviceKit ...@@ -15,7 +15,6 @@ import DeviceKit
@main @main
class AppDelegate: UIResponder, UIApplicationDelegate { class AppDelegate: UIResponder, UIApplicationDelegate {
var window: UIWindow? var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// JPush服务注册 // JPush服务注册
...@@ -37,6 +36,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ...@@ -37,6 +36,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
//4.本地用户信息加载 //4.本地用户信息加载
YHLoginManager.shared.loadLocalUserInfoData() YHLoginManager.shared.loadLocalUserInfoData()
YHConfigManager.shared.loadConfigData()
// YHAnalytics.analyticsStart(launchOptions: launchOptions) // YHAnalytics.analyticsStart(launchOptions: launchOptions)
...@@ -123,8 +124,11 @@ extension AppDelegate { ...@@ -123,8 +124,11 @@ extension AppDelegate {
//1.设置主窗口 //1.设置主窗口
private func setupRootVC() { private func setupRootVC() {
let tabBarController = YHTabBarViewController() let tabBarController = YHTabBarViewController()
let v0 = YHNavigationController(rootVC:YHHomeViewController())
let v1 = YHNavigationController(rootVC:YHServiceCenterMainViewController()) let homeVC = YHHomePageViewController()
tabBarController.delegate = homeVC
let v0 = YHNavigationController(rootVC:homeVC)
let v1 = YHNavigationController(rootVC:YHServiceViewController())
let v2 = YHNavigationController(rootVC:YHMsgViewController()) let v2 = YHNavigationController(rootVC:YHMsgViewController())
let v3 = YHNavigationController(rootVC:YHMyViewController()) let v3 = YHNavigationController(rootVC:YHMyViewController())
...@@ -137,15 +141,9 @@ extension AppDelegate { ...@@ -137,15 +141,9 @@ extension AppDelegate {
v3.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1")) v3.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1"))
tabBarController.viewControllers = [v0,v1,v2,v3] tabBarController.viewControllers = [v0,v1,v2,v3]
// 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)
// window?.rootViewController = tabBarController
window?.rootViewController = YHStartPageViewController() window?.rootViewController = YHStartPageViewController()
window?.makeKeyAndVisible() window?.makeKeyAndVisible()
......
...@@ -41,6 +41,7 @@ extension AppDelegate: JPUSHRegisterDelegate { ...@@ -41,6 +41,7 @@ extension AppDelegate: JPUSHRegisterDelegate {
let deviceTokenStr = deviceToken.map{String(format:"%02.2hhx", arguments: [$0]) }.joined() let deviceTokenStr = deviceToken.map{String(format:"%02.2hhx", arguments: [$0]) }.joined()
print("deviceToken:\(deviceTokenStr)") print("deviceToken:\(deviceTokenStr)")
JPUSHService.registerDeviceToken(deviceToken) JPUSHService.registerDeviceToken(deviceToken)
YHLoginManager.shared.userModel?.deviceToken = deviceTokenStr
} }
//获取token 失败 //获取token 失败
func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { //可选 func application(_ application: UIApplication, didFailToRegisterForRemoteNotificationsWithError error: Error) { //可选
......
//
// YHMessageSessionCell.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMessageSessionCell: UITableViewCell {
static let cellReuseIdentifier = "YHMessageSessionCell"
let badgeHeight = 16.0
var iconContentView: UIView!
var iconImgView: UIImageView!
var badgeLabel: UILabel!
var nameLabel: UILabel!
var detailLabel: UILabel!
var timeLabel: UILabel!
var bottomLineView: UIView!
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.backgroundColor = .white
iconContentView = UIView()
iconContentView.backgroundColor = UIColor(hex: 0xF4F6FA)
iconContentView.layer.cornerRadius = 22.0
contentView.addSubview(iconContentView)
iconImgView = UIImageView()
iconImgView.backgroundColor = .red
iconContentView.addSubview(iconImgView)
badgeLabel = UILabel()
badgeLabel.backgroundColor = UIColor(hex:0xF81D22)
badgeLabel.textColor = .white
badgeLabel.textAlignment = .center
badgeLabel.font = UIFont.PFSC_M(ofSize:10)
badgeLabel.layer.cornerRadius = badgeHeight/2.0
badgeLabel.clipsToBounds = true
iconContentView.addSubview(badgeLabel)
nameLabel = UILabel()
nameLabel.textColor = UIColor(hex:0x121A26)
nameLabel.textAlignment = .left
nameLabel.font = UIFont.PFSC_M(ofSize:15)
contentView.addSubview(nameLabel)
detailLabel = UILabel()
detailLabel.textColor = UIColor(hex:0x121A26, alpha: 0.5)
detailLabel.textAlignment = .left
detailLabel.font = UIFont.PFSC_R(ofSize:12)
contentView.addSubview(detailLabel)
timeLabel = UILabel()
timeLabel.textColor = UIColor(hex:0x121A26, alpha: 0.3)
timeLabel.textAlignment = .right
timeLabel.font = UIFont.PFSC_R(ofSize:11)
timeLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
timeLabel.setContentHuggingPriority(.required, for: .horizontal)
contentView.addSubview(timeLabel)
bottomLineView = UIView()
bottomLineView.backgroundColor = UIColor(hex: 0xF0F3F7)
contentView.addSubview(bottomLineView)
badgeLabel.text = "5"
nameLabel.text = "资料填写资料填写资料填写资料填写资料填写资料填写资料填写资料填写资料填写资料填写资料填写资料填写资料填写"
detailLabel.text = "尊敬的用户,您好~很高兴通知您进行资料填写列尊敬的用户,您好~很高兴通知您进行资料填写列尊敬的用户,您好~很高兴通知您进行资料填写列"
timeLabel.text = "2024-01-01"
iconContentView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.size.equalTo(CGSize(width: 44, height: 44))
make.centerY.equalToSuperview()
}
iconImgView.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 21, height: 21))
make.center.equalToSuperview()
}
badgeLabel.snp.makeConstraints { make in
make.width.equalTo(badgeHeight)
make.height.equalTo(badgeHeight)
make.top.equalToSuperview().offset(-4)
make.left.equalTo(iconContentView.snp.right).offset(-12)
}
nameLabel.snp.makeConstraints { make in
make.left.equalTo(iconContentView.snp.right).offset(16)
make.right.equalTo(timeLabel.snp.left).offset(-20)
make.top.equalTo(iconContentView)
make.height.equalTo(21)
}
detailLabel.snp.makeConstraints { make in
make.left.equalTo(nameLabel)
make.right.equalTo(timeLabel)
make.top.equalTo(nameLabel.snp.bottom).offset(2)
make.height.equalTo(17)
}
timeLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-20)
make.top.equalTo(nameLabel)
make.height.equalTo(15)
}
bottomLineView.snp.makeConstraints { make in
make.left.right.equalTo(detailLabel)
make.height.equalTo(1)
make.bottom.equalToSuperview()
}
}
}
...@@ -13,13 +13,6 @@ class YHTabBarViewController: ESTabBarController { ...@@ -13,13 +13,6 @@ class YHTabBarViewController: ESTabBarController {
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
handleTabBarLine() handleTabBarLine()
// self.tabBar.shadowImage = UIImage()
// self.tabBar.backgroundImage = UIImage()
// NotificationCenter.default.addObserver(self, selector: #selector(hideTabBar), name: BsConstant.BsNotification.tabBarHideNotification, object: nil)
//
// NotificationCenter.default.addObserver(self, selector: #selector(showTabBar), name: BsConstant.BsNotification.tabBarShowNotification, object: nil)
} }
} }
...@@ -38,20 +31,14 @@ extension YHTabBarViewController { ...@@ -38,20 +31,14 @@ extension YHTabBarViewController {
//展示tabbar上的横线 //展示tabbar上的横线
func handleTabBarLine() -> Void { func handleTabBarLine() -> Void {
let rect = CGRect.init(x:0,y:0,width:KScreenWidth,height:0.5) let rect = CGRect.init(x:0,y:0,width:KScreenWidth,height:0.5)
let fillColor = UIColor(hex:0x888888) let fillColor = UIColor(hex:0x222222,transparency: 0.2)!
let img = UIImage.from(color: fillColor, rect: rect) let img = UIImage.from(color: fillColor, rect: rect)
UIView.transition(with:self.tabBar, duration:0.5, options: .transitionCrossDissolve) { UIView.transition(with:self.tabBar, duration:0.5, options: .transitionCrossDissolve) {
if #available(iOS 13.0, *) { let appearance = self.tabBar.standardAppearance.copy()
let appearance = self.tabBar.standardAppearance.copy() appearance.backgroundImage = UIImage()
appearance.backgroundImage = UIImage() appearance.shadowImage = img
appearance.shadowImage = img self.tabBar.standardAppearance = appearance
self.tabBar.standardAppearance = appearance
}
else{
self.tabBar.backgroundImage = UIImage()
self.tabBar.shadowImage = img
}
} completion: { Bool in } completion: { Bool in
} }
} }
......
//
// YHTestViewController.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHTestViewController: YHBaseViewController {
lazy var nameLabel: UILabel = {
let nameLabel = UILabel()
nameLabel.textColor = UIColor(hex:0x121A26)
nameLabel.textAlignment = .left
nameLabel.font = UIFont.PFSC_M(ofSize:15)
nameLabel.numberOfLines = 0
return nameLabel
}()
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
view.addSubview(nameLabel)
nameLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview()
}
YHHUD.show(.progress(message: "加载中..."))
JPUSHService.registrationIDCompletionHandler {
resCode, registrationID in
YHHUD.hide()
YHLoginManager.shared.userModel?.registerId = registrationID ?? ""
var info = "deviceToken: \n" + (YHLoginManager.shared.userModel?.deviceToken ?? "")
info += "\nregisterId: \n" + (YHLoginManager.shared.userModel?.registerId ?? "")
DispatchQueue.main.async {
self.nameLabel.text = info
}
}
}
}
...@@ -13,12 +13,12 @@ class YHBasicContentView: ESTabBarItemContentView { ...@@ -13,12 +13,12 @@ class YHBasicContentView: ESTabBarItemContentView {
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
textColor = UIColor.init(white: 175.0 / 255.0, alpha: 1.0)
highlightTextColor = .brandMainColor
iconColor = UIColor.init(white: 175.0 / 255.0, alpha: 1.0)
highlightIconColor = .brandMainColor
// 此渲染模式会影响图片颜色哦
renderingMode = .alwaysOriginal
textColor = UIColor(hex: 0x121A26)
highlightTextColor = UIColor(hex: 0x121A26)
titleLabel.font = UIFont.PFSC_R(ofSize: 14) titleLabel.font = UIFont.PFSC_R(ofSize: 14)
} }
......
//
// YHConfigManager.swift
// galaxy
//
// Created by davidhuangA on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHConfigManager: NSObject {
static let shared = YHConfigManager()
lazy var reqVM: YHHomePageViewModel = {
let vm = YHHomePageViewModel()
return vm
}()
private var loadNewDataFlag : Bool = false
private override init() {
super.init()
}
var h5Url : String {
return reqVM.configModel?.article_h5_url ?? ""
}
}
extension YHConfigManager {
func loadConfigData() {
reqVM.getHomeConfig { flag, error in
if flag {
self.loadNewDataFlag = true
}
}
}
}
//
// YHDavidTestViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/1/10.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
import ESPullToRefresh
import JXSegmentedView
import GKNavigationBarSwift
class YHDavidTestViewController: YHBaseViewController {
var vcCanScroll : Bool = true
lazy var descripeLable:UILabel = {
let label = UILabel()
label.text = "赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
label.numberOfLines = 2
label.lineBreakMode = .byTruncatingTail
return label
}()
lazy var headImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_person_icon"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var nameLable:UILabel = {
let label = UILabel()
label.text = "Fiona"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var dateLable:UILabel = {
let label = UILabel()
label.text = "12-12"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var heartImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_red_heart"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var numLable:UILabel = {
let label = UILabel()
label.text = "2000"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 14)
return label
}()
lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")]
}()
private lazy var bannerView: YHHomeBannerView = {
let view = YHHomeBannerView()
return view
}()
lazy var myCollectView = {
// 设置布局方向
let flowLayout = UICollectionViewFlowLayout()
let margin = 20.0
let gap = 20.0
let itemWidth = ceil((KScreenWidth - 2*margin - gap)/2.0)
flowLayout.itemSize = CGSize(width: itemWidth, height: 210 + 87 + 4)
flowLayout.minimumInteritemSpacing = 10.0
flowLayout.minimumLineSpacing = 10.0
flowLayout.scrollDirection = .vertical
let collectinoView = YHGestureCollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectinoView.backgroundColor = .white
collectinoView.register(YHAboutUsAdvantageCell.self, forCellWithReuseIdentifier:YHAboutUsAdvantageCell.cellReuseIdentifier)
collectinoView.register(YHDavidTestCollectionViewCell.self, forCellWithReuseIdentifier:YHDavidTestCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
return collectinoView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
view.backgroundColor = .white
gk_navigationBar.isHidden = true
self.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")]
self.myCollectView.reloadData()
}
}
extension YHDavidTestViewController {
private func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")]
self.myCollectView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.myCollectView.reloadData()
}
}
private func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"))
self.myCollectView.es.stopLoadingMore()
self.myCollectView.reloadData()
}
}
func setupUI() {
gk_navTitle = "David的测试UI"
view.backgroundColor = .white
view.addSubview(myCollectView)
myCollectView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalToSuperview().offset(10)
}
self.myCollectView.es.addInfiniteScrolling {
self.loadFakeData()
}
}
}
extension YHDavidTestViewController: UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHDavidTestCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHDavidTestCollectionViewCell
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
}
// MARK: - JXSegmentedListContainerViewListDelegate
extension YHDavidTestViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
// MARK: - 滑动使用
extension YHDavidTestViewController: UIScrollViewDelegate {
//控制滑动交互
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let scrollViewSet: CGFloat = scrollView.contentOffset.y
if vcCanScroll == false {//不能滚动时
scrollView.contentOffset = CGPoint(x: -20, y: 0)
} else {
if (scrollViewSet <= 0) {
scrollView.contentOffset = CGPoint(x: -20, y: 0)
vcCanScroll = false
NotificationCenter.default.post(name: Notification.Name(rawValue: "leaveTop"), object: nil)
} else {
scrollView.contentOffset = CGPoint(x: -20, y: scrollViewSet)
}
}
}
}
//
// YHFourKingViewController.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHFourKingViewController: YHBaseViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var tableFootView: YHServiceTableFootView!
var sectionView: YHServiceSectionView!
var id = 3
var classId: Int = 0
var dataSouce: [YHHomeListModel?] = [] {
didSet {
self.homeTableView.reloadData()
}
}
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHServerHKLifeViewCell.self,forCellReuseIdentifier: YHServerHKLifeViewCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHFourKingViewController {
func loadData() {
homeViewModel.getHomeClassify{[weak self] success, error in
guard let self = self, let classify = self.homeViewModel.classify else { return }
for item in classify {
let model = item as YHHomeClassifyModel
if model.id == self.id {
gk_navTitle = model.name
self.sectionView.items = model.children
let classifyID = model.children.first?.id ?? 0
self.classId = classifyID
self.homeViewModel.getList(true, classifyID) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
}
}
}
}
}
func setupUI() {
gk_navBarAlpha = 1
sectionView = {
let view = YHServiceSectionView()
view.block = {[weak self] model in
guard let self = self else { return }
self.classId = model.id
self.homeViewModel.getList(true, model.id) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.homeTableView.es.noticeNoMoreData()
}
}
}
return view
}()
view.addSubview(homeTableView)
homeTableView.tableFooterView = tableFootView
homeTableView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
}
homeTableView.delegate = self
homeTableView.dataSource = self
homeTableView.es.addInfiniteScrolling {[weak self] in
guard let self = self else { return }
self.homeViewModel.getList(false, self.classId) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
self.homeTableView.es.stopLoadingMore()
if self.homeViewModel.hasMoreForHomeNews == false {
self.homeTableView.es.noticeNoMoreData()
}
}
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHFourKingViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 48
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return sectionView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return KScreenHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.tableFootView.items = dataSouce
cell0.selectionStyle = .none
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHHKEventViewController.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import WebKit
class YHHKEventViewController: YHBaseViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var sectionView: YHServiceSectionView!
var webview = WKWebView()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHHKEventViewController {
func loadData() {
homeViewModel.getHKEvent {[weak self] success, error in
guard let self = self else { return }
self.sectionView.type = 1
self.sectionView.dataSource = self.homeViewModel.hkList ?? []
guard let model = self.homeViewModel.hkList?.first, let urlString = model.list.first else { return }
let url = NSURL(string: urlString)
// 创建请求
let request = NSURLRequest(url: url! as URL)
// 加载请求
self.webview.load(request as URLRequest)
}
}
func setupUI() {
gk_navBarAlpha = 1
sectionView = {
let view = YHServiceSectionView()
view.hkBlock = {[weak self] model in
guard let self = self else { return }
guard let urlString = model.list.first else { return }
let url = NSURL(string: urlString)
// 创建请求
let request = NSURLRequest(url: url! as URL)
// 加载请求
self.webview.load(request as URLRequest)
}
return view
}()
view.addSubview(sectionView)
sectionView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(48)
}
let navHeight = self.navigationController?.navigationBar.frame.height
//获取状态栏高度
let statusHeight = k_Height_statusBar()
// 创建wkwebview
webview = WKWebView(frame: CGRect(x: 0, y: statusHeight + navHeight! + 48, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight! - 48))
// 添加wkwebview
self.view.addSubview(webview)
}
}
//
// YHHomePageViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import ESPullToRefresh
import GKNavigationBarSwift
class YHHomePageViewController: YHBaseViewController {
lazy var viewModel : YHHomePageViewModel = {
let viewModel = YHHomePageViewModel()
return viewModel
}()
lazy var homeCollectView = {
// 设置布局方向
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 10.0
flowLayout.sectionInset = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
collectinoView.register(YHHomeCollectionViewCell.self, forCellWithReuseIdentifier:YHHomeCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
return collectinoView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
getData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
lazy var searchView: YHHomeSearchView = {
let view = YHHomeSearchView()
let tap = UITapGestureRecognizer(target: self, action: #selector(didSearchBarClicked))
view.addGestureRecognizer(tap)
return view
}()
lazy var homeHeaderView: YHHomeHeadView = {
let view = YHHomeHeadView()
return view
}()
var tapTimestamp : CFAbsoluteTime = -10.0
}
private extension YHHomePageViewController {
@objc func didSearchBarClicked() {
let vc = YHSearchInfomationVC()
self.navigationController?.pushViewController(vc)
}
func getData() {
loadFirstData()
viewModel.getHomeBanner(0) {[weak self] success, error in
guard let self = self else { return }
self.homeHeaderView.homeBannerView.dataArr = self.viewModel.banners ?? []
}
}
func loadMoreData() {
viewModel.getHomeNewsList(firstPageFlag : false) {[weak self] success, error in
guard let self = self else { return }
homeCollectView.es.stopLoadingMore()
if self.viewModel.hasMoreForHomeNews == false {
homeCollectView.es.noticeNoMoreData()
}
self.homeCollectView.reloadData()
}
}
func loadFirstData() {
viewModel.getHomeNewsList(firstPageFlag : true) {[weak self] success, error in
guard let self = self else { return }
homeCollectView.es.stopPullToRefresh()
if self.viewModel.hasMoreForHomeNews == false {
homeCollectView.es.noticeNoMoreData()
}
self.homeCollectView.reloadData()
// DispatchQueue.main.asyncAfter(deadline: .now() + 3, execute:{
// printLog(YHHomeHeadView.viewH)
// printLog(self.homeCollectView.contentOffset)
// })
}
}
func setupUI() {
gk_navigationBar.isHidden = true
view.backgroundColor = .white
// NotificationCenter.default.addObserver(self, selector: #selector(homepageRefresh), name:YhConstant.YhNotification.refreshHomePageNotifiction, object: nil)
view.addSubview(searchView)
searchView.snp.makeConstraints { make in
make.top.equalTo(k_Height_safeAreaInsetsTop() + 6)
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(YHHomeSearchView.viewH)
}
view.addSubview(homeCollectView)
homeCollectView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(searchView.snp.bottom).offset(6)
}
homeHeaderView.frame = CGRect(x: 20, y: -YHHomeHeadView.viewH, width: KScreenWidth - 40, height: YHHomeHeadView.viewH)
homeCollectView.addSubview(homeHeaderView)
homeCollectView.contentInset = UIEdgeInsets(top: YHHomeHeadView.viewH, left: 0, bottom: 20, right: 0)
let tmpHeadView = homeCollectView.es.addPullToRefresh {
self.loadFirstData()
}
var r = tmpHeadView.frame
r.origin.y = r.origin.y - YHHomeHeadView.viewH
tmpHeadView.frame = r
homeCollectView.es.addInfiniteScrolling {
self.loadMoreData()
}
}
@objc func homepageRefresh() {
loadFirstData()
}
}
extension YHHomePageViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.viewModel.arrHomeNewsData?.count ?? 0
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHHomeCollectionViewCell
cell.listModel = self.viewModel.arrHomeNewsData?[indexPath.row]
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let model = self.viewModel.arrHomeNewsData?[indexPath.row] else { return }
if model.type == 2 {
let vc = YHHomeWebViewController()
vc.url = YHConfigManager.shared.h5Url + "?id=\(model.id)"
vc.id = model.id
vc.block = { item in
if let arr = self.viewModel.arrHomeNewsData {
for (index,targetItem) in arr.enumerated() {
if targetItem.id == item.id {
targetItem.is_like = item.is_like
targetItem.like_count = item.like_count
self.homeCollectView.reloadItems(at: [IndexPath(index: index)])
}
}
}
}
self.navigationController?.pushViewController(vc)
} else if model.type == 1 {
printLog("直接播放视频")
}
}
}
extension YHHomePageViewController : CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
guard let model = self.viewModel.arrHomeNewsData?[indexPath.row] else { return CGSize.zero }
return CGSize(width: model.img_width_cell, height: model.img_height_cell)
}
}
extension YHHomePageViewController : UITabBarControllerDelegate {
func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
let doubleTapInterval : CGFloat = 0.3
if tabBarController.selectedIndex == 0 {
let timestamp = CFAbsoluteTimeGetCurrent()
printLog(timestamp - self.tapTimestamp)
if timestamp - self.tapTimestamp < doubleTapInterval {
UIView.animate(withDuration: 0.25) {
self.homeCollectView.contentOffset = CGPoint(x: 0, y: -YHHomeHeadView.viewH)//置顶功能
}
}
self.tapTimestamp = timestamp
}
}
}
//
// YHHomeViewCoontroller.swift
// galaxy
//
// Created by davidhuangA on 2024/1/3.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import Foundation
import GKNavigationBarSwift
import JXSegmentedView
import SafariServices
class YHHomeViewController: YHBaseViewController {
let sectionHeaderHeight : CGFloat = 40
let cellHeight : CGFloat = 80
var arrItemVc : [UIViewController] = []
var canScroll : Bool = true
var myCellHeight : CGFloat {
get {
return view.bounds.size.height - homeNavBarView.height - k_TabBar_Height
}
}
let cellView: YHMainContentBaseViewController = YHMainContentBaseViewController()
//model 及网络请求
lazy var homeReqVM : YHHomePageViewModel = {
return YHHomePageViewModel()
}()
//头部背景图片
lazy var headBkgImagV: UIImageView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "home_head_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
//自定义导航栏
lazy var homeNavBarView: UIView = {
let view1 = UIView()
view1.backgroundColor = .clear
view1.isUserInteractionEnabled = true
let icon = UIImageView(image: UIImage(named: "home_nav_icon"))
icon.contentMode = .scaleAspectFill
view1.addSubview(icon)
icon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(16)
make.height.equalTo(26)
make.width.equalTo(120)
}
let btnMsg = UIButton(type: .custom)
btnMsg.setImage(UIImage(named: "home_nav_msg"), for: .normal)
view1.addSubview(btnMsg)
btnMsg.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-16)
make.height.width.equalTo(34)
}
btnMsg.addTarget(self, action: #selector(tapSearch), for: .touchUpInside)
let btnSearch = UIButton(type: .custom)
btnSearch.setImage(UIImage(named: "home_nav_search"), for: .normal)
btnSearch.addTarget(self, action: #selector(tapSearch), for: .touchUpInside)
view1.addSubview(btnSearch)
btnSearch.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(btnMsg.snp.left).offset(-12)
make.height.width.equalTo(34)
}
return view1
}()
var homeTableView: YHGestureTableView = {
let tableView = YHGestureTableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
// tableView.rowHeight = UITableView.automaticDimension
// tableView.estimatedRowHeight = 100
// tableView.register(YHHomeCustomCell.self, forCellReuseIdentifier: YHHomeCustomCell.cellReuseIdentifier)
tableView.register(YHDavidCell0.self,forCellReuseIdentifier: YHDavidCell0.cellReuseIdentifier)
tableView.register(YHDavidCell1.self,forCellReuseIdentifier: YHDavidCell1.cellReuseIdentifier)
tableView.register(YHDavidCell3.self,forCellReuseIdentifier: YHDavidCell3.cellReuseIdentifier)
tableView.register(YHDavidCell2.self,forCellReuseIdentifier: YHDavidCell2.cellReuseIdentifier)
tableView.register(YHDavidCell4.self,forCellReuseIdentifier: YHDavidCell4.cellReuseIdentifier)
tableView.register(YHDavidCell5.self,forCellReuseIdentifier: YHDavidCell5.cellReuseIdentifier)
return tableView
}()
let arrItemTitles = ["推荐","子女教育","税务规划","民生医疗","成功案例","我的服务","行业资讯","香港生活","你我他","我是很长的tag呀"]
let segmentView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 40))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 16)
dataSource.titleNormalColor = UIColor(hexString: "#888F98")!
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18)
dataSource.titleSelectedColor = .brandMainColor
dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension
dataSource.itemSpacing = 24
return dataSource
}()
// MARK: - 生命周期方法
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(leaveTopOp), name:Notification.Name(rawValue: "leaveTop"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging"), object: nil)
//1.UI
initView()
// testModelParse()//for test hjl 添加 数据类型 转换
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
}
}
// MARK: - 私有方法
extension YHHomeViewController {
func testModelParse() {
// SmartConfig.debugMode = .verbose
let json = """
{
"data": "balabala Team",
"errorCode": 0,
"errorMessage": "操作成功",
"success":true,
"test": {
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
},
"testArr":[
{
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
},
{
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
},
{
"test1": "test1-value",
"test2": "test2-value",
"test333": "test3-value",
}
]
}
"""
//1. json字符串 转 对象
guard let model = NetBaseModel.deserialize(json: json) else { return }
print("model 是 ==>",model)
print(model)
//2. 对象 转 dictionary
let dic = model.toDictionary()
print("dic 是 ==>",dic as Any)
//3. dictionary 转 string
let jsonString = dic?.jsonString()
print("jsonString 是 ==>",jsonString ?? "")
//4.model 转 string
let jsonString2 = model.toJSONString()
print("jsonString2 是 ==>",jsonString2 ?? "")
//5. dic 转 model
guard let model1 = NetBaseModel.deserialize(dict: dic) else { return }
print("model1 是 ==>",model1)
}
@objc func leaveTopOp() {
canScroll = true
}
@objc func beginDragging() {
homeTableView.isScrollEnabled = false
canScroll = false
}
@objc func endDragging() {
homeTableView.isScrollEnabled = true
canScroll = true
}
private func requestData() {
self.homeReqVM.getHomeConfig { flag, error in
if flag == true {
//1. 调用model 刷新界面
YHHUD.flash(message: "数据已更新")
} else {
//2. 给出 错误提示
if let error = error {
YHHUD.flash(message: error.errorMsg)
}
}
}
}
private func initView()->Void {
gk_navigationBar.isHidden = true
view.addSubview(headBkgImagV)
headBkgImagV.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(307)
}
view.addSubview(homeNavBarView)
homeNavBarView.layer.zPosition = 1
homeNavBarView.snp.makeConstraints { make in
make.top.equalTo(k_Height_safeAreaInsetsTop())
make.left.right.equalToSuperview()
make.height.equalTo(48)
}
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.equalTo(homeNavBarView.snp.bottom).offset(0)
make.left.right.bottom.equalToSuperview()
}
self.homeTableView.es.addPullToRefresh {
self.loadFirstItem()
}
self.homeTableView.es.startPullToRefresh()
self.homeTableView.es.addInfiniteScrolling {
self.loadFakeData()
}
}
private func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.homeTableView.reloadData()
}
}
private func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.homeTableView.es.stopLoadingMore()
self.homeTableView.reloadData()
}
}
@objc func tapSearch() {
printLog("*")
navigationController?.pushViewController(YHDavidTestViewController())
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHHomeViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if section == 0 {
return 6
}
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
if section == 0 {
return 0
}
return 0
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
if section == 0 {
return UIView()
}
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 0 {
if indexPath.row == 0 {
return 136
} else if indexPath.row == 1 {
return 194
} else if indexPath.row == 2 {
return 113
} else if indexPath.row == 3 {
return 138 + 15
} else if indexPath.row == 4 {
return YHDavidCell4.cellHeight
} else if indexPath.row == 5 {
return YHDavidCell5.cellHeight
}
return 100
}
return CGRectGetHeight(self.view.bounds)
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell0.cellReuseIdentifier, for: indexPath) as! YHDavidCell0
return cell
} else if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell1.cellReuseIdentifier, for: indexPath) as! YHDavidCell1
return cell
} else if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell2.cellReuseIdentifier, for: indexPath) as! YHDavidCell2
return cell
} else if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell3.cellReuseIdentifier, for: indexPath) as! YHDavidCell3
return cell
} else if indexPath.row == 4 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell4.cellReuseIdentifier, for: indexPath) as! YHDavidCell4
return cell
} else if indexPath.row == 5 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell5.cellReuseIdentifier, for: indexPath) as! YHDavidCell5
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: YHDavidCell0.cellReuseIdentifier, for: indexPath) as! YHDavidCell0
return cell
}
let cell = UITableViewCell()
cellView.view.frame = CGRect(x: 0, y: 0, width: cell.contentView.bounds.size.width, height: myCellHeight)
cell.contentView.addSubview(cellView.view)
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
let vc = YHHomeWebViewController()
self.navigationController?.pushViewController(vc)
}
}
extension YHHomeViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let bottomCellOffset: CGFloat = homeTableView.rect(forSection: 1).origin.y - 64 + 80 - 12 //48
if (scrollView.contentOffset.y >= bottomCellOffset) {
scrollView.contentOffset = CGPointMake(0, bottomCellOffset)
if canScroll == true {
canScroll = false
//传递参数到 子VC
cellView.canScroll = true
}
}else{
if canScroll == false {
scrollView.contentOffset = CGPoint(x: 0, y: bottomCellOffset)
}
}
self.homeTableView.showsVerticalScrollIndicator = false
}
}
extension YHHomeViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成
func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
print(#function)
}
// MARK: 加载完成
func safariViewController(_ controller: SFSafariViewController, didCompleteInitialLoad didLoadSuccessfully: Bool) {
print(#function)
}
// MARK: 点击右下角调用Safari浏览器打开
func safariViewControllerWillOpenInBrowser(_ controller: SFSafariViewController) {
print(#function)
}
}
...@@ -10,22 +10,30 @@ import UIKit ...@@ -10,22 +10,30 @@ import UIKit
import WebKit import WebKit
class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationDelegate { class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationDelegate {
var operationFlag:Bool = false
typealias Block = (YHWebModel) -> ()
var block: Block?
var viewModel: YHHomeWebViewModel!
var webview = WKWebView() var webview = WKWebView()
var progBar = UIProgressView() var progBar = UIProgressView()
var bottomView: YHHomeWebBottomView! var bottomView: YHHomeWebBottomView!
var url = "https://upload-cdn.galaxy-immi.com/crm/production/1620271613711.pdf" var url = ""
var id: Int = 0
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
viewModel = YHHomeWebViewModel()
//获取导航栏高度 //获取导航栏高度
let navHeight = self.navigationController?.navigationBar.frame.height let navHeight = self.navigationController?.navigationBar.frame.height
//获取状态栏高度 //获取状态栏高度
let statusHeight = k_Height_statusBar() let statusHeight = k_Height_statusBar()
// 创建wkwebview // 创建wkwebview
webview = WKWebView(frame: CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height)) webview = WKWebView(frame: CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight! - 59 - k_Height_safeAreaInsetsBottom()))
webview.navigationDelegate = self webview.navigationDelegate = self
// 创建网址 // 创建网址
let url = NSURL(string: url) let url = NSURL(string: url)
...@@ -48,19 +56,67 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -48,19 +56,67 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
let view = YHHomeWebBottomView() let view = YHHomeWebBottomView()
view.likeBlock = { [weak self] flag in view.likeBlock = { [weak self] flag in
guard let self = self else { return } guard let self = self else { return }
if YHLoginManager.shared.isLogin() == false {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
return
}
if flag { if flag {
YHHUD.flash(message: "已点赞") self.viewModel.getLike(self.id, 1) {[weak self] success, error in
guard let self = self else { return }
if success {
operationFlag = true
YHHUD.flash(message: "已点赞")
self.getData()
} else {
operationFlag = false
}
}
} else { } else {
YHHUD.flash(message: "已取消点赞") self.viewModel.getLike(self.id, 0) {[weak self] success, error in
guard let self = self else { return }
if success {
operationFlag = true
YHHUD.flash(message: "已取消点赞")
self.getData()
} else {
operationFlag = false
}
}
} }
} }
view.starBlock = { [weak self] flag in view.starBlock = { [weak self] flag in
guard let self = self else { return } guard let self = self else { return }
if YHLoginManager.shared.isLogin() == false {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom
self.navigationController?.present(vc, animated: true)
return
}
if flag { if flag {
YHHUD.flash(message: "已收藏") self.viewModel.getStar(self.id, 1) {[weak self] success, error in
guard let self = self else { return }
if success {
operationFlag = true
YHHUD.flash(message: "已收藏")
self.getData()
} else {
operationFlag = false
}
}
} else { } else {
YHHUD.flash(message: "已取消收藏") self.viewModel.getStar(self.id, 0) {[weak self] success, error in
guard let self = self else { return }
if success {
operationFlag = true
YHHUD.flash(message: "已取消收藏")
self.getData()
} else {
operationFlag = false
}
}
} }
} }
return view return view
...@@ -70,13 +126,41 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD ...@@ -70,13 +126,41 @@ class YHHomeWebViewController: YHBaseViewController, WKUIDelegate, WKNavigationD
make.bottom.left.right.equalToSuperview() make.bottom.left.right.equalToSuperview()
make.height.equalTo(59 + k_Height_safeAreaInsetsBottom()) make.height.equalTo(59 + k_Height_safeAreaInsetsBottom())
} }
getData()
if id == 0 {
if self.url.contains("?id=") {
let list = self.url.components(separatedBy: "?id=")
if list.count == 2 {
if let iddd = list[1].int {
id = iddd
return
}
}
}
bottomView.isHidden = true
webview.frame = CGRect(x: 0, y: statusHeight + navHeight!, width: self.view.frame.width, height: self.view.frame.height - statusHeight - navHeight!)
}
} }
deinit { deinit {
webview.removeObserver(self, forKeyPath: "estimatedProgress") webview.removeObserver(self, forKeyPath: "estimatedProgress")
} }
func getData() {
viewModel.getWebDetail(self.id) {[weak self] success, error in
guard let self = self else { return }
if success {
guard let model = self.viewModel.mainModel else { return }
bottomView.likeCount = model.like_count
bottomView.starCount = model.collect_count
bottomView.isStar = model.is_collect
bottomView.isLike = model.is_like
self.block?(model)
}
}
}
// MARK: - WKNavigationDelegate // MARK: - WKNavigationDelegate
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
......
//
// YHSearchInfomationVC.swift
// galaxy
//
// Created by edy on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSearchInfomationVC: YHBaseViewController {
static let searchInfoHistoryKey = "searchInfoHistoryKey"
static let searchHistoryMaxCount = 10
var items:[YHHomeListModel] = []
lazy var viewModel: YHHomePageViewModel = {
let viewModel = YHHomePageViewModel()
return viewModel
}()
lazy var navBar:UIView = {
let bar = UIView()
let backBtn = UIButton()
backBtn.setImage(UIImage(named: "back_icon"), for: .normal)
backBtn.addTarget(self, action: #selector(didBackBtnClicked), for: .touchUpInside)
backBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
bar.addSubview(backBtn)
backBtn.snp.makeConstraints { make in
make.width.height.equalTo(21)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(16)
}
return bar
}()
lazy var searchBar: YHSearchInfoBar = {
let bar = YHSearchInfoBar(frame: CGRect(x: 20, y: k_Height_NavigationtBarAndStatuBar+8.0, width: KScreenWidth-40, height: 36.0))
bar.searchBlock = {
[weak self] text in
guard let self = self else { return }
searchText(self.searchBar.textField.text ?? "")
if let searchText = self.searchBar.textField.text, searchText.count > 0 {
self.saveSearchHistory(searchText)
}
}
bar.textChange = {
[weak self] text in
guard let self = self else { return }
if isEmptyString(text) {
searchHistoryView.isHidden = false
searchHistoryView.updateDataSource(self.getSearchHistoryList())
items.removeAll()
self.tableView.reloadData()
}
}
return bar
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.estimatedSectionHeaderHeight = 0.1
tableView.estimatedSectionFooterHeight = 20.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = .white
tableView.backgroundView = emptyDataTipsView
tableView.register(YHSearchInfoCell.self, forCellReuseIdentifier: YHSearchInfoCell.cellReuseIdentifier)
return tableView
}()
lazy var searchHistoryView: YHSearchInfoHistoryView = {
let view = YHSearchInfoHistoryView(frame: CGRect(x: 0, y: searchBar.frame.maxY+8, width: KScreenWidth, height: KScreenHeight-searchBar.frame.maxY-8))
view.updateDataSource(self.getSearchHistoryList())
view.selectBlock = {
[weak self] text in
guard let self = self else { return }
self.searchHistoryView.isHidden = true
self.searchBar.textField.text = text
searchText(text)
self.saveSearchHistory(text)
}
return view
}()
lazy var emptyDataTipsView:UIView = {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 124))
view.isHidden = true
let imgView = UIImageView(image: UIImage(named: "service_center_no_data"))
imgView.contentMode = .scaleAspectFill
view.addSubview(imgView)
let label = UILabel()
label.textColor = UIColor.labelTextColor2
label.font = UIFont.PFSC_R(ofSize: 14)
label.textAlignment = .center
label.text = "无搜索结果".local
view.addSubview(label)
imgView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(204)
make.width.height.equalTo(92)
make.centerX.equalTo(view)
}
label.snp.makeConstraints { make in
make.top.equalTo(imgView.snp.bottom).offset(12)
make.centerX.equalTo(view)
}
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
self.setupUI()
}
func setupUI() {
gk_navigationBar.isHidden = true
view.backgroundColor = .white
view.addSubview(navBar)
view.addSubview(searchBar)
view.addSubview(tableView)
view.addSubview(searchHistoryView)
searchBar.textField.becomeFirstResponder()
navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
searchBar.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar+8.0)
make.height.equalTo(36.0)
}
searchHistoryView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(searchBar.snp.bottom).offset(20)
make.bottom.equalToSuperview()
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(searchBar.snp.bottom).offset(8+20)
make.bottom.equalToSuperview()
}
}
func searchText(_ text:String) {
YHHUD.show(.progress(message: "搜索中..."))
self.viewModel.searchArticleList(text) {
[weak self] success, error in
YHHUD.hide()
guard let self = self else { return }
items.removeAll()
if let arr = self.viewModel.arrHomeNewsData {
items.append(contentsOf: arr)
}
emptyDataTipsView.isHidden = (items.count > 0)
searchHistoryView.isHidden = true
self.tableView.reloadData()
}
}
func getSearchHistoryList() -> [String] {
if let arr = UserDefaults.standard.array(forKey: Self.searchInfoHistoryKey) as? [String] {
return arr
}
return []
}
func saveSearchHistory(_ text: String) {
if isEmptyString(text) { return }
var arr = getSearchHistoryList()
// 查找历史记录中是否有相同记录
var targetIndex = -1
for (index, history) in arr.enumerated() {
if history == text {
targetIndex = index
break
}
}
// 去除相同记录
if 0 <= targetIndex && targetIndex < arr.count {
arr.remove(at: targetIndex)
}
// 将最近记录放在第一位
if arr.count < Self.searchHistoryMaxCount {
arr.insert(text, at: 0)
} else {
arr.insert(text, at: 0)
arr.removeLast()
}
UserDefaults.standard.set(arr, forKey: Self.searchInfoHistoryKey)
UserDefaults.standard.synchronize()
}
@objc func didBackBtnClicked() {
self.navigationController?.popViewController(animated: true)
}
}
extension YHSearchInfomationVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHSearchInfoCell.cellReuseIdentifier, for: indexPath) as! YHSearchInfoCell
if 0 <= indexPath.section && indexPath.section < items.count {
let item = items[indexPath.section]
cell.updateModel(item)
cell.renderHighLightText(self.searchBar.textField.text ?? "")
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 70.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.section && indexPath.section < items.count {
let model = items[indexPath.section]
let vc = YHHomeWebViewController()
vc.url = YHConfigManager.shared.h5Url + "?id=\(model.id)"
vc.id = model.id
self.navigationController?.pushViewController(vc)
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 0.1
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 20.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
}
...@@ -14,7 +14,7 @@ import ESTabBarController_swift ...@@ -14,7 +14,7 @@ import ESTabBarController_swift
class YHStartPageViewController: UIViewController { class YHStartPageViewController: UIViewController {
private var MaxTime : Int = 10 //for test hjl private var MaxTime : Int = 3
private var timer : Timer? private var timer : Timer?
lazy var imagV: UIImageView = { lazy var imagV: UIImageView = {
...@@ -82,8 +82,8 @@ private extension YHStartPageViewController { ...@@ -82,8 +82,8 @@ private extension YHStartPageViewController {
closeBtn.clipsToBounds = true closeBtn.clipsToBounds = true
closeBtn.layer.cornerRadius = 14 closeBtn.layer.cornerRadius = 14
closeBtn.snp.makeConstraints { make in closeBtn.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar) make.top.equalTo(k_Height_safeAreaInsetsTop() + 15)
make.right.equalTo(-10) make.right.equalTo(-20)
make.width.equalTo(56) make.width.equalTo(56)
make.height.equalTo(28) make.height.equalTo(28)
} }
...@@ -98,8 +98,10 @@ private extension YHStartPageViewController { ...@@ -98,8 +98,10 @@ private extension YHStartPageViewController {
//1.设置主窗口 //1.设置主窗口
func setupRootVC() { func setupRootVC() {
let tabBarController = YHTabBarViewController() let tabBarController = YHTabBarViewController()
let v0 = YHNavigationController(rootVC:YHHomeViewController()) let homeVC = YHHomePageViewController()
let v1 = YHNavigationController(rootVC:YHServiceCenterMainViewController()) tabBarController.delegate = homeVC
let v0 = YHNavigationController(rootVC:homeVC)
let v1 = YHNavigationController(rootVC:YHServiceViewController())
let v2 = YHNavigationController(rootVC:YHMsgViewController()) let v2 = YHNavigationController(rootVC:YHMsgViewController())
let v3 = YHNavigationController(rootVC:YHMyViewController()) let v3 = YHNavigationController(rootVC:YHMyViewController())
...@@ -112,10 +114,8 @@ private extension YHStartPageViewController { ...@@ -112,10 +114,8 @@ private extension YHStartPageViewController {
v3.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1")) v3.tabBarItem = ESTabBarItem.init(YHBasicContentView(),title: "我的", image: UIImage(named: "me"), selectedImage: UIImage(named: "me_1"))
tabBarController.viewControllers = [v0,v1,v2,v3] tabBarController.viewControllers = [v0,v1,v2,v3]
// tabBarController.viewControllers = [v1,v2] //for test hjl 配合测试同学做自动化测试 Moon 2023.03.12
tabBarController.tabBar.backgroundColor = .white tabBarController.tabBar.backgroundColor = .white
let window = UIApplication.shared.yhKeyWindow() let window = UIApplication.shared.yhKeyWindow()
window?.rootViewController = tabBarController window?.rootViewController = tabBarController
window?.makeKeyAndVisible() window?.makeKeyAndVisible()
......
...@@ -8,11 +8,12 @@ ...@@ -8,11 +8,12 @@
import Foundation import Foundation
class YHBannerModel { class YHBannerModel: YHBaseModel {
var title: String = "我是Title" //banner标题 var name: String = ""
var img_url: String = "https://upload-cdn.galaxy-immi.com/sell/test/1668772072522.jpg" //banner图片链接 var skip_url: String = ""
var link_type: Int = 0 //跳转类型 0:不跳转 10 :跳转H5 20:跳转原生页面 var img_url: String = ""
var link_url: String = "" //跳转地址 var type: Int = 0//banner 跳转类型:0-不跳转,1-跳转H5,2-跳转APP内Tab,3-跳转资讯页
var create_at: String = ""
required init() {} var skip_type: Int = 0
var id: Int = 0
} }
//
// YHConfigModel.swift
// galaxy
//
// Created by davidhuangA on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHConfigModel : SmartCodable {
var oss_server : String = ""
var start_up_url : String = ""
var article_h5_url : String = ""
var min_version_num : Int = 0
var countdown : Int = 0
required init() {
}
}
//
// YHDavidModel0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/10.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHDavidModel0: SmartCodable {
var imageUrl : String = ""
var titleDes : String = ""
var uImageUrl : String = ""
var uName : String = ""
var date : String = "12-11"
var heartNum : Int32 = 0
required init() {
}
}
//
// YHHKEventModel.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKEventModel: YHBaseModel {
var tag: String = ""
var list: [String] = []
}
//
// YHHomeClassifyModel.swift
// galaxy
//
// Created by EDY on 2024/4/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeClassifyModel: YHBaseModel {
var id: Int = 0
var name: String = ""
var pid: Int = 0
var type: Int = 0
var children: [YHClassifyModel] = []
}
class YHClassifyModel: YHBaseModel {
var children: [String] = []
var id: Int = 0
var name: String = ""
var pid: Int = 0
var type: Int = 0
}
//
// YHHomeKingKongBlockModel.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeKingKongBlockModel {
var type : String
var iconName : String
var title : String
init(type: String, iconName: String, title: String) {
self.type = type
self.iconName = iconName
self.title = title
}
}
//
// YHHomeListModel.swift
// galaxy
//
// Created by EDY on 2024/4/10.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeListTotalModel: YHBaseModel {
var data: [YHHomeListModel] = []
var total: Int = 0
}
class YHHomeListModel: YHBaseModel {
var collect_count: Int = 0
var id: Int = 0
var title: String = ""
var content: String = ""
var view_count: Int = 0 //浏览数量
var img_url: String = ""
var type: Int = 0 //文章类型 '文章类型 1视频 2图文 3图片',
var is_like : Bool = false
var media_url : String = ""
var like_count : Int = 0 //点赞梳理
//网络返回的图片宽高
var img_width: CGFloat = 0
var img_height: CGFloat = 0
//实际使用的图片宽高
var img_width_use : CGFloat = 0
var img_height_use : CGFloat = 0
//cell的宽高
var img_width_cell : CGFloat = 0
var img_height_cell : CGFloat = 0
//描述的高度
var textH : CGFloat = 16.0
func calHeightParam() {
let text = self.title
let width = (KScreenWidth - 47) / 2
let font = UIFont.PFSC_R(ofSize: 14) // 字体大小
let maxWidth = width - 16 // 最大宽度限制
// 创建NSAttributedString对象并设置属性
let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
_ = NSMutableAttributedString(string: text, attributes: attributes)
// 根据指定的最大宽度和字体大小计算文本的高度
let size = (text as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
var textHeight : CGFloat = size.height
if textHeight > 40.0 {
textHeight = 40.0
} else if textHeight < 16 {
textHeight = 16
}
self.textH = textHeight
let imageSize = CGSizeMake(CGFloat(self.img_width), CGFloat(self.img_height))
var imageHeight = 0.0
if imageSize.width == 0 {
imageHeight = width
} else {
imageHeight = width * imageSize.height/imageSize.width
if imageHeight > 280 {
imageHeight = 280
}
}
let totalHeight = imageHeight + textHeight + 30 + 16
self.img_width_use = width
self.img_height_use = imageHeight
self.img_width_cell = width
self.img_height_cell = totalHeight
}
}
//
// YHWebModel.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWebModel: YHBaseModel {
var like_count: Int = 0
var id: Int = 0
var is_like: Bool = false
var view_count: Int = 0
var is_collect: Bool = false
var collect_count: Int = 0
}
//
// YHBbxCollectionViewCell.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHBbxCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHBbxCollectionViewCell"
static let bbxCellHeight = 64
static let bbxCellWidth = 80
lazy var titleImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_bbx_icon"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var descripeLable:UILabel = {
let label = UILabel()
label.textColor = UIColor(red: 0.315, green: 0.315, blue: 0.315, alpha: 1)
label.font = UIFont.PFSC_R(ofSize: 12)
label.textAlignment = .center
label.text = "证件办理"
// label.backgroundColor = .blue
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private func setupUI() {
contentView.addSubview(titleImageView)
titleImageView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.height.width.equalTo(44)
make.centerX.equalToSuperview()
}
contentView.addSubview(descripeLable)
descripeLable.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom).offset(4)
make.centerX.equalToSuperview()
make.height.equalTo(16)
make.left.right.equalToSuperview()
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell0: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell0"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var headImage: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleAspectFill
imagV.image = UIImage(named: "home_cell0_head_icon")
return imagV
}()
lazy var contentImage: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleAspectFill
imagV.image = UIImage(named: "home_cell0_content_icon")
return imagV
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(headImage)
contentView.addSubview(contentImage)
contentImage.snp.makeConstraints { make in
make.top.equalToSuperview().offset(12)
make.right.equalToSuperview().offset(-16)
make.width.equalTo(242)
make.height.equalTo(97)
}
headImage.snp.makeConstraints { make in
make.right.equalTo(contentImage.snp.left)
make.width.equalTo(88)
make.height.equalTo(122)
make.bottom.equalToSuperview()
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell1: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell1"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var bigImageView: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleToFill
imagV.image = UIImage(named: "home_cell1_bkg")
return imagV
}()
lazy var subContentView : UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x999999, alpha: 1.0)
view.layer.cornerRadius = kCornerRadius6
return view
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(182)
}
subContentView.addSubview(bigImageView)
bigImageView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(182)
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell2: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell2"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var bigImageView: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleToFill
imagV.image = UIImage(named: "home_cell1_bkg")
return imagV
}()
lazy var subContentView : UIView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x999999, alpha: 1.0)
view.layer.cornerRadius = kCornerRadius6
view.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor
view.layer.cornerRadius = 10
view.layer.borderWidth = 0.5
view.layer.borderColor = UIColor(red: 0.862, green: 0.862, blue: 0.862, alpha: 1).cgColor
return view
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(16)
make.right.equalTo(-16)
make.height.equalTo(99)
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell3: UITableViewCell {
static let cellReuseIdentifier = "YHDavidCell3"
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var bigImageView: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleToFill
imagV.image = UIImage(named: "home_cell1_bkg")
return imagV
}()
lazy var subContentView : UIView = {
let view = UIView()
view.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor
return view
}()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(138)
}
let bbxLable = UILabel()
bbxLable.text = "银河推荐官"
bbxLable.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
bbxLable.font = UIFont.PFSC_R(ofSize: 18)
subContentView.addSubview(bbxLable)
bbxLable.snp.makeConstraints { make in
make.top.equalTo(13)
make.left.equalTo(25)
}
let desLable = UILabel()
desLable.text = "邀请拉新,合作共赢"
desLable.frame = CGRect(x: 0, y: 0, width: 141.5, height: 11.5)
desLable.textColor = UIColor(red: 0.592, green: 0.592, blue: 0.592, alpha: 1)
desLable.font = UIFont.PFSC_R(ofSize: 10)
subContentView.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.left.equalTo(bbxLable.snp.right).offset(11)
make.centerY.equalTo(bbxLable)
}
}
}
//
// YHDavidCell0.swift
// galaxy
//
// Created by davidhuangA on 2024/1/17.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHDavidCell5: UITableViewCell {
static let cellHeight : CGFloat = 219
static let cellReuseIdentifier = "YHDavidCell5"
let items : [Int32] = [1,2,3,4,5,6,7,8]
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var subContentView : UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
var myCollectView : UICollectionView!
// lazy var myCollectView = {
// // 设置布局方向
//
//
//
// return collectinoView
// }()
func setupUI() {
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
let bbxLable = UILabel()
bbxLable.text = "百宝箱"
bbxLable.textColor = UIColor(red: 0.2, green: 0.2, blue: 0.2, alpha: 1)
bbxLable.font = UIFont.PFSC_R(ofSize: 18)
subContentView.addSubview(bbxLable)
bbxLable.snp.makeConstraints { make in
make.top.equalTo(13)
make.left.equalTo(25)
}
let desLable = UILabel()
desLable.text = "香港本地宝,智慧小助手"
desLable.frame = CGRect(x: 0, y: 0, width: 141.5, height: 11.5)
desLable.textColor = UIColor(red: 0.592, green: 0.592, blue: 0.592, alpha: 1)
desLable.font = UIFont.PFSC_R(ofSize: 10)
subContentView.addSubview(desLable)
desLable.snp.makeConstraints { make in
make.left.equalTo(bbxLable.snp.right).offset(11)
make.centerY.equalTo(bbxLable)
}
// subContentView.backgroundColor = UIColor(hex: 0x999999)
let flowLayout = UICollectionViewFlowLayout()
let margin = 16.0
let gap = 20.0
let itemWidth = 80.0
flowLayout.itemSize = CGSize(width: itemWidth, height: 64)
flowLayout.minimumInteritemSpacing = (KScreenWidth - 2 * 16 - 2*16 - 4 * itemWidth)/4
flowLayout.minimumLineSpacing = 15.0
flowLayout.scrollDirection = .vertical
let collectinoView = YHGestureCollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.contentInset = UIEdgeInsets(top: 0, left: margin, bottom: 20, right: margin)
collectinoView.backgroundColor = .white
collectinoView.register(YHBbxCollectionViewCell.self, forCellWithReuseIdentifier:YHBbxCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
myCollectView = collectinoView
myCollectView.isScrollEnabled = false
subContentView.addSubview(myCollectView)
myCollectView.snp.makeConstraints { make in
make.top.equalTo(bbxLable.snp.bottom).offset(15)
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.bottom.equalToSuperview().offset(-20)
}
}
}
extension YHDavidCell5: UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHBbxCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHBbxCollectionViewCell
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
}
//
// YHDavidTestCollectionViewCell.swift
// galaxy
//
// Created by davidhuangA on 2024/1/10.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
class YHDavidTestCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHDavidTestCollectionViewCell"
lazy var titleImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_title_image"))
imageV.contentMode = .scaleAspectFill
imageV.roundCorners(UIRectCorner.topLeft, radius: 8)
imageV.roundCorners(UIRectCorner.topRight, radius: 8)
return imageV
}()
lazy var descripeLable:UILabel = {
let label = UILabel()
label.text = "赴港攻略,当日往返无忧,这个季节风景..赴港攻略,当日往返无忧,这个季节风景"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
label.numberOfLines = 2
label.lineBreakMode = .byTruncatingTail
return label
}()
lazy var headImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_person_icon"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var nameLable:UILabel = {
let label = UILabel()
label.text = "Fiona"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var dateLable:UILabel = {
let label = UILabel()
label.text = "12-12"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 10)
return label
}()
lazy var heartImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_red_heart"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var numLable:UILabel = {
let label = UILabel()
label.text = "2000"
label.textColor = UIColor(hexString:"#333333")
label.font = UIFont.systemFont(ofSize: 14)
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private func setupUI() {
contentView.backgroundColor = UIColor(hexString: "#F8F9FB")
contentView.roundCorners([.topLeft,.topRight], radius: 4)
contentView.clipsToBounds = true
contentView.addSubview(titleImageView)
titleImageView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(210)
}
let subHoldView = UIView()
subHoldView.layer.backgroundColor = UIColor(red: 1, green: 1, blue: 1, alpha: 1).cgColor
subHoldView.layer.borderWidth = 0.5
subHoldView.layer.borderColor = UIColor(red: 0.798, green: 0.798, blue: 0.798, alpha: 1).cgColor
contentView.addSubview(subHoldView)
subHoldView.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom).offset(4)
make.left.right.equalToSuperview()
make.height.equalTo(87)
}
subHoldView.addSubview(descripeLable)
descripeLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(8)
make.left.equalToSuperview().offset(8)
make.right.equalToSuperview().offset(-8)
make.height.equalTo(30)
}
subHoldView.addSubview(headImageView)
headImageView.snp.makeConstraints { make in
make.top.equalTo(descripeLable.snp.bottom).offset(10)
make.left.equalTo(descripeLable.snp.left)
make.height.width.equalTo(25)
}
subHoldView.addSubview(nameLable)
nameLable.snp.makeConstraints { make in
make.top.equalTo(headImageView.snp.top)
make.left.equalTo(headImageView.snp.right).offset(5)
make.height.equalTo(12)
make.width.equalTo(50)
}
subHoldView.addSubview(dateLable)
dateLable.snp.makeConstraints { make in
make.top.equalTo(nameLable.snp.bottom).offset(2)
make.left.equalTo(nameLable.snp.left)
make.height.equalTo(12)
make.right.equalTo(nameLable.snp.right)
}
subHoldView.addSubview(numLable)
numLable.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-8)
make.height.equalTo(12)
make.centerY.equalTo(headImageView.snp.centerY)
}
subHoldView.addSubview(heartImageView)
heartImageView.snp.makeConstraints { make in
make.right.equalTo(numLable.snp.left).offset(-6)
make.height.width.equalTo(12)
make.centerY.equalTo(headImageView.snp.centerY)
}
}
}
...@@ -18,11 +18,6 @@ extension YHGestureTableView: UIGestureRecognizerDelegate { ...@@ -18,11 +18,6 @@ extension YHGestureTableView: UIGestureRecognizerDelegate {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true return true
} }
// open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// return true
// }
} }
...@@ -38,11 +33,6 @@ extension YHGestureScrollView: UIGestureRecognizerDelegate { ...@@ -38,11 +33,6 @@ extension YHGestureScrollView: UIGestureRecognizerDelegate {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true return true
} }
// open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// return true
// }
} }
...@@ -57,9 +47,4 @@ extension YHGestureCollectionView: UIGestureRecognizerDelegate { ...@@ -57,9 +47,4 @@ extension YHGestureCollectionView: UIGestureRecognizerDelegate {
public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool { public func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -> Bool {
return true return true
} }
// open override func gestureRecognizerShouldBegin(_ gestureRecognizer: UIGestureRecognizer) -> Bool {
// return true
// }
} }
//
// YHHkLifeAndIdItemView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum HkLifeItemType : Int {
case unknow = -1 //未知
case hkID = 0 //香港身份
case hklife = 1 //香港生活
}
class YHHkLifeAndIdItemView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var bkgImagV: UIImageView = {
let imageV = UIImageView()
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var iconV: UIImageView = {
let imageV = UIImageView()
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var titleLable : UILabel = {
let label = UILabel()
label.text = "香港身份"
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_M(ofSize: 17)
label.lineBreakMode = .byTruncatingMiddle
return label
}()
lazy var subtitleLable:UILabel = {
let label = UILabel()
label.text = "去香港"
label.textColor = UIColor(hex: 0x94A3B8, alpha: 1.0)
label.font = UIFont.PFSC_R(ofSize: 11)
label.lineBreakMode = .byTruncatingMiddle
return label
}()
var itemType : HkLifeItemType = .unknow {
didSet {
updateUI()
}
}
}
private extension YHHkLifeAndIdItemView {
func initView() {
addSubview(bkgImagV)
bkgImagV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
addSubview(iconV)
iconV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(kMargin)
make.width.height.equalTo(34)
}
addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalTo(iconV.snp.top).offset(-3)
make.left.equalTo(iconV.snp.right).offset(kMargin)
make.height.equalTo(24)
make.right.equalTo(-10)
}
addSubview(subtitleLable)
subtitleLable.snp.makeConstraints { make in
make.top.equalTo(titleLable.snp.bottom).offset(2)
make.left.equalTo(titleLable.snp.left)
make.height.equalTo(16)
make.right.equalTo(titleLable.snp.right)
}
let tap = UITapGestureRecognizer(target: self, action: #selector(tapView(gestureRecognizer:)))
addGestureRecognizer(tap)
}
func updateUI() {
if itemType == .hkID {
bkgImagV.image = UIImage(named: "hklife_bkg_0")
iconV.image = UIImage(named: "hklife_icon_0")
titleLable.text = "香港身份"
subtitleLable.text = "去香港"
} else if itemType == .hklife {
bkgImagV.image = UIImage(named: "hklife_bkg_1")
iconV.image = UIImage(named: "hklife_icon_1")
titleLable.text = "香港生活"
subtitleLable.text = "在香港"
} else {
printLog("errorr:未处理")
}
}
@objc func tapView(gestureRecognizer:UITapGestureRecognizer) {
if itemType == .hkID {
//香港身份
if let vc = UIApplication.shared.keyWindow?.rootViewController as? YHTabBarViewController {
vc.selectedIndex = 1
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
if let vcs = vc.viewControllers,vcs.count > 1 {
if let nvc = vcs[1] as? YHNavigationController,let vvc = nvc.topViewController as? YHServiceViewController {
vvc.jumpToItemIndex(itemIndex: 0)
}
}
}
}
} else if itemType == .hklife {
//香港生活
if let vc = UIApplication.shared.keyWindow?.rootViewController as? YHTabBarViewController {
vc.selectedIndex = 1
DispatchQueue.main.asyncAfter(deadline: .now() + 0.25) {
if let vcs = vc.viewControllers,vcs.count > 1 {
if let nvc = vcs[1] as? YHNavigationController,let vvc = nvc.topViewController as? YHServiceViewController {
vvc.jumpToItemIndex(itemIndex: 1)
}
}
}
}
} else {
printLog("errorr:未处理")
}
}
}
//
// YHHkLifeAndIdView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
/*
香港身份 香港生活
*/
class YHHkLifeAndIdView: UIView {
static let viewH : CGFloat = 74.0
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
private extension YHHkLifeAndIdView {
func initView() {
let itemW : CGFloat = (KScreenWidth - 20 * 2 - 12) / 2.0
let item0 = YHHkLifeAndIdItemView()
item0.itemType = .hkID
addSubview(item0)
item0.snp.makeConstraints { make in
make.top.left.equalToSuperview()
make.height.equalTo(YHHkLifeAndIdView.viewH)
make.width.equalTo(itemW)
}
let item1 = YHHkLifeAndIdItemView()
item1.itemType = .hklife
addSubview(item1)
item1.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(item0.snp.right).offset(12)
make.height.equalTo(YHHkLifeAndIdView.viewH)
make.width.equalTo(itemW)
}
}
}
//
// YHHomeBannerCollectionViewCell.swift
// galaxy
//
// Created by davidhuangA on 2024/4/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import FSPagerView
class YHHomeBannerCollectionViewCell: FSPagerViewCell {
override init(frame: CGRect) {
super.init(frame: frame)
textLabel?.text = ""
textLabel?.isHidden = true
imageView?.isHidden = true
initView()
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var bannerImagV: UIImageView = {
let imagV : UIImageView = UIImageView()
imagV.contentMode = .scaleAspectFill
imagV.clipsToBounds = true
return imagV
}()
lazy var bannerTitleLable: UILabel = {
let lable = UILabel()
lable.font = UIFont.PFSC_R(ofSize: 16)
lable.textColor = UIColor.white
return lable
}()
lazy var effectV : UIVisualEffectView = {
let effect = UIBlurEffect(style: .light)
let effectV = UIVisualEffectView.init(effect: effect)
return effectV
}()
var dataModel : YHBannerModel? {
didSet {
updateUI()
}
}
}
private extension YHHomeBannerCollectionViewCell {
func initView() {
contentView.addSubview(bannerImagV)
bannerImagV.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
contentView.addSubview(effectV)
effectV.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(77)
}
contentView.addSubview(bannerTitleLable)
bannerTitleLable.snp.makeConstraints { make in
make.right.equalTo(-20)
make.bottom.equalTo(-35)
make.left.equalTo(20)
make.height.equalTo(22)
}
}
func updateUI() {
guard let model = dataModel else { return }
if let url = URL(string: model.img_url) {
bannerImagV.kf.setImage(with: url)
}
bannerTitleLable.text = model.name
}
}
//
// YHHomeBannerIndicatorView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeBannerIndicatorView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var indicatorItems : Int = 0 {
didSet {
createUI()
}
}
var curIndicatorIndex : Int = 0 {
didSet {
updateUI()
}
}
private var arrViews : [UIView] = []
private var normalColor : UIColor = UIColor(hex: 0xffffff, alpha: 0.3)
private var selectedColor : UIColor = UIColor(hex: 0xffffff)
lazy var subHoldView: UIView = {
let view = UIView()
return view
}()
}
extension YHHomeBannerIndicatorView {
func initView() {
addSubview(subHoldView)
subHoldView.snp.makeConstraints { make in
make.centerX.centerY.equalToSuperview()
make.top.bottom.equalToSuperview()
}
}
func createUI() {
arrViews.removeAll()
subHoldView.removeSubviews()
if indicatorItems == 1 {
let view = UIView()
view.backgroundColor = normalColor
subHoldView.addSubview(view)
view.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.bottom.equalToSuperview()
make.width.equalTo(16)
}
} else {
var tagView : UIView?
for i in 0..<indicatorItems {
let view = UIView()
view.backgroundColor = normalColor
subHoldView.addSubview(view)
if i == 0 {
view.snp.makeConstraints { make in
make.left.equalToSuperview()
make.top.bottom.equalToSuperview()
make.width.equalTo(16)
}
view.backgroundColor = selectedColor
} else if i == indicatorItems - 1 {
view.snp.makeConstraints { make in
make.left.equalTo(tagView!.snp.right).offset(3)
make.right.equalToSuperview()
make.top.bottom.equalToSuperview()
make.width.equalTo(16)
}
} else {
view.snp.makeConstraints { make in
make.left.equalTo(tagView!.snp.right).offset(3)
make.top.bottom.equalToSuperview()
make.width.equalTo(16)
}
}
tagView = view
arrViews.append(view)
}
}
}
func updateUI() {
if curIndicatorIndex < indicatorItems {
for (index,item) in arrViews.enumerated() {
if index == curIndicatorIndex {
item.backgroundColor = selectedColor
} else {
item.backgroundColor = normalColor
}
}
}
}
}
...@@ -9,18 +9,15 @@ ...@@ -9,18 +9,15 @@
import Foundation import Foundation
import FSPagerView import FSPagerView
import Kingfisher import Kingfisher
//import SwifterSwift
class YHHomeBannerView: UIView { class YHHomeBannerView: UIView {
static let viewH : CGFloat = KScreenWidth - 20.0 * 2
// MARK: - constant 常量 var dataArr: [YHBannerModel] = [] {
// 位置、大小、图片、文本 didSet {
self.indicatorView.indicatorItems = self.dataArr.count
fileprivate var dataArr: [YHBannerModel] = [YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel()] bannerView.reloadData()
}
}
// MARK: - life cycle 生命周期
//工程的viewDidLoad、viewWillAppear、init、didReceiveMemoryWarning等方法都放在这里
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
...@@ -31,82 +28,62 @@ class YHHomeBannerView: UIView { ...@@ -31,82 +28,62 @@ class YHHomeBannerView: UIView {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
private lazy var bannerView: FSPagerView = {
let view = FSPagerView()
view.delegate = self
view.dataSource = self
view.automaticSlidingInterval = 4
view.register(YHHomeBannerCollectionViewCell.self, forCellWithReuseIdentifier: "cell")
view.itemSize = CGSizeMake(YHHomeBannerView.viewH, YHHomeBannerView.viewH)//FSPagerView.automaticSize
return view
}()
// MARK: - view layout 子视图的布局 lazy var indicatorView : YHHomeBannerIndicatorView = {
//界面布局 let view = YHHomeBannerIndicatorView()
return view
}()
}
private extension YHHomeBannerView {
func initView() { func initView() {
addSubview(bannerView) addSubview(bannerView)
bannerView.snp.makeConstraints { make in bannerView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10) make.top.equalToSuperview()
make.bottom.equalToSuperview() make.left.equalToSuperview()
make.left.equalToSuperview().offset(16) make.right.equalToSuperview()
make.right.equalToSuperview().offset(-16) make.height.equalTo(YHHomeBannerView.viewH)
} }
bannerView.addSubview(pageControl) bannerView.addSubview(indicatorView)
pageControl.snp.makeConstraints { make in indicatorView.snp.makeConstraints { make in
make.left.bottom.right.equalToSuperview() make.left.right.equalToSuperview()
make.height.equalTo(25) make.height.equalTo(2)
make.bottom.equalTo(-14)
} }
setupPageControl()
bannerView.reloadData() bannerView.reloadData()
} }
func setupPageControl() { func goAppTab(tabBarName : String) {
self.pageControl.numberOfPages = self.dataArr.count if !tabBarName.isEmpty {
self.pageControl.contentHorizontalAlignment = .center if tabBarName.contains("tabBarHome",caseSensitive: false) {
self.pageControl.contentInsets = UIEdgeInsets(top: 0, left: 12, bottom: 10, right: 12) //首页
goTabBarBy(tabType: .home)
} else if tabBarName.contains("tabBarService",caseSensitive: false) {
let normalImage = UIImage(color: UIColor(hex: 0xff0000, alpha: 1.0), size: CGSize(width: 5, height: 5))//UIImage(color: UIColor(white: 1, alpha: 0.5), size: CGSize(width: 5, height: 5)) //服务中心
let selectImage = UIImage(color: .white, size: CGSize(width: 8, height: 5)) goTabBarBy(tabType: .service)
self.pageControl.setImage(normalImage, for: .normal) } else if tabBarName.contains("tabBarMsg",caseSensitive: false) {
self.pageControl.setImage(selectImage, for: .selected) //消息
goTabBarBy(tabType: .message)
self.pageControl.interitemSpacing = 3 } else if tabBarName.contains("tabBarMine",caseSensitive: false) {
//我的
goTabBarBy(tabType: .mine)
} else {
}
}
} }
// public func refreshUI(_ arr: [YHBannerModel]) {
//
// let model : YHBannerModel = YHBannerModel()
// model.img_url = "https://upload-cdn.galaxy-immi.com/sell/test/1668772072522.jpg"
//
// model.link_type = 0
// model.title = "我是测试数据"
//
// let arr = [model,model,model,model,model]
//
// self.dataArr = arr
// setupPageControl()
// bannerView.reloadData()
// }
private lazy var bannerView: FSPagerView = {
let view = FSPagerView()
view.delegate = self
view.dataSource = self
view.automaticSlidingInterval = 3
view.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
view.itemSize = FSPagerView.automaticSize
view.interitemSpacing = 10
return view
}()
lazy var pageControl: FSPageControl = {
let view = FSPageControl()
return view
}()
} }
// MARK: - delegate 具体到某个delegate,比如UITableViewDelegate
//代理或者数据源
// MARK: - FSPagerViewDelegate
extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate { extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
public func numberOfItems(in pagerView: FSPagerView) -> Int { public func numberOfItems(in pagerView: FSPagerView) -> Int {
...@@ -114,28 +91,14 @@ extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate { ...@@ -114,28 +91,14 @@ extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
} }
public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell { public func pagerView(_ pagerView: FSPagerView, cellForItemAt index: Int) -> FSPagerViewCell {
let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index) let cell = pagerView.dequeueReusableCell(withReuseIdentifier: "cell", at: index) as! YHHomeBannerCollectionViewCell
let image = UIImage(named: "default_placeholder_image")?.bs_scaled(toWidth: UIDevice.kScreenW - 16*2, opaque: false)
cell.imageView?.image = image
if index < dataArr.count { if index < dataArr.count {
let model = dataArr[index] cell.dataModel = dataArr[index]
if let url = URL(string: model.img_url) {
cell.imageView?.kf.setImage(with: url)
}
cell.textLabel?.text = model.title
} }
cell.imageView?.contentMode = .scaleAspectFill
cell.backgroundColor = .contentBkgColor
cell.contentView.layer.shadowColor = UIColor.clear.cgColor
return cell return cell
} }
// MARK: - FSPagerView Delegate // MARK: - FSPagerView Delegate
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) { func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
pagerView.deselectItem(at: index, animated: true) pagerView.deselectItem(at: index, animated: true)
pagerView.scrollToItem(at: index, animated: true) pagerView.scrollToItem(at: index, animated: true)
...@@ -143,27 +106,34 @@ extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate { ...@@ -143,27 +106,34 @@ extension YHHomeBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
return return
} }
let model = dataArr[index] let model = dataArr[index]
switch model.link_type { if model.skip_url.isEmpty == false {
case 10: //跳转H5 switch model.skip_type {
// let vc = BsWebViewController() case 1: //跳转H5
// vc.urlString = model.link_url let vc = YHHomeWebViewController()
// UIViewController.navTopViewController?.navigationController?.pushViewController(vc, animated: true) vc.url = model.skip_url
break self.parentViewController?.navigationController?.pushViewController(vc)
case 20: //跳转原生页面 case 2: //跳转APP内Tab
if let vc = UIViewController.classFromString(model.link_url) { goAppTab(tabBarName:model.skip_url)
UIViewController.navTopViewController?.navigationController?.pushViewController(vc, animated: true) case 3://3-跳转资讯页
let vc = YHHomeWebViewController()
vc.url = model.skip_url
self.parentViewController?.navigationController?.pushViewController(vc)
case 0://0 不需要跳转
printLog("0 不需要跳转")
default:
YHHUD.flash(message: "不需要处理的类型")
break
} }
break } else {
default: YHHUD.flash(message: "error:skip_url不能为空")
break
} }
} }
func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int) { func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int) {
self.pageControl.currentPage = targetIndex self.indicatorView.curIndicatorIndex = targetIndex
} }
func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView) { func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView) {
self.pageControl.currentPage = pagerView.currentIndex self.indicatorView.curIndicatorIndex = pagerView.currentIndex
} }
} }
//
// YHHomeCustomCell.swift
// galaxy
//
// Created by davidhuangA on 2024/1/10.
// Copyright © 2024 www.davidhuang.com. All rights reserved.
//
import UIKit
class YHHomeCustomCell: UITableViewCell {
static let cellReuseIdentifier = "YHHomeCustomCell"
lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"),
AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求"),
AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持"),
AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上")]
}()
var dataArray: [String] = [] // 假定我们的数据结构就是一个String数组
var collectionView: UICollectionView!
var collectionContainer: UIView!
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
// 设置布局方向
let flowLayout = UICollectionViewFlowLayout()
let margin = 18.0
let gap = 12.0
let itemWidth = floor((KScreenWidth-2*margin-gap)/2.0)
flowLayout.itemSize = CGSize(width: itemWidth, height: itemWidth)
flowLayout.minimumInteritemSpacing = 12.0
flowLayout.minimumLineSpacing = 12.0
flowLayout.scrollDirection = .vertical
collectionView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectionView.contentInset = UIEdgeInsets(top: 0, left: margin, bottom: 0, right: margin)
collectionView.backgroundColor = UIColor.white
collectionView.register(YHAboutUsAdvantageCell.self, forCellWithReuseIdentifier:YHAboutUsAdvantageCell.cellReuseIdentifier)
collectionView.delegate = self
collectionContainer = UIView(frame: .zero)
contentView.addSubview(collectionContainer)
collectionContainer.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(0)
}
collectionContainer.addSubview(collectionView)
collectionView.snp.makeConstraints({ make in
make.edges.equalToSuperview()
})
// collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: "test")
// collectionView.delegate = self // 这里根据具体业务写吧,demo中我就把代理直接设置成cell了..
// collectionView.dataSource = self // 根据业务,demo直接先cell持有数据来控制collectionView的显示了..
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
// 外部调用,用来设置collectionView的数据源
func setData(_ data: [String]) {
self.dataArray = data
collectionView.reloadData()
// 这里需要 layoutIfNeeded 一下,否则我们不能同步拿到contentSize
// 注意,如果上面collectionContainer的布局没有指明宽度,这个时候cell的宽度是estimate状态,所以下面就算layout也拿不到正确的contentSize
collectionView.layoutIfNeeded()
let height = collectionView.contentSize.height
printLog(height)
collectionContainer.snp.updateConstraints { make in
make.height.equalTo(height)
}
}
}
extension YHHomeCustomCell: UICollectionViewDelegateFlowLayout, UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHAboutUsAdvantageCell.cellReuseIdentifier, for: indexPath) as! YHAboutUsAdvantageCell
cell.advantateItem = items[indexPath.row]
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
}
//
// YHHomeHeadView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeHeadView: UIView {
static let viewH : CGFloat = (20 + YHHomeBannerView.viewH) + (20 + YHHkLifeAndIdView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + 31 + 31
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//1.bannner
lazy var homeBannerView : YHHomeBannerView = {
let view = YHHomeBannerView()
return view
}()
//2.香港身份 香港生活
lazy var homeHkLife : YHHkLifeAndIdView = {
let view = YHHkLifeAndIdView()
return view
}()
//3. 四大金刚区
lazy var homeKingKongBlock : YHHomeKingKongBlockView = {
let view = YHHomeKingKongBlockView()
return view
}()
}
private extension YHHomeHeadView {
func initView() {
backgroundColor = .clear
addSubview(homeBannerView)
homeBannerView.snp.makeConstraints { make in
make.top.equalTo(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHHomeBannerView.viewH)
}
addSubview(homeHkLife)
homeHkLife.snp.makeConstraints { make in
make.top.equalTo(homeBannerView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHHkLifeAndIdView.viewH)
}
addSubview(homeKingKongBlock)
homeKingKongBlock.snp.makeConstraints { make in
make.top.equalTo(homeHkLife.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHHomeKingKongBlockView.viewH)
}
let line = UIView()
line.backgroundColor = UIColor(hex: 0xF0F3F7, alpha: 1.0)
addSubview(line)
line.snp.makeConstraints { make in
make.top.equalTo(homeKingKongBlock.snp.bottom).offset(31)
make.left.right.equalToSuperview()
make.height.equalTo(1)
}
}
}
//
// YHHomeKingKongBlockItem.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeKingKongBlockItem: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var iconV: UIImageView = {
let imageV = UIImageView()
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var subtitleLable:UILabel = {
let label = UILabel()
label.text = "去香港"
label.textColor = UIColor(hex: 0x94A3B8, alpha: 1.0)
label.font = UIFont.PFSC_M(ofSize: 12)
label.lineBreakMode = .byTruncatingMiddle
label.textAlignment = .center
return label
}()
var dataModel : YHHomeKingKongBlockModel? {
didSet {
updateUI()
}
}
}
private extension YHHomeKingKongBlockItem {
func initView() {
backgroundColor = UIColor(hex: 0xF8FAFB, alpha: 1.0)
addSubview(iconV)
iconV.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.width.height.equalTo(31)
make.top.equalTo(10)
}
addSubview(subtitleLable)
subtitleLable.snp.makeConstraints { make in
make.centerX.equalToSuperview()
make.left.equalTo(4)
make.right.equalTo(-4)
make.height.equalTo(18)
make.bottom.equalTo(-8)
}
}
func updateUI() {
guard let dataModel = dataModel else { return }
iconV.image = UIImage(named: dataModel.iconName)
subtitleLable.text = dataModel.title
}
}
//
// YHHomeKingKongBlockView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeKingKongBlockView: UIView {
static let viewH : CGFloat = (KScreenWidth - 20 * 2 - 16 * 3) / 4.0
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var arrData : [YHHomeKingKongBlockModel] = [
YHHomeKingKongBlockModel(type: "3", iconName: "kingkong_sffl", title: "身份福利"),
YHHomeKingKongBlockModel(type: "4", iconName: "kingkong_blgl", title: "办理攻略"),
YHHomeKingKongBlockModel(type: "5", iconName: "kingkong_khxs", title: "客户心声"),
YHHomeKingKongBlockModel(type: "6", iconName: "kingkong_xgbs", title: "香港办事"),
]
}
private extension YHHomeKingKongBlockView {
func initView() {
let gap : CGFloat = 16.0
var offsetX : CGFloat = 0.0
for (index,item) in arrData.enumerated() {
let view = YHHomeKingKongBlockItem()
view.dataModel = item
addSubview(view)
view.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(offsetX)
make.width.height.equalTo(YHHomeKingKongBlockView.viewH)
}
offsetX = offsetX + YHHomeKingKongBlockView.viewH + gap
view.tag = index
let tap = UITapGestureRecognizer(target: self, action: #selector(tapView(gestureRecognizer:)))
view.addGestureRecognizer(tap)
}
}
@objc func tapView(gestureRecognizer:UITapGestureRecognizer) {
if let tag = gestureRecognizer.view?.tag {
switch tag {
case 0:
let vc = YHFourKingViewController()
vc.id = 3
UIViewController.current?.navigationController?.pushViewController(vc)
printLog("跳转 身份福利")
case 1:
let vc = YHFourKingViewController()
vc.id = 4
UIViewController.current?.navigationController?.pushViewController(vc)
printLog("跳转 办理攻略")
case 2:
let vc = YHFourKingViewController()
vc.id = 5
UIViewController.current?.navigationController?.pushViewController(vc)
printLog("跳转 客户心声")
case 3:
let vc = YHHKEventViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
printLog("跳转 香港办事")
default:
break
}
}
}
}
//
// YHHomeSearchView.swift
// galaxy
//
// Created by davidhuangA on 2024/4/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeSearchView: UIView {
static let viewH : CGFloat = 36.0
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
private extension YHHomeSearchView {
func initView() {
backgroundColor = UIColor(hex: 0xF4F6FA, alpha: 1.0)
let imageV : UIImageView = UIImageView()
imageV.contentMode = .scaleAspectFill
imageV.image = UIImage(named: "home_search_icon")
addSubview(imageV)
imageV.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(12)
make.width.height.equalTo(16)
}
let lable = UILabel()
lable.text = "大家正在搜香港身份"
lable.font = UIFont.PFSC_R(ofSize: 12)
lable.textColor = UIColor(hex: 0x94A3B8, alpha: 1.0)
addSubview(lable)
lable.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(imageV.snp.right).offset(8)
make.height.equalTo(18)
make.right.equalToSuperview().offset(-12)
}
}
}
...@@ -12,23 +12,26 @@ class YHHomeWebBottomView: UIView { ...@@ -12,23 +12,26 @@ class YHHomeWebBottomView: UIView {
typealias Block = (Bool) -> () typealias Block = (Bool) -> ()
var likeBlock: Block? var likeBlock: Block?
var starBlock: Block? var starBlock: Block?
private var likeButton: YHHomeWebBottomButton! var likeButton: YHHomeWebBottomButton!
private var starButton: YHHomeWebBottomButton! var starButton: YHHomeWebBottomButton!
var likeCount: Int = 0
var starCount: Int = 0
var isStar: Bool = false { var isStar: Bool = false {
didSet { didSet {
if isStar { if isStar {
starButton.setContent("home_web_stared", "34") starButton.setContent("home_web_stared", "\(starCount)")
} else { } else {
starButton.setContent("home_web_star", "34") starButton.setContent("home_web_star", "\(starCount)")
} }
} }
}//是否收藏 }//是否收藏
var isLike: Bool = false { var isLike: Bool = false {
didSet { didSet {
if isLike { if isLike {
likeButton.setContent("home_web_liked", "34") likeButton.setContent("home_web_liked", "\(likeCount)")
} else { } else {
likeButton.setContent("home_web_like", "34") likeButton.setContent("home_web_like", "\(likeCount)")
} }
} }
}//是否点赞 }//是否点赞
......
//
// BsPageContentView.swift
// GDKit
//
// Created by GDKit on 01/11/2022.
// Copyright (c) 2022 GDKit. All rights reserved.
//
import UIKit
@objc public protocol YHPageContentViewDelegate : AnyObject {
func pageContentView(_ contentView : YHPageContentView, progress : CGFloat, sourceIndex : Int, targetIndex : Int)
}
private let ContentCellID = "BsContentCellID"
open class YHPageContentView: UIView {
// MARK: - 定义属性
fileprivate var childVcs : [UIViewController]
fileprivate weak var parentVC : UIViewController?
fileprivate var startOffsetX : CGFloat = 0
fileprivate var isForbidScrollDelegate : Bool = false
@objc public weak var delegate : YHPageContentViewDelegate?
public var isScrollEnabled: Bool? {
didSet {
if let isScrollEnabled = isScrollEnabled {
collectionView.isScrollEnabled = isScrollEnabled
}
}
}
@objc public func banScrollEnabled() {
// collectionView.isScrollEnabled = false
collectionView.isScrollEnabled = true
}
fileprivate func getLayout() -> UICollectionViewFlowLayout {
let layout = UICollectionViewFlowLayout()
layout.itemSize = self.bounds.size
layout.minimumLineSpacing = 0
layout.minimumInteritemSpacing = 0
layout.scrollDirection = .horizontal
return layout
}
// MARK: - 懒加载属性
fileprivate lazy var collectionView : UICollectionView = {[weak self] in
// 1.创建layout
let layout = self?.getLayout() ?? UICollectionViewFlowLayout()
// 2.创建UICollectionView
let collectionView = UICollectionView(frame: CGRect.zero, collectionViewLayout: layout)
collectionView.backgroundColor = .clear//groupTableViewBackground
collectionView.showsHorizontalScrollIndicator = false
collectionView.isPagingEnabled = true
collectionView.bounces = false
collectionView.dataSource = self
collectionView.delegate = self
collectionView.scrollsToTop = false
collectionView.register(UICollectionViewCell.self, forCellWithReuseIdentifier: ContentCellID)
return collectionView
}()
// MARK: - 自定义构造函数
@objc public init(frame: CGRect, childVcs : [UIViewController], parentViewController : UIViewController?) {
self.childVcs = childVcs
self.parentVC = parentViewController
super.init(frame: frame)
// 设置UI
setupUI()
}
public required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
// MARK: - 设置UI界面
extension YHPageContentView {
fileprivate func setupUI() {
// 1.将所有的子控制器添加父控制器中
// for childVc in childVcs {
// parentVC?.addChild(childVc)
// }
// 2.添加UICollectionView,用于在Cell中存放控制器的View
addSubview(collectionView)
collectionView.frame = bounds
}
public func refreshRect() {
collectionView.frame = bounds
collectionView.collectionViewLayout = self.getLayout()
}
}
// MARK: - 遵守UICollectionViewDataSource
extension YHPageContentView : UICollectionViewDataSource {
public func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return childVcs.count
}
public func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
// 1.创建Cell
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: ContentCellID, for: indexPath)
// 2.给Cell设置内容
for view in cell.contentView.subviews {
view.removeFromSuperview()
}
let childVc = childVcs[(indexPath as NSIndexPath).item]
childVc.view.frame = cell.contentView.bounds
cell.contentView.addSubview(childVc.view)
return cell
}
}
// MARK: - 遵守UICollectionViewDelegate
extension YHPageContentView : UICollectionViewDelegate {
public func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
isForbidScrollDelegate = false
startOffsetX = scrollView.contentOffset.x
}
public func scrollViewDidScroll(_ scrollView: UIScrollView) {
// 0.判断是否是点击事件
if isForbidScrollDelegate { return }
// 1.定义获取需要的数据
var progress : CGFloat = 0
var sourceIndex : Int = 0
var targetIndex : Int = 0
// 2.判断是左滑还是右滑
let currentOffsetX = scrollView.contentOffset.x
let scrollViewW = scrollView.bounds.width
if currentOffsetX > startOffsetX { // 左滑
// 1.计算progress
progress = currentOffsetX / scrollViewW - floor(currentOffsetX / scrollViewW)
// 2.计算sourceIndex
sourceIndex = Int(currentOffsetX / scrollViewW)
// 3.计算targetIndex
targetIndex = sourceIndex + 1
if targetIndex >= childVcs.count {
targetIndex = childVcs.count - 1
}
// 4.如果完全划过去
if currentOffsetX - startOffsetX == scrollViewW {
progress = 1
targetIndex = sourceIndex
}
} else { // 右滑
// 1.计算progress
progress = 1 - (currentOffsetX / scrollViewW - floor(currentOffsetX / scrollViewW))
// 2.计算targetIndex
targetIndex = Int(currentOffsetX / scrollViewW)
// 3.计算sourceIndex
sourceIndex = targetIndex + 1
if sourceIndex >= childVcs.count {
sourceIndex = childVcs.count - 1
}
}
// 3.将progress/sourceIndex/targetIndex传递给titleView
delegate?.pageContentView(self, progress: progress, sourceIndex: sourceIndex, targetIndex: targetIndex)
}
}
// MARK: - 对外暴露的方法
extension YHPageContentView {
@objc public func setCurrentIndex(_ currentIndex : Int) {
// 1.记录需要进制执行代理方法
isForbidScrollDelegate = true
// 2.滚动正确的位置
let offsetX = CGFloat(currentIndex) * collectionView.frame.width
collectionView.setContentOffset(CGPoint(x: offsetX, y: 0), animated: false)
}
}
//
// YHSearchInfoBar.swift
// galaxy
//
// Created by edy on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSearchInfoBar: UIView {
static let height = 36.0
static let maxWordsCount = 50
var textChange:((String?)->Void)?
var searchBlock:((String?)->Void)?
var placeHolder:String? {
didSet {
if let placeholder = placeHolder {
textField.attributedPlaceholder = NSAttributedString(string: placeholder, attributes: [NSAttributedString.Key.foregroundColor : UIColor.placeHolderColor])
}
}
}
private lazy var contentView = {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xF4F6FA)
view.clipsToBounds = true
return view
}()
lazy var searchImgView: UIImageView = {
let imgView = UIImageView(image: UIImage(named: "home_search_icon"))
return imgView
}()
lazy var textField:UITextField = {
let textField = UITextField()
textField.backgroundColor = .clear
textField.attributedPlaceholder = NSAttributedString(string: "大家正在搜香港身份".local, attributes: [NSAttributedString.Key.foregroundColor : UIColor(hex: 0x94A3B8)])
textField.font = UIFont.PFSC_M(ofSize: 12)
textField.tintColor = UIColor(hex: 0x3570DC)
textField.textColor = UIColor(hexString: "#121A26")
textField.clearButtonMode = .whileEditing
textField.addTarget(self, action: #selector(textFieldChanged(textField:)), for: .editingChanged)
textField.delegate = self
return textField
}()
lazy var searchBtn: UIButton = {
let btn = UIButton()
btn.setTitle("搜索".local, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_R(ofSize: 12)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor(hexString: "#3570DC")
btn.addTarget(self, action: #selector(searchBtnClicked), for: .touchUpInside)
return btn
}()
override init(frame: CGRect) {
super.init(frame: frame)
self.createUI()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
@objc func searchBtnClicked() {
textField.resignFirstResponder()
if let searchBlock = searchBlock {
searchBlock(textField.text)
}
}
func setSearchButtonEnable(_ enable: Bool) {
searchBtn.isUserInteractionEnabled = enable
searchBtn.alpha = (enable ? 1.0 : 0.5)
}
func createUI() {
self.backgroundColor = .white
setSearchButtonEnable(true)
contentView.addSubview(searchImgView)
contentView.addSubview(textField)
contentView.addSubview(searchBtn)
self.addSubview(contentView)
contentView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
searchImgView.snp.makeConstraints { make in
make.width.height.equalTo(16.0)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(12.0)
}
textField.snp.makeConstraints { make in
make.left.equalTo(searchImgView.snp.right).offset(8)
make.right.equalTo(searchBtn.snp.left).offset(-4)
make.top.bottom.equalToSuperview()
}
searchBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 56, height: Self.height-8.0))
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-4)
}
}
@objc func textFieldChanged(textField:UITextField) {
if let textChange = textChange {
textChange(textField.text)
}
}
}
extension YHSearchInfoBar: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.isEmpty == true { // 点击删除
return true
}
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if newText.count > Self.maxWordsCount {
YHHUD.flash(message: "搜索限制最多\(Self.maxWordsCount)个字符")
return false
}
return true
}
}
//
// YHSearchInfoCell.swift
// galaxy
//
// Created by edy on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import Kingfisher
class YHSearchInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHSearchInfoCell"
var model: YHHomeListModel = YHHomeListModel()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
lazy var headImgView: UIImageView = {
let imagV = UIImageView()
imagV.contentMode = .scaleAspectFill
imagV.clipsToBounds = true
imagV.image = UIImage(named: "home_cell0_head_icon")
return imagV
}()
lazy var videoPlayImgView: UIImageView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "home_play_btn")
imagV.isHidden = true
return imagV
}()
lazy var titleLabel: UILabel = {
var label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textAlignment = .left
label.textColor = UIColor(hex: 0x121A26)
label.numberOfLines = 2
return label
}()
func updateModel(_ model: YHHomeListModel) {
self.model = model
titleLabel.text = model.title
videoPlayImgView.isHidden = (model.type != 1)
if let url = URL(string: model.img_url) {
headImgView.kf.setImage(with: url)
}
}
func setupUI() {
contentView.backgroundColor = .white
contentView.addSubview(headImgView)
headImgView.addSubview(videoPlayImgView)
contentView.addSubview(titleLabel)
headImgView.snp.makeConstraints { make in
make.width.height.equalTo(70.0)
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(20)
}
videoPlayImgView.snp.makeConstraints { make in
make.width.height.equalTo(20.0)
make.center.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(headImgView.snp.right).offset(20)
make.right.equalToSuperview().offset(-20)
}
}
func renderHighLightText(_ text: String) {
var attributedString = NSMutableAttributedString(string:self.model.title, attributes: [
.foregroundColor: UIColor(hex: 0x121A26)
])
if isEmptyString(text) {
self.titleLabel.attributedText = attributedString
return
}
// 设置高亮样式
let highlightAttributes: [NSAttributedString.Key: Any] = [
.foregroundColor: UIColor(hex: 0x3570DC)
]
let ranges = findOccurrencesOfString(text, inString:self.model.title)
for range in ranges {
let changeRange = NSRange(range, in: self.model.title)
attributedString.addAttributes(highlightAttributes, range: changeRange)
}
self.titleLabel.attributedText = attributedString
}
func findOccurrencesOfString(_ searchString: String, inString string: String) -> [Range<String.Index>] {
var occurrences: [Range<String.Index>] = []
var searchStartIndex = string.startIndex
while let range = string.range(of: searchString, options: [], range: searchStartIndex..<string.endIndex) {
occurrences.append(range)
searchStartIndex = range.upperBound
}
return occurrences
}
}
//
// YHSearchInfoHistoryCell.swift
// galaxy
//
// Created by edy on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSearchInfoHistoryCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHSearchInfoHistoryCell"
lazy var titleLabel: UILabel = {
var label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textAlignment = .left
label.textColor = UIColor(hex: 0x121A26)
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private func setupUI() {
contentView.backgroundColor = UIColor(hexString: "#F4F6FA")
contentView.clipsToBounds = true
contentView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalToSuperview().offset(12.0)
make.right.equalToSuperview().offset(-12.0)
}
}
}
//
// YHSearchInfoHistoryView.swift
// galaxy
//
// Created by edy on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSearchInfoHistoryView: UIView {
var historyItems:[String] = []
// var historyItems:[String] = ["几天2345", "阿", "萨法", "阿德"]
var selectBlock:((String)->())?
let interItemSpacing: CGFloat = 12.0 // 相邻单元格之间的水平间距
let gap: CGFloat = 12.0
let cellHeight: CGFloat = 30.0 // 单元格的固定高度
lazy var titleLabel: UILabel = {
var label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hex: 0x94A3B8)
label.text = "历史搜索"
return label
}()
lazy var collectionView: UICollectionView = {
// 创建集合视图布局
let layout = YHSearchItemLayout()
layout.scrollDirection = .vertical
layout.minimumInteritemSpacing = interItemSpacing
// 创建集合视图
let collectView = UICollectionView(frame:.zero, collectionViewLayout: layout)
collectView.delegate = self
collectView.dataSource = self
collectView.backgroundColor = .white
// 注册自定义单元格
collectView.register(YHSearchInfoHistoryCell.self, forCellWithReuseIdentifier: YHSearchInfoHistoryCell.cellReuseIdentifier)
return collectView
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
self.addSubview(titleLabel)
self.addSubview(collectionView)
titleLabel.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.height.equalTo(20.0)
}
collectionView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(15.0)
make.left.right.equalTo(titleLabel)
make.bottom.equalToSuperview()
}
}
func updateDataSource(_ arr:[String]) {
historyItems.removeAll()
historyItems.append(contentsOf: arr)
self.collectionView.reloadData()
titleLabel.isHidden = arr.count <= 0
}
// 计算文字宽度大小
func getwith(font: UIFont, height: CGFloat, string: String) -> CGSize {
let size = CGSize.init(width: CGFloat(MAXFLOAT), height: height)
let dic = [NSAttributedString.Key.font: font] // swift 4.2
let strSize = string.boundingRect(with: size, options: [.usesLineFragmentOrigin], attributes: dic, context:nil).size
return strSize
}
}
extension YHSearchInfoHistoryView: UICollectionViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout {
// 返回单元格数量
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return historyItems.count
}
// 返回每个单元格的大小
func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
let size = self.getwith(font: UIFont.systemFont(ofSize: 12), height: 24, string: historyItems[indexPath.item])
var width = size.width + gap*2.0
if width > collectionView.width {
width = collectionView.width
}
return CGSize(width: width, height: cellHeight)
}
// 返回自定义单元格
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHSearchInfoHistoryCell.cellReuseIdentifier, for: indexPath) as! YHSearchInfoHistoryCell
if 0 <= indexPath.item && indexPath.item < historyItems.count {
cell.titleLabel.text = historyItems[indexPath.item]
}
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
if 0 <= indexPath.item && indexPath.item < historyItems.count {
let text = historyItems[indexPath.item]
selectBlock?(text)
}
}
}
//
// ViewController.swift
// LayoutCollection
//
// Created by mac on 2019/6/2.
// Copyright © 2019年 mac. All rights reserved.
//
import UIKit
class YHSearchItemLayout: UICollectionViewFlowLayout {
var interItemSpacing: CGFloat = 12.0 // 相邻单元格之间的水平间距
override func prepare() {
super.prepare()
self.minimumInteritemSpacing = 12
}
override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
let arrCell = super.layoutAttributesForElements(in: rect)
if arrCell == nil { return nil }
if arrCell!.count <= 1 { return arrCell }
for i in 1 ..< arrCell!.count {
//当前 UICollectionViewLayoutAttributes
let currentLayout = arrCell![i]
//上一个 UICollectionViewLayoutAttributes
let prevLayout = arrCell![i - 1]
if (prevLayout.indexPath.section == currentLayout.indexPath.section) {
//我们想设置的最大间距,可根据需要改
let maximumSpacing = 12.0
//前一个cell的最右边
let originX = prevLayout.frame.maxX
//如果当 (上一个cell的最右边X + 我们想要的间距 + 当前cell的宽度 + 区边距) 依然在contentSize中 (小于屏幕宽度),我们改变当前cell的原点位置
//判断 当前cell的 maxX 是否超出屏幕
if((CGFloat(originX) + CGFloat(maximumSpacing) + currentLayout.frame.size.width) + self.sectionInset.right < self.collectionViewContentSize.width) {
var frame = currentLayout.frame
frame.origin.x = CGFloat(originX) + CGFloat(maximumSpacing)
currentLayout.frame = frame
} else {
print("超出屏幕, 换一行")
var frame = currentLayout.frame
frame.origin.x = self.sectionInset.left
currentLayout.frame = frame
}
}
}
return arrCell
}
}
...@@ -10,19 +10,28 @@ import UIKit ...@@ -10,19 +10,28 @@ import UIKit
class YHHomePageViewModel : YHBaseViewModel { class YHHomePageViewModel : YHBaseViewModel {
//数据源 //数据源
var configModel:YHHomeCofigMode? var configModel:YHConfigModel?//app相关配置
var arrHomeNewsData: [YHHomeListModel]?
var banners: [YHBannerModel]?
var classify: [YHHomeClassifyModel]?
var hkList: [YHHKEventModel]?
//首页相关参数
private var curPageIndex : Int = 1
private var page_Size : Int = 6
private var totalCount : Int = 0
var hasMoreForHomeNews : Bool = true
} }
//接口 //接口
extension YHHomePageViewModel { extension YHHomePageViewModel {
//请求首页的配置 //请求配置
func getHomeConfig(callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) { func getHomeConfig(callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.homeConfigApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.homeConfigApi
let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { return } guard let self = self else { return }
let dic = json.data let dic = json.data
guard let resultModel = YHHomeCofigMode.deserialize(dict: dic as? [AnyHashable : Any]) else { guard let resultModel = YHConfigModel.deserialize(dict: dic as? [AnyHashable : Any]) else {
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
...@@ -34,4 +43,228 @@ extension YHHomePageViewModel { ...@@ -34,4 +43,228 @@ extension YHHomePageViewModel {
callBackBlock(false,err) callBackBlock(false,err)
} }
} }
/*
firstPageFlag true - 首页 false - 更多
*/
func getHomeNewsList(firstPageFlag : Bool,callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
var params: [String : Any] = ["page": curPageIndex,
"page_size": page_Size]
if firstPageFlag {
params = ["page": curPageIndex,
"page_size": page_Size]
} else {
params = ["page": curPageIndex + 1,
"page_size": page_Size]
}
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.consult
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
guard let result = YHHomeListTotalModel.deserialize(from: dic as? Dictionary) else {
self.arrHomeNewsData = []
callBackBlock(false,nil)
return
}
for item in result.data {
item.calHeightParam()
}
if firstPageFlag {
self.totalCount = result.total
self.arrHomeNewsData = result.data
curPageIndex = 1
} else {
curPageIndex = curPageIndex + 1
self.arrHomeNewsData?.append(contentsOf: result.data)
}
if let count = self.arrHomeNewsData?.count {
if count == self.totalCount {
self.hasMoreForHomeNews = false
} else {
self.hasMoreForHomeNews = true
}
}
callBackBlock(true, nil)
} else {
self.arrHomeNewsData = []
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
// type: 0 APP首页 1 香港身份 2香港生活
func getHomeBanner(_ type: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let params: [String : Any] = ["type": type]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.banner
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
guard let result = [YHBannerModel].deserialize(from: dic as? [Any]) else {
callBackBlock(false,nil)
return
}
var arrData = result as? [YHBannerModel]
if let arr = arrData,arr.count > 6 {
arrData = Array(arrData?[0...5] ?? [])
}
self.banners = arrData
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
func getHomeClassify(callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.classify
let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
guard let result = [YHHomeClassifyModel].deserialize(from: dic as? [Any]) else {
callBackBlock(false,nil)
return
}
self.classify = result as? [YHHomeClassifyModel]
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
func getList(_ firstPageFlag : Bool, _ classifyID: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
var params: [String : Any] = ["page": curPageIndex,
"page_size": page_Size,
"classify_id[0]": classifyID]
if firstPageFlag {
curPageIndex = 1
params = ["page": curPageIndex,
"page_size": page_Size,
"classify_id[0]": classifyID]
} else {
params = ["page": curPageIndex + 1,
"page_size": page_Size,
"classify_id[0]": classifyID]
curPageIndex = curPageIndex + 1
}
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.article
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
if json.code == 200 {
let dic = json.data
guard let result = YHHomeListTotalModel.deserialize(from: dic as? Dictionary) else {
self.arrHomeNewsData = []
callBackBlock(false,nil)
return
}
for item in result.data {
item.calHeightParam()
}
if firstPageFlag {
self.totalCount = result.total
self.arrHomeNewsData = result.data
} else {
self.arrHomeNewsData?.append(contentsOf: result.data)
}
if let count = self.arrHomeNewsData?.count {
if count == self.totalCount {
self.hasMoreForHomeNews = false
} else {
self.hasMoreForHomeNews = true
}
}
callBackBlock(true, nil)
} else {
self.arrHomeNewsData = []
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
func getHKEvent(callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.hklist
let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
guard let result = [YHHKEventModel].deserialize(from: dic as? [Any]) else {
callBackBlock(false,nil)
return
}
self.hkList = (result as! [YHHKEventModel])
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
// 搜索
func searchArticleList(_ title: String, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let params: [String : Any] = ["page": 1,
"page_size": 10,
"title": title]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.article
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
guard let result = YHHomeListTotalModel.deserialize(from: dic as? Dictionary) else {
self.arrHomeNewsData = []
callBackBlock(false,nil)
return
}
for item in result.data {
item.calHeightParam()
}
self.arrHomeNewsData = result.data
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
} }
//
// YHHomeWebViewModel.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHomeWebViewModel : YHBaseViewModel {
//数据源
var mainModel :YHWebModel?
}
extension YHHomeWebViewModel {
//请求web详情
func getWebDetail(_ id: Int, callBackBlock:@escaping (_ success: Bool, _ error:YHErrorModel?)->()) {
let params: [String : Any] = ["id": id]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.webInfo
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
let dic = json.data
guard let resultModel = YHWebModel.deserialize(from: dic as? Dictionary) else {
callBackBlock(false,nil)
return
}
self.mainModel = resultModel
callBackBlock(true,nil)
} failBlock: { err in
callBackBlock(false,err)
}
}
// type:0取消 1收藏
func getStar(_ id: Int, _ type: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let params: [String : Any] = ["operate_type": type,
"article_id": id]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.star
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
// type:0取消 1收藏
func getLike(_ id: Int, _ type: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let params: [String : Any] = ["operate_type": type,
"article_id": id]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.like
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
}
//
// YHServerHKLifeViewController.swift
// galaxy
//
// Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHServerHKLifeViewController: YHBaseViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var tableHeadView: YHServerTableHeadView!
var tableFootView: YHServiceTableFootView!
var sectionView: YHServiceSectionView!
var classId: Int = 0
var dataSouce: [YHHomeListModel?] = [] {
didSet {
self.homeTableView.reloadData()
}
}
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHServerHKLifeViewCell.self,forCellReuseIdentifier: YHServerHKLifeViewCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHServerHKLifeViewController {
func loadData() {
homeViewModel.getHomeBanner(2){[weak self] success, error in
guard let self = self else { return }
self.tableHeadView.bannarView.dataArr = self.homeViewModel.banners ?? []
}
homeViewModel.getHomeClassify{[weak self] success, error in
guard let self = self, let classify = self.homeViewModel.classify else { return }
for item in classify {
let model = item as YHHomeClassifyModel
if model.id == 2 {
self.sectionView.items = model.children
let classifyID = model.children.first?.id ?? 0
self.classId = classifyID
self.homeViewModel.getList(true, classifyID) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.homeTableView.es.noticeNoMoreData()
}
}
}
}
}
}
func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
sectionView = {
let view = YHServiceSectionView()
view.block = {[weak self] model in
guard let self = self else { return }
self.classId = model.id
self.homeViewModel.getList(true, model.id) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.homeTableView.es.noticeNoMoreData()
}
}
}
return view
}()
tableHeadView = YHServerTableHeadView()
tableHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 365)
view.addSubview(homeTableView)
homeTableView.tableHeaderView = tableHeadView
homeTableView.tableFooterView = tableFootView
homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
homeTableView.delegate = self
homeTableView.dataSource = self
homeTableView.es.addInfiniteScrolling {[weak self] in
guard let self = self else { return }
self.homeTableView.es.stopLoadingMore()
self.homeViewModel.getList(false, self.classId) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.homeTableView.es.noticeNoMoreData()
}
}
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 48
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return sectionView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return KScreenHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.tableFootView.items = dataSouce
cell0.tableFootView.myCollectView.es.removeRefreshFooter()
cell0.selectionStyle = .none
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
extension YHServerHKLifeViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
class YHServerHKLifeViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHServerHKLifeViewCell"
var tableFootView: YHServiceTableFootView!
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
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension YHServerHKLifeViewCell {
func updateUI() {
}
func setupUI() {
let holdView = UIView()
holdView.backgroundColor = .white
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
backgroundColor = .clear
contentView.backgroundColor = .clear
tableFootView = YHServiceTableFootView()
tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)
contentView.addSubview(tableFootView)
}
}
// //
// YHHomeViewController.swift // YHServiceCenterMainViewController.swift
// galaxy // galaxy
// //
// Created by EDY on 2023/12/20. // Created by EDY on 2023/12/20.
// //
import UIKit import UIKit
import JXSegmentedView
//服务中心 //服务中心
class YHServiceCenterMainViewController: YHBaseViewController { class YHServiceCenterMainViewController: YHBaseViewController {
...@@ -222,3 +223,9 @@ extension YHServiceCenterMainViewController { ...@@ -222,3 +223,9 @@ extension YHServiceCenterMainViewController {
homeTableView.reloadData() homeTableView.reloadData()
} }
} }
extension YHServiceCenterMainViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
//
// YHServiceListViewController.swift
// galaxy
//
// Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHServiceListViewController: YHBaseViewController {
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var orderListView: YHOrderListView!
var normalView: YHServerNoOrderView!
var classId: Int = 0
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
handleRightUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
handleRightUI()
loadData()
}
}
extension YHServiceListViewController {
func loadData() {
homeViewModel.getHomeBanner(1){[weak self] success, error in
guard let self = self else { return }
self.normalView.tableHeadView.bannarView.dataArr = self.homeViewModel.banners ?? []
}
homeViewModel.getHomeClassify{[weak self] success, error in
guard let self = self, let classify = self.homeViewModel.classify else { return }
for item in classify {
let model = item as YHHomeClassifyModel
if model.id == 1 {
self.normalView.sectionView.items = model.children
let classifyID = model.children.first?.id ?? 0
self.classId = classifyID
self.homeViewModel.getList(true, classifyID) {[weak self] success, error in
guard let self = self else { return }
self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.normalView.homeTableView.es.noticeNoMoreData()
}
}
}
}
}
if YHLoginManager.shared.isLogin() == false {
self.handleRightUI()
return
}
serviceCenterMainReqVM.getContactList { success, error in
if success == true {
} else {
YHHUD.flash(message: error?.errorMsg ?? "请求出错")
}
self.handleRightUI()
}
}
func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
orderListView = {
let view = YHOrderListView()
return view
}()
view.addSubview(orderListView)
orderListView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
normalView = {
let view = YHServerNoOrderView()
view.sectionBlock = {[weak self] model in
guard let self = self else { return }
self.classId = model.id
self.homeViewModel.getList(true, model.id) {[weak self] success, error in
guard let self = self else { return }
self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.normalView.homeTableView.es.noticeNoMoreData()
}
}
}
view.loadMoreBlock = {[weak self] model in
guard let self = self else { return }
self.homeViewModel.getList(false, self.classId) {[weak self] success, error in
guard let self = self else { return }
self.normalView.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.normalView.homeTableView.es.noticeNoMoreData()
}
}
}
return view
}()
view.addSubview(normalView)
normalView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
}
}
extension YHServiceListViewController {
private func handleRightUI() {
if YHLoginManager.shared.isLogin() == false {
normalView.isHidden = false
orderListView.isHidden = true
} else {
if serviceCenterMainReqVM.arrContactList.isEmpty {
normalView.isHidden = false
orderListView.isHidden = true
} else {
normalView.isHidden = true
orderListView.isHidden = false
orderListView.dataSource = serviceCenterMainReqVM.arrContactList
}
}
}
}
extension YHServiceListViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
func listWillAppear() {
loadData()
}
}
// //
// ContentBaseViewController.swift // YHServiceViewController.swift
// JXSegmentedView // galaxy
// //
// Created by jiaxin on 2018/12/26. // Created by EDY on 2024/4/8.
// Copyright © 2018 jiaxin. All rights reserved. // Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
// //
import UIKit import UIKit
import JXSegmentedView import JXSegmentedView
class YHMainContentBaseViewController: UIViewController { class YHServiceViewController: YHBaseViewController {
var canScroll : Bool = false { var canScroll : Bool = false {
didSet { didSet {
for vc in arrItemVCs { for vc in arrItemVCs {
vc.vcCanScroll = canScroll
} }
} }
} }
let arrItemTitles = ["推荐","子女教育","税务规划","民生医疗","成功案例","我的服务","行业资讯","香港生活","你我他","我是很长的tag呀"] let arrItemTitles = ["香港身份","香港生活"]
var arrItemVCs : [YHDavidTestViewController] = [] var arrItemVCs : [YHBaseViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 40)) var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: KScreenWidth, height: 48))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = { lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource() let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 16) dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 15)
dataSource.titleNormalColor = .labelTextColor2 dataSource.titleNormalColor = .labelTextColor2
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18) dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18)
dataSource.titleSelectedColor = .brandMainColor dataSource.titleSelectedColor = .mainTextColor
dataSource.isItemSpacingAverageEnabled = false dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension dataSource.itemWidth = JXSegmentedViewAutomaticDimension
dataSource.itemSpacing = 24 dataSource.itemSpacing = 90
return dataSource return dataSource
}() }()
//分类title 所对应的VC //分类title 所对应的VC
lazy var listContainerView: JXSegmentedListContainerView! = { lazy var listContainerView: JXSegmentedListContainerView! = {
return JXSegmentedListContainerView(dataSource: self, type: .collectionView) return JXSegmentedListContainerView(dataSource: self, type: .scrollView)
}() }()
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = .white
for _ in arrItemTitles { for i in 0..<arrItemTitles.count {
let vc = YHDavidTestViewController() if i == 0 {
arrItemVCs.append(vc) let vc = YHServiceListViewController()
arrItemVCs.append(vc)
} else {
let vc = YHServerHKLifeViewController()
arrItemVCs.append(vc)
}
} }
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!! //segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self segmentedView.delegate = self
segmentedView.collectionView.backgroundColor = .white
view.addSubview(segmentedView) view.addSubview(segmentedView)
segmentedView.listContainer = listContainerView segmentedView.listContainer = listContainerView
...@@ -75,7 +83,7 @@ class YHMainContentBaseViewController: UIViewController { ...@@ -75,7 +83,7 @@ class YHMainContentBaseViewController: UIViewController {
segmentedView.indicators = [indicator] segmentedView.indicators = [indicator]
segmentedView.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1) segmentedView.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1)
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
...@@ -93,14 +101,19 @@ class YHMainContentBaseViewController: UIViewController { ...@@ -93,14 +101,19 @@ class YHMainContentBaseViewController: UIViewController {
override func viewDidLayoutSubviews() { override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews() super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 50) segmentedView.frame = CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: view.bounds.size.width, height: 48)
listContainerView.frame = CGRect(x: 0, y: 50, width: view.bounds.size.width, height: view.bounds.size.height - 50) listContainerView.frame = CGRect(x: 0, y: k_Height_safeAreaInsetsTop() + 48, width: view.bounds.size.width, height: view.bounds.size.height - 48 - k_Height_safeAreaInsetsTop())
}
}
extension YHServiceViewController {
func jumpToItemIndex(itemIndex : Int) {
self.segmentedView.selectItemAt(index: itemIndex)
} }
} }
extension YHMainContentBaseViewController: JXSegmentedViewDelegate { extension YHServiceViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) { func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewDidEndDragging"), object: nil) // NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewDidEndDragging"), object: nil)
} }
/// 正在滚动中的回调 /// 正在滚动中的回调
...@@ -111,11 +124,11 @@ extension YHMainContentBaseViewController: JXSegmentedViewDelegate { ...@@ -111,11 +124,11 @@ extension YHMainContentBaseViewController: JXSegmentedViewDelegate {
/// - rightIndex: 正在滚动中,相对位置处于右边的index /// - rightIndex: 正在滚动中,相对位置处于右边的index
/// - percent: 从左往右计算的百分比 /// - percent: 从左往右计算的百分比
func segmentedView(_ segmentedView: JXSegmentedView, scrollingFrom leftIndex: Int, to rightIndex: Int, percent: CGFloat) { func segmentedView(_ segmentedView: JXSegmentedView, scrollingFrom leftIndex: Int, to rightIndex: Int, percent: CGFloat) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewWillBeginDragging"), object: nil) // NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewWillBeginDragging"), object: nil)
} }
} }
extension YHMainContentBaseViewController: JXSegmentedListContainerViewDataSource { extension YHServiceViewController: JXSegmentedListContainerViewDataSource {
func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int { func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource { if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
return titleDataSource.dataSource.count return titleDataSource.dataSource.count
...@@ -124,6 +137,6 @@ extension YHMainContentBaseViewController: JXSegmentedListContainerViewDataSourc ...@@ -124,6 +137,6 @@ extension YHMainContentBaseViewController: JXSegmentedListContainerViewDataSourc
} }
func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate { func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
return arrItemVCs[index] return arrItemVCs[index] as! JXSegmentedListContainerViewListDelegate
} }
} }
...@@ -63,7 +63,7 @@ class YHFileListViewController: YHBaseViewController { ...@@ -63,7 +63,7 @@ class YHFileListViewController: YHBaseViewController {
private lazy var footLable : UILabel = { private lazy var footLable : UILabel = {
let footLable = UILabel() let footLable = UILabel()
footLable.text = "*感谢您对银河移民的信赖,以上信息均用于香港优才签证申银河移民承诺对您所提供的信息将绝对保密" footLable.text = "*感谢您对银河移民的信赖,以上信息均用于香港优才签证申请,银河移民承诺对您所提供的信息将绝对保密"
footLable.textColor = .white footLable.textColor = .white
footLable.textAlignment = .center footLable.textAlignment = .center
footLable.font = UIFont.PFSC_R(ofSize: 12) footLable.font = UIFont.PFSC_R(ofSize: 12)
......
...@@ -36,7 +36,7 @@ class YHCertificateCategoryItem { ...@@ -36,7 +36,7 @@ class YHCertificateCategoryItem {
class YHCertificateListContainerVC: YHBaseViewController { class YHCertificateListContainerVC: YHBaseViewController {
static let segmentHeight = 53.0 static let segmentHeight = 49.0
var orderId : Int? var orderId : Int?
var filterDict : [String: String] = [:] var filterDict : [String: String] = [:]
...@@ -68,6 +68,12 @@ class YHCertificateListContainerVC: YHBaseViewController { ...@@ -68,6 +68,12 @@ class YHCertificateListContainerVC: YHBaseViewController {
YHCertificateCategoryItem(type: .finish)] YHCertificateCategoryItem(type: .finish)]
var itemVCs:[YHCertificateListVC] = [] var itemVCs:[YHCertificateListVC] = []
lazy var segmentContainerView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var segmentedView : JXSegmentedView = { lazy var segmentedView : JXSegmentedView = {
let segview = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_NavigationtBarAndStatuBar, width: KScreenWidth, height: Self.segmentHeight)) let segview = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_NavigationtBarAndStatuBar, width: KScreenWidth, height: Self.segmentHeight))
segview.dataSource = segmentedDataSource segview.dataSource = segmentedDataSource
...@@ -75,6 +81,7 @@ class YHCertificateListContainerVC: YHBaseViewController { ...@@ -75,6 +81,7 @@ class YHCertificateListContainerVC: YHBaseViewController {
//配置指示器 //配置指示器
let indicator = JXSegmentedIndicatorLineView() let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16 indicator.indicatorWidth = 16
indicator.indicatorHeight = 4.0
indicator.indicatorColor = .brandMainColor indicator.indicatorColor = .brandMainColor
segview.indicators = [indicator] segview.indicators = [indicator]
segview.backgroundColor = .clear segview.backgroundColor = .clear
...@@ -163,8 +170,9 @@ class YHCertificateListContainerVC: YHBaseViewController { ...@@ -163,8 +170,9 @@ class YHCertificateListContainerVC: YHBaseViewController {
itemVCs.append(vc) itemVCs.append(vc)
} }
view.addSubview(navBar) view.addSubview(navBar)
view.addSubview(segmentedView) view.addSubview(segmentContainerView)
view.addSubview(filterBtn) segmentContainerView.addSubview(segmentedView)
segmentContainerView.addSubview(filterBtn)
view.addSubview(listContainerView) view.addSubview(listContainerView)
navBar.snp.makeConstraints { make in navBar.snp.makeConstraints { make in
...@@ -172,21 +180,27 @@ class YHCertificateListContainerVC: YHBaseViewController { ...@@ -172,21 +180,27 @@ class YHCertificateListContainerVC: YHBaseViewController {
make.top.equalToSuperview().offset(k_Height_statusBar()) make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar) make.height.equalTo(k_Height_NavContentBar)
} }
segmentContainerView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(Self.segmentHeight+4)
}
segmentedView.snp.makeConstraints { make in segmentedView.snp.makeConstraints { make in
make.left.equalToSuperview() make.top.left.equalToSuperview()
make.right.equalToSuperview().offset(-21-18) make.right.equalToSuperview().offset(-21-18)
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(Self.segmentHeight) make.height.equalTo(Self.segmentHeight)
} }
filterBtn.snp.makeConstraints { make in filterBtn.snp.makeConstraints { make in
make.width.height.equalTo(YHCertificateFilterButton.width) make.width.height.equalTo(YHCertificateFilterButton.width)
make.centerY.equalTo(segmentedView.snp.centerY) make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-18) make.right.equalToSuperview().offset(-18)
} }
listContainerView.snp.makeConstraints { make in listContainerView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(segmentedView.snp.bottom) make.top.equalTo(segmentContainerView.snp.bottom)
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
} }
} }
......
...@@ -283,7 +283,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData ...@@ -283,7 +283,7 @@ extension YHCertificateUploadContentListVC: UITableViewDelegate, UITableViewData
} else if editType == .delete { // 删除 } else if editType == .delete { // 删除
let msg = "您确定要删除文档\(contentItem.name)吗" let msg = "您确定要删除文档\(contentItem.name)?"
YHTwoOptionAlertView.showAlertView(message:msg) { sure in YHTwoOptionAlertView.showAlertView(message:msg) { sure in
if !sure { return } if !sure { return }
// 删除 // 删除
......
...@@ -66,7 +66,20 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -66,7 +66,20 @@ class YHCertificateInfoCell: UITableViewCell {
if !model.nameExtra.applicant.isEmpty { if !model.nameExtra.applicant.isEmpty {
ownerStr = model.nameExtra.applicant ownerStr = model.nameExtra.applicant
} }
infoLabel.text = "类型: \(typeStr) 所属人: \(ownerStr)"
infoStr = "类型: \(typeStr) | 所属人: \(ownerStr)"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize:11),
.foregroundColor: UIColor.labelTextColor2
]
let attrString = NSMutableAttributedString(string: infoStr, attributes: attributes)
if let separatorRange = infoStr.range(of: String("|")) {
let range = NSRange(separatorRange, in: infoStr)
attrString.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor(hex: 0xF0F0F0), range: range)
}
infoLabel.attributedText = attrString
var result:ASAttributedString = .init(string:"", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor)) var result:ASAttributedString = .init(string:"", .font(UIFont.PFSC_M(ofSize: 16)), .foreground(UIColor.mainTextColor))
let mustTag: ASAttributedString = .init("*", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.failColor)) let mustTag: ASAttributedString = .init("*", .font(UIFont.PFSC_M(ofSize: 16)),.foreground(UIColor.failColor))
...@@ -155,7 +168,7 @@ class YHCertificateInfoCell: UITableViewCell { ...@@ -155,7 +168,7 @@ class YHCertificateInfoCell: UITableViewCell {
nameTextView.snp.makeConstraints { make in nameTextView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10) make.left.equalToSuperview().offset(10)
make.top.equalToSuperview().offset(4) make.top.equalToSuperview().offset(4)
make.right.equalTo(statusLabel.snp.left).offset(-6) make.right.equalTo(statusLabel.snp.left).offset(-26)
} }
infoLabel.snp.makeConstraints { make in infoLabel.snp.makeConstraints { make in
......
...@@ -12,6 +12,13 @@ enum YHNavLeftSecondBtnType: Int { ...@@ -12,6 +12,13 @@ enum YHNavLeftSecondBtnType: Int {
case none = 0 case none = 0
case search = 1 case search = 1
} }
enum YHNavRightBtnType: Int {
case none = 0
case clean = 1
}
class YHCustomNavigationBar: UIView { class YHCustomNavigationBar: UIView {
static let searchLeftIcon = "" static let searchLeftIcon = ""
...@@ -23,6 +30,7 @@ class YHCustomNavigationBar: UIView { ...@@ -23,6 +30,7 @@ class YHCustomNavigationBar: UIView {
} }
var backBlock:(()->())? var backBlock:(()->())?
var leftSecondBtnClick:(()->())? var leftSecondBtnClick:(()->())?
var rightBtnClick:(()->())?
private lazy var titleLabel: UILabel = { private lazy var titleLabel: UILabel = {
let label = UILabel() let label = UILabel()
...@@ -33,7 +41,7 @@ class YHCustomNavigationBar: UIView { ...@@ -33,7 +41,7 @@ class YHCustomNavigationBar: UIView {
return label return label
}() }()
private lazy var backButton: UIButton = { lazy var backButton: UIButton = {
let btn = UIButton() let btn = UIButton()
btn.setImage(UIImage(named: "nav_back_icon"), for: .normal) btn.setImage(UIImage(named: "nav_back_icon"), for: .normal)
btn.addTarget(self, action: #selector(didBackBtnClicked), for: .touchUpInside) btn.addTarget(self, action: #selector(didBackBtnClicked), for: .touchUpInside)
...@@ -45,6 +53,12 @@ class YHCustomNavigationBar: UIView { ...@@ -45,6 +53,12 @@ class YHCustomNavigationBar: UIView {
btn.addTarget(self, action: #selector(didleftSecondButtonClicked), for: .touchUpInside) btn.addTarget(self, action: #selector(didleftSecondButtonClicked), for: .touchUpInside)
return btn return btn
}() }()
private lazy var rightButton: UIButton = {
let btn = UIButton()
btn.addTarget(self, action: #selector(didRightButtonClicked), for: .touchUpInside)
return btn
}()
static func navBar()-> YHCustomNavigationBar { static func navBar()-> YHCustomNavigationBar {
let bar = YHCustomNavigationBar(frame:CGRect(x: 0, y: 0, width: KScreenWidth, height: k_Height_NavContentBar)) let bar = YHCustomNavigationBar(frame:CGRect(x: 0, y: 0, width: KScreenWidth, height: k_Height_NavContentBar))
...@@ -66,10 +80,17 @@ class YHCustomNavigationBar: UIView { ...@@ -66,10 +80,17 @@ class YHCustomNavigationBar: UIView {
} }
} }
func showRightButtonType(_ type: YHNavRightBtnType) {
if type == .clean {
rightButton.setImage(UIImage(named: "msg_clean"), for: .normal)
}
}
func createUI() { func createUI() {
self.addSubview(titleLabel) self.addSubview(titleLabel)
self.addSubview(backButton) self.addSubview(backButton)
self.addSubview(leftSecondButton) self.addSubview(leftSecondButton)
self.addSubview(rightButton)
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
make.edges.equalToSuperview() make.edges.equalToSuperview()
...@@ -86,6 +107,12 @@ class YHCustomNavigationBar: UIView { ...@@ -86,6 +107,12 @@ class YHCustomNavigationBar: UIView {
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
make.left.equalTo(backButton.snp.right).offset(5) make.left.equalTo(backButton.snp.right).offset(5)
} }
rightButton.snp.makeConstraints { make in
make.width.height.equalTo(24)
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-20)
}
} }
} }
...@@ -101,4 +128,10 @@ extension YHCustomNavigationBar { ...@@ -101,4 +128,10 @@ extension YHCustomNavigationBar {
leftSecondBtnClick() leftSecondBtnClick()
} }
} }
@objc func didRightButtonClicked() {
if let rightBtnClick = rightBtnClick {
rightBtnClick()
}
}
} }
...@@ -81,7 +81,7 @@ class YHCertificateViewModel: YHBaseViewModel { ...@@ -81,7 +81,7 @@ class YHCertificateViewModel: YHBaseViewModel {
let tmpModel = YHFileListModel() let tmpModel = YHFileListModel()
tmpModel.ApplicantName = "温馨提示" tmpModel.ApplicantName = "温馨提示"
tmpModel.type = 1 tmpModel.type = 1
tmpModel.arrTxt = ["1.以上资料请提供清晰完整的彩色扫描件。","2.照片最好同时提供电子档及时通知我们以避免对申请结果产生影响。","3.申请递交之后,如目前所报备的情况有任何变化(包含婚姻状况、新生子女、工作情况、亲属关系变化,请及时通知我们以避免对申请结果产生影响。"] tmpModel.arrTxt = ["1.以上资料请提供清晰完整的彩色扫描件。","2.照片最好同时提供电子档及时通知我们以避免对申请结果产生影响。","3.申请递交之后,如目前所报备的情况有任何变化(包含婚姻状况、新生子女、工作情况、亲属关系变化,请及时通知我们以避免对申请结果产生影响。"]
arr.append(tmpModel) arr.append(tmpModel)
self.arrFileListData = arr self.arrFileListData = arr
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import Alamofire
/* /*
赴港计划书 赴港计划书
*/ */
...@@ -24,6 +25,7 @@ class YHHKPlanDoctumentVC: YHBaseViewController { ...@@ -24,6 +25,7 @@ class YHHKPlanDoctumentVC: YHBaseViewController {
private var canEditFlag : Bool = false private var canEditFlag : Bool = false
private var timer : Timer? private var timer : Timer?
private var finishHandleFlag : Bool = true
override func viewDidLoad() { override func viewDidLoad() {
...@@ -43,6 +45,8 @@ class YHHKPlanDoctumentVC: YHBaseViewController { ...@@ -43,6 +45,8 @@ class YHHKPlanDoctumentVC: YHBaseViewController {
override func viewWillDisappear(_ animated: Bool) { override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
YHHUD.hide()
finishHandleFlag = true
cancelTimer() cancelTimer()
} }
...@@ -85,15 +89,19 @@ extension YHHKPlanDoctumentVC { ...@@ -85,15 +89,19 @@ extension YHHKPlanDoctumentVC {
} }
@objc fileprivate func flipNext(sender: Timer?) { @objc fileprivate func flipNext(sender: Timer?) {
YHHUD.hide() finishHandleFlag = true
YHHUD.flash(message: "提交成功") DispatchQueue.main.async {
getData()
YHHUD.hide()
YHHUD.flash(message: "提交成功")
self.getData()
}
} }
func updateUI() { func updateUI() {
//1、不展示 2、待确认 3、核对中 4、核对中 5、已驳回 6、已定稿
if status > 3 { if status > 2 {
canEditFlag = false canEditFlag = false
bottomView.isHidden = true bottomView.isHidden = true
tableView.snp.removeConstraints() tableView.snp.removeConstraints()
...@@ -117,7 +125,12 @@ extension YHHKPlanDoctumentVC { ...@@ -117,7 +125,12 @@ extension YHHKPlanDoctumentVC {
//点击提交按钮 //点击提交按钮
@objc func clickSubmitBtn() { @objc func clickSubmitBtn() {
submitOp() YHCommonAlertView.show("", "是否已完成对文本框的内容修改,并确认提交?", "取消", "确认") {
self.viewModel.requestSignaturePersonalURL(callBackBlock: {[weak self] success, error in
guard let self = self else { return }
self.submitOp()
})
}
} }
//提交数据 //提交数据
...@@ -136,17 +149,27 @@ extension YHHKPlanDoctumentVC { ...@@ -136,17 +149,27 @@ extension YHHKPlanDoctumentVC {
"content_save":1] "content_save":1]
cancelTimer() cancelTimer()
startTimer() startTimer()
finishHandleFlag = false
YHHUD.show(.progress(message: "")) YHHUD.show(.progress(message: ""))
viewModel.submitHKPlanDocument(params) { success, error in viewModel.submitHKPlanDocument(params) {[weak self ] success, error in
YHHUD.hide() guard let self = self else { return }
if self.finishHandleFlag {
return
}
self.finishHandleFlag = true
self.cancelTimer() self.cancelTimer()
self.getData() YHHUD.hide()
if success { if success {
YHHUD.flash(message: "提交成功") YHHUD.flash(message: "提交成功")
self.getData()
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "提交失败") YHHUD.flash(message: error?.errorMsg ?? "提交失败")
} }
} }
} else { } else {
YHHUD.flash(message: "订单ID 为空") YHHUD.flash(message: "订单ID 为空")
} }
......
...@@ -56,6 +56,10 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -56,6 +56,10 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
viewModel.requestSignBack("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)") {[weak self] success, error in
guard let self = self else { return }
self.getData()
}
getData() getData()
} }
...@@ -71,31 +75,40 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -71,31 +75,40 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
} }
self.bottomView.isHidden = true self.bottomView.isHidden = true
} }
if self.viewModel.mainModel?.writing_document.doc_sign.supplement_id == 0 { if self.viewModel.mainModel?.writing_document.status ?? 0 < 6 {
//没有doc_sign
self.stepView.currentIndex = 0 self.stepView.currentIndex = 0
self.bottomView.isHidden = true self.bottomView.isHidden = true
} else { } else {
let state = self.viewModel.mainModel?.writing_document.doc_sign.status ?? 0 let state = self.viewModel.mainModel?.writing_document.doc_sign.status ?? 0
// 0-待上传,1-未发送, 2-发送中,3-已发送,4-已签收,5-审核通过,6-驳回 // 0-待上传,1-未发送, 2-发送中,3-已发送,4-已签收,5-审核通过,6-驳回
self.type = state self.type = state
if state == 0 || state == 1 || state == 2 || state == 3 { if state < 3 {
//没有doc_sign
self.stepView.currentIndex = 0
self.bottomView.isHidden = true
}
else if state == 3 {
self.promptView.isHidden = true self.promptView.isHidden = true
self.bottomButton.isEnabled = true self.bottomButton.isEnabled = true
self.bottomView.isHidden = false self.bottomView.isHidden = false
self.bottomButton.alpha = 1 self.bottomButton.alpha = 1
self.bottomButton.setTitle("确定已签章,提交", for: .normal) self.bottomButton.setTitle("确定已签章,提交", for: .normal)
self.stepView.currentIndex = 1
} else if state == 4 { } else if state == 4 {
self.promptView.isHidden = true self.promptView.isHidden = true
self.bottomButton.isEnabled = false self.bottomButton.isEnabled = false
self.bottomButton.alpha = 0.4 self.bottomButton.alpha = 0.4
self.bottomView.isHidden = false self.bottomView.isHidden = false
self.bottomButton.setTitle("提交成功", for: .normal) self.bottomButton.setTitle("提交成功", for: .normal)
self.stepView.currentIndex = 1
} else if state == 5 { } else if state == 5 {
self.promptView.isHidden = true self.promptView.isHidden = true
self.bottomView.isHidden = true self.bottomView.isHidden = true
self.bottomButton.isEnabled = true self.bottomButton.isEnabled = true
self.bottomButton.alpha = 1 self.bottomButton.alpha = 1
self.bottomButton.setTitle("确定已签章,提交", for: .normal) self.bottomButton.setTitle("确定已签章,提交", for: .normal)
self.stepView.currentIndex = 1
} else { } else {
self.promptView.isHidden = false self.promptView.isHidden = false
self.promptView.setPrompt(self.viewModel.mainModel?.writing_document.doc_sign.audit_opinion ?? "") self.promptView.setPrompt(self.viewModel.mainModel?.writing_document.doc_sign.audit_opinion ?? "")
...@@ -109,31 +122,32 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -109,31 +122,32 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64) make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.equalTo(self.view) make.left.right.equalTo(self.view)
} }
self.stepView.currentIndex = 1
} }
self.stepView.currentIndex = 1
} }
self.tableView.reloadData() self.tableView.reloadData()
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "") YHHUD.flash(message: error?.errorMsg ?? "")
} }
self.checkSign()
}) })
}
func checkSign() {
viewModel?.requestSignCallBack("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)", callBackBlock: {[weak self] success, error in viewModel?.requestSignCallBack("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)", callBackBlock: {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.isSign = success self.isSign = success
if self.type == 3 && self.viewModel.mainModel?.writing_document.doc_sign.doc_return_manual.count == 0 && !success { if self.type == 3 && self.viewModel.mainModel?.writing_document.doc_sign.doc_return_manual.count == 0 && !success {
self.bottomButton.isEnabled = false self.bottomButton.isEnabled = false
self.bottomButton.alpha = 0.4 self.bottomButton.alpha = 0.4
} else {
self.bottomButton.isEnabled = true
self.bottomButton.alpha = 1
} }
self.tableView.reloadData() self.tableView.reloadData()
}) })
} }
func getPromptHeight(_ value: String) -> CGFloat { func getPromptHeight(_ value: String) -> CGFloat {
let text = value // 要显示的文本内容 let text = "驳回原因:" + value // 要显示的文本内容
let font = UIFont.PFSC_R(ofSize: 12) // 字体大小 let font = UIFont.PFSC_R(ofSize: 12) // 字体大小
let maxWidth = KScreenWidth - 74 // 最大宽度限制 let maxWidth = KScreenWidth - 74 // 最大宽度限制
...@@ -202,6 +216,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -202,6 +216,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
bottomView = { bottomView = {
let bottom = UIView() let bottom = UIView()
bottom.backgroundColor = .white bottom.backgroundColor = .white
bottom.isHidden = true
return bottom return bottom
}() }()
view.addSubview(bottomView) view.addSubview(bottomView)
...@@ -248,7 +263,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -248,7 +263,7 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
//发送接口 //发送接口
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") { if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
YHHUD.show(.progress(message: "发送中...")) YHHUD.show(.progress(message: "发送中..."))
let params = ["order_id":orderID,"ids":[self.id],"email":text] let params = ["order_id":orderID,"ids":[self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0],"email":text]
self.viewModel?.sendEmailForDocs(params, callBackBlock: { success, error in self.viewModel?.sendEmailForDocs(params, callBackBlock: { success, error in
YHHUD.hide() YHHUD.hide()
if success { if success {
...@@ -274,11 +289,13 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -274,11 +289,13 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
} }
@objc func submit() { @objc func submit() {
YHHUD.show(.progress(message: ""))
viewModel.requestSignConfirm("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)") {[weak self] success, error in viewModel.requestSignConfirm("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)") {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
YHHUD.hide()
if success { if success {
self.getData()
YHHUD.flash(message: "提交成功") YHHUD.flash(message: "提交成功")
self.getData()
} else { } else {
if let errorMsg = error?.errorMsg, !errorMsg.isEmpty { if let errorMsg = error?.errorMsg, !errorMsg.isEmpty {
YHHUD.flash(message: errorMsg) YHHUD.flash(message: errorMsg)
...@@ -290,11 +307,14 @@ class YHMyDocumentsDetailViewController: YHBaseViewController { ...@@ -290,11 +307,14 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
func showSureAlert() { func showSureAlert() {
YHCommonAlertView.show("", "请确认是否已完成编辑并提交", "取消", "确认") {[weak self] in YHCommonAlertView.show("", "请确认是否已完成编辑并提交", "取消", "确认") {[weak self] in
guard let self = self else { return } guard let self = self else { return }
YHHUD.show(.progress(message: ""))
self.viewModel.requestDocumentSubmit("\(self.id)") {[weak self] success, error in self.viewModel.requestDocumentSubmit("\(self.id)") {[weak self] success, error in
YHHUD.hide()
guard let self = self else { return } guard let self = self else { return }
if success { if success {
YHHUD.flash(message: "提交成功") YHHUD.flash(message: "提交成功")
self.navigationController?.popViewController() self.getData()
// self.navigationController?.popViewController()
} }
} }
} }
...@@ -408,26 +428,22 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -408,26 +428,22 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
cell.block = {[weak self] type in cell.block = {[weak self] type in
guard let self = self else { return } guard let self = self else { return }
if type == .edit { if type == .edit {
if self.viewModel.mainModel?.prospectus.id != 0 { YHHUD.show(.progress(message: ""))
// 跳转赴港计划书编辑页面 self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in
} else { YHHUD.hide()
YHHUD.show(.progress(message: "")) guard let self = self else { return }
self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in if success {
YHHUD.hide() self.viewModel.requestDocumentRecord("\(id)", 2) { success, error in
guard let self = self else { return }
if success {
self.viewModel.requestDocumentRecord("\(id)", 2) { success, error in
}
guard let url = URL(string: self.viewModel?.urlModel?.url) else { return }
let tmpVC = SFSafariViewController(url: url)
tmpVC.dismissButtonStyle = .close
tmpVC.delegate = self
self.navigationController?.pushViewController(tmpVC)
} else {
YHHUD.flash(message: error?.errorMsg ?? "")
} }
}) guard let url = URL(string: self.viewModel?.urlModel?.url) else { return }
} let tmpVC = SFSafariViewController(url: url)
tmpVC.dismissButtonStyle = .close
tmpVC.delegate = self
self.navigationController?.pushViewController(tmpVC)
} else {
YHHUD.flash(message: error?.errorMsg ?? "")
}
})
} }
if type == .submit { if type == .submit {
...@@ -435,32 +451,29 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -435,32 +451,29 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
} }
if type == .look { if type == .look {
if self.viewModel.mainModel?.prospectus.id != 0 { YHHUD.show(.progress(message: ""))
// 跳转赴港计划书查看页面 self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in
} else { YHHUD.hide()
YHHUD.show(.progress(message: "")) guard let self = self else { return }
self.viewModel.requestDocumentsTemporaryUrl("\(id)", callBackBlock: {[weak self] success, error in if success {
YHHUD.hide() self.viewModel.requestDocumentRecord("\(id)", 1) { success, error in
guard let self = self else { return }
if success {
self.viewModel.requestDocumentRecord("\(id)", 1) { success, error in
}
guard let url = URL(string: self.viewModel?.urlModel?.url) else { return }
let tmpVC = SFSafariViewController(url: url)
tmpVC.dismissButtonStyle = .close
tmpVC.delegate = self
self.navigationController?.pushViewController(tmpVC)
} else {
YHHUD.flash(message: error?.errorMsg ?? "")
} }
}) guard let url = URL(string: self.viewModel?.urlModel?.url) else { return }
} let tmpVC = SFSafariViewController(url: url)
tmpVC.dismissButtonStyle = .close
tmpVC.delegate = self
self.navigationController?.pushViewController(tmpVC)
} else {
YHHUD.flash(message: error?.errorMsg ?? "")
}
})
} }
} }
return cell return cell
} else { } else {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self)
cell.type = self.viewModel.mainModel?.writing_document.doc_sign.doc_type ?? 0
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
return cell return cell
...@@ -468,6 +481,9 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -468,6 +481,9 @@ extension YHMyDocumentsDetailViewController: UITableViewDelegate, UITableViewDat
let cell = tableView.dequeueReusableCell(withClass: YHDocumentToActionTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHDocumentToActionTableViewCell.self)
cell.dataSource = self.viewModel.mainModel cell.dataSource = self.viewModel.mainModel
cell.isSign = self.isSign cell.isSign = self.isSign
if self.type == 5 || self.type == 4 {
cell.isSign = true
}
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
cell.block = { [weak self] type in cell.block = { [weak self] type in
...@@ -739,6 +755,10 @@ extension YHMyDocumentsDetailViewController: SFSafariViewControllerDelegate { ...@@ -739,6 +755,10 @@ extension YHMyDocumentsDetailViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成 // MARK: 点击左上角的完成
func safariViewControllerDidFinish(_ controller: SFSafariViewController) { func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
controller.navigationController?.popViewController() controller.navigationController?.popViewController()
viewModel.requestSignBack("\(self.viewModel.mainModel?.writing_document.doc_sign.id ?? 0)") {[weak self] success, error in
guard let self = self else { return }
self.getData()
}
} }
// MARK: 加载完成 // MARK: 加载完成
......
...@@ -346,21 +346,16 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS ...@@ -346,21 +346,16 @@ extension YHMyDocumentsListViewController: UITableViewDelegate, UITableViewDataS
tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none) tableView.reloadRows(at: [indexPath], with: UITableView.RowAnimation.none)
updateBottomViewNumbers() updateBottomViewNumbers()
} else { } else {
if model.file_type == "doc" { //文书状态
if model.template_id == 195 { if model.template_id == 195 {
//跳转赴港计划书 //跳转赴港计划书
let vc = YHHKPlanDoctumentVC() let vc = YHHKPlanDoctumentVC()
vc.supplement_id = model.id vc.supplement_id = model.id
vc.status = model.status vc.status = model.status
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} else {
let vc = YHMyDocumentsDetailViewController()
vc.id = model.id
self.navigationController?.pushViewController(vc)
}
} else { } else {
let vc = YHMySignatureDetailViewController() let vc = YHMyDocumentsDetailViewController()
vc.id = model.id vc.id = model.id
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
} }
......
...@@ -144,46 +144,100 @@ class YHDocListCell: UITableViewCell { ...@@ -144,46 +144,100 @@ class YHDocListCell: UITableViewCell {
} else { } else {
checkButton.isHidden = true checkButton.isHidden = true
statusHoldView.isHidden = false statusHoldView.isHidden = false
/* var statusTxt = "--"
docOpt: { var color : UIColor = .failColor
1: '待确认',
2: '待签章', if dataSource.document.status == 6 && dataSource.sign_doc.id > 0 && dataSource.sign_doc.status > 2 {
3: '已驳回', //签字状态
4: '待核对', let status = dataSource.sign_doc.status
5: '已签章', if status == 3 {
6: '已定稿', statusTxt = "待签章"
7: '已完成' color = UIColor.brandMainColor
}, } else if status == 4 {
*/ statusTxt = "已签章"
var statusTxt = "" color = UIColor.successColor
var color : UIColor = .brandMainColor } else if status == 5 {
statusTxt = "已完成"
color = UIColor.labelTextColor2
} else if status == 6 {
statusTxt = "已驳回"
color = UIColor.failColor
} else {
statusTxt = "--"
color = UIColor.failColor
}
} else {
//文书状态
let status = dataSource.document.status
if status == 2 {
statusTxt = "待确认"
color = UIColor.brandMainColor
} else if status == 3 {
statusTxt = "核对中"
color = UIColor.warnColor
} else if status == 4 {
statusTxt = "核对中"
color = UIColor.warnColor
} else if status == 5 {
statusTxt = "已驳回"
color = UIColor.failColor
} else if status == 6 {
statusTxt = "已定稿"
color = UIColor.labelTextColor2
} else {
statusTxt = "--"
color = UIColor.failColor
}
}
//
// if dataSource.file_type.contains("sign", caseSensitive: true) {
// let status = dataSource.sign_doc.status
// if status == 3 {
// statusTxt = "待签章"
// color = UIColor.brandMainColor
// } else if status == 4 {
// statusTxt = "已签章"
// color = UIColor.successColor
// } else if status == 5 {
// statusTxt = "已完成"
// color = UIColor.labelTextColor2
// } else if status == 6 {
// statusTxt = "已驳回"
// color = UIColor.failColor
// } else {
// statusTxt = "--"
// color = UIColor.failColor
// }
// } else if dataSource.file_type.contains("doc", caseSensitive: true) {
// let status = dataSource.status
// if status == 2 {
// statusTxt = "待确认"
// color = UIColor.brandMainColor
// } else if status == 3 {
// statusTxt = "核对中"
// color = UIColor.warnColor
// } else if status == 4 {
// statusTxt = "核对中"
// color = UIColor.warnColor
// } else if status == 5 {
// statusTxt = "已驳回"
// color = UIColor.failColor
// } else if status == 6 {
// statusTxt = "已定稿"
// color = UIColor.labelTextColor2
// } else {
// statusTxt = "--"
// color = UIColor.failColor
// }
// } else {
// statusTxt = "--"
// color = UIColor.failColor
//
// }
let status = dataSource.status
if status == 1 {
statusTxt = "待确认"
color = UIColor.brandMainColor
} else if status == 2 {
statusTxt = "待签章"
color = UIColor.brandMainColor
} else if status == 3 {
statusTxt = "已驳回"
color = UIColor.failColor
} else if status == 4 {
statusTxt = "核对中"
color = UIColor.warnColor
} else if status == 5 {
statusTxt = "已签章"
color = UIColor.successColor
} else if status == 6 {
statusTxt = "已定稿"
color = UIColor.labelTextColor2
} else if status == 7 {
statusTxt = "已完成"
color = UIColor.labelTextColor2
} else {
statusTxt = "--"
color = UIColor.failColor
}
statusLabel.text = statusTxt statusLabel.text = statusTxt
statusLabel.textColor = color statusLabel.textColor = color
} }
...@@ -230,7 +284,6 @@ class YHDocListCell: UITableViewCell { ...@@ -230,7 +284,6 @@ class YHDocListCell: UITableViewCell {
} }
statusLabel.text = statusTxt statusLabel.text = statusTxt
statusLabel.textColor = color statusLabel.textColor = color
} }
} }
......
...@@ -69,8 +69,9 @@ class YHDocumentFileItemView: UIView { ...@@ -69,8 +69,9 @@ class YHDocumentFileItemView: UIView {
}() }()
addSubview(centerButton) addSubview(centerButton)
centerButton.snp.makeConstraints { make in centerButton.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview() make.top.bottom.equalToSuperview()
make.left.equalTo(112) make.left.equalTo(112)
make.right.equalTo(-50)
} }
deleteButton = { deleteButton = {
...@@ -86,6 +87,7 @@ class YHDocumentFileItemView: UIView { ...@@ -86,6 +87,7 @@ class YHDocumentFileItemView: UIView {
make.width.height.equalTo(16) make.width.height.equalTo(16)
} }
deleteButton.YH_clickEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
} }
func updateAllViews() { func updateAllViews() {
......
...@@ -211,48 +211,67 @@ class YHDocumentMessageTableViewCell: UITableViewCell { ...@@ -211,48 +211,67 @@ class YHDocumentMessageTableViewCell: UITableViewCell {
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
if dataSource.prospectus.id == 0 { if dataSource.prospectus.id == 0 {
//state 1待提交 2待客户确认 3待核对 4待审核 5驳回 6已定稿 var statusTxt = ""
var color = UIColor.red var color : UIColor = .brandMainColor
var title = " 待提交 "
if dataSource.writing_document.status == 1 { let status = dataSource.writing_document.status
title = " 待提交 " if status == 1 {
statusTxt = " 不展示 "
color = UIColor.brandMainColor color = UIColor.brandMainColor
lookButton.isHidden = true lookButton.isHidden = true
} editButton.isHidden = false
if dataSource.writing_document.status == 2 { submitButton.isHidden = false
title = " 待确认 " } else if status == 2 {
statusTxt = " 待确认 "
color = UIColor.brandMainColor color = UIColor.brandMainColor
lookButton.isHidden = true lookButton.isHidden = true
} editButton.isHidden = false
if dataSource.writing_document.status == 3 { submitButton.isHidden = false
title = "核对中" } else if status == 3 {
statusTxt = " 核对中 "
color = UIColor.warnColor color = UIColor.warnColor
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} } else if status == 4 {
if dataSource.writing_document.status == 4 { statusTxt = " 核对中 "
title = " 待审核 "
color = UIColor.warnColor color = UIColor.warnColor
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} } else if status == 5 {
if dataSource.writing_document.status == 5 { statusTxt = " 已驳回 "
title = " 已驳回 " color = UIColor.successColor
color = UIColor.failColor lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} } else if status == 6 {
if dataSource.writing_document.status == 6 { statusTxt = " 已定稿 "
title = " 已定稿 " color = UIColor.labelTextColor2
lookButton.isHidden = false
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else if status == 7 {
statusTxt = " 已完成 "
color = UIColor.labelTextColor2 color = UIColor.labelTextColor2
lookButton.isHidden = false
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else {
statusTxt = " -- "
color = UIColor.failColor
lookButton.isHidden = false
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} }
subTitleLabel.text = title
subTitleLabel.text = statusTxt
subTitleLabel.textColor = color subTitleLabel.textColor = color
subTitleLabel.backgroundColor = color.withAlphaComponent(0.08) subTitleLabel.backgroundColor = color.withAlphaComponent(0.08)
fileNameLabel.text = dataSource.writing_document.name fileNameLabel.text = dataSource.writing_document.name
......
...@@ -14,10 +14,9 @@ class YHDocumentPromptTableViewCell: UITableViewCell { ...@@ -14,10 +14,9 @@ class YHDocumentPromptTableViewCell: UITableViewCell {
var promptImageView: UIImageView! var promptImageView: UIImageView!
var titleLabel: UILabel! var titleLabel: UILabel!
var subTitleLabel: UILabel! var subTitleLabel: UILabel!
var type: Int = 0 {
var dataSource: YHMyDocumentDetailModel? {
didSet { didSet {
updateAllViews() updatePrompt()
} }
} }
...@@ -104,10 +103,22 @@ class YHDocumentPromptTableViewCell: UITableViewCell { ...@@ -104,10 +103,22 @@ class YHDocumentPromptTableViewCell: UITableViewCell {
} }
func updateAllViews() { func updatePrompt() {
guard let dataSource = dataSource else { return } // 1-代理委托书,2-受养人声明,3-工作经验补充表,4-声明书,5-人才清单声明书,6-个人陈述书,7-推荐信,8-组织架构图
// titleLabel.text = dataSource.doc_name
// subTitleLabel.text = "\(dataSource.doc_type)" if type == 7 || type == 8 {
let a: ASAttributedString = .init("您可以", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("转发给需签署的人签字,若需要盖章,则先确认文书是否已签完,然后下载打印去盖章,扫描签章件上传", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else if type == 2 {
let a: ASAttributedString = .init("您可以", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("先下载原件,然后打印去签字/盖章,最后扫描签字/盖章件上传", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
} else {
let a: ASAttributedString = .init("您可以", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("直接电子签署文书,或上传已签章件", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
subTitleLabel.attributed.text = a + aa
}
} }
} }
......
...@@ -106,33 +106,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell { ...@@ -106,33 +106,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
bottomView.snp.makeConstraints { make in bottomView.snp.makeConstraints { make in
make.right.left.equalToSuperview() make.right.left.equalToSuperview()
make.height.equalTo(1) make.height.equalTo(1)
make.top.equalTo(123) make.top.equalTo(115)
}
bottomLeftLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomLeftLineView)
bottomLeftLineView.snp.makeConstraints { make in
make.left.equalTo(width)
make.width.equalTo(1)
make.bottom.equalTo(-17.5)
make.height.equalTo(16)
}
bottomRightLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomRightLineView)
bottomRightLineView.snp.makeConstraints { make in
make.left.equalTo(width * 2)
make.width.equalTo(1)
make.bottom.equalTo(-17.5)
make.height.equalTo(16)
} }
editButton = { editButton = {
...@@ -208,11 +182,37 @@ class YHDocumentToActionTableViewCell: UITableViewCell { ...@@ -208,11 +182,37 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
make.height.equalTo(40) make.height.equalTo(40)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
bottomLeftLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomLeftLineView)
bottomLeftLineView.snp.makeConstraints { make in
make.left.equalTo(width)
make.width.equalTo(1)
make.centerY.equalTo(editButton.snp.centerY)
make.height.equalTo(16)
}
bottomRightLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomRightLineView)
bottomRightLineView.snp.makeConstraints { make in
make.left.equalTo(width * 2)
make.width.equalTo(1)
make.centerY.equalTo(editButton.snp.centerY)
make.height.equalTo(16)
}
} }
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
let suffix = dataSource.writing_document.name.pathExtension.lowercased() let suffix = dataSource.writing_document.doc_sign.doc_send.pathExtension.lowercased()
var iconImgName = "my_cer_type_pdf" var iconImgName = "my_cer_type_pdf"
if suffix == "jpeg" { if suffix == "jpeg" {
iconImgName = "my_cer_type_jpg" iconImgName = "my_cer_type_jpg"
...@@ -232,7 +232,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell { ...@@ -232,7 +232,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
iconImgName = "my_cer_type_tiff" iconImgName = "my_cer_type_tiff"
} }
fileImageView.image = UIImage(named: iconImgName) fileImageView.image = UIImage(named: iconImgName)
fileNameLabel.text = dataSource.writing_document.name fileNameLabel.text = dataSource.writing_document.doc_sign.doc_type_name
} }
@objc func editButtonClick() { @objc func editButtonClick() {
......
...@@ -129,6 +129,16 @@ class YHDocumentUploadTableViewCell: UITableViewCell { ...@@ -129,6 +129,16 @@ class YHDocumentUploadTableViewCell: UITableViewCell {
make.bottom.equalTo(-153) make.bottom.equalTo(-153)
make.top.equalTo(52) make.top.equalTo(52)
} }
let line = UIView()
line.backgroundColor = UIColor.separatorColor
centerView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(52)
make.height.equalTo(1)
make.right.equalTo(-18)
}
} }
func updateAllViews() { func updateAllViews() {
......
...@@ -174,9 +174,11 @@ private extension YHHKPlanItemView { ...@@ -174,9 +174,11 @@ private extension YHHKPlanItemView {
if model.canEditFlag { if model.canEditFlag {
myTextView.isEditable = true myTextView.isEditable = true
myTextView.isSelectable = true myTextView.isSelectable = true
myTextView.textColor = UIColor.mainTextColor
} else { } else {
myTextView.isEditable = false myTextView.isEditable = false
myTextView.isSelectable = false myTextView.isSelectable = false
myTextView.textColor = UIColor(hex: 0x222222, alpha: 0.5)
myTextView.wrapToContent() myTextView.wrapToContent()
} }
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
// //
import UIKit import UIKit
import Alamofire
class YHMyDocumentsDetailViewModel: YHBaseViewModel { class YHMyDocumentsDetailViewModel: YHBaseViewModel {
var mainModel: YHMyDocumentDetailModel? var mainModel: YHMyDocumentDetailModel?
...@@ -92,7 +93,7 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel { ...@@ -92,7 +93,7 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel {
//提交赴港计划书 //提交赴港计划书
func submitHKPlanDocument(_ params : [String : Any], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) { func submitHKPlanDocument(_ params : [String : Any], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Documents.hkPlanApi let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Documents.hkPlanApi
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard self != nil else { return } guard self != nil else { return }
if json.code == 200 { if json.code == 200 {
...@@ -296,6 +297,25 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel { ...@@ -296,6 +297,25 @@ class YHMyDocumentsDetailViewModel: YHBaseViewModel {
callBackBlock(false, err) callBackBlock(false, err)
} }
} }
func requestSignBack(_ id: String, callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
// let params: [String : Any] = ["order_id": orderId]
let params: [String : Any] = ["id": id]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.signCallBack
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
let dic = json.data
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
} }
private extension YHMyDocumentsDetailViewModel { private extension YHMyDocumentsDetailViewModel {
......
...@@ -168,7 +168,7 @@ class YHSchemeTableViewCell: UITableViewCell { ...@@ -168,7 +168,7 @@ class YHSchemeTableViewCell: UITableViewCell {
mainMessageLabel.attributedText = newString mainMessageLabel.attributedText = newString
let paragraphStyle = NSMutableParagraphStyle() let paragraphStyle = NSMutableParagraphStyle()
paragraphStyle.lineSpacing = 10 // 设置行间距 paragraphStyle.lineSpacing = 4 // 设置行间距
let attributes: [NSAttributedString.Key: Any] = [ let attributes: [NSAttributedString.Key: Any] = [
.paragraphStyle: paragraphStyle, .paragraphStyle: paragraphStyle,
.font: UIFont.PFSC_R(ofSize: 14) .font: UIFont.PFSC_R(ofSize: 14)
......
...@@ -53,6 +53,10 @@ class YHMySignatureDetailViewController: YHBaseViewController { ...@@ -53,6 +53,10 @@ class YHMySignatureDetailViewController: YHBaseViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
viewModel.requestSignBack("\(id)") {[weak self] success, error in
guard let self = self else { return }
self.getData()
}
getData() getData()
} }
...@@ -99,24 +103,24 @@ class YHMySignatureDetailViewController: YHBaseViewController { ...@@ -99,24 +103,24 @@ class YHMySignatureDetailViewController: YHBaseViewController {
} else { } else {
YHHUD.flash(message: error?.errorMsg ?? "") YHHUD.flash(message: error?.errorMsg ?? "")
} }
self.checkSign()
}) })
}
func checkSign() {
viewModel?.requestSignCallBack("\(self.id)", callBackBlock: {[weak self] success, error in viewModel?.requestSignCallBack("\(self.id)", callBackBlock: {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.isSign = success self.isSign = success
if self.type == 3 && self.viewModel.mainModel?.doc_return_manual.count == 0 && !success { if self.type == 3 && self.viewModel.mainModel?.doc_return_manual.count == 0 && !success {
self.bottomButton.isEnabled = false self.bottomButton.isEnabled = false
self.bottomButton.alpha = 0.4 self.bottomButton.alpha = 0.4
} else {
self.bottomButton.isEnabled = true
self.bottomButton.alpha = 1
} }
self.tableView.reloadData() self.tableView.reloadData()
}) })
} }
func getPromptHeight(_ value: String) -> CGFloat { func getPromptHeight(_ value: String) -> CGFloat {
let text = value // 要显示的文本内容 let text = "驳回原因:" + value // 要显示的文本内容
let font = UIFont.PFSC_R(ofSize: 12) // 字体大小 let font = UIFont.PFSC_R(ofSize: 12) // 字体大小
let maxWidth = KScreenWidth - 74 // 最大宽度限制 let maxWidth = KScreenWidth - 74 // 最大宽度限制
...@@ -173,6 +177,7 @@ class YHMySignatureDetailViewController: YHBaseViewController { ...@@ -173,6 +177,7 @@ class YHMySignatureDetailViewController: YHBaseViewController {
bottomView = { bottomView = {
let bottom = UIView() let bottom = UIView()
bottom.backgroundColor = .white bottom.backgroundColor = .white
bottom.isHidden = true
return bottom return bottom
}() }()
view.addSubview(bottomView) view.addSubview(bottomView)
...@@ -357,6 +362,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -357,6 +362,7 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 { if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self)
cell.type = self.viewModel.mainModel?.doc_type ?? 0
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
return cell return cell
...@@ -364,6 +370,9 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat ...@@ -364,6 +370,9 @@ extension YHMySignatureDetailViewController: UITableViewDelegate, UITableViewDat
let cell = tableView.dequeueReusableCell(withClass: YHSignatureToActionTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHSignatureToActionTableViewCell.self)
cell.dataSource = self.viewModel.mainModel cell.dataSource = self.viewModel.mainModel
cell.isSign = self.isSign cell.isSign = self.isSign
if self.type == 5 || self.type == 4 {
cell.isSign = true
}
cell.backgroundColor = .clear cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear cell.contentView.backgroundColor = .clear
cell.block = { [weak self] type in cell.block = { [weak self] type in
...@@ -639,6 +648,10 @@ extension YHMySignatureDetailViewController: SFSafariViewControllerDelegate { ...@@ -639,6 +648,10 @@ extension YHMySignatureDetailViewController: SFSafariViewControllerDelegate {
// MARK: 点击左上角的完成 // MARK: 点击左上角的完成
func safariViewControllerDidFinish(_ controller: SFSafariViewController) { func safariViewControllerDidFinish(_ controller: SFSafariViewController) {
controller.navigationController?.popViewController() controller.navigationController?.popViewController()
viewModel.requestSignBack("\(id)") {[weak self] success, error in
guard let self = self else { return }
self.getData()
}
} }
// MARK: 加载完成 // MARK: 加载完成
......
...@@ -382,124 +382,3 @@ extension YHMySignatureListViewController { ...@@ -382,124 +382,3 @@ extension YHMySignatureListViewController {
} }
} }
} }
//class YHMySignatureListViewController: YHBaseViewController {
// var bottomView: UIView!
// var bottomButton: UIButton!
// var tableView: UITableView!
// var dataSource: [YHWorkItemListModel]?
// var viewModel: YHMySignatureListViewModel?
// var orderId: Int = 0
// override func viewDidLoad() {
// super.viewDidLoad()
// viewModel = YHMySignatureListViewModel()
// gk_navTitle = "我的签字"
// setView()
// getData()
// // Do any additional setup after loading the view.
// }
//
// override func viewWillAppear(_ animated: Bool) {
// super.viewWillAppear(animated)
// getData()
// }
//
// func getData() {
// viewModel.requestSignatureList("\(orderId)", callBackBlock: {[weak self] success, error in
// guard let self = self else { return }
// self.tableView.reloadData()
// })
// }
//
// 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: YHMySignatureListTableViewCell.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 = UIFont.PFSC_M(ofSize: 16)
// button.contentHorizontalAlignment = .center
// button.setTitle("提交", for: .normal)
// button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
// button.layer.cornerRadius = kCornerRadius6
// button.clipsToBounds = true
// 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)
// }
//
// bottomButton.layoutIfNeeded()
// bottomButton.addYinHeGradualLayer()
// }
//
// @objc func submit() {
// YHCommonAlertView.show("实名认证", "为保证签署有效,请先实名认证", "取消", "去认证") {
//
// }
// }
//}
//
//extension YHMySignatureListViewController: UITableViewDelegate, UITableViewDataSource {
// func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
// return viewModel.mainModel?.list.count ?? 0
// }
//
// func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
// let cell = tableView.dequeueReusableCell(withClass: YHMySignatureListTableViewCell.self)
// cell.dataSource = viewModel.mainModel?.list[indexPath.row]
// cell.backgroundColor = .clear
// cell.contentView.backgroundColor = .clear
// return cell
// }
//
// func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
// return CGFloat(82)
// }
//
// func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
// let model = viewModel.mainModel?.list[indexPath.row]
// let vc = YHMySignatureDetailViewController()
// vc.id = model?.id ?? 0
// self.navigationController?.pushViewController(vc)
// }
//}
...@@ -13,6 +13,7 @@ class YHCommonAlertView: UIView { ...@@ -13,6 +13,7 @@ class YHCommonAlertView: UIView {
var agreeBlock: AgreeBlock? var agreeBlock: AgreeBlock?
var centerView: UIView! var centerView: UIView!
var titleLabel: UILabel! var titleLabel: UILabel!
var lineView: UIView!
var messageLabel: UILabel! var messageLabel: UILabel!
var agreeButton: UIButton! var agreeButton: UIButton!
var disAgressButton: UIButton! var disAgressButton: UIButton!
...@@ -50,8 +51,8 @@ class YHCommonAlertView: UIView { ...@@ -50,8 +51,8 @@ class YHCommonAlertView: UIView {
messageLabel.snp.remakeConstraints { make in messageLabel.snp.remakeConstraints { make in
make.left.equalTo(22) make.left.equalTo(22)
make.right.equalTo(-22) make.right.equalTo(-22)
make.height.equalTo(42) make.height.lessThanOrEqualTo(60)
make.top.equalTo(40) make.top.equalTo(37)
} }
} }
} }
...@@ -96,7 +97,7 @@ class YHCommonAlertView: UIView { ...@@ -96,7 +97,7 @@ class YHCommonAlertView: UIView {
let label = UILabel() let label = UILabel()
label.textAlignment = .center label.textAlignment = .center
label.textColor = UIColor.mainTextColor label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_M(ofSize: 16) label.font = UIFont.PFSC_R(ofSize: 16)
label.numberOfLines = 0 label.numberOfLines = 0
return label return label
}() }()
...@@ -149,6 +150,17 @@ class YHCommonAlertView: UIView { ...@@ -149,6 +150,17 @@ class YHCommonAlertView: UIView {
make.height.equalTo(45) make.height.equalTo(45)
} }
lineView = {
let line = UIView()
line.backgroundColor = UIColor(hex: 0xF0F0F0)
return line
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalTo(0)
make.height.equalTo(1)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
} }
@objc func agree() { @objc func agree() {
......
...@@ -118,33 +118,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell { ...@@ -118,33 +118,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
bottomView.snp.makeConstraints { make in bottomView.snp.makeConstraints { make in
make.right.left.equalToSuperview() make.right.left.equalToSuperview()
make.height.equalTo(1) make.height.equalTo(1)
make.top.equalTo(123) make.top.equalTo(115)
}
bottomLeftLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomLeftLineView)
bottomLeftLineView.snp.makeConstraints { make in
make.left.equalTo(width)
make.width.equalTo(1)
make.bottom.equalTo(-17.5)
make.height.equalTo(16)
}
bottomRightLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomRightLineView)
bottomRightLineView.snp.makeConstraints { make in
make.left.equalTo(width * 2)
make.width.equalTo(1)
make.bottom.equalTo(-17.5)
make.height.equalTo(16)
} }
editButton = { editButton = {
...@@ -220,11 +194,37 @@ class YHSignatureToActionTableViewCell: UITableViewCell { ...@@ -220,11 +194,37 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
make.height.equalTo(40) make.height.equalTo(40)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
bottomLeftLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomLeftLineView)
bottomLeftLineView.snp.makeConstraints { make in
make.left.equalTo(width)
make.width.equalTo(1)
make.centerY.equalTo(editButton.snp.centerY)
make.height.equalTo(16)
}
bottomRightLineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(bottomRightLineView)
bottomRightLineView.snp.makeConstraints { make in
make.left.equalTo(width * 2)
make.width.equalTo(1)
make.centerY.equalTo(editButton.snp.centerY)
make.height.equalTo(16)
}
} }
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
let suffix = dataSource.doc_type_name.pathExtension.lowercased() let suffix = dataSource.doc_send.pathExtension.lowercased()
var iconImgName = "my_cer_type_pdf" var iconImgName = "my_cer_type_pdf"
if suffix == "jpeg" { if suffix == "jpeg" {
iconImgName = "my_cer_type_jpg" iconImgName = "my_cer_type_jpg"
......
...@@ -129,6 +129,16 @@ class YHSignatureUploadTableViewCell: UITableViewCell { ...@@ -129,6 +129,16 @@ class YHSignatureUploadTableViewCell: UITableViewCell {
make.bottom.equalTo(-153) make.bottom.equalTo(-153)
make.top.equalTo(52) make.top.equalTo(52)
} }
let line = UIView()
line.backgroundColor = UIColor.separatorColor
centerView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(52)
make.height.equalTo(1)
make.right.equalTo(-18)
}
} }
func updateAllViews() { func updateAllViews() {
......
...@@ -210,4 +210,23 @@ class YHMySignatureDetailViewModel: YHBaseViewModel { ...@@ -210,4 +210,23 @@ class YHMySignatureDetailViewModel: YHBaseViewModel {
callBackBlock(false, err) callBackBlock(false, err)
} }
} }
func requestSignBack(_ id: String, callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
// let params: [String : Any] = ["order_id": orderId]
let params: [String : Any] = ["id": id]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.signCallBack
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
let dic = json.data
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
} }
//
// YHHomeCollectionLayout.swift
// galaxy
//
// Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
public let CollectionViewWaterfallElementKindSectionHeader = "CollectionViewWaterfallElementKindSectionHeader"
public let CollectionViewWaterfallElementKindSectionFooter = "CollectionViewWaterfallElementKindSectionFooter"
@objc public protocol CollectionViewWaterfallLayoutDelegate: UICollectionViewDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize
@objc optional func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, heightForHeaderInSection section: Int) -> Float
@objc optional func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, heightForFooterInSection section: Int) -> Float
@objc optional func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, insetForSection section: Int) -> UIEdgeInsets
@objc optional func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, insetForHeaderInSection section: Int) -> UIEdgeInsets
@objc optional func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, insetForFooterInSection section: Int) -> UIEdgeInsets
@objc optional func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, minimumInteritemSpacingForSection section: Int) -> Float
}
class YHHomeCollectionLayout: UICollectionViewLayout {
// MARK: - Private constants
/// How many items to be union into a single rectangle
private let unionSize = 20
// MARK: - Public Properties
public var columnCount: Int = 2 {
didSet {
invalidateIfNotEqual(oldValue, newValue: columnCount)
}
}
public var minimumColumnSpacing: Float = 10.0 {
didSet {
invalidateIfNotEqual(oldValue, newValue: minimumColumnSpacing)
}
}
public var minimumInteritemSpacing: Float = 10.0 {
didSet {
invalidateIfNotEqual(oldValue, newValue: minimumInteritemSpacing)
}
}
public var headerHeight: Float = 0.0 {
didSet {
invalidateIfNotEqual(oldValue, newValue: headerHeight)
}
}
public var footerHeight: Float = 0.0 {
didSet {
invalidateIfNotEqual(oldValue, newValue: footerHeight)
}
}
public var headerInset: UIEdgeInsets = .zero {
didSet {
invalidateIfNotEqual(oldValue, newValue: headerInset)
}
}
public var footerInset:UIEdgeInsets = .zero {
didSet {
invalidateIfNotEqual(oldValue, newValue: footerInset)
}
}
public var sectionInset:UIEdgeInsets = .zero {
didSet {
invalidateIfNotEqual(oldValue, newValue: sectionInset)
}
}
public override var collectionViewContentSize: CGSize {
let numberOfSections = collectionView?.numberOfSections
if numberOfSections == 0 {
return CGSize.zero
}
var contentSize = collectionView?.bounds.size
contentSize?.height = CGFloat(columnHeights[0])
return contentSize!
}
// MARK: - Private Properties
private weak var delegate: CollectionViewWaterfallLayoutDelegate? {
get {
return collectionView?.delegate as? CollectionViewWaterfallLayoutDelegate
}
}
private var columnHeights = [Float]()
private var sectionItemAttributes = [[UICollectionViewLayoutAttributes]]()
private var allItemAttributes = [UICollectionViewLayoutAttributes]()
private var headersAttribute = [Int: UICollectionViewLayoutAttributes]()
private var footersAttribute = [Int: UICollectionViewLayoutAttributes]()
private var unionRects = [CGRect]()
// MARK: - UICollectionViewLayout Methods
public override func prepare() {
super.prepare()
guard let numberOfSections = collectionView?.numberOfSections else {
return
}
guard let delegate = delegate else {
assertionFailure("UICollectionView's delegate should conform to WaterfallLayoutDelegate protocol")
return
}
guard let collectionView = collectionView else {
return
}
assert(columnCount > 0, "WaterfallFlowLayout's columnCount should be greater than 0")
// Initialize variables
headersAttribute.removeAll(keepingCapacity: false)
footersAttribute.removeAll(keepingCapacity: false)
unionRects.removeAll(keepingCapacity: false)
columnHeights.removeAll(keepingCapacity: false)
allItemAttributes.removeAll(keepingCapacity: false)
sectionItemAttributes.removeAll(keepingCapacity: false)
for _ in 0..<columnCount {
self.columnHeights.append(0)
}
// Create attributes
var top: Float = 0
var attributes: UICollectionViewLayoutAttributes
for section in 0..<numberOfSections {
/*
* 1. Get section-specific metrics (minimumInteritemSpacing, sectionInset)
*/
let minimumInteritemSpacing: Float = delegate.collectionView?(collectionView, layout: self, minimumInteritemSpacingForSection: section) ?? self.minimumInteritemSpacing
let sectionInset: UIEdgeInsets = delegate.collectionView?(collectionView, layout: self, insetForSection: section) ?? self.sectionInset
let width = Float(collectionView.frame.size.width - sectionInset.left - sectionInset.right)
let itemWidth = floorf((width - Float(columnCount - 1) * Float(minimumColumnSpacing)) / Float(columnCount))
/*
* 2. Section header
*/
let headerHeight: Float = delegate.collectionView?(collectionView, layout: self, heightForHeaderInSection: section) ?? self.headerHeight
let headerInset: UIEdgeInsets = delegate.collectionView?(collectionView, layout: self, insetForHeaderInSection: section) ?? self.headerInset
top += Float(headerInset.top)
if headerHeight > 0 {
attributes = UICollectionViewLayoutAttributes(forSupplementaryViewOfKind: CollectionViewWaterfallElementKindSectionHeader, with: NSIndexPath(item: 0, section: section) as IndexPath)
attributes.frame = CGRect(x: headerInset.left, y: CGFloat(top), width: collectionView.frame.size.width - (headerInset.left + headerInset.right), height: CGFloat(headerHeight))
headersAttribute[section] = attributes
allItemAttributes.append(attributes)
top = Float(attributes.frame.maxY) + Float(headerInset.bottom)
}
top += Float(sectionInset.top)
for idx in 0..<columnCount {
columnHeights[idx] = top
}
/*
* 3. Section items
*/
let itemCount = collectionView.numberOfItems(inSection: section)
var itemAttributes = [UICollectionViewLayoutAttributes]()
// Item will be put into shortest column.
for idx in 0..<itemCount {
let indexPath = NSIndexPath(item: idx, section: section)
let columnIndex = shortestColumnIndex()
let xOffset = Float(sectionInset.left) + Float(itemWidth + minimumColumnSpacing) * Float(columnIndex)
let yOffset = columnHeights[columnIndex]
let itemSize = delegate.collectionView(collectionView, layout: self, sizeForItemAtIndexPath: indexPath)
var itemHeight: Float = 0.0
if itemSize.height > 0 && itemSize.width > 0 {
itemHeight = Float(itemSize.height) * itemWidth / Float(itemSize.width)
}
attributes = UICollectionViewLayoutAttributes(forCellWith: indexPath as IndexPath)
attributes.frame = CGRect(x: CGFloat(xOffset), y: CGFloat(yOffset), width: CGFloat(itemWidth), height: CGFloat(itemHeight))
itemAttributes.append(attributes)
allItemAttributes.append(attributes)
columnHeights[columnIndex] = Float(attributes.frame.maxY) + minimumInteritemSpacing
}
sectionItemAttributes.append(itemAttributes)
/*
* 4. Section footer
*/
let columnIndex = longestColumnIndex()
top = columnHeights[columnIndex] - minimumInteritemSpacing + Float(sectionInset.bottom)
let footerHeight: Float = delegate.collectionView?(collectionView, layout: self, heightForFooterInSection: section) ?? self.footerHeight
let footerInset: UIEdgeInsets = delegate.collectionView?(collectionView, layout: self, insetForFooterInSection: section) ?? self.footerInset
top += Float(footerInset.top)
if footerHeight > 0 {
attributes = UICollectionViewLayoutAttributes(forSupplementaryViewOfKind: CollectionViewWaterfallElementKindSectionFooter, with: NSIndexPath(item: 0, section: section) as IndexPath)
attributes.frame = CGRect(x: footerInset.left, y: CGFloat(top), width: collectionView.frame.size.width - (footerInset.left + footerInset.right), height: CGFloat(footerHeight))
footersAttribute[section] = attributes
allItemAttributes.append(attributes)
top = Float(attributes.frame.maxY) + Float(footerInset.bottom)
}
for idx in 0..<columnCount {
columnHeights[idx] = top
}
}
// Build union rects
var idx = 0
let itemCounts = allItemAttributes.count
while idx < itemCounts {
let rect1 = allItemAttributes[idx].frame
idx = min(idx + unionSize, itemCounts) - 1
let rect2 = allItemAttributes[idx].frame
unionRects.append(rect1.union(rect2))
idx += 1
}
}
public override func layoutAttributesForItem(at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
if indexPath.section >= sectionItemAttributes.count {
return nil
}
if indexPath.item >= sectionItemAttributes[indexPath.section].count {
return nil
}
return sectionItemAttributes[indexPath.section][indexPath.item]
}
public override func layoutAttributesForSupplementaryView(ofKind elementKind: String, at indexPath: IndexPath) -> UICollectionViewLayoutAttributes? {
var attribute: UICollectionViewLayoutAttributes?
if elementKind == CollectionViewWaterfallElementKindSectionHeader {
attribute = headersAttribute[indexPath.section]
} else if elementKind == CollectionViewWaterfallElementKindSectionFooter {
attribute = footersAttribute[indexPath.section]
}
return attribute
}
public override func layoutAttributesForElements(in rect: CGRect) -> [UICollectionViewLayoutAttributes]? {
var begin: Int = 0
var end: Int = unionRects.count
var attrs = [UICollectionViewLayoutAttributes]()
for i in 0..<unionRects.count {
if rect.intersects(unionRects[i]) {
begin = i * unionSize
break
}
}
for i in (0..<unionRects.count).reversed() {
if rect.intersects(unionRects[i]) {
end = min((i+1) * unionSize, allItemAttributes.count)
break
}
}
for i in begin..<end {
let attr = allItemAttributes[i]
if rect.intersects(attr.frame) {
attrs.append(attr)
}
}
return Array(attrs)
}
public override func shouldInvalidateLayout(forBoundsChange newBounds: CGRect) -> Bool {
let oldBounds = collectionView?.bounds
if newBounds.width != oldBounds?.width {
return true
}
return false
}
}
// MARK: - Private Methods
private extension YHHomeCollectionLayout {
func shortestColumnIndex() -> Int {
var index: Int = 0
var shortestHeight = MAXFLOAT
for (idx, height) in columnHeights.enumerated() {
if height < shortestHeight {
shortestHeight = height
index = idx
}
}
return index
}
func longestColumnIndex() -> Int {
var index: Int = 0
var longestHeight:Float = 0
for (idx, height) in columnHeights.enumerated() {
if height > longestHeight {
longestHeight = height
index = idx
}
}
return index
}
func invalidateIfNotEqual<T: Equatable>(_ oldValue: T, newValue: T) {
if oldValue != newValue {
invalidateLayout()
}
}
}
//
// YHHomeCollectionViewCell.swift
// galaxy
//
// Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import Kingfisher
import AVFoundation
import AVKit
class YHHomeCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHHomeCollectionViewCell"
lazy var viewModel: YHHomeWebViewModel = {
let viewModel = YHHomeWebViewModel()
return viewModel
}()
var listModel: YHHomeListModel? {
didSet {
updataSubViews()
}
}
lazy var titleImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: "home_title_image"))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var descripeLable:UILabel = {
let label = UILabel()
label.text = ""
label.textColor = UIColor(hex: 0x121A26, alpha: 1.0)
label.font = UIFont.PFSC_R(ofSize: 14)
label.numberOfLines = 2
label.lineBreakMode = .byWordWrapping
return label
}()
lazy var headImageView:UIImageView = {
let imageV = UIImageView(image: UIImage(named: ""))
imageV.contentMode = .scaleAspectFill
return imageV
}()
lazy var heartImageViewBtn : UIButton = {
let btn : UIButton = UIButton(type: .custom)
btn.setImage(UIImage(named: "home_grey_heart"), for: .normal)
btn.setImage(UIImage(named: "home_red_heart"), for: .selected)
return btn
}()
lazy var numLable:UILabel = {
let label = UILabel()
label.text = ""
label.textColor = UIColor(hex: 0x121A264D, alpha: 0.3)
label.font = UIFont.PFSC_R(ofSize: 12)
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
lazy var playButton: UIButton = {
let btn = UIButton(type: .custom)
btn.setImage(UIImage(named: "home_play_btn"), for: .normal)
btn.isHidden = true
return btn
}()
lazy var playerViewController: AVPlayerViewController = {
let vc = AVPlayerViewController()
return vc
}()
}
extension YHHomeCollectionViewCell {
@objc func clickPlayButton() {
guard let listModel = listModel else { return }
//"https://upload.cdn.galaxy-immi.com/sell/production/video/1638527500518.mp4"
if listModel.media_url.isEmpty == false,let url = URL(string: listModel.media_url) {
let player = AVPlayer(url:url)
playerViewController.player = player
self.parentViewController?.present(playerViewController, animated: true) {
self.playerViewController.player!.play() // 开始播放视频
}
}
}
private func setupUI() {
contentView.clipsToBounds = true
contentView.addSubview(titleImageView)
titleImageView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(210)
}
let subHoldView = UIView()
subHoldView.layer.backgroundColor = UIColor.white.cgColor
subHoldView.layer.borderWidth = 0.6
subHoldView.layer.borderColor = UIColor(red: 0.943, green: 0.952, blue: 0.969, alpha: 1).cgColor
contentView.addSubview(subHoldView)
subHoldView.snp.makeConstraints { make in
make.top.equalTo(titleImageView.snp.bottom)
make.bottom.left.right.equalToSuperview()
}
subHoldView.addSubview(descripeLable)
descripeLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalToSuperview().offset(8)
make.right.equalToSuperview().offset(-8)
}
subHoldView.addSubview(numLable)
numLable.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-8)
make.top.equalTo(descripeLable.snp.bottom).offset(10)
make.height.equalTo(16)
}
subHoldView.addSubview(heartImageViewBtn)
heartImageViewBtn.snp.makeConstraints { make in
make.right.equalTo(numLable.snp.left).offset(-2)
make.height.width.equalTo(16)
make.centerY.equalTo(numLable)
}
heartImageViewBtn.addTarget(self, action: #selector(clickHeart), for: .touchUpInside)
heartImageViewBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 15, left: 15, bottom: 15, right: 15)
contentView.addSubview(playButton)
playButton.snp.makeConstraints { make in
make.top.equalToSuperview().offset(8)
make.right.equalToSuperview().offset(-8)
make.width.height.equalTo(20)
}
playButton.addTarget(self, action: #selector(clickPlayButton), for: .touchUpInside)
}
func updataSubViews() {
guard let listModel = listModel else { return }
titleImageView.snp.remakeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(listModel.img_height_use)
}
if let url = URL(string: listModel.img_url) {
titleImageView.kf.setImage(with: url)
}
descripeLable.text = listModel.title.defaultStringIfEmpty(detaultValue: "***")
descripeLable.snp.removeConstraints()
descripeLable.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(10)
make.left.equalToSuperview().offset(8)
make.right.equalToSuperview().offset(-8)
make.bottom.equalTo(-36)
}
numLable.text = listModel.like_count.string
heartImageViewBtn.isSelected = listModel.is_like
if listModel.type == 1 {
//视频
playButton.isHidden = false
let tap = UITapGestureRecognizer(target: self, action: #selector(tapView(gestureRecognizer:)))
contentView.addGestureRecognizer(tap)
} else {
//资讯
playButton.isHidden = true
contentView.removeGestureRecognizers()
}
}
@objc func clickHeart() {
guard let listModel = listModel else { return }
if YHLoginManager.shared.isLogin() {
if listModel.is_like == false {
viewModel.getLike(listModel.id, 1) {[weak self] success, error in
guard let self = self else { return }
if success {
YHHUD.flash(message: "已点赞")
listModel.is_like = true
listModel.like_count = listModel.like_count + 1
updataSubViews()
}
}
} else {
viewModel.getLike(listModel.id, 0) {[weak self] success, error in
guard let self = self else { return }
if success {
YHHUD.flash(message: "已取消点赞")
listModel.is_like = false
listModel.like_count = listModel.like_count - 1
updataSubViews()
}
}
}
} else {
let vc = UINavigationController(rootVC: YHPhoneLoginViewController())
vc.modalPresentationStyle = .custom
self.parentViewController?.navigationController?.present(vc, animated: true)
}
}
@objc func tapView(gestureRecognizer:UITapGestureRecognizer) {
clickPlayButton()
}
}
//
// YHOrderListView.swift
// galaxy
//
// Created by EDY on 2024/4/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHOrderListView: UIView {
var dataSource: [YHContactItemModel] = [] {
didSet {
self.homeTableView.reloadData()
}
}
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHContractCell.self,forCellReuseIdentifier: YHContractCell.cellReuseIdentifier)
return tableView
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
homeTableView.delegate = self
homeTableView.dataSource = self
}
}
extension YHOrderListView : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return self.dataSource.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return kMargin
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: kMargin))
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 81
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHContractCell.self)
cell0.selectionStyle = .none
if indexPath.section < self.dataSource.count {
cell0.dataModel = self.dataSource[indexPath.section]
}
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
printLog("点击了 tableView Cell \(indexPath.section)")
//获取订单号
let orderId = dataSource[indexPath.section].id
UserDefaults.standard.set(orderId, forKey: "orderIdForPreview")
UserDefaults.standard.synchronize()
let vc = YHServiceCenterSecondViewController()
vc.orderId = orderId
vc.mobile = dataSource[indexPath.section].mobile
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
//
// YHServerNoOrderView.swift
// galaxy
//
// Created by EDY on 2024/4/9.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHServerNoOrderView: UIView {
typealias SectionBlock = (YHClassifyModel) -> ()
var sectionBlock: SectionBlock?
var loadMoreBlock: SectionBlock?
var tableHeadView: YHServerTableHeadView!
var sectionView: YHServiceSectionView!
var dataSouce: [YHHomeListModel?] = [] {
didSet {
self.homeTableView.reloadData()
}
}
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0
tableView.register(YHServerHKLifeViewCell.self,forCellReuseIdentifier: YHServerHKLifeViewCell.cellReuseIdentifier)
return tableView
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
sectionView = {
let view = YHServiceSectionView()
view.block = {[weak self] model in
guard let self = self else { return }
if let block = sectionBlock {
block(model)
}
}
return view
}()
tableHeadView = YHServerTableHeadView()
tableHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 365)
addSubview(homeTableView)
homeTableView.tableHeaderView = tableHeadView
homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
homeTableView.delegate = self
homeTableView.dataSource = self
homeTableView.es.addInfiniteScrolling {[weak self] in
guard let self = self else { return }
self.homeTableView.es.stopLoadingMore()
if let block = self.loadMoreBlock {
block(YHClassifyModel())
}
}
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHServerNoOrderView : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 48
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return sectionView
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return KScreenHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.tableFootView.items = dataSouce
cell0.tableFootView.myCollectView.es.removeRefreshFooter()
cell0.selectionStyle = .none
return cell0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
}
//
// YHServerTableHeadView.swift
// galaxy
//
// Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHServerTableHeadView: UIView {
var search: YHHomeSearchView!
var bannarView: YHServiceBannerView!
var titleLabel: UILabel!
var dataSource: YHScemeHeadModel? {
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() {
search = {
let view = YHHomeSearchView()
let tap = UITapGestureRecognizer(target: self, action: #selector(didSearchBarClicked))
view.addGestureRecognizer(tap)
return view
}()
addSubview(search)
search.snp.makeConstraints { make in
make.top.equalTo(6)
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(36)
}
bannarView = {
let view = YHServiceBannerView()
return view
}()
addSubview(bannarView)
bannarView.snp.makeConstraints { make in
make.top.equalTo(64)
make.height.equalTo(235)
make.left.right.equalToSuperview()
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 18)
label.textColor = UIColor.mainTextColor
label.textAlignment = .left
label.text = "香港生活攻略"
return label
}()
addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.bottom.equalTo(-10)
make.height.equalTo(25)
make.left.equalTo(20)
}
}
func updateAllViews() {
guard let model = dataSource else { return }
}
@objc func goNext() {
UIViewController.current?.navigationController?.pushViewController(YHScoreDetailViewController())
}
@objc func didSearchBarClicked() {
let vc = YHSearchInfomationVC()
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
// //
// YHDavidCell0.swift // YHServiceBannerView.swift
// galaxy // galaxy
// //
// Created by davidhuangA on 2024/1/17. // Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved. // Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
// //
import UIKit import UIKit
import FSPagerView import FSPagerView
class YHDavidCell4: UITableViewCell { class YHServiceBannerView: UIView {
fileprivate var dataArr: [YHBannerModel] = [YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel()] // 位置、大小、图片、文本
var dataArr: [YHBannerModel] = [] {
static let cellHeight : CGFloat = 88 + 20 didSet {
self.indicatorView.indicatorItems = self.dataArr.count
static let cellReuseIdentifier = "YHDavidCell4" bannerView.reloadData()
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
setupUI()
} }
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { override init(frame: CGRect) {
super.init(style: style, reuseIdentifier: reuseIdentifier) super.init(frame: frame)
setupUI() initView()
} }
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
}
lazy var subContentView : UIView = {
let view = UIView()
// view.backgroundColor = .red
return view
}()
private lazy var bannerView: FSPagerView = { private lazy var bannerView: FSPagerView = {
let view = FSPagerView() let view = FSPagerView()
view.delegate = self view.delegate = self
view.dataSource = self view.dataSource = self
view.automaticSlidingInterval = 2 view.automaticSlidingInterval = 3
view.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell") view.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
view.itemSize = FSPagerView.automaticSize view.itemSize = FSPagerView.automaticSize
view.interitemSpacing = 10 view.interitemSpacing = 10
view.isInfinite = true
return view return view
}() }()
...@@ -62,52 +46,71 @@ class YHDavidCell4: UITableViewCell { ...@@ -62,52 +46,71 @@ class YHDavidCell4: UITableViewCell {
return view return view
}() }()
func setupUI() { lazy var indicatorView : YHHomeBannerIndicatorView = {
contentView.backgroundColor = .clear let view = YHHomeBannerIndicatorView()
backgroundColor = .clear return view
}()
}
contentView.addSubview(subContentView)
subContentView.snp.makeConstraints { make in private extension YHServiceBannerView {
make.top.equalToSuperview() func initView() {
make.left.equalTo(16) addSubview(bannerView)
make.right.equalTo(-16)
make.bottom.equalToSuperview()
}
subContentView.addSubview(bannerView)
bannerView.snp.makeConstraints { make in bannerView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview() make.top.left.right.bottom.equalToSuperview()
make.height.equalTo(80)
} }
subContentView.addSubview(pageControl) bannerView.addSubview(pageControl)
pageControl.snp.makeConstraints { make in pageControl.snp.makeConstraints { make in
make.left.bottom.right.equalToSuperview()
make.height.equalTo(25)
}
// setupPageControl()
bannerView.addSubview(indicatorView)
indicatorView.snp.makeConstraints { make in
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
make.top.equalTo(bannerView.snp.bottom) make.height.equalTo(2)
make.height.equalTo(20) make.bottom.equalTo(-14)
} }
setupPageControl()
bannerView.reloadData() bannerView.reloadData()
} }
func setupPageControl() { func setupPageControl() {
self.pageControl.numberOfPages = self.dataArr.count self.pageControl.numberOfPages = self.dataArr.count
self.pageControl.contentHorizontalAlignment = .center self.pageControl.contentHorizontalAlignment = .center
let normalImage = UIImage(color: .white, size: CGSize(width: 15, height: 5)) self.pageControl.contentInsets = UIEdgeInsets(top: 0, left: 12, bottom: 10, right: 12)
let selectImage = UIImage(color: UIColor(hex: 0xff0000, alpha: 1.0), size: CGSize(width: 20, height: 5))
let normalImage = UIImage(color: UIColor(hex: 0xff0000, alpha: 1.0), size: CGSize(width: 5, height: 5))
let selectImage = UIImage(color: .white, size: CGSize(width: 8, height: 5))
self.pageControl.setImage(normalImage, for: .normal) self.pageControl.setImage(normalImage, for: .normal)
self.pageControl.setImage(selectImage, for: .selected) self.pageControl.setImage(selectImage, for: .selected)
self.pageControl.interitemSpacing = 15 self.pageControl.interitemSpacing = 3
}
func goAppTab(tabBarName : String) {
if !tabBarName.isEmpty {
if tabBarName.contains("tabBarHome",caseSensitive: false) {
//首页
goTabBarBy(tabType: .home)
} else if tabBarName.contains("tabBarService",caseSensitive: false) {
//服务中心
goTabBarBy(tabType: .service)
} else if tabBarName.contains("tabBarMsg",caseSensitive: false) {
//消息
goTabBarBy(tabType: .message)
} else if tabBarName.contains("tabBarMine",caseSensitive: false) {
//我的
goTabBarBy(tabType: .mine)
} else {
}
}
} }
} }
extension YHServiceBannerView: FSPagerViewDataSource, FSPagerViewDelegate {
// MARK: - FSPagerViewDelegate
extension YHDavidCell4: FSPagerViewDataSource, FSPagerViewDelegate {
public func numberOfItems(in pagerView: FSPagerView) -> Int { public func numberOfItems(in pagerView: FSPagerView) -> Int {
return self.dataArr.count return self.dataArr.count
...@@ -122,9 +125,7 @@ extension YHDavidCell4: FSPagerViewDataSource, FSPagerViewDelegate { ...@@ -122,9 +125,7 @@ extension YHDavidCell4: FSPagerViewDataSource, FSPagerViewDelegate {
if let url = URL(string: model.img_url) { if let url = URL(string: model.img_url) {
cell.imageView?.kf.setImage(with: url) cell.imageView?.kf.setImage(with: url)
} }
// cell.textLabel?.text = model.name
// cell.textLabel?.text = model.title
} }
cell.imageView?.contentMode = .scaleAspectFill cell.imageView?.contentMode = .scaleAspectFill
cell.backgroundColor = .contentBkgColor cell.backgroundColor = .contentBkgColor
...@@ -133,11 +134,43 @@ extension YHDavidCell4: FSPagerViewDataSource, FSPagerViewDelegate { ...@@ -133,11 +134,43 @@ extension YHDavidCell4: FSPagerViewDataSource, FSPagerViewDelegate {
return cell return cell
} }
// MARK: - FSPagerView Delegate
func pagerView(_ pagerView: FSPagerView, didSelectItemAt index: Int) {
pagerView.deselectItem(at: index, animated: true)
pagerView.scrollToItem(at: index, animated: true)
if index >= dataArr.count {
return
}
let model = dataArr[index]
if model.skip_url.isEmpty == false {
switch model.skip_type {
case 1: //跳转H5
let vc = YHHomeWebViewController()
vc.url = model.skip_url
self.parentViewController?.navigationController?.pushViewController(vc)
case 2: //跳转APP内Tab
goAppTab(tabBarName:model.skip_url)
case 3://3-跳转资讯页
let vc = YHHomeWebViewController()
vc.url = model.skip_url
self.parentViewController?.navigationController?.pushViewController(vc)
case 0://0 不需要跳转
printLog("0 不需要跳转")
default:
YHHUD.flash(message: "不需要处理的类型")
break
}
} else {
YHHUD.flash(message: "error:skip_url不能为空")
}
}
func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int) { func pagerViewWillEndDragging(_ pagerView: FSPagerView, targetIndex: Int) {
self.pageControl.currentPage = targetIndex self.indicatorView.curIndicatorIndex = targetIndex
} }
func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView) { func pagerViewDidEndScrollAnimation(_ pagerView: FSPagerView) {
self.pageControl.currentPage = pagerView.currentIndex self.indicatorView.curIndicatorIndex = pagerView.currentIndex
} }
} }
//
// YHServiceSectionView.swift
// galaxy
//
// Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHServiceSectionView: UIView {
typealias Block = (YHClassifyModel) -> ()
var block: Block?
typealias HkBlock = (YHHKEventModel) -> ()
var hkBlock: HkBlock?
var items: [YHClassifyModel] = [] {
didSet {
self.myCollectView.reloadData()
}
}
var dataSource: [YHHKEventModel] = [] {
didSet {
self.myCollectView.reloadData()
}
}
var type: Int = 0
var selectIndex = 0
lazy var myCollectView = {
// 设置布局方向
let flowLayout = UICollectionViewFlowLayout()
flowLayout.itemSize = CGSize(width: 75, height: 32)
flowLayout.minimumInteritemSpacing = 12.0
flowLayout.minimumLineSpacing = 12.0
flowLayout.scrollDirection = .horizontal
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
collectinoView.contentInset = UIEdgeInsets(top: 8, left: 20, bottom: 0, right: 20)
collectinoView.register(YHServiceSectionCollectionViewCell.self, forCellWithReuseIdentifier:YHServiceSectionCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
collectinoView.showsVerticalScrollIndicator = false
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
return collectinoView
}()
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
backgroundColor = .white
addSubview(myCollectView)
myCollectView.snp.makeConstraints { make in
make.top.left.right.bottom.equalToSuperview()
}
// self.myCollectView.es.addInfiniteScrolling {
// self.loadFakeData()
// }
}
}
extension YHServiceSectionView: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
if type == 0 {
return items.count
} else {
return dataSource.count
}
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHServiceSectionCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHServiceSectionCollectionViewCell
if type == 0 {
cell.dataSource = items[indexPath.row]
} else {
cell.setTag(dataSource[indexPath.row].tag)
}
if indexPath.row == selectIndex {
cell.setSelectedStyle()
} else {
cell.setDeSelectedStyle()
}
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
selectIndex = indexPath.row
collectionView.reloadData()
if type == 0 {
let model = items[indexPath.row]
if let block = block {
block(model)
}
} else {
let model = dataSource[indexPath.row]
if let block = hkBlock {
block(model)
}
}
print("index is \(indexPath.row)")
}
}
class YHServiceSectionCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHServiceSectionCollectionViewCell"
func setSelectedStyle() {
contentView.backgroundColor = UIColor.brandMainColor
descripeLable.textColor = UIColor.white
}
func setDeSelectedStyle() {
contentView.backgroundColor = UIColor(hex: 0xf4f6fa)
descripeLable.textColor = UIColor(hex: 0x94a3bb)
}
var dataSource: YHClassifyModel? {
didSet {
updataAllSubViews()
}
}
lazy var descripeLable:UILabel = {
let label = UILabel()
label.text = "赴港"
label.textColor = UIColor(hex: 0x94a3bb)
label.font = UIFont.PFSC_R(ofSize: 13)
label.textAlignment = .center
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
private func setupUI() {
contentView.backgroundColor = UIColor(hex: 0xf4f6fa)
contentView.clipsToBounds = true
contentView.layer.cornerRadius = 16
contentView.addSubview(descripeLable)
descripeLable.snp.makeConstraints { make in
make.top.left.right.bottom.equalToSuperview()
}
}
func updataAllSubViews() {
guard let dataSource = dataSource else { return }
descripeLable.text = dataSource.name
}
func setTag(_ tag: String) {
descripeLable.text = tag
}
}
//
// YHServiceTableFootView.swift
// galaxy
//
// Created by EDY on 2024/4/8.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHServiceTableFootView: UIView {
typealias LoadBlock = () -> ()
var moreBlock: LoadBlock?
var items:[YHHomeListModel?] = [] {
didSet {
self.myCollectView.reloadData()
}
}
lazy var myCollectView = {
// 设置布局方向
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
let collectinoView = YHGestureCollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
collectinoView.register(YHHomeCollectionViewCell.self, forCellWithReuseIdentifier:YHHomeCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self
collectinoView.dataSource = self
collectinoView.bounces = false
collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true
return collectinoView
}()
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
backgroundColor = .white
addSubview(myCollectView)
myCollectView.snp.makeConstraints { make in
make.top.left.right.bottom.equalToSuperview()
}
myCollectView.es.addInfiniteScrolling {[weak self] in
guard let self = self else { return }
if let block = moreBlock {
block ()
}
}
}
}
extension YHServiceTableFootView: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return items.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHHomeCollectionViewCell
cell.listModel = items[indexPath.row]
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let model = items[indexPath.row] else { return }
if model.type == 2 {
let vc = YHHomeWebViewController()
vc.url = YHConfigManager.shared.h5Url + "?id=\(model.id)"
vc.id = model.id
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 1 {
printLog("直接播放视频")
}
}
}
extension YHServiceTableFootView: CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
guard let model = items[indexPath.row] else { return CGSize.zero }
return CGSize(width: model.img_width_cell, height: model.img_height_cell)
}
}
...@@ -16,6 +16,10 @@ struct YHUserModel: SmartCodable { ...@@ -16,6 +16,10 @@ struct YHUserModel: SmartCodable {
var headpic: String? var headpic: String?
var sex: Int? var sex: Int?
var token: String? var token: String?
var deviceToken: String = ""
var pushUserId: String = ""
var registerId: String = ""
} }
//
// YHInformationFillCell.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHInformationFillCell: UITableViewCell {
static let cellReuseIdentifier = "YHInformationFillCell"
static let unreadPointWidth = 6.0
var whiteView:UIView!
var titleLabel:UILabel!
var detailLabel:UILabel!
var unreadPointView:UIView!
var bottomBtn:UIButton!
var lineView:UIView!
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.backgroundColor = UIColor(hex:0xF8F8F8)
whiteView = UIView()
whiteView.backgroundColor = .white
whiteView.layer.cornerRadius = 6.0
whiteView.clipsToBounds = true
contentView.addSubview(whiteView)
titleLabel = UILabel()
titleLabel.textColor = UIColor(hex: 0x222222)
titleLabel.textAlignment = .left
titleLabel.font = UIFont.PFSC_M(ofSize:17)
titleLabel.text = "资料填写提醒".local
whiteView.addSubview(titleLabel)
unreadPointView = UIView()
unreadPointView.backgroundColor = UIColor(hex:0xF81D22)
unreadPointView.layer.cornerRadius = Self.unreadPointWidth/2.0
unreadPointView.clipsToBounds = true
whiteView.addSubview(unreadPointView)
detailLabel = UILabel()
detailLabel.textAlignment = .left
detailLabel.numberOfLines = 0
whiteView.addSubview(detailLabel)
lineView = UIView()
lineView.backgroundColor = UIColor(hex:0xF8F8F8)
whiteView.addSubview(lineView)
bottomBtn = UIButton()
bottomBtn.setTitle("去填写".local, for: .normal)
bottomBtn.setTitleColor(UIColor(hex: 0x3570DC), for: .normal)
bottomBtn.titleLabel?.font = .PFSC_R(ofSize: 14)
bottomBtn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
whiteView.addSubview(bottomBtn)
whiteView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.bottom.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(16)
make.height.equalTo(24.0)
}
unreadPointView.snp.makeConstraints { make in
make.width.height.equalTo(Self.unreadPointWidth)
make.left.equalTo(titleLabel.snp.right).offset(4)
make.centerY.equalTo(titleLabel)
make.right.lessThanOrEqualToSuperview().offset(-16)
}
detailLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
}
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(detailLabel.snp.bottom).offset(16)
make.height.equalTo(1)
}
bottomBtn.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom)
make.left.right.bottom.equalToSuperview()
make.height.equalTo(52)
}
updateModel()
}
@objc func didBottomBtnClicked() {
}
func updateModel() {
let text1: ASAttributedString = .init("林先生,您好,您尚有20%内容未填写,请到", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor(hex: 0x121A26, alpha: 0.7)))
let text2: ASAttributedString = .init("服务中心-资料上传", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(hex: 0x3570DC)), .action {
})
let text3: ASAttributedString = .init("去填写,请您尽快完成~", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor(hex: 0x121A26, alpha: 0.7)))
detailLabel.attributed.text = text1 + text2 + text3
}
}
//
// YHInformationFillVC.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHInformationFillVC: YHBaseViewController {
var msgArr:[String] = ["","","",""]
lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar()
bar.backgroundColor = .white
bar.title = "资料填写".local
bar.showRightButtonType(.clean)
bar.backBlock = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popViewController(animated: true)
}
bar.rightBtnClick = {
[weak self] in
guard let self = self else { return }
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") {
}
}
return bar
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.sectionHeaderHeight = 46.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = UIColor(hex:0xF8F8F8)
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHInformationFillCell.self, forCellReuseIdentifier: YHInformationFillCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
func setupUI() {
gk_navigationBar.isHidden = true
view.backgroundColor = .white
view.addSubview(tableView)
view.addSubview(navBar)
navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview()
}
}
}
extension YHInformationFillVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return msgArr.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHInformationFillCell.cellReuseIdentifier, for: indexPath) as! YHInformationFillCell
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 46.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
let label = UILabel()
label.textColor = UIColor(hex: 0x121A26, alpha: 0.3)
label.textAlignment = .center
label.font = UIFont.PFSC_R(ofSize:12)
label.text = "2023-09-13"
view.addSubview(label)
label.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
return view
}
}
//
// YHMsgViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/4/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMsgViewController: YHBaseViewController {
var msgArr:[String] = ["","","",""]
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.sectionHeaderHeight = 42.0
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = .white
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHMessageSessionCell.self, forCellReuseIdentifier: YHMessageSessionCell.cellReuseIdentifier)
return tableView
}()
lazy var navBar: YHCustomNavigationBar = {
let bar = YHCustomNavigationBar.navBar()
bar.backButton.isHidden = true
bar.backgroundColor = .white
bar.title = "消息"
bar.showRightButtonType(.clean)
bar.backBlock = {
[weak self] in
guard let self = self else { return }
self.navigationController?.popViewController(animated: true)
}
bar.rightBtnClick = {
[weak self] in
guard let self = self else { return }
YHCommonAlertView.show("清除未读", "确定要清除所有未读提示吗?", "取消", "确认") {
}
}
return bar
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
func setupUI() {
gk_navigationBar.isHidden = true
view.backgroundColor = .white
view.addSubview(navBar)
view.addSubview(tableView)
navBar.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
}
}
extension YHMsgViewController {
@objc func clean() {
}
@objc func didEnableNotifyBtnClicked() {
}
}
extension YHMsgViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return msgArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHMessageSessionCell.cellReuseIdentifier, for: indexPath) as! YHMessageSessionCell
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 76.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let vc = YHInformationFillVC()
self.navigationController?.pushViewController(vc)
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return 42.0
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
view.backgroundColor = UIColor(hex: 0x3570DC, alpha: 0.06)
let label = UILabel()
label.textColor = UIColor(hex: 0x121A26)
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:13)
label.text = "开启通知,及时掌握最新消息".local
view.addSubview(label)
let enableBtn = UIButton()
enableBtn.setTitle("开启".local, for: .normal)
enableBtn.setTitleColor(UIColor(hex: 0x3570DC), for: .normal)
enableBtn.titleLabel?.font = .PFSC_R(ofSize: 13)
enableBtn.YH_clickEdgeInsets = UIEdgeInsets(top: 12, left: 20, bottom: 12, right: 20)
enableBtn.addTarget(self, action: #selector(didEnableNotifyBtnClicked), for: .touchUpInside)
view.addSubview(enableBtn)
label.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalTo(enableBtn.snp.left).offset(-20)
make.centerY.equalToSuperview()
}
enableBtn.snp.makeConstraints { make in
make.size.equalTo(CGSize(width: 26, height: 18))
make.right.equalToSuperview().offset(-20)
make.centerY.equalToSuperview()
}
return view
}
}
//
// YHMsgViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/4/7.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMsgViewController: YHBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
initView()
}
}
extension YHMsgViewController {
func initView() {
gk_backStyle = .white
gk_navTitle = "消息中心"
}
}
...@@ -13,16 +13,16 @@ struct AboutAdvantageItem { ...@@ -13,16 +13,16 @@ struct AboutAdvantageItem {
var iconName : String var iconName : String
var title : String var title : String
var detail : String var detail : String
var url: String
} }
class YHAboutUsViewController: YHBaseViewController { class YHAboutUsViewController: YHBaseViewController {
lazy var items = { lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "ABC".local, detail: "大数据精准匹配,专属方案获批率更高", url: ""),
return [AboutAdvantageItem(iconName: "about_match", title: "ABC".local, detail: "大数据精准匹配,专属方案获批率更高"), AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求", url: ""),
AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求"), AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持", url: ""),
AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持"), AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上", url: "")]
AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上")]
}() }()
lazy var collectView = { lazy var collectView = {
......
//
// YHMyLikeViewController.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyLikeViewController: YHBaseViewController {
let viewModel: YHMyLikeViewModel = YHMyLikeViewModel()
var tableFootView: YHServiceTableFootView!
var id = 1
var dataSouce: [YHHomeListModel?] = [] {
didSet {
self.tableFootView.items = dataSouce
}
}
override func viewDidLoad() {
super.viewDidLoad()
var title = "我的收藏"
if id == 1 {
title = "我的点赞"
} else if id == 2{
title = "我的收藏"
} else {
title = "我的浏览"
}
gk_navTitle = title
setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHMyLikeViewController {
func loadData() {
if id == 1 || id == 2 {
self.viewModel.getList(true ,id) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.viewModel.arrHomeNewsData ?? []
if self.viewModel.hasMoreForHomeNews == false {
self.tableFootView.myCollectView.es.noticeNoMoreData()
}
}
} else {
self.viewModel.getList(true, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.viewModel.arrHomeNewsData ?? []
if self.viewModel.hasMoreForHomeNews == false {
self.tableFootView.myCollectView.es.noticeNoMoreData()
}
})
}
}
func setupUI() {
gk_navBarAlpha = 1
tableFootView = {
let view = YHServiceTableFootView()
view.moreBlock = {[weak self] in
guard let self = self else { return }
if id == 1 || id == 2 {
self.tableFootView.myCollectView.es.stopLoadingMore()
self.viewModel.getList(false ,id) {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.viewModel.arrHomeNewsData ?? []
if self.viewModel.hasMoreForHomeNews == false {
self.tableFootView.myCollectView.es.noticeNoMoreData()
}
}
} else {
self.tableFootView.myCollectView.es.stopLoadingMore()
self.viewModel.getList(false, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
self.dataSouce = self.viewModel.arrHomeNewsData ?? []
if self.viewModel.hasMoreForHomeNews == false {
self.tableFootView.myCollectView.es.noticeNoMoreData()
}
})
}
}
return view
}()
view.addSubview(tableFootView)
tableFootView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
}
}
}
//
// YHMyNotifySettingVC.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyNotifySettingVC: YHBaseViewController {
var items:[YHPermissionItem] = [YHPermissionItem(title: "接收推送消息通知".local, type:.notify, enableStatus: false)]
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = .white
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHMyPermissionCell.self, forCellReuseIdentifier: YHMyPermissionCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
func setupUI() {
gk_navTitle = "通知设置".local
view.backgroundColor = .white
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
}
}
extension YHMyNotifySettingVC: 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: YHMyPermissionCell.cellReuseIdentifier, for: indexPath) as! YHMyPermissionCell
if 0 <= indexPath.row && indexPath.row < items.count {
let item = items[indexPath.row]
cell.updateModel(item)
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 53.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let url = URL(string: UIApplication.openSettingsURLString)
if let url = url, UIApplication .shared.canOpenURL(url) {
UIApplication .shared.open(url, options: [:], completionHandler: {
(success) in
})
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return UITableView.automaticDimension
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xF8FAFB)
let label = UILabel()
label.textColor = UIColor(hex: 0x121A26, alpha: 0.5)
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:12)
label.numberOfLines = 0
label.text = "允许银河APP向您发送通知,可以及时了解到服务进度提醒、政策解读等系统通知".local
view.addSubview(label)
label.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalToSuperview().offset(12)
make.bottom.equalToSuperview().offset(-12)
}
return view
}
}
//
// YHMyPermissionSettingVC.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import Photos
enum YHPermissionType: Int {
case none = 0
case network = 1
case photo = 2
case camera = 3
case location = 4
case file = 5
case notify = 6
}
class YHPermissionItem {
var type: YHPermissionType = .none
var title:String = ""
var enableStatus:Bool = false
init(title: String, type:YHPermissionType, enableStatus: Bool) {
self.title = title
self.type = type
self.enableStatus = enableStatus
}
}
class YHMyPermissionSettingVC: YHBaseViewController {
let items:[YHPermissionItem] = [YHPermissionItem(title: "网络".local, type:.network, enableStatus: YHNetworkStatusManager.shared.isNetWorkOK),
YHPermissionItem(title: "照片".local, type:.photo, enableStatus: false),
YHPermissionItem(title: "相机".local, type:.camera, enableStatus: false)]
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
tableView.estimatedSectionFooterHeight = 1.0
tableView.showsVerticalScrollIndicator = false
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.backgroundColor = .white
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHMyPermissionCell.self, forCellReuseIdentifier: YHMyPermissionCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
requestPermission()
}
func setupUI() {
gk_navTitle = "权限设置".local
view.backgroundColor = .white
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalToSuperview().offset(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalToSuperview().offset(-k_Height_TabBar)
}
}
func requestPermission() {
// 获取相册权限
requestPhotoLibraryPermission {
[weak self] grant in
guard let self = self else { return }
for item in items {
if item.type == .photo {
item.enableStatus = grant
self.tableView.reloadData()
}
}
}
// 获取相机权限
requestCameraPermission {
[weak self] grant in
guard let self = self else { return }
for item in items {
if item.type == .camera {
item.enableStatus = grant
self.tableView.reloadData()
}
}
}
}
func requestPhotoLibraryPermission(completion: @escaping (Bool) -> Void) {
let status = PHPhotoLibrary.authorizationStatus()
switch status {
case .authorized:
// 已经授权
completion(true)
case .denied, .restricted, .limited:
// 拒绝或受限制,需要提示用户去设置中授权
completion(false)
case .notDetermined:
// 尚未确定,请求授权
completion(false)
@unknown default:
completion(false)
}
}
func requestCameraPermission(completion: @escaping (Bool) -> Void) {
let status = AVCaptureDevice.authorizationStatus(for: .video)
switch status {
case .authorized:
// 已经授权
completion(true)
case .denied, .restricted:
// 拒绝或受限制,需要提示用户去设置中授权
completion(false)
case .notDetermined:
// 尚未确定,请求授权
completion(false)
@unknown default:
completion(false)
}
}
}
extension YHMyPermissionSettingVC: 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: YHMyPermissionCell.cellReuseIdentifier, for: indexPath) as! YHMyPermissionCell
if 0 <= indexPath.row && indexPath.row < items.count {
let item = items[indexPath.row]
cell.updateModel(item)
}
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 53.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
let url = URL(string: UIApplication.openSettingsURLString)
if let url = url, UIApplication .shared.canOpenURL(url) {
UIApplication .shared.open(url, options: [:], completionHandler: {
(success) in
})
}
}
private func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> CGFloat {
return UITableView.automaticDimension
}
private func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> CGFloat {
return 1.0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
view.backgroundColor = UIColor(hex: 0xF8FAFB)
let label = UILabel()
label.textColor = UIColor(hex: 0x121A26, alpha: 0.5)
label.textAlignment = .left
label.font = UIFont.PFSC_R(ofSize:12)
label.numberOfLines = 0
label.text = "为了更好的使用体验,银河在特定场景会向您申请手机系统权限。您可以随时在手机系统设置中修改".local
view.addSubview(label)
label.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.right.equalToSuperview().offset(-20)
make.top.equalToSuperview().offset(12)
make.bottom.equalToSuperview().offset(-12)
}
return view
}
}
...@@ -36,8 +36,8 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget ...@@ -36,8 +36,8 @@ class YHMySettingViewController: YHBaseViewController, ConstraintRelatableTarget
}() }()
lazy var items: [PersonalModuleItem] = { lazy var items: [PersonalModuleItem] = {
return [PersonalModuleItem(title: "调整设置".local, type:.changeSettings), return [PersonalModuleItem(title: "通知设置".local, type:.notifySettings),
PersonalModuleItem(title: "深色模式".local, type:.darkMode), PersonalModuleItem(title: "权限配置".local, type:.permissionSettings),
PersonalModuleItem(title: "个人信息收集清单".local, type:.infoCollectList), PersonalModuleItem(title: "个人信息收集清单".local, type:.infoCollectList),
PersonalModuleItem(title: "第三方信息共享清单".local, type:.infoShareList), PersonalModuleItem(title: "第三方信息共享清单".local, type:.infoShareList),
PersonalModuleItem(title: "关于我们".local, type:.aboutUs)] PersonalModuleItem(title: "关于我们".local, type:.aboutUs)]
...@@ -84,8 +84,10 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource ...@@ -84,8 +84,10 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: YHMySettingCell.cellReuseIdentifier, for: indexPath) as! YHMySettingCell let cell = tableView.dequeueReusableCell(withIdentifier: YHMySettingCell.cellReuseIdentifier, for: indexPath) as! YHMySettingCell
let item : PersonalModuleItem = items[indexPath.row]; if 0 <= indexPath.row && indexPath.row < items.count {
cell.titleLabel.text = item.title let item : PersonalModuleItem = items[indexPath.row];
cell.titleLabel.text = item.title
}
return cell return cell
} }
...@@ -95,11 +97,20 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource ...@@ -95,11 +97,20 @@ extension YHMySettingViewController : UITableViewDelegate, UITableViewDataSource
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if (indexPath.row >= items.count) { return } if 0 <= indexPath.row && indexPath.row < items.count {
let item = items[indexPath.row] let item = items[indexPath.row]
if item.type == .aboutUs { if item.type == .notifySettings {
let vc = YHAboutUsViewController() let vc = YHMyNotifySettingVC()
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} else if item.type == .permissionSettings {
let vc = YHMyPermissionSettingVC()
self.navigationController?.pushViewController(vc)
} else if item.type == .aboutUs {
let vc = YHAboutUsViewController()
self.navigationController?.pushViewController(vc)
}
} }
} }
} }
......
...@@ -20,8 +20,8 @@ enum YHPersonalModuleItemType: Int { ...@@ -20,8 +20,8 @@ enum YHPersonalModuleItemType: Int {
case myTestCode case myTestCode
case appointGalaxyBay case appointGalaxyBay
case changeSettings case notifySettings
case darkMode case permissionSettings
case infoCollectList case infoCollectList
case infoShareList case infoShareList
case aboutUs case aboutUs
...@@ -60,7 +60,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -60,7 +60,7 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
lazy var items: [PersonalModuleItem] = { lazy var items: [PersonalModuleItem] = {
let version = "app版本号:" + UIDevice.appVersion() + "_" + UIDevice.appBuild() let version = "app版本号:" + UIDevice.appVersion() + "_" + UIDevice.appBuild()
return [PersonalModuleItem(icon: "mine_item_msg", title: "我的消息".local, type:.myMessage), return [PersonalModuleItem(icon: "mine_item_msg", title: "我的消息".local, type:.myMessage),
PersonalModuleItem(icon: "mine_item_progress", title: "我的进度".local, type:.myProgress), PersonalModuleItem(icon: "mine_item_progress", title: "我的进度".local, type:.myProgress),
PersonalModuleItem(icon: "mine_item_scoreCenter", title: "积分中心".local, type:.scoreCenter), PersonalModuleItem(icon: "mine_item_scoreCenter", title: "积分中心".local, type:.scoreCenter),
...@@ -96,6 +96,33 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget { ...@@ -96,6 +96,33 @@ class YHMyViewController: YHBaseViewController, ConstraintRelatableTarget {
guard let self = self else { return } guard let self = self else { return }
if !checkLogin() { return } if !checkLogin() { return }
} }
view.likeClick = {
[weak self] in
guard let self = self else { return }
if !checkLogin() { return }
let vc = YHMyLikeViewController()
vc.id = 1
self.navigationController?.pushViewController(vc)
print("点赞")
}
view.collectClick = {
[weak self] in
guard let self = self else { return }
if !checkLogin() { return }
let vc = YHMyLikeViewController()
vc.id = 2
self.navigationController?.pushViewController(vc)
print("收藏")
}
view.recentScanClick = {
[weak self] in
guard let self = self else { return }
if !checkLogin() { return }
let vc = YHMyLikeViewController()
vc.id = 3
self.navigationController?.pushViewController(vc)
print("最近浏览")
}
return view return view
}() }()
...@@ -204,6 +231,9 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -204,6 +231,9 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
self.navigationController?.present(vc, animated: true) self.navigationController?.present(vc, animated: true)
return return
} else { } else {
let vc = YHTestViewController()
self.navigationController?.pushViewController(vc)
YHHUD.flash(message: "已登录: 功能完善中...") YHHUD.flash(message: "已登录: 功能完善中...")
} }
return return
......
//
// YHMyPermissionCell.swift
// galaxy
//
// Created by edy on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyPermissionCell: UITableViewCell {
static let cellReuseIdentifier = "YHMyPermissionCell"
static let enableColor = UIColor(hex: 0x121A26, alpha: 0.3)
static let disableColor = UIColor(hex: 0x121A26, alpha: 0.7)
var titleLabel: UILabel!
var statusLabel: UILabel!
var rightArrowImgV: UIImageView!
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
titleLabel = UILabel()
titleLabel.textColor = UIColor(hex:0x121A26)
titleLabel.textAlignment = .left
titleLabel.font = UIFont.PFSC_R(ofSize: 15)
contentView.addSubview(titleLabel)
statusLabel = UILabel()
statusLabel.textColor = Self.disableColor
statusLabel.textAlignment = .right
statusLabel.font = UIFont.PFSC_R(ofSize:15)
contentView.addSubview(statusLabel)
rightArrowImgV = UIImageView(image: UIImage(named: "service_center_right_next_icon"))
contentView.addSubview(rightArrowImgV)
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(20)
make.centerY.equalToSuperview()
make.right.equalTo(statusLabel.snp.left).offset(-10)
}
statusLabel.snp.makeConstraints { make in
make.right.equalTo(rightArrowImgV.snp.left).offset(-4)
make.size.equalTo(CGSize(width: 46, height: 21))
make.centerY.equalToSuperview()
}
rightArrowImgV.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-20)
make.size.equalTo(CGSize(width: 16, height: 16))
make.centerY.equalToSuperview()
}
}
func updateModel(_ model: YHPermissionItem) {
self.titleLabel.text = model.title
self.statusLabel.text = model.enableStatus ? "已开启".local : "未开启".local
self.statusLabel.textColor = model.enableStatus ? Self.enableColor : Self.disableColor
}
}
...@@ -7,14 +7,22 @@ ...@@ -7,14 +7,22 @@
// //
import UIKit import UIKit
import AttributedString
class YHUserInfoHeaderView: UIView { class YHUserInfoHeaderView: UIView {
static let likeTag = 9527
static let collectTag = 9528
static let scanTag = 9529
var settingBlock:(()->Void)? var settingBlock:(()->Void)?
var evaluateBlock:(()->Void)? var evaluateBlock:(()->Void)?
var avatarClickBlock:(()->Void)? var avatarClickBlock:(()->Void)?
var nickNameClickBlock:(()->Void)? var nickNameClickBlock:(()->Void)?
var likeClick:(()->Void)?
var collectClick:(()->Void)?
var recentScanClick:(()->Void)?
var nickName:String? { var nickName:String? {
didSet { didSet {
userNameLabel.text = nickName userNameLabel.text = nickName
...@@ -46,15 +54,72 @@ class YHUserInfoHeaderView: UIView { ...@@ -46,15 +54,72 @@ class YHUserInfoHeaderView: UIView {
return label return label
}() }()
private lazy var infoLabel:UILabel = { private lazy var likeLabel:UILabel = {
let label = UILabel()
label.text = "点赞 0".local
label.textColor = UIColor(hex: 0x949DB5)
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_R(ofSize: 13)
label.isUserInteractionEnabled = true
label.tag = Self.likeTag
let tap = UITapGestureRecognizer(target: self, action: #selector(tap(gestureRecognizer:)))
label.addGestureRecognizer(tap)
return label
}()
private lazy var collectLabel:UILabel = {
let label = UILabel() let label = UILabel()
label.text = "点赞 0 收藏 0 最近浏览 0".local label.text = "收藏 0".local
label.textColor = UIColor(hexString:"#949DB5") label.textColor = UIColor(hex: 0x949DB5)
label.textAlignment = NSTextAlignment.left label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_R(ofSize: 13) label.font = UIFont.PFSC_R(ofSize: 13)
label.isUserInteractionEnabled = true
label.tag = Self.collectTag
let tap = UITapGestureRecognizer(target: self, action: #selector(tap(gestureRecognizer:)))
label.addGestureRecognizer(tap)
return label return label
}() }()
private lazy var scanLabel:UILabel = {
let label = UILabel()
label.text = "最近浏览 0".local
label.textColor = UIColor(hex: 0x949DB5)
label.textAlignment = NSTextAlignment.left
label.font = UIFont.PFSC_R(ofSize: 13)
label.isUserInteractionEnabled = true
label.tag = Self.scanTag
let tap = UITapGestureRecognizer(target: self, action: #selector(tap(gestureRecognizer:)))
label.addGestureRecognizer(tap)
return label
}()
private lazy var line1View:UIView = {
let line = UIView()
line.backgroundColor = UIColor(hex:0x92959D, alpha: 0.2)
return line
}()
private lazy var line2View:UIView = {
let line = UIView()
line.backgroundColor = UIColor(hex:0x92959D, alpha: 0.2)
return line
}()
@objc func tap(gestureRecognizer:UITapGestureRecognizer) {
if let view = gestureRecognizer.view {
if view.tag == Self.likeTag {
self.likeClick?()
} else if view.tag == Self.collectTag {
self.collectClick?()
} else if view.tag == Self.scanTag {
self.recentScanClick?()
}
}
}
private lazy var evaluateView:UIView = { private lazy var evaluateView:UIView = {
let view = UIView() let view = UIView()
return view return view
...@@ -122,8 +187,13 @@ class YHUserInfoHeaderView: UIView { ...@@ -122,8 +187,13 @@ class YHUserInfoHeaderView: UIView {
self.addSubview(avarImgView) self.addSubview(avarImgView)
self.addSubview(userNameLabel) self.addSubview(userNameLabel)
self.addSubview(infoLabel)
self.addSubview(likeLabel)
self.addSubview(collectLabel)
self.addSubview(scanLabel)
self.addSubview(line1View)
self.addSubview(line2View)
self.addSubview(evaluateView) self.addSubview(evaluateView)
evaluateView.addSubview(evaluateBgImgView) evaluateView.addSubview(evaluateBgImgView)
evaluateView.addSubview(evaluateLabel) evaluateView.addSubview(evaluateLabel)
...@@ -161,18 +231,47 @@ class YHUserInfoHeaderView: UIView { ...@@ -161,18 +231,47 @@ class YHUserInfoHeaderView: UIView {
make.height.equalTo(25.0) make.height.equalTo(25.0)
} }
infoLabel.snp.makeConstraints { make in likeLabel.snp.makeConstraints { make in
make.left.equalTo(avarImgView) make.left.equalTo(avarImgView)
make.right.equalToSuperview().offset(-30) make.right.equalTo(line1View.snp.left).offset(-12)
make.height.equalTo(15.0) make.height.equalTo(15.0)
make.top.equalTo(userNameLabel.snp.bottom).offset(10) make.top.equalTo(userNameLabel.snp.bottom).offset(10)
} }
likeLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
likeLabel.setContentHuggingPriority(.required, for: .horizontal)
line1View.snp.makeConstraints { make in
make.centerY.equalTo(likeLabel)
make.size.equalTo(CGSize(width: 1, height: 12))
}
collectLabel.snp.makeConstraints { make in
make.left.equalTo(line1View.snp.right).offset(12)
make.right.equalTo(line2View.snp.left).offset(-12)
make.height.equalTo(15.0)
make.top.equalTo(likeLabel)
}
collectLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
collectLabel.setContentHuggingPriority(.required, for: .horizontal)
line2View.snp.makeConstraints { make in
make.centerY.equalTo(likeLabel)
make.size.equalTo(CGSize(width: 1, height: 12))
}
scanLabel.snp.makeConstraints { make in
make.left.equalTo(line2View.snp.right).offset(12)
make.right.equalToSuperview().offset(-31)
make.height.equalTo(15.0)
make.top.equalTo(likeLabel)
}
scanLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
evaluateView.snp.makeConstraints { make in evaluateView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10) make.left.equalToSuperview().offset(10)
make.right.equalToSuperview().offset(-7) make.right.equalToSuperview().offset(-7)
make.height.equalTo(98) make.height.equalTo(98)
make.top.equalTo(infoLabel.snp.bottom).offset(17.0) make.top.equalTo(likeLabel.snp.bottom).offset(17.0)
} }
evaluateBgImgView.snp.makeConstraints { make in evaluateBgImgView.snp.makeConstraints { make in
......
//
// YHMyLikeViewModel.swift
// galaxy
//
// Created by EDY on 2024/4/11.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHMyLikeViewModel: YHBaseViewModel {
var arrHomeNewsData: [YHHomeListModel]?
private var curPageIndex : Int = 1
private var page_Size : Int = 6
private var totalCount : Int = 0
var hasMoreForHomeNews : Bool = true
}
extension YHMyLikeViewModel {
// 1点赞 2收藏
func getList(_ firstPageFlag : Bool, _ type: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
var params: [String : Any] = ["page": curPageIndex,
"page_size": page_Size,
"operate_type": type]
if firstPageFlag {
curPageIndex = 1
params = ["page": curPageIndex,
"page_size": page_Size,
"operate_type": type]
} else {
params = ["page": curPageIndex + 1,
"page_size": page_Size,
"operate_type": type]
curPageIndex = curPageIndex + 1
}
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.user
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
guard let result = YHHomeListTotalModel.deserialize(from: dic as? Dictionary) else {
self.arrHomeNewsData = []
callBackBlock(false,nil)
return
}
for item in result.data {
item.calHeightParam()
}
if firstPageFlag {
self.totalCount = result.total
self.arrHomeNewsData = result.data
} else {
self.arrHomeNewsData?.append(contentsOf: result.data)
}
if let count = self.arrHomeNewsData?.count {
if count == self.totalCount {
self.hasMoreForHomeNews = false
} else {
self.hasMoreForHomeNews = true
}
}
callBackBlock(true, nil)
} else {
self.arrHomeNewsData = []
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
//最近浏览
func getList(_ firstPageFlag : Bool, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
var params: [String : Any] = ["page": curPageIndex,
"page_size": page_Size]
if firstPageFlag {
curPageIndex = 1
params = ["page": curPageIndex,
"page_size": page_Size]
} else {
params = ["page": curPageIndex + 1,
"page_size": page_Size]
curPageIndex = curPageIndex + 1
}
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Common.userLook
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
//1. json字符串 转 对象
if json.code == 200 {
let dic = json.data
guard let result = YHHomeListTotalModel.deserialize(from: dic as? Dictionary) else {
self.arrHomeNewsData = []
callBackBlock(false,nil)
return
}
for item in result.data {
item.calHeightParam()
}
if firstPageFlag {
self.totalCount = result.total
self.arrHomeNewsData = result.data
} else {
self.arrHomeNewsData?.append(contentsOf: result.data)
}
if let count = self.arrHomeNewsData?.count {
if count == self.totalCount {
self.hasMoreForHomeNews = false
} else {
self.hasMoreForHomeNews = true
}
}
callBackBlock(true, nil)
} else {
self.arrHomeNewsData = []
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
}
//
// AppDelegate + UIAppearance.swift
// SleepDoctor
//
// Created by DAVIDiOS1 on 2020/12/24.
// Copyright © 2020 sumian. All rights reserved.
//
import UIKit
// MARK: - Pay 支付
extension AppDelegate {
func payCallback(url: URL) {
// //支付宝支付
// if url.host == "safepay" {
// AlipaySDK.defaultService().processOrder(withPaymentResult: url, standbyCallback: { resultDic in
// let status = resultDic?["resultStatus"] as? String ?? ""
// var success: Bool = false
// if status == "9000" {
// success = true
// print("支付宝: 支付成功")
// } else {
// success = false
// print("支付宝: 支付失败")
// }
// NotificationCenter.default.post(name: BsConstant.BsNotification.payResultNotification, object: success)
// })
// }
}
}
...@@ -22,6 +22,8 @@ extension UIDevice { ...@@ -22,6 +22,8 @@ extension UIDevice {
static let kSystemVersion : String = UIDevice.current.systemVersion static let kSystemVersion : String = UIDevice.current.systemVersion
// MARK: - 顶部安全区高度 // MARK: - 顶部安全区高度
static func bs_safeDistanceTop() -> CGFloat { static func bs_safeDistanceTop() -> CGFloat {
if #available(iOS 13.0, *) { if #available(iOS 13.0, *) {
......
...@@ -29,7 +29,7 @@ class YHWholeScreenTipsView: UIView { ...@@ -29,7 +29,7 @@ class YHWholeScreenTipsView: UIView {
lazy var blackMaskView: UIView = { lazy var blackMaskView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = UIColor(hex: 0x000000, alpha: 0.1) view.backgroundColor = .clear
let tap = UITapGestureRecognizer(target: self, action: #selector(dismiss)) let tap = UITapGestureRecognizer(target: self, action: #selector(dismiss))
view.addGestureRecognizer(tap) view.addGestureRecognizer(tap)
return view return view
...@@ -112,9 +112,14 @@ class YHWholeScreenTipsView: UIView { ...@@ -112,9 +112,14 @@ class YHWholeScreenTipsView: UIView {
make.edges.equalTo(0) make.edges.equalTo(0)
} }
let rrrrr = targetView.convert(targetView.bounds, to: UIApplication.shared.yhKeyWindow()) let rrrrr = targetView.convert(targetView.bounds, to: UIApplication.shared.yhKeyWindow())
let left = rrrrr.origin.x var left = rrrrr.origin.x
let top = rrrrr.origin.y + targetView.height + 5 let top = rrrrr.origin.y + targetView.height + 5
let offset = left + 214 - KScreenWidth
if offset > 0 {
left = left - offset - 16
}
whiteContentView.snp.makeConstraints { make in whiteContentView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(left) make.left.equalToSuperview().offset(left)
make.top.equalToSuperview().offset(top) make.top.equalToSuperview().offset(top)
......
...@@ -52,6 +52,9 @@ let k_TabBar_Height :CGFloat = 49.0 ...@@ -52,6 +52,9 @@ let k_TabBar_Height :CGFloat = 49.0
/** 底部导航栏高度(包括安全区),一般使用这个值 */ /** 底部导航栏高度(包括安全区),一般使用这个值 */
let k_Height_TabBar :CGFloat = k_Height_safeAreaInsetsBottom() + k_TabBar_Height let k_Height_TabBar :CGFloat = k_Height_safeAreaInsetsBottom() + k_TabBar_Height
//比例
let kRadio = KScreenWidth / 375.0
// MARK: - 尺寸信息: - // MARK: - 尺寸信息: -
/* 状态栏高度 20 或 44 */ /* 状态栏高度 20 或 44 */
// 然而从iOS 14开始,全面屏iPhone的状态栏高度不一定是 44 或 20 了,比如下面就是这些设备在iOS 14.1上的状态栏高度。(还可能时47、48) // 然而从iOS 14开始,全面屏iPhone的状态栏高度不一定是 44 或 20 了,比如下面就是这些设备在iOS 14.1上的状态栏高度。(还可能时47、48)
...@@ -107,16 +110,6 @@ func ClassFromString(className: String) -> UIViewController? { ...@@ -107,16 +110,6 @@ func ClassFromString(className: String) -> UIViewController? {
} }
} }
/** 判断字符串是否为空 */
func kIsEmpty(string: String) -> Bool {
if string.isEmpty || string == "" {
return true
}else {
return false
}
}
/// 版本号相同: /// 版本号相同:
func systemVersionEqual(version:String) -> Bool { func systemVersionEqual(version:String) -> Bool {
return UIDevice.current.systemVersion == version return UIDevice.current.systemVersion == version
...@@ -132,6 +125,38 @@ func isIphoneX() -> Bool { ...@@ -132,6 +125,38 @@ func isIphoneX() -> Bool {
return k_Height_safeAreaInsetsBottom() > 0.0 // 底部安全区 > 0 时, return k_Height_safeAreaInsetsBottom() > 0.0 // 底部安全区 > 0 时,
} }
enum tabBarPageType : Int {
case home
case service
case message
case mine
}
func goTabBarBy(tabType : tabBarPageType) {
var tabIndex : Int = 0
switch tabType {
case .home:
tabIndex = 0
case .service:
tabIndex = 1
case .message:
tabIndex = 2
case .mine:
tabIndex = 3
}
if let vc = UIApplication.shared.keyWindow?.rootViewController as? YHTabBarViewController {
vc.selectedIndex = tabIndex
}
}
class YhConstant { class YhConstant {
// MARK: - 登录信息 // MARK: - 登录信息
static let KLoginedInfoKey = "KLoginedInfoKey" static let KLoginedInfoKey = "KLoginedInfoKey"
...@@ -166,8 +191,10 @@ extension YhConstant { ...@@ -166,8 +191,10 @@ extension YhConstant {
//退出成功 //退出成功
public static let didLogoutSuccessNotifiction = Notification.Name(rawValue: "com.usleep.health.logout.success") public static let didLogoutSuccessNotifiction = Notification.Name(rawValue: "com.usleep.health.logout.success")
//token 过期 //token 过期
public static let tokenInvalidateNotifiction = Notification.Name(rawValue: "com.usleep.health.token.invalidate") public static let tokenInvalidateNotifiction = Notification.Name(rawValue: "com.usleep.health.token.invalidate")
//首页刷新通知
public static let refreshHomePageNotifiction = Notification.Name(rawValue: "com.yinhe.homePage.refresh")
} }
} }
...@@ -10,10 +10,28 @@ ...@@ -10,10 +10,28 @@
class YHAllApiName { class YHAllApiName {
//接口 模块名 Common //接口 模块名 Common
struct Common { struct Common {
//具体的业务接口
//首页配置接口 //首页配置接口
static let homeConfigApi = "common/homepage-config/index" static let homeConfigApi = "infoflow/app/config"
//获取首页展示的资讯
static let consult = "infoflow/home/consult"
//获取首页展示的banner
static let banner = "infoflow/banner/list"
//获取栏目
static let classify = "infoflow/classify/list"
//获取资讯
static let article = "infoflow/article/list"
//资讯详情
static let webInfo = "infoflow/article/info"
//资讯收藏
static let star = "infoflow/article/collect"
//资讯点赞
static let like = "infoflow/article/like"
//我的点赞和收藏
static let user = "infoflow/user/consult"
//我的浏览
static let userLook = "infoflow/user/view"
//获取香港办事
static let hklist = "infoflow/tool/list"
} }
//order 模块 //order 模块
...@@ -191,7 +209,8 @@ class YHAllApiName { ...@@ -191,7 +209,8 @@ class YHAllApiName {
static let confirm = "infoflow/my-sign/confirm" static let confirm = "infoflow/my-sign/confirm"
// 查看合同 // 查看合同
static let look = "infoflow/sign/view-detail" static let look = "infoflow/sign/view-detail"
// 查看签署状态
static let signCallBack = "infoflow/sign/sign-callback"
} }
//我的文书 //我的文书
......
//
// YHOOSManager.swift
// galaxy
//
// Created by EDY on 2024/1/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
public protocol Error {
var _domain: String { get }
var _code: Int { get }
var _userInfo: AnyObject? { get }
}
extension NSError : Error {
@nonobjc
public var _domain: String { return domain }
@nonobjc
public var _code: Int { return code }
@nonobjc
public var _userInfo: AnyObject? { return userInfo as NSDictionary }
}
class YHOSSDefine {
static let OSS_ACCESSKEY_ID: String = "access_key_id"
static let OSS_SECRETKEY_ID: String = "access_key_secret"
static let OSS_BUCKET_PUBLIC: String = "public-bucket"
static let OSS_BUCKET_PRIVATE: String = "private-bucket"
static let OSS_ENDPOINT: String = "http://oss-cn-region.aliyuncs.com"
static let OSS_MULTIPART_UPLOADKEY: String = "multipart"
static let OSS_RESUMABLE_UPLOADKEY: String = "resumable"
static let OSS_CALLBACK_URL: String = "http://oss-demo.aliyuncs.com:23450"
static let OSS_CNAME_URL: String = "http://www.cnametest.com/"
static let OSS_STSTOKEN_URL: String = "http://*.*.*.*.****/sts/getsts"
static let OSS_IMAGE_KEY: String = "testImage.png"
static let OSS_CRC64_ENABLE: Bool = true
static let OSS_CONTENT_TYPE: String = "Content-Type"
static let OSS_CONTENT_LENGTH: String = "Content-Length"
static let OSS_TEST_CONTENT_TYPE: String = "application/special"
static let OSS_APPEND_OBJECT_KEY: String = "appendObject"
static let SCHEME = "https://"
static let ENDPOINT = "oss-cn-hangzhou.aliyuncs.com"
static let CNAME_ENDPOINT = "oss.custom.com"
static let IP_ENDPOINT = "192.168.1.1:8080"
static let BUCKET_NAME = "BucketName"
static let OBJECT_KEY = "ObjectKey"
}
class YHOSSManager: NSObject, URLSessionDelegate {
static let share = YHOSSManager()
var mProvider: OSSAuthCredentialProvider!
var mClient: OSSClient!
override init() {
mProvider = OSSAuthCredentialProvider(authServerUrl: YHOSSDefine.OSS_STSTOKEN_URL)
mClient = OSSClient(endpoint: YHOSSDefine.OSS_ENDPOINT, credentialProvider: mProvider)
}
func getObject() {
let getObjectReq: OSSGetObjectRequest = OSSGetObjectRequest()
getObjectReq.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
getObjectReq.objectKey = YHOSSDefine.OSS_IMAGE_KEY
getObjectReq.downloadProgress = { (bytesWritten: Int64,totalBytesWritten : Int64, totalBytesExpectedToWrite: Int64) -> Void in
printLog("bytesWritten:\(bytesWritten),totalBytesWritten:\(totalBytesWritten),totalBytesExpectedToWrite:\(totalBytesExpectedToWrite)")
};
let task: OSSTask = mClient.getObject(getObjectReq);
task.continue({(t) -> OSSTask<AnyObject>? in
self.showResult(task: t)
return nil
})
task.waitUntilFinished()
printLog("Error:\(String(describing: task.error))")
}
func getImage() {
let getObjectReq: OSSGetObjectRequest = OSSGetObjectRequest()
getObjectReq.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
getObjectReq.objectKey = "ImageKey"
getObjectReq.xOssProcess = "image/resize,m_lfit,w_100,h_100"
getObjectReq.downloadProgress = { (bytesWritten: Int64,totalBytesWritten : Int64, totalBytesExpectedToWrite: Int64) -> Void in
printLog("bytesWritten:\(bytesWritten),totalBytesWritten:\(totalBytesWritten),totalBytesExpectedToWrite:\(totalBytesExpectedToWrite)")
};
let task: OSSTask = mClient.getObject(getObjectReq);
task.continue({(t) -> OSSTask<AnyObject>? in
self.showResult(task: t)
return nil
})
task.waitUntilFinished()
printLog("Error:\(String(describing: task.error))")
}
func getStsToken() {
let tcs = OSSTaskCompletionSource<AnyObject>()
let federationProvider: OSSFederationCredentialProvider = OSSFederationCredentialProvider(federationTokenGetter: {() ->OSSFederationToken? in
let url: URL = URL(string: YHOSSDefine.OSS_STSTOKEN_URL)!
let config: URLSessionConfiguration = URLSessionConfiguration.default
let session: URLSession = URLSession(configuration: config, delegate: self as URLSessionDelegate, delegateQueue: nil)
let task = session.dataTask(with: url, completionHandler: { (data, response, error) -> Void in
//Convert Data to Jsons
tcs.setResult(data as AnyObject)
})
task.resume()
tcs.task.waitUntilFinished()
let json = try? JSONSerialization.jsonObject(with: tcs.task.result as! Data,
options:.allowFragments) as? [String: Any]
print("Json Object:", json as Any)
//verify json
let accessKeyId = json?["AccessKeyId"]
let accessKeySecret = json?["AccessKeySecret"]
self.ossAlert(title: "notice", message: json?.description)
let token = OSSFederationToken()
token.tAccessKey = accessKeyId as! String
token.tSecretKey = accessKeySecret as! String
return token
})
do {
try federationProvider.getToken()
} catch{
print("get Error")
}
}
func headObject() {
let objectKey = "key"
if objectKey.isEmpty {
ossAlert(title: nil, message: "objectKey can not be empty!")
}
let request = OSSHeadObjectRequest()
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.objectKey = objectKey
let task: OSSTask = mClient.headObject(request)
task.continue({(task) -> OSSTask<AnyObject>? in
self.showResult(task: task)
return nil
})
task.waitUntilFinished()
}
func getBucket() {
let request = OSSGetBucketRequest()
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
let task = mClient.getBucket(request)
task.continue( { (t) -> Any? in
if let result = t.result as? OSSGetBucketResult {
self.showResult(task: OSSTask(result: result.contents as AnyObject))
} else {
self.showResult(task: t)
}
return nil
})
}
func getBucketACL() -> Void {
let request = OSSGetBucketACLRequest()
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
let task = mClient.getBucketACL(request)
task.continue( { (t) -> Any? in
if let result = t.result as? OSSGetBucketACLResult {
self.showResult(task: OSSTask(result: result.aclGranted as AnyObject))
} else {
self.showResult(task: t)
}
return nil
})
}
func createBucket() -> Void {
let request = OSSCreateBucketRequest()
request.bucketName = "com-dhc-test"
let task = mClient.createBucket(request)
task.continue( { (t) -> Any? in
self.showResult(task: t)
return nil
})
}
func deleteBucket() -> Void {
let request = OSSDeleteBucketRequest()
request.bucketName = "com-dhc-test"
let task = mClient.deleteBucket(request)
task.continue( { (t) -> Any? in
self.showResult(task: t)
return nil
})
}
func putObject(image: UIImage) {
let request = OSSPutObjectRequest()
request.uploadingData = image.pngData()!
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.objectKey = "landscape-painting.jpeg"
request.uploadProgress = { (bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) -> Void in
printLog("bytesSent:\(bytesSent),totalBytesSent:\(totalBytesSent),totalBytesExpectedToSend:\(totalBytesExpectedToSend)")
};
let provider = OSSFederationTokenCredentialProvider {
let tcs = TaskCompletionSource()
DispatchQueue(label: "test").async {
Thread.sleep(forTimeInterval: 10)
let token = OSSFederationToken()
token.tAccessKey = "STS.tAccessKey"
token.tSecretKey = "tSecretKey"
token.tToken = "tToken"
token.expirationTimeInGMTFormat = "2023-05-23T07:34:27Z"
// or tcs.trySetError(<#T##error: Error##Error#>)
tcs.trySetResult(token)
}
tcs.wait(timeout: 5)
if let error = tcs.task.error {
let nsError = error as NSError
if nsError.code == OSSClientErrorCODE.codeNotKnown.rawValue,
let errorMessage = nsError.userInfo[OSSErrorMessageTOKEN] as? String,
errorMessage == "TaskCompletionSource wait timeout." {
// 超时错误
}
throw error
} else if let result = tcs.task.result as? OSSFederationToken {
return result
}
throw NSError(domain: OSSClientErrorDomain,
code: OSSClientErrorCODE.codeSignFailed.rawValue,
userInfo: [OSSErrorMessageTOKEN : "Can not get FederationToken."])
}
let client = OSSClient(endpoint: YHOSSDefine.OSS_ENDPOINT, credentialProvider: provider)
let task = client.putObject(request)
task.continue({ (t) -> Any? in
self.showResult(task: t)
}).waitUntilFinished()
}
func multipartUpload() {
let request = OSSMultipartUploadRequest()
request.uploadingFileURL = Bundle.main.url(forResource: "wangwang", withExtension: "zip")!
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.objectKey = "wangwang(swift).zip"
request.partSize = 102400;
request.uploadProgress = { (bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) -> Void in
printLog("bytesSent:\(bytesSent),totalBytesSent:\(totalBytesSent),totalBytesExpectedToSend:\(totalBytesExpectedToSend)")
};
let provider = OSSAuthCredentialProvider(authServerUrl: YHOSSDefine.OSS_STSTOKEN_URL)
let client = OSSClient(endpoint: YHOSSDefine.OSS_ENDPOINT, credentialProvider: provider)
let task = client.multipartUpload(request)
task.continue({ (t) -> Any? in
self.showResult(task: t)
}).waitUntilFinished()
}
func sequentialMultipartUpload() {
let request = OSSResumableUploadRequest()
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE;
request.objectKey = "sequential-swift-multipart"
request.uploadingFileURL = Bundle.main.url(forResource: "wangwang", withExtension: "zip")!
request.deleteUploadIdOnCancelling = false
request.crcFlag = OSSRequestCRCFlag.open
let filePath = Bundle.main.path(forResource: "wangwang", ofType: "zip")
request.contentSHA1 = OSSUtil.sha1(withFilePath: filePath)
let task = mClient.sequentialMultipartUpload(request)
task.continue({ (t) -> Any? in
self.showResult(task: t)
return nil
}).waitUntilFinished()
}
func resumableUpload() {
var request = OSSResumableUploadRequest()
request.uploadingFileURL = Bundle.main.url(forResource: "wangwang", withExtension: "zip")!
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.deleteUploadIdOnCancelling = false
request.objectKey = "wangwang(swift).zip"
let cacheDir = NSSearchPathForDirectoriesInDomains(FileManager.SearchPathDirectory.cachesDirectory, FileManager.SearchPathDomainMask.userDomainMask, true).first
request.recordDirectoryPath = cacheDir!
request.partSize = 102400
request.uploadProgress = { (bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) -> Void in
printLog("bytesSent:\(bytesSent),totalBytesSent:\(totalBytesSent),totalBytesExpectedToSend:\(totalBytesExpectedToSend)")
if totalBytesSent > (totalBytesExpectedToSend / 2) {
request.cancel()
}
}
var task = mClient.resumableUpload(request)
task.continue({ (t) -> Any? in
print("Error: \(String(describing: t.error))")
return nil
}).waitUntilFinished()
request = OSSResumableUploadRequest()
request.uploadingFileURL = Bundle.main.url(forResource: "wangwang", withExtension: "zip")!
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.objectKey = "wangwang(swift).zip"
request.partSize = 102400;
request.deleteUploadIdOnCancelling = false
request.recordDirectoryPath = cacheDir!
request.uploadProgress = { (bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) -> Void in
printLog("bytesSent:\(bytesSent),totalBytesSent:\(totalBytesSent),totalBytesExpectedToSend:\(totalBytesExpectedToSend)")
}
task = mClient.resumableUpload(request)
task.continue({ (t) -> Any? in
self.showResult(task: t)
return nil
}).waitUntilFinished()
}
func putObjectWithXML() {
let request = OSSPutObjectRequest()
request.uploadingFileURL = Bundle.main.url(forResource: "test", withExtension: "xml")!
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.objectKey = "test.xml"
request.contentSHA1 = OSSUtil.sha1(withFilePath: Bundle.main.path(forResource: "test", ofType: "xml"))
request.uploadProgress = { (bytesSent: Int64, totalBytesSent: Int64, totalBytesExpectedToSend: Int64) -> Void in
print("bytesSent:\(bytesSent),totalBytesSent:\(totalBytesSent),totalBytesExpectedToSend:\(totalBytesExpectedToSend)");
};
let task = mClient.putObject(request)
task.continue({ (t) -> Any? in
self.showResult(task: t)
}).waitUntilFinished()
}
func getObjectACL() {
let request = OSSGetObjectACLRequest()
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.objectName = YHOSSDefine.OSS_IMAGE_KEY
let task = mClient.getObjectACL(request)
task.continue({ (t) -> Any? in
self.showResult(task: t)
return nil
}).waitUntilFinished()
}
func deleteMultipleObjects() {
let request = OSSDeleteMultipleObjectsRequest()
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.keys = ["testFor5m"]
request.quiet = false
request.encodingType = "url"
let task = mClient.deleteMultipleObjects(request)
task.continue({ (t) -> Any? in
self.showResult(task: t)
return nil
}).waitUntilFinished()
}
func triggerCallBack() {
let provider = OSSPlainTextAKSKPairCredentialProvider.init(plainTextAccessKey: "AK", secretKey: "SK")
let pClient = OSSClient.init(endpoint: YHOSSDefine.OSS_ENDPOINT, credentialProvider: provider)
let request = OSSCallBackRequest()
request.bucketName = YHOSSDefine.OSS_BUCKET_PRIVATE
request.objectName = "file1m"
request.callbackVar = ["key1": "value1",
"key2": "value2"]
request.callbackParam = ["callbackUrl": YHOSSDefine.OSS_CALLBACK_URL,
"callbackBody": "test"]
let task = pClient.triggerCallBack(request)
task.continue({ (t) -> Any? in
if (t.result != nil) {
let result = t.result as! OSSCallBackResult;
self .ossAlert(title: "提示", message: result.serverReturnJsonString);
}
return nil
}).waitUntilFinished()
}
//验证结果
func showResult(task: OSSTask<AnyObject>?) {
if (task?.error != nil) {
let error: NSError = (task?.error)! as NSError
self.ossAlert(title: "error", message: error.description)
} else {
let result = task?.result
self.ossAlert(title: "notice", message: result?.description)
}
}
func ossAlert(title: String?,message:String?) {
DispatchQueue.main.async {
let alertCtrl = UIAlertController(title: title, message: message, preferredStyle: UIAlertController.Style.alert)
alertCtrl.addAction(UIAlertAction(title: "confirm", style: UIAlertAction.Style.default, handler: { (action) in
print("\(action.title!) has been clicked");
alertCtrl.dismiss(animated: true, completion: nil)
}))
UIViewController.current?.present(alertCtrl, animated: true, completion: nil)
}
}
}
public class OSSFederationTokenCredentialProvider: OSSFederationCredentialProvider {
var token: OSSFederationToken?
private var tokenGetter: () throws -> OSSFederationToken
public init(tokenGetter: @escaping () throws -> OSSFederationToken) {
self.tokenGetter = tokenGetter
super.init()
}
public override func getToken() throws -> OSSFederationToken {
do {
if var token = token {
if let expirationTimeInGMTFormat = token.expirationTimeInGMTFormat {
let dateFormatter = DateFormatter()
dateFormatter.timeZone = TimeZone(identifier: "GMT")
dateFormatter.locale = Locale(identifier: "en_US_POSIX")
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ssZ"
if let data = dateFormatter.date(from: expirationTimeInGMTFormat) {
token.expirationTimeInMilliSecond = Int64(data.timeIntervalSince1970 * 1000)
}
}
let expirationDate = Date(timeIntervalSince1970: TimeInterval(token.expirationTimeInMilliSecond / 1000))
let interval = expirationDate.timeIntervalSince(NSDate.oss_clockSkewFixed())
if interval < 5 * 60 {
token = try self.tokenGetter()
self.token = token
}
return token
} else {
let token = try self.tokenGetter()
self.token = token
return token
}
} catch {
throw NSError(domain: OSSClientErrorDomain,
code: OSSClientErrorCODE.codeSignFailed.rawValue,
userInfo: [OSSErrorMessageTOKEN : error])
}
}
}
public class TaskCompletionSource: OSSTaskCompletionSource<AnyObject> {
public func wait(timeout: TimeInterval) {
let timer = DispatchSource.makeTimerSource()
timer.schedule(deadline: .now() + timeout)
timer.setEventHandler {
if !self.task.isCompleted {
let error = NSError(domain: OSSClientErrorDomain,
code: OSSClientErrorCODE.codeNotKnown.rawValue,
userInfo: [OSSErrorMessageTOKEN : "TaskCompletionSource wait timeout."])
self.trySetError(error)
}
}
timer.resume()
task.waitUntilFinished()
timer.cancel()
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 346240964@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 346240964@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 346240965@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 346240965@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "激活身份@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "激活身份@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194154@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194154@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "编组-8@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "编组-8@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "编组-21@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "编组-21@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "编组-8@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "编组-8@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "icon_sousuo@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "icon_sousuo@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -5,12 +5,12 @@ ...@@ -5,12 +5,12 @@
"scale" : "1x" "scale" : "1x"
}, },
{ {
"filename" : "Vector@2x.png", "filename" : "Frame 1@2x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"filename" : "Vector@3x.png", "filename" : "Frame 1@3x.png",
"idiom" : "universal", "idiom" : "universal",
"scale" : "3x" "scale" : "3x"
} }
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 2033194487@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 2033194487@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
#import <Bugly/Bugly.h> #import <Bugly/Bugly.h>
#import <ATAuthSDK_D/ATAuthSDK.h> #import <ATAuthSDK_D/ATAuthSDK.h>
#import <AliyunOSSiOS/OSSService.h> //#import <AliyunOSSiOS/OSSService.h>
#import "JPUSHService.h" #import "JPUSHService.h"
// iOS10注册APNs所需头文件 // iOS10注册APNs所需头文件
......
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