Commit 38ea9c10 authored by Steven杜宇's avatar Steven杜宇

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

# Conflicts:
#	galaxy/galaxy.xcodeproj/project.pbxproj
parents 7d6a542b d638dbad
...@@ -24,6 +24,9 @@ ...@@ -24,6 +24,9 @@
044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413FE2BC391F000784A14 /* YHServiceListViewController.swift */; }; 044413FF2BC391F000784A14 /* YHServiceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044413FE2BC391F000784A14 /* YHServiceListViewController.swift */; };
044414012BC3979800784A14 /* YHServerHKLifeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */; }; 044414012BC3979800784A14 /* YHServerHKLifeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */; };
044414032BC39B8D00784A14 /* YHServerTableHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414022BC39B8D00784A14 /* YHServerTableHeadView.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 */; };
...@@ -269,6 +272,8 @@ ...@@ -269,6 +272,8 @@
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 */; }; 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 */; };
...@@ -361,7 +366,6 @@ ...@@ -361,7 +366,6 @@
A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */; }; A5C5B2E82B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */; };
A5C5B2EA2B4ECA4D00A7C5D1 /* YHDavidModel0.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2E92B4ECA4D00A7C5D1 /* YHDavidModel0.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 */; }; A5C5B3002B55623800A7C5D1 /* YHMainContentBaseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */; };
...@@ -387,6 +391,7 @@ ...@@ -387,6 +391,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 */; };
...@@ -446,6 +451,9 @@ ...@@ -446,6 +451,9 @@
044413FE2BC391F000784A14 /* YHServiceListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceListViewController.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>"; }; 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>"; }; 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>"; };
...@@ -694,6 +702,8 @@ ...@@ -694,6 +702,8 @@
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>"; }; 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>"; };
...@@ -790,7 +800,6 @@ ...@@ -790,7 +800,6 @@
A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDavidTestCollectionViewCell.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>"; }; 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>"; }; A5C5B2FE2B55623700A7C5D1 /* YHMainContentBaseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHMainContentBaseViewController.swift; sourceTree = "<group>"; };
...@@ -816,6 +825,7 @@ ...@@ -816,6 +825,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>"; };
...@@ -2056,6 +2066,9 @@ ...@@ -2056,6 +2066,9 @@
A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */, A5FD63C82B63A35B00D1D9DA /* YHInformationFillTipsAlertView.swift */,
A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */, A5FD63CA2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift */,
044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */, 044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */,
044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */,
044414062BC3C54B00784A14 /* YHHomeCollectionViewCell.swift */,
044414082BC3CE8500784A14 /* YHHomeCollectionLayout.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2128,7 +2141,6 @@ ...@@ -2128,7 +2141,6 @@
A5ACE95B2B45712D002C94D2 /* V */ = { A5ACE95B2B45712D002C94D2 /* V */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A5C5B2F82B5515CE00A7C5D1 /* YHPageContentView.swift */,
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */, A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */,
A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */, A5C5B2E72B4EC95600A7C5D1 /* YHDavidTestCollectionViewCell.swift */,
A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */, A5C5B32A2B57D17600A7C5D1 /* YHDavidCell5.swift */,
...@@ -2148,6 +2160,9 @@ ...@@ -2148,6 +2160,9 @@
044E1E822BC3BBFC00A3B4AF /* YHSearchInfoHistoryView.swift */, 044E1E822BC3BBFC00A3B4AF /* YHSearchInfoHistoryView.swift */,
044E1E842BC3BEC300A3B4AF /* YHSearchInfoHistoryCell.swift */, 044E1E842BC3BEC300A3B4AF /* YHSearchInfoHistoryCell.swift */,
044E1E882BC3D7DF00A3B4AF /* YHSearchInfoBar.swift */, 044E1E882BC3D7DF00A3B4AF /* YHSearchInfoBar.swift */,
A5173D692BC3C187007D4E74 /* YHHkLifeAndIdView.swift */,
A5173D6B2BC3C273007D4E74 /* YHHomeKingKongBlockView.swift */,
A5F9AD322BC3CD66000323F8 /* YHHkLifeAndIdItemView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2404,6 +2419,7 @@ ...@@ -2404,6 +2419,7 @@
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */, 045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.swift in Sources */, A5ACE9362B4564F7002C94D2 /* YHNetworkStatusManager.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 */,
...@@ -2492,6 +2508,7 @@ ...@@ -2492,6 +2508,7 @@
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 */,
...@@ -2504,7 +2521,6 @@ ...@@ -2504,7 +2521,6 @@
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 */,
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 */,
...@@ -2597,6 +2613,7 @@ ...@@ -2597,6 +2613,7 @@
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 */,
...@@ -2656,9 +2673,11 @@ ...@@ -2656,9 +2673,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 */,
...@@ -2673,6 +2692,7 @@ ...@@ -2673,6 +2692,7 @@
A5C5B2EA2B4ECA4D00A7C5D1 /* YHDavidModel0.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 */,
......
...@@ -66,7 +66,7 @@ class YHDavidTestViewController: YHBaseViewController { ...@@ -66,7 +66,7 @@ class YHDavidTestViewController: YHBaseViewController {
lazy var items = { lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")] return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
}() }()
...@@ -105,7 +105,7 @@ class YHDavidTestViewController: YHBaseViewController { ...@@ -105,7 +105,7 @@ class YHDavidTestViewController: YHBaseViewController {
view.backgroundColor = .white view.backgroundColor = .white
gk_navigationBar.isHidden = true 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.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
self.myCollectView.reloadData() self.myCollectView.reloadData()
} }
} }
...@@ -115,7 +115,7 @@ extension YHDavidTestViewController { ...@@ -115,7 +115,7 @@ extension YHDavidTestViewController {
private func loadFirstItem() { private func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { 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.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
self.myCollectView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false) self.myCollectView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.myCollectView.reloadData() self.myCollectView.reloadData()
} }
...@@ -124,11 +124,11 @@ extension YHDavidTestViewController { ...@@ -124,11 +124,11 @@ extension YHDavidTestViewController {
private func loadFakeData() { private func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.myCollectView.es.stopLoadingMore() self.myCollectView.es.stopLoadingMore()
self.myCollectView.reloadData() self.myCollectView.reloadData()
......
...@@ -12,12 +12,7 @@ import GKNavigationBarSwift ...@@ -12,12 +12,7 @@ import GKNavigationBarSwift
class YHHomePageViewController: YHBaseViewController { class YHHomePageViewController: YHBaseViewController {
lazy var items = { lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")] return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
}()
private lazy var homeBannerView: YHHomeBannerView = {
let view = YHHomeBannerView()
return view
}() }()
lazy var homeCollectView = { lazy var homeCollectView = {
...@@ -32,12 +27,11 @@ class YHHomePageViewController: YHBaseViewController { ...@@ -32,12 +27,11 @@ class YHHomePageViewController: YHBaseViewController {
flowLayout.scrollDirection = .vertical flowLayout.scrollDirection = .vertical
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout) let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
collectinoView.backgroundColor = .white collectinoView.backgroundColor = .white
collectinoView.register(YHAboutUsAdvantageCell.self, forCellWithReuseIdentifier:YHAboutUsAdvantageCell.cellReuseIdentifier)
collectinoView.register(YHDavidTestCollectionViewCell.self, forCellWithReuseIdentifier:YHDavidTestCollectionViewCell.cellReuseIdentifier) collectinoView.register(YHDavidTestCollectionViewCell.self, forCellWithReuseIdentifier:YHDavidTestCollectionViewCell.cellReuseIdentifier)
collectinoView.delegate = self collectinoView.delegate = self
collectinoView.dataSource = self collectinoView.dataSource = self
collectinoView.showsVerticalScrollIndicator = false
collectinoView.translatesAutoresizingMaskIntoConstraints = false collectinoView.translatesAutoresizingMaskIntoConstraints = false
collectinoView.alwaysBounceVertical = true collectinoView.alwaysBounceVertical = true
...@@ -49,12 +43,16 @@ class YHHomePageViewController: YHBaseViewController { ...@@ -49,12 +43,16 @@ class YHHomePageViewController: YHBaseViewController {
setupUI() setupUI()
} }
lazy var searchView: YHHomeSearchView = { lazy var searchView: YHHomeSearchView = {
let view = YHHomeSearchView() let view = YHHomeSearchView()
return view return view
}() }()
lazy var homeHeaderView: YHHomeHeadView = {
let view = YHHomeHeadView()
return view
}()
} }
private extension YHHomePageViewController { private extension YHHomePageViewController {
...@@ -73,18 +71,24 @@ private extension YHHomePageViewController { ...@@ -73,18 +71,24 @@ private extension YHHomePageViewController {
view.addSubview(homeCollectView) view.addSubview(homeCollectView)
homeCollectView.snp.makeConstraints { make in homeCollectView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.top.equalTo(searchView.snp.bottom).offset(20) make.top.equalTo(searchView.snp.bottom)
} }
homeHeaderView.frame = CGRect(x: 0, y: -YHHomeHeadView.viewH, width: KScreenWidth - 40, height: YHHomeHeadView.viewH)
homeCollectView.addSubview(homeHeaderView)
homeCollectView.contentInset = UIEdgeInsets(top: YHHomeHeadView.viewH, left: 20, bottom: 20, right: 20)
homeCollectView.es.addInfiniteScrolling { homeCollectView.es.addInfiniteScrolling {
self.loadFakeData() self.loadFakeData()
} }
homeCollectView.reloadData()
} }
func loadFirstItem() { func loadFirstItem() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { 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.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
self.homeCollectView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false) self.homeCollectView.es.stopPullToRefresh(ignoreDate: true,ignoreFooter: false)
self.homeCollectView.reloadData() self.homeCollectView.reloadData()
} }
...@@ -93,11 +97,11 @@ private extension YHHomePageViewController { ...@@ -93,11 +97,11 @@ private extension YHHomePageViewController {
func loadFakeData() { func loadFakeData() {
DispatchQueue.main.asyncAfter(deadline: .now() + 1) { DispatchQueue.main.asyncAfter(deadline: .now() + 1) {
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高")) self.items.append(AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""))
self.homeCollectView.es.stopLoadingMore() self.homeCollectView.es.stopLoadingMore()
self.homeCollectView.reloadData() self.homeCollectView.reloadData()
......
...@@ -14,7 +14,7 @@ import ESTabBarController_swift ...@@ -14,7 +14,7 @@ import ESTabBarController_swift
class YHStartPageViewController: UIViewController { class YHStartPageViewController: UIViewController {
private var MaxTime : Int = 50 //for test hjl private var MaxTime : Int = 3
private var timer : Timer? private var timer : Timer?
lazy var imagV: UIImageView = { lazy var imagV: UIImageView = {
......
//
// 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)
}
}
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:未处理")
}
}
}
//
// 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)
}
}
}
...@@ -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 {
// MARK: - constant 常量 // MARK: - constant 常量
// 位置、大小、图片、文本
fileprivate var dataArr: [YHBannerModel] = [YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel()] static let viewH : CGFloat = KScreenWidth - 20 * 2
// MARK: - life cycle 生命周期 // 位置、大小、图片、文本
//工程的viewDidLoad、viewWillAppear、init、didReceiveMemoryWarning等方法都放在这里 fileprivate var dataArr: [YHBannerModel] = [YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel(),YHBannerModel()]
override init(frame: CGRect) { override init(frame: CGRect) {
super.init(frame: frame) super.init(frame: frame)
...@@ -31,17 +28,34 @@ class YHHomeBannerView: UIView { ...@@ -31,17 +28,34 @@ 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 = 3
view.register(FSPagerViewCell.self, forCellWithReuseIdentifier: "cell")
view.itemSize = FSPagerView.automaticSize
view.interitemSpacing = 10
return view
}()
// MARK: - view layout 子视图的布局 lazy var pageControl: FSPageControl = {
//界面布局 let view = FSPageControl()
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(pageControl)
...@@ -49,7 +63,6 @@ class YHHomeBannerView: UIView { ...@@ -49,7 +63,6 @@ class YHHomeBannerView: UIView {
make.left.bottom.right.equalToSuperview() make.left.bottom.right.equalToSuperview()
make.height.equalTo(25) make.height.equalTo(25)
} }
setupPageControl() setupPageControl()
bannerView.reloadData() bannerView.reloadData()
} }
...@@ -60,53 +73,15 @@ class YHHomeBannerView: UIView { ...@@ -60,53 +73,15 @@ class YHHomeBannerView: UIView {
self.pageControl.contentInsets = UIEdgeInsets(top: 0, left: 12, bottom: 10, right: 12) self.pageControl.contentInsets = UIEdgeInsets(top: 0, left: 12, bottom: 10, right: 12)
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 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)) 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 = 3 self.pageControl.interitemSpacing = 3
} }
// 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 {
......
...@@ -13,10 +13,10 @@ class YHHomeCustomCell: UITableViewCell { ...@@ -13,10 +13,10 @@ class YHHomeCustomCell: UITableViewCell {
lazy var items = { lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高"), return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),
AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求"), AboutAdvantageItem(iconName: "about_response", title: "快速响应", detail: "身份规划师一对一专业服务,第一时间响应您的需求", url: ""),
AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持"), AboutAdvantageItem(iconName: "about_service", title: "专业服务", detail: "5年经验+英语专8级文案导师团队倾力支持", url: ""),
AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上")] AboutAdvantageItem(iconName: "about_service2", title: "精准匹配", detail: "香港专才、香港留学获批常年保持90%以上", url: "")]
}() }()
......
...@@ -7,7 +7,64 @@ ...@@ -7,7 +7,64 @@
// //
import UIKit import UIKit
class YHHomeHeadView: UIView { class YHHomeHeadView: UIView {
static let viewH : CGFloat = (20 + YHHomeBannerView.viewH) + (20 + YHHkLifeAndIdView.viewH) + (20 + YHHomeKingKongBlockView.viewH) + 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)
}
// homeBannerView.backgroundColor = .red
addSubview(homeHkLife)
homeHkLife.snp.makeConstraints { make in
make.top.equalTo(homeBannerView.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHHkLifeAndIdView.viewH)
}
// homeHkLife.backgroundColor = .yellow
addSubview(homeKingKongBlock)
homeKingKongBlock.snp.makeConstraints { make in
make.top.equalTo(homeHkLife.snp.bottom).offset(20)
make.left.right.equalToSuperview()
make.height.equalTo(YHHomeKingKongBlockView.viewH)
}
homeKingKongBlock.backgroundColor = .purple
}
} }
//
// 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 = 71.0
override init(frame: CGRect) {
super.init(frame: frame)
initView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
private extension YHHomeKingKongBlockView {
func initView() {
}
}
//
// 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)
}
}
...@@ -13,6 +13,7 @@ class YHServerHKLifeViewController: YHBaseViewController { ...@@ -13,6 +13,7 @@ class YHServerHKLifeViewController: YHBaseViewController {
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel() private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
var tableHeadView: YHServerTableHeadView! var tableHeadView: YHServerTableHeadView!
var tableFootView: YHServiceTableFootView!
var homeTableView: UITableView = { var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped) let tableView = UITableView(frame: .zero, style: .grouped)
...@@ -61,9 +62,11 @@ extension YHServerHKLifeViewController { ...@@ -61,9 +62,11 @@ extension YHServerHKLifeViewController {
tableHeadView = YHServerTableHeadView() tableHeadView = YHServerTableHeadView()
tableHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 365) tableHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 365)
tableFootView = YHServiceTableFootView()
tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight - k_Height_safeAreaInsetsTop() - 48 - k_Height_TabBar)
view.addSubview(homeTableView) view.addSubview(homeTableView)
homeTableView.tableHeaderView = tableHeadView homeTableView.tableHeaderView = tableHeadView
homeTableView.tableFooterView = tableFootView
homeTableView.snp.makeConstraints { make in homeTableView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview() make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-k_Height_TabBar) make.bottom.equalToSuperview().offset(-k_Height_TabBar)
...@@ -83,7 +86,7 @@ extension YHServerHKLifeViewController { ...@@ -83,7 +86,7 @@ extension YHServerHKLifeViewController {
// MARK: - UITableViewDelegate 和 UITableViewDataSource // MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSource { extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int { func numberOfSections(in tableView: UITableView) -> Int {
return self.serviceCenterMainReqVM.arrContactList.count return 1
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
......
...@@ -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 color = UIColor.red docOpt: {
var title = " 待提交 " 1: '待确认',
if dataSource.writing_document.status == 1 { 2: '待签章',
title = " 待提交 " 3: '已驳回',
4: '待核对',
5: '已签章',
6: '已定稿',
7: '已完成'
},
*/
var statusTxt = ""
var color : UIColor = .brandMainColor
let status = dataSource.writing_document.status
if status == 1 {
statusTxt = "待确认"
color = UIColor.brandMainColor color = UIColor.brandMainColor
lookButton.isHidden = true lookButton.isHidden = true
} } else if status == 2 {
if dataSource.writing_document.status == 2 { statusTxt = "待签章"
title = " 待确认 "
color = UIColor.brandMainColor color = UIColor.brandMainColor
lookButton.isHidden = true lookButton.isHidden = true
} } else if status == 3 {
if dataSource.writing_document.status == 3 { statusTxt = "已驳回"
title = "核对中" color = UIColor.failColor
color = UIColor.warnColor
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
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
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 color = UIColor.labelTextColor2
editButton.isHidden = true editButton.isHidden = true
submitButton.isHidden = true submitButton.isHidden = true
bottomCenterLineView.isHidden = true bottomCenterLineView.isHidden = true
} else if status == 7 {
statusTxt = "已完成"
color = UIColor.labelTextColor2
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else {
statusTxt = "--"
color = UIColor.failColor
editButton.isHidden = true
submitButton.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
......
...@@ -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)
......
//
// 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
class YHHomeCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHHomeCollectionViewCell"
var dataSource: AboutAdvantageItem? {
didSet {
updataAllSubViews()
}
}
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)
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)
make.bottom.equalTo(-36)
}
subHoldView.addSubview(numLable)
numLable.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-8)
make.height.equalTo(12)
make.bottom.equalTo(-10)
}
subHoldView.addSubview(heartImageView)
heartImageView.snp.makeConstraints { make in
make.right.equalTo(numLable.snp.left).offset(-6)
make.height.width.equalTo(12)
make.bottom.equalTo(-10)
}
}
func updataAllSubViews() {
guard let dataSource = dataSource else { return }
let imageSize = getImageSize(dataSource.url)
var imageHeight = 0.0
if imageSize.width == 0 {
imageHeight = width
} else {
imageHeight = width * imageSize.height/imageSize.width
if imageHeight > 280 {
imageHeight = 280
}
}
titleImageView.snp.remakeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(imageHeight)
}
if let url = URL(string: dataSource.url) {
titleImageView.kf.setImage(with: url)
}
descripeLable.text = dataSource.title
}
func getImageSize(_ url: String?) -> CGSize {
guard let urlStr = url, urlStr.count != 0 else {
return CGSize.zero
}
let tempUrl = URL(string: urlStr)
let imageSourceRef = CGImageSourceCreateWithURL(tempUrl! as CFURL, nil)
var width: CGFloat = 0
var height: CGFloat = 0
if let imageSRef = imageSourceRef {
let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSRef, 0, nil)
if let imageP = imageProperties {
let imageDict = imageP as Dictionary
width = imageDict[kCGImagePropertyPixelWidth] as! CGFloat
height = imageDict[kCGImagePropertyPixelHeight] as! CGFloat
}
}
return CGSize(width: width, height: height)
}
}
//
// 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 {
lazy var items = {
return [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "")]
}()
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.contentInset = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
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
}()
var dataSource: YHScemeHeadModel? {
didSet {
updateAllViews()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setUpView()
self.items = [AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "https://copyright.bdstatic.com/vcg/creative/cc9c744cf9f7c864889c563cbdeddce6.jpg@h_1280"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "https://inews.gtimg.com/om_bt/OjPq2cnMN_-ivDKjxpCZ2kk_ab8YC5VMnL-0pQ21fUvd4AA/1000"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "https://img.pconline.com.cn/images/upload/upc/tx/itbbs/2101/25/c1/251135935_1611532823091_mthumb.jpg"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: ""),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "https://photo.16pic.com/00/47/86/16pic_4786353_b.jpg"),AboutAdvantageItem(iconName: "about_match", title: "精准匹配", detail: "大数据精准匹配,专属方案获批率更高", url: "https://inews.gtimg.com/om_bt/OMvPDmiuH_X5Vq1YLNgbFEzD2h_-2dCfWQ7xZFcKFSEsAAA/641")]
self.myCollectView.reloadData()
}
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()
// }
}
func updateAllViews() {
guard let model = dataSource else { return }
}
func getImageSize(_ url: String?) -> CGSize {
guard let urlStr = url, urlStr.count != 0 else {
return CGSize.zero
}
let tempUrl = URL(string: urlStr)
let imageSourceRef = CGImageSourceCreateWithURL(tempUrl! as CFURL, nil)
var width: CGFloat = 0
var height: CGFloat = 0
if let imageSRef = imageSourceRef {
let imageProperties = CGImageSourceCopyPropertiesAtIndex(imageSRef, 0, nil)
if let imageP = imageProperties {
let imageDict = imageP as Dictionary
width = imageDict[kCGImagePropertyPixelWidth] as! CGFloat
height = imageDict[kCGImagePropertyPixelHeight] as! CGFloat
}
}
return CGSize(width: width, height: height)
}
}
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.dataSource = items[indexPath.row]
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
print("index is \(indexPath.row)")
}
// func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
//
// }
}
extension YHServiceTableFootView: CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
let model = items[indexPath.row]
let text = model.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 = size.height
if textHeight > 40 {
textHeight = 40
}
let imageSize = getImageSize(model.url)
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 + 46
return CGSize(width: width, height: totalHeight)
}
}
...@@ -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 = {
......
{
"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
}
}
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