Commit e6611ad3 authored by pete谢兆麟's avatar pete谢兆麟

删除多余无用代码

parent 12200d02
...@@ -145,8 +145,6 @@ ...@@ -145,8 +145,6 @@
043D2C8A2C0EEF3F00172438 /* YHOrderSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */; }; 043D2C8A2C0EEF3F00172438 /* YHOrderSearchViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */; };
043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */; }; 043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */; };
044378A42BFC848C001F95AE /* loginBkg.mov in Resources */ = {isa = PBXBuildFile; fileRef = 044378A32BFC848C001F95AE /* loginBkg.mov */; }; 044378A42BFC848C001F95AE /* loginBkg.mov in Resources */ = {isa = PBXBuildFile; fileRef = 044378A32BFC848C001F95AE /* loginBkg.mov */; };
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 */; }; 044414032BC39B8D00784A14 /* YHServerTableHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414022BC39B8D00784A14 /* YHServerTableHeadView.swift */; };
044414052BC3B9DE00784A14 /* YHServiceTableFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */; }; 044414052BC3B9DE00784A14 /* YHServiceTableFootView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */; };
0445E6AF2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0445E6AE2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift */; }; 0445E6AF2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0445E6AE2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift */; };
...@@ -522,11 +520,6 @@ ...@@ -522,11 +520,6 @@
04F0ABF72C364F9D00518C30 /* service.json in Resources */ = {isa = PBXBuildFile; fileRef = 04F0ABF62C364F9D00518C30 /* service.json */; }; 04F0ABF72C364F9D00518C30 /* service.json in Resources */ = {isa = PBXBuildFile; fileRef = 04F0ABF62C364F9D00518C30 /* service.json */; };
04F316442C3568F000024164 /* YHAboutGalaxyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */; }; 04F316442C3568F000024164 /* YHAboutGalaxyViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */; };
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */; }; 04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */; };
04F5F8602C1944D5004A463C /* YHHKCenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F85F2C1944D5004A463C /* YHHKCenterViewController.swift */; };
04F5F8622C1945C0004A463C /* YHHKIdentityCardViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8612C1945C0004A463C /* YHHKIdentityCardViewController.swift */; };
04F5F8642C19460D004A463C /* YHHKLifeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8632C19460D004A463C /* YHHKLifeViewController.swift */; };
04F5F8662C197FFF004A463C /* YHHKControllerHoldViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8652C197FFF004A463C /* YHHKControllerHoldViewController.swift */; };
04F5F8682C198372004A463C /* YHHKClassListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8672C198372004A463C /* YHHKClassListViewController.swift */; };
04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */; }; 04F5F86A2C1A95BB004A463C /* YHOtherServiceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */; };
04F5F86C2C1A9B52004A463C /* YHOtherServiceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F86B2C1A9B52004A463C /* YHOtherServiceListViewController.swift */; }; 04F5F86C2C1A9B52004A463C /* YHOtherServiceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F86B2C1A9B52004A463C /* YHOtherServiceListViewController.swift */; };
04F5F86E2C1AC351004A463C /* YHHKEventCenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F86D2C1AC351004A463C /* YHHKEventCenterViewController.swift */; }; 04F5F86E2C1AC351004A463C /* YHHKEventCenterViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04F5F86D2C1AC351004A463C /* YHHKEventCenterViewController.swift */; };
...@@ -554,7 +547,6 @@ ...@@ -554,7 +547,6 @@
A5000F512C3BC28B00843452 /* YHHomeHoldViewPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5000F502C3BC28B00843452 /* YHHomeHoldViewPageViewController.swift */; }; A5000F512C3BC28B00843452 /* YHHomeHoldViewPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5000F502C3BC28B00843452 /* YHHomeHoldViewPageViewController.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 */; };
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 */; };
...@@ -607,10 +599,8 @@ ...@@ -607,10 +599,8 @@
A567E5B12BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58A2BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift */; }; A567E5B12BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58A2BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift */; };
A567E5B22BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58B2BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift */; }; A567E5B22BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58B2BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift */; };
A567E5B32BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58C2BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift */; }; A567E5B32BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58C2BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift */; };
A567E5B42BD7643D00D5D5A0 /* YHHkLifeAndIdView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58D2BD7643D00D5D5A0 /* YHHkLifeAndIdView.swift */; };
A567E5B52BD7643D00D5D5A0 /* YHSearchInfoBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58E2BD7643D00D5D5A0 /* YHSearchInfoBar.swift */; }; A567E5B52BD7643D00D5D5A0 /* YHSearchInfoBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58E2BD7643D00D5D5A0 /* YHSearchInfoBar.swift */; };
A567E5B62BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58F2BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift */; }; A567E5B62BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E58F2BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift */; };
A567E5B72BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5902BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift */; };
A567E5B82BD7643D00D5D5A0 /* YHSearchItemLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */; }; A567E5B82BD7643D00D5D5A0 /* YHSearchItemLayout.swift in Sources */ = {isa = PBXBuildFile; fileRef = A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */; };
A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */; }; A56D2D612B62020C009C83A8 /* YHContractMainItemStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */; };
A5765B262C771F86002CD3C1 /* YHRangeDatePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5765B252C771F86002CD3C1 /* YHRangeDatePickerView.swift */; }; A5765B262C771F86002CD3C1 /* YHRangeDatePickerView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5765B252C771F86002CD3C1 /* YHRangeDatePickerView.swift */; };
...@@ -922,8 +912,6 @@ ...@@ -922,8 +912,6 @@
043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderSearchViewController.swift; sourceTree = "<group>"; }; 043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOrderSearchViewController.swift; sourceTree = "<group>"; };
043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceOrderSearchViewModel.swift; sourceTree = "<group>"; }; 043D2C8B2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceOrderSearchViewModel.swift; sourceTree = "<group>"; };
044378A32BFC848C001F95AE /* loginBkg.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = loginBkg.mov; sourceTree = "<group>"; }; 044378A32BFC848C001F95AE /* loginBkg.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = loginBkg.mov; 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>"; }; 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>"; }; 044414042BC3B9DE00784A14 /* YHServiceTableFootView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceTableFootView.swift; sourceTree = "<group>"; };
0445E6AE2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppVersionForceUpdateView.swift; sourceTree = "<group>"; }; 0445E6AE2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAppVersionForceUpdateView.swift; sourceTree = "<group>"; };
...@@ -1302,11 +1290,6 @@ ...@@ -1302,11 +1290,6 @@
04F0ABF62C364F9D00518C30 /* service.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = service.json; sourceTree = "<group>"; }; 04F0ABF62C364F9D00518C30 /* service.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = service.json; sourceTree = "<group>"; };
04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutGalaxyViewController.swift; sourceTree = "<group>"; }; 04F316432C3568F000024164 /* YHAboutGalaxyViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAboutGalaxyViewController.swift; sourceTree = "<group>"; };
04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateSheetView.swift; sourceTree = "<group>"; }; 04F4B76A2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHCertificateTemplateSheetView.swift; sourceTree = "<group>"; };
04F5F85F2C1944D5004A463C /* YHHKCenterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKCenterViewController.swift; sourceTree = "<group>"; };
04F5F8612C1945C0004A463C /* YHHKIdentityCardViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKIdentityCardViewController.swift; sourceTree = "<group>"; };
04F5F8632C19460D004A463C /* YHHKLifeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKLifeViewController.swift; sourceTree = "<group>"; };
04F5F8652C197FFF004A463C /* YHHKControllerHoldViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKControllerHoldViewController.swift; sourceTree = "<group>"; };
04F5F8672C198372004A463C /* YHHKClassListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKClassListViewController.swift; sourceTree = "<group>"; };
04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherServiceViewController.swift; sourceTree = "<group>"; }; 04F5F8692C1A95BB004A463C /* YHOtherServiceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherServiceViewController.swift; sourceTree = "<group>"; };
04F5F86B2C1A9B52004A463C /* YHOtherServiceListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherServiceListViewController.swift; sourceTree = "<group>"; }; 04F5F86B2C1A9B52004A463C /* YHOtherServiceListViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherServiceListViewController.swift; sourceTree = "<group>"; };
04F5F86D2C1AC351004A463C /* YHHKEventCenterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKEventCenterViewController.swift; sourceTree = "<group>"; }; 04F5F86D2C1AC351004A463C /* YHHKEventCenterViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKEventCenterViewController.swift; sourceTree = "<group>"; };
...@@ -1336,7 +1319,6 @@ ...@@ -1336,7 +1319,6 @@
A5000F502C3BC28B00843452 /* YHHomeHoldViewPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeHoldViewPageViewController.swift; sourceTree = "<group>"; }; A5000F502C3BC28B00843452 /* YHHomeHoldViewPageViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeHoldViewPageViewController.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>"; };
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>"; };
...@@ -1393,10 +1375,8 @@ ...@@ -1393,10 +1375,8 @@
A567E58A2BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeCollectionViewCell.swift; sourceTree = "<group>"; }; A567E58A2BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeCollectionViewCell.swift; sourceTree = "<group>"; };
A567E58B2BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeBannerCollectionViewCell.swift; sourceTree = "<group>"; }; A567E58B2BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeBannerCollectionViewCell.swift; sourceTree = "<group>"; };
A567E58C2BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHServiceOrderAlertView.swift; sourceTree = "<group>"; }; A567E58C2BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHServiceOrderAlertView.swift; sourceTree = "<group>"; };
A567E58D2BD7643D00D5D5A0 /* YHHkLifeAndIdView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHkLifeAndIdView.swift; sourceTree = "<group>"; };
A567E58E2BD7643D00D5D5A0 /* YHSearchInfoBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchInfoBar.swift; sourceTree = "<group>"; }; A567E58E2BD7643D00D5D5A0 /* YHSearchInfoBar.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchInfoBar.swift; sourceTree = "<group>"; };
A567E58F2BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeBannerIndicatorView.swift; sourceTree = "<group>"; }; A567E58F2BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHomeBannerIndicatorView.swift; sourceTree = "<group>"; };
A567E5902BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHHkLifeAndIdItemView.swift; sourceTree = "<group>"; };
A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchItemLayout.swift; sourceTree = "<group>"; }; A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSearchItemLayout.swift; sourceTree = "<group>"; };
A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractMainItemStatusCell.swift; sourceTree = "<group>"; }; A56D2D602B62020C009C83A8 /* YHContractMainItemStatusCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHContractMainItemStatusCell.swift; sourceTree = "<group>"; };
A5765B252C771F86002CD3C1 /* YHRangeDatePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHRangeDatePickerView.swift; sourceTree = "<group>"; }; A5765B252C771F86002CD3C1 /* YHRangeDatePickerView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHRangeDatePickerView.swift; sourceTree = "<group>"; };
...@@ -3462,10 +3442,8 @@ ...@@ -3462,10 +3442,8 @@
A567E58A2BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift */, A567E58A2BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift */,
A567E58B2BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift */, A567E58B2BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift */,
A567E58C2BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift */, A567E58C2BD7643D00D5D5A0 /* YHServiceOrderAlertView.swift */,
A567E58D2BD7643D00D5D5A0 /* YHHkLifeAndIdView.swift */,
A567E58E2BD7643D00D5D5A0 /* YHSearchInfoBar.swift */, A567E58E2BD7643D00D5D5A0 /* YHSearchInfoBar.swift */,
A567E58F2BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift */, A567E58F2BD7643D00D5D5A0 /* YHHomeBannerIndicatorView.swift */,
A567E5902BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift */,
049AB5ED2C0EF68700155DDF /* YHOrderTipsView.swift */, 049AB5ED2C0EF68700155DDF /* YHOrderTipsView.swift */,
A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */, A567E5912BD7643D00D5D5A0 /* YHSearchItemLayout.swift */,
A5EE41EE2C21387C005BBA5D /* YHAiRadarAreaView.swift */, A5EE41EE2C21387C005BBA5D /* YHAiRadarAreaView.swift */,
...@@ -3818,16 +3796,8 @@ ...@@ -3818,16 +3796,8 @@
A5ACE9192B4564F7002C94D2 /* YHServiceCenterMainViewController.swift */, A5ACE9192B4564F7002C94D2 /* YHServiceCenterMainViewController.swift */,
04E41DE72BD240570077EAE3 /* YHOrderDetailViewController.swift */, 04E41DE72BD240570077EAE3 /* YHOrderDetailViewController.swift */,
048787D42BCE880B0036E221 /* YHServiceOrderListViewController.swift */, 048787D42BCE880B0036E221 /* YHServiceOrderListViewController.swift */,
04F5F85F2C1944D5004A463C /* YHHKCenterViewController.swift */,
044413FE2BC391F000784A14 /* YHServiceListViewController.swift */,
04F5F8612C1945C0004A463C /* YHHKIdentityCardViewController.swift */,
04F5F8632C19460D004A463C /* YHHKLifeViewController.swift */,
044414002BC3979800784A14 /* YHServerHKLifeViewController.swift */,
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */,
A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */, A5FD63BC2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift */,
043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */, 043D2C892C0EEF3F00172438 /* YHOrderSearchViewController.swift */,
04F5F8652C197FFF004A463C /* YHHKControllerHoldViewController.swift */,
04F5F8672C198372004A463C /* YHHKClassListViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4329,7 +4299,6 @@ ...@@ -4329,7 +4299,6 @@
04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */, 04A671592B9F18C800C1FB91 /* YHCertificateUploadSheetView.swift in Sources */,
04B360E52C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift in Sources */, 04B360E52C60B5D3001EB053 /* YHPrinciplePhotoCollectCell.swift in Sources */,
0425E6422BA95B1B00A5E763 /* YHSchemeTableFooterView.swift in Sources */, 0425E6422BA95B1B00A5E763 /* YHSchemeTableFooterView.swift in Sources */,
A567E5B42BD7643D00D5D5A0 /* YHHkLifeAndIdView.swift in Sources */,
045EEEBD2B9F171A0022A143 /* YHWorkExampleTypeView.swift in Sources */, 045EEEBD2B9F171A0022A143 /* YHWorkExampleTypeView.swift in Sources */,
049AB5EE2C0EF68700155DDF /* YHOrderTipsView.swift in Sources */, 049AB5EE2C0EF68700155DDF /* YHOrderTipsView.swift in Sources */,
045EEEB12B9F171A0022A143 /* YHClipperView.swift in Sources */, 045EEEB12B9F171A0022A143 /* YHClipperView.swift in Sources */,
...@@ -4339,13 +4308,11 @@ ...@@ -4339,13 +4308,11 @@
044D0C182C22AB7300C5CF5E /* YHEditBaseInfoFootView.swift in Sources */, 044D0C182C22AB7300C5CF5E /* YHEditBaseInfoFootView.swift in Sources */,
047AA3F42C50E5C7009C4554 /* YHInvitationWithGiftsViewModel.swift in Sources */, 047AA3F42C50E5C7009C4554 /* YHInvitationWithGiftsViewModel.swift in Sources */,
04CE1AD52C2AD91F001CB80A /* YHActivityTravelViewController.swift in Sources */, 04CE1AD52C2AD91F001CB80A /* YHActivityTravelViewController.swift in Sources */,
A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */,
A5EF21372BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift in Sources */, A5EF21372BA6E2D1005027E6 /* YHQuestionAndAnswerModel.swift in Sources */,
A567E5A52BD7643D00D5D5A0 /* YHHomeCollectionLayout.swift in Sources */, A567E5A52BD7643D00D5D5A0 /* YHHomeCollectionLayout.swift in Sources */,
04A6715C2B9FE9EA00C1FB91 /* YHCertificateUploadContentListVC.swift in Sources */, 04A6715C2B9FE9EA00C1FB91 /* YHCertificateUploadContentListVC.swift in Sources */,
A592FE972BA6DB340062FACA /* YHCertificateViewModel.swift in Sources */, A592FE972BA6DB340062FACA /* YHCertificateViewModel.swift in Sources */,
045EEEF02B9F171A0022A143 /* YHChildPrimaryInfoVC.swift in Sources */, 045EEEF02B9F171A0022A143 /* YHChildPrimaryInfoVC.swift in Sources */,
04F5F8602C1944D5004A463C /* YHHKCenterViewController.swift in Sources */,
A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */, A5D001212BAA9D99001F003C /* YHChoiceButtonHoldView.swift in Sources */,
045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */, 045EEEF62B9F171A0022A143 /* YHSpousePrimaryInfoVC.swift in Sources */,
044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */, 044867B82BA1C75700DFAD4A /* YHCertificateUploadFailTipsView.swift in Sources */,
...@@ -4436,7 +4403,6 @@ ...@@ -4436,7 +4403,6 @@
045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */, 045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */,
045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */, 045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */,
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */, 045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
04F5F8682C198372004A463C /* YHHKClassListViewController.swift in Sources */,
0430E6582C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift in Sources */, 0430E6582C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift in Sources */,
A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */, A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */,
045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */, 045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */,
...@@ -4510,7 +4476,6 @@ ...@@ -4510,7 +4476,6 @@
0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */, 0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */,
A567E5AA2BD7643D00D5D5A0 /* YHGestureTableView.swift in Sources */, A567E5AA2BD7643D00D5D5A0 /* YHGestureTableView.swift in Sources */,
04CE1ADF2C2AD91F001CB80A /* YHActivityListCell.swift in Sources */, 04CE1ADF2C2AD91F001CB80A /* YHActivityListCell.swift in Sources */,
04F5F8642C19460D004A463C /* YHHKLifeViewController.swift in Sources */,
04256DFC2C742C7D00A37BA4 /* YHFamilyInfoConfirmViewModel.swift in Sources */, 04256DFC2C742C7D00A37BA4 /* YHFamilyInfoConfirmViewModel.swift in Sources */,
A59B43CF2C4B5AD100B28379 /* YHShareViewOnTablebarView.swift in Sources */, A59B43CF2C4B5AD100B28379 /* YHShareViewOnTablebarView.swift in Sources */,
A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */, A5ACE94A2B4564F7002C94D2 /* YHHUDProgressView.swift in Sources */,
...@@ -4612,7 +4577,6 @@ ...@@ -4612,7 +4577,6 @@
A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */, A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */,
04AF82D62C25542D0028CE2A /* YHInterestTopicLayout.swift in Sources */, 04AF82D62C25542D0028CE2A /* YHInterestTopicLayout.swift in Sources */,
045EEE902B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemsView.swift in Sources */, 045EEE902B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemsView.swift in Sources */,
A567E5B72BD7643D00D5D5A0 /* YHHkLifeAndIdItemView.swift in Sources */,
A5ACE9502B4564F7002C94D2 /* YhCacheTool.swift in Sources */, A5ACE9502B4564F7002C94D2 /* YhCacheTool.swift in Sources */,
04F957452C1FEC4A003C631C /* YHMessageBellView.swift in Sources */, 04F957452C1FEC4A003C631C /* YHMessageBellView.swift in Sources */,
A567E5992BD7643D00D5D5A0 /* YHBannerModel.swift in Sources */, A567E5992BD7643D00D5D5A0 /* YHBannerModel.swift in Sources */,
...@@ -4679,7 +4643,6 @@ ...@@ -4679,7 +4643,6 @@
045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */, 045EEEBC2B9F171A0022A143 /* YHClipperButton.swift in Sources */,
0430E66A2C7493A5000511E2 /* YHAdopterExampleTableViewCell.swift in Sources */, 0430E66A2C7493A5000511E2 /* YHAdopterExampleTableViewCell.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 */,
A5DF9C632C78733200CE48E6 /* YHHKLegaldaysModel.swift in Sources */, A5DF9C632C78733200CE48E6 /* YHHKLegaldaysModel.swift in Sources */,
0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */, 0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */,
...@@ -4999,7 +4962,6 @@ ...@@ -4999,7 +4962,6 @@
045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */, 045EEF052B9F171A0022A143 /* YHFormItemExpireDateCell.swift in Sources */,
043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */, 043B0A352C1190C6008A9BBA /* YHSelectFileSheetView.swift in Sources */,
0430E6462C73171E000511E2 /* YHAdopterStepTableViewCell.swift in Sources */, 0430E6462C73171E000511E2 /* YHAdopterStepTableViewCell.swift in Sources */,
04F5F8662C197FFF004A463C /* YHHKControllerHoldViewController.swift in Sources */,
A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */, A5ACE92D2B4564F7002C94D2 /* YHLoginPrivacyView.swift in Sources */,
04FD85742C219CFD00BEF9C5 /* YHMatchResultListViewController.swift in Sources */, 04FD85742C219CFD00BEF9C5 /* YHMatchResultListViewController.swift in Sources */,
045EEEB72B9F171A0022A143 /* YHWorkItemAddView.swift in Sources */, 045EEEB72B9F171A0022A143 /* YHWorkItemAddView.swift in Sources */,
...@@ -5011,14 +4973,12 @@ ...@@ -5011,14 +4973,12 @@
045EEF092B9F171A0022A143 /* YHBasicInfoFillModel.swift in Sources */, 045EEF092B9F171A0022A143 /* YHBasicInfoFillModel.swift in Sources */,
A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */, A5ACE9352B4564F7002C94D2 /* YHNetRequest.swift in Sources */,
A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */, A5FD63CB2B63D6C300D1D9DA /* YHInformationFillTipsCell.swift in Sources */,
04F5F8622C1945C0004A463C /* YHHKIdentityCardViewController.swift in Sources */,
04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */, 04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */,
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */, 0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */,
045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */, 045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */,
04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */, 04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */,
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */, 045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */,
044BACC72BCFA58E00184C64 /* YHNoDataTipsView.swift in Sources */, 044BACC72BCFA58E00184C64 /* YHNoDataTipsView.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 */, 0414BDAD2BC7F02C00225367 /* YHMyNotifySettingVC.swift in Sources */,
......
//
// 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.yhGreyColor
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 {
//香港身份
let vc = YHHKCenterViewController()
vc.defaltIndex = 0
UIViewController.current?.navigationController?.pushViewController(vc)
} else if itemType == .hklife {
//香港生活
let vc = YHHKCenterViewController()
vc.defaltIndex = 1
UIViewController.current?.navigationController?.pushViewController(vc)
} 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)
}
}
}
//
// YHHKCenterViewController.swift
// galaxy
//
// Created by EDY on 2024/6/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHHKCenterViewController: YHBaseViewController {
var defaltIndex: Int = 0
let arrItemTitles = ["香港身份","香港生活"]
var arrItemVCs : [YHBaseViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: KScreenWidth, height: 48))
lazy var segmentedDataSource: JXSegmentedBaseDataSource = {
let dataSource = JXSegmentedTitleDataSource()
dataSource.isTitleColorGradientEnabled = true
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_M(ofSize: 15)
dataSource.titleNormalColor = .labelTextColor2
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 18)
dataSource.titleSelectedColor = .mainTextColor
dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension
dataSource.itemSpacing = 90
return dataSource
}()
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
}()
//分类title 所对应的VC
lazy var listContainerView: JXSegmentedListContainerView! = {
return JXSegmentedListContainerView(dataSource: self, type: .scrollView)
}()
@objc func didBackBtnClicked() {
self.navigationController?.popViewController(animated: true)
}
override func viewDidLoad() {
super.viewDidLoad()
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = .white
for i in 0..<arrItemTitles.count {
if i == 0 {
let vc = YHHKIdentityCardViewController()
arrItemVCs.append(vc)
} else {
let vc = YHHKLifeViewController()
arrItemVCs.append(vc)
}
}
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource
segmentedView.collectionView.backgroundColor = .white
view.addSubview(segmentedView)
segmentedView.listContainer = listContainerView
view.addSubview(listContainerView)
//分类Title
segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self
//配置指示器
let indicator = JXSegmentedIndicatorLineView()
indicator.indicatorWidth = 16
indicator.indicatorColor = UIColor.brandMainColor
segmentedView.indicators = [indicator]
segmentedView.backgroundColor = UIColor(red: 0.95, green: 0.95, blue: 0.95, alpha: 1)
view.addSubview(navBar)
navBar.snp.makeConstraints { make in
make.left.equalToSuperview()
// make.top.equalToSuperview().offset(k_Height_statusBar())
make.height.equalTo(k_Height_NavContentBar)
make.width.equalTo(47)
make.centerY.equalTo(segmentedView.snp.centerY)
}
segmentedView.defaultSelectedIndex = defaltIndex
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
//处于第一个item的时候,才允许屏幕边缘手势返回
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
//离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 0, y: k_Height_safeAreaInsetsTop(), width: view.bounds.size.width, height: 48)
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 YHHKCenterViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
}
}
extension YHHKCenterViewController {
func jumpToItemIndex(itemIndex : Int) {
self.segmentedView.selectItemAt(index: itemIndex)
}
}
extension YHHKCenterViewController: JXSegmentedListContainerViewDataSource {
func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
return titleDataSource.dataSource.count
}
return 0
}
func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
return arrItemVCs[index] as! JXSegmentedListContainerViewListDelegate
}
}
//
// YHHKClassListView.swift
// galaxy
//
// Created by EDY on 2024/6/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHHKClassListViewController: YHBaseViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
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
collectinoView.showsVerticalScrollIndicator = false
collectinoView.showsHorizontalScrollIndicator = false
return collectinoView
}()
var classId: Int = 0
public var vcCanScroll : Bool = true
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .white
setupUI()
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHHKClassListViewController {
func loadData() {
self.homeViewModel.getList(true, classId) {[weak self] success, error in
guard let self = self else { return }
self.items = self.homeViewModel.arrHomeNewsData ?? []
if self.homeViewModel.hasMoreForHomeNews == false {
self.myCollectView.es.noticeNoMoreData()
self.myCollectView.footer?.alpha = 1
}
}
}
func setupUI() {
gk_navBarAlpha = 1
gk_navigationBar.isHidden = true
view.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 }
self.homeViewModel.getList(false, self.classId) {[weak self] success, error in
guard let self = self else { return }
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.35, execute: {
CATransaction.setDisableActions(true)
self.items = self.homeViewModel.arrHomeNewsData ?? []
CATransaction.commit()
self.myCollectView.es.stopLoadingMore()
if self.homeViewModel.hasMoreForHomeNews == false {
self.myCollectView.es.noticeNoMoreData()
}
})
}
}
}
}
extension YHHKClassListViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
extension YHHKClassListViewController {
@objc func beginDragging() {
myCollectView.isScrollEnabled = false
vcCanScroll = false
}
@objc func endDragging() {
myCollectView.isScrollEnabled = true
vcCanScroll = true
}
}
extension YHHKClassListViewController: UIScrollViewDelegate {
//控制滑动交互
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let scrollViewSet: CGFloat = scrollView.contentOffset.y
if vcCanScroll == false {//不能滚动时
scrollView.contentOffset = CGPoint(x: 0, y: 0)
} else {
if (scrollViewSet <= 0) {
scrollView.contentOffset = CGPoint(x: 0, y: 0)
vcCanScroll = false
NotificationCenter.default.post(name: Notification.Name(rawValue: "leaveTop0"), object: nil)
} else {
scrollView.contentOffset = CGPoint(x: 0, y: scrollViewSet)
}
}
}
}
extension YHHKClassListViewController: 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 = YHBaseUrlManager.shared.curH5URL() + "articleDetail.html" + "?id=\(model.id)"
vc.id = model.id
vc.block = {[weak self] model in
guard let self = self else { return }
let arr = self.items
for (index, targetItem) in arr.enumerated() {
guard let target = targetItem else { return }
if target.id == model.id {
target.is_like = model.is_like
target.like_count = model.like_count
self.myCollectView.reloadItems(at: [IndexPath.SubSequence(item: index, section: 0)])
}
}
}
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 1 {
printLog("直接播放视频")
}
}
}
extension YHHKClassListViewController: 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)
}
}
//
// YHHKControllerHoldViewController.swift
// galaxy
//
// Created by EDY on 2024/6/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHHKControllerHoldViewController: UIViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var canScroll : Bool = false {
didSet {
for vc in arrItemVCs {
vc.vcCanScroll = canScroll
}
}
}
var items: [YHClassifyModel] = []
var classID = 0
var myDefaultNavItemIndex : Int = 0 {
didSet {
self.segmentedView.selectItemAt(index: self.myDefaultNavItemIndex)
}
}
var arrItemTitles: [String] = []
var arrItemVCs : [YHHKClassListViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 55))
lazy var segmentedDataSource: JXSegmentedTitleDataSource = {
let dataSource = JXSegmentedTitleDataSource()
dataSource.titles = arrItemTitles
dataSource.titleNormalFont = UIFont.PFSC_R(ofSize: 14)
dataSource.titleSelectedColor = UIColor.labelTextColor2
dataSource.titleSelectedFont = UIFont.PFSC_M(ofSize: 14)
dataSource.titleSelectedColor = UIColor.white
dataSource.isTitleMaskEnabled = true
dataSource.isItemSpacingAverageEnabled = false
dataSource.itemWidth = JXSegmentedViewAutomaticDimension
dataSource.itemSpacing = 24
return dataSource
}()
//分类title 所对应的VC
lazy var listContainerView: JXSegmentedListContainerView! = {
return JXSegmentedListContainerView(dataSource: self, type: .collectionView)
}()
override func viewDidLoad() {
super.viewDidLoad()
//segmentedViewDataSource一定要通过属性强持有!!!!!!!!!
segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self
view.addSubview(segmentedView)
segmentedView.listContainer = listContainerView
view.addSubview(listContainerView)
//分类Title
segmentedView.dataSource = segmentedDataSource
segmentedView.delegate = self
//配置指示器
let indicator = JXSegmentedIndicatorBackgroundView()
indicator.indicatorColor = UIColor.brandMainColor
indicator.indicatorHeight = 32
segmentedView.indicators = [indicator]
segmentedView.defaultSelectedIndex = self.myDefaultNavItemIndex
getData()
}
func getData() {
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.classID {
self.items = model.children
self.arrItemTitles.removeAll()
for item in model.children {
self.arrItemTitles.append(item.name)
let vc = YHHKClassListViewController()
vc.classId = item.id
arrItemVCs.append(vc)
}
}
self.segmentedDataSource.titles = arrItemTitles
self.segmentedView.dataSource = segmentedDataSource
self.segmentedView.reloadData()
}
}
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
//处于第一个item的时候,才允许屏幕边缘手势返回
navigationController?.interactivePopGestureRecognizer?.isEnabled = (segmentedView.selectedIndex == 0)
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
//离开页面的时候,需要恢复屏幕边缘手势,不能影响其他页面
navigationController?.interactivePopGestureRecognizer?.isEnabled = true
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
segmentedView.frame = CGRect(x: 0, y: 0, width: view.bounds.size.width, height: 55)
listContainerView.frame = CGRect(x: 0, y: 55, width: view.bounds.size.width, height: view.bounds.size.height - 55)
segmentedView.backgroundColor = .white
}
}
extension YHHKControllerHoldViewController: JXSegmentedViewDelegate {
func segmentedView(_ segmentedView: JXSegmentedView, didSelectedItemAt index: Int) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewDidToTop"), object: nil)
}
/// 正在滚动中的回调
///
/// - Parameters:
/// - segmentedView: JXSegmentedView
/// - leftIndex: 正在滚动中,相对位置处于左边的index
/// - rightIndex: 正在滚动中,相对位置处于右边的index
/// - percent: 从左往右计算的百分比
func segmentedView(_ segmentedView: JXSegmentedView, scrollingFrom leftIndex: Int, to rightIndex: Int, percent: CGFloat) {
NotificationCenter.default.post(name: Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
}
}
extension YHHKControllerHoldViewController: JXSegmentedListContainerViewDataSource {
func numberOfLists(in listContainerView: JXSegmentedListContainerView) -> Int {
if let titleDataSource = segmentedView.dataSource as? JXSegmentedBaseDataSource {
return titleDataSource.dataSource.count
}
return 0
}
func listContainerView(_ listContainerView: JXSegmentedListContainerView, initListAt index: Int) -> JXSegmentedListContainerViewListDelegate {
return arrItemVCs[index] as JXSegmentedListContainerViewListDelegate
}
}
//
// YHHKIdentityCardViewController.swift
// galaxy
//
// Created by EDY on 2024/6/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHHKIdentityCardViewController: YHBaseViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var tableHeadView: YHServerTableHeadView!
var orderId : Int?
var canScroll : Bool = true
var myCellHeight : CGFloat {
get {
return view.bounds.size.height
}
}
var myDefaultIndex : Int = 0 {
didSet {
DispatchQueue.global().asyncAfter(wallDeadline: .now() ) {[weak self] in
DispatchQueue.main.async {
self?.cellView.myDefaultNavItemIndex = self?.myDefaultIndex ?? 0
}
}
}
}
lazy var cellView: YHHKControllerHoldViewController = {
let ttt = YHHKControllerHoldViewController()
ttt.classID = 1
return ttt
}()
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
return tableView
}()
var myHeadView : UIView = {
let view = UIView(frame: CGRect(x: kMargin, y: 0, width: KScreenWidth, height: 365))
view.backgroundColor = .white
return view
}()
//头像
private lazy var headImagV : UIImageView = {
let imageV = UIImageView(image: UIImage(named: "mine_head_default"))
imageV.contentMode = .scaleAspectFill
imageV.layer.cornerRadius = 26.5
imageV.clipsToBounds = true
imageV.layer.borderWidth = 2
imageV.layer.borderColor = UIColor.white.cgColor
return imageV
}()
//姓名
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "")
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 19)
return lable0
}()
//电话号码
private lazy var phoneLable : UILabel = {
let lable0 = UILabel(text: "")
lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 14)
return lable0
}()
// MARK: - 生命周期方法
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(leaveTopOp), name:Notification.Name(rawValue: "leaveTop0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(scrDragging), name:Notification.Name(rawValue: "scrollViewDidToTop"), object: nil)
//1.UI
initView()
//2.网络请求
loadData()
// updateDefaultSearchKeyWord()
}
// func updateDefaultSearchKeyWord() {
// var placeHolder = "香港身份"
// if isHaveLocalSearchRecords() {
// let latestValidSearchWord = getLatestValidSearchWord()
// if !latestValidSearchWord.isEmpty {
// placeHolder = latestValidSearchWord
// }
// }
//// tableHeadView.searchPlaceHolder = placeHolder
// }
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
cellView.view.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: myCellHeight)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// updateDefaultSearchKeyWord()
}
}
// MARK: - 私有方法
extension YHHKIdentityCardViewController {
func loadData() {
self.tableHeadView.bannarView.dataArr = [YHBannerModel.localDefaultItem()]
homeViewModel.getHomeBanner(1){[weak self] success, error in
guard let self = self else { return }
self.tableHeadView.bannarView.dataArr = self.homeViewModel.banners ?? [YHBannerModel.localDefaultItem()]
}
}
private func initView() {
gk_navigationBar.isHidden = true
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.bottom.equalToSuperview()
}
tableHeadView = YHServerTableHeadView()
tableHeadView.titleLabel.text = "香港身份攻略"
tableHeadView.frame = CGRect(x: 0, y: -YHServerTableHeadView.viewH - 48, width: KScreenWidth, height: YHServerTableHeadView.viewH)
homeTableView.tableHeaderView = tableHeadView
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHHKIdentityCardViewController : 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 0.001
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.001))
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.001
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.001))
return view
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return myCellHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell()
cellView.view.frame = CGRect(x: 0, y: 0, width: cell.contentView.bounds.size.width, height: myCellHeight)
cell.contentView.addSubview(cellView.view)
cellView.view.snp.makeConstraints { make in
make.edges.equalTo(0)
}
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}
}
extension YHHKIdentityCardViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let bottomCellOffset: CGFloat = homeTableView.rect(forSection: 0).origin.y
if (scrollView.contentOffset.y >= bottomCellOffset) {
scrollView.contentOffset = CGPointMake(0, bottomCellOffset)
if canScroll == true {
canScroll = false
//传递参数到 子VC
cellView.canScroll = true
}
canScroll = false
//传递参数到 子VC
cellView.canScroll = true
}else{
if canScroll == false {
scrollView.contentOffset = CGPoint(x: 0, y: bottomCellOffset)
}
}
self.homeTableView.showsVerticalScrollIndicator = false
}
}
extension YHHKIdentityCardViewController {
@objc func leaveTopOp() {
canScroll = true
}
@objc func beginDragging() {
homeTableView.isScrollEnabled = false
canScroll = false
}
@objc func endDragging() {
homeTableView.isScrollEnabled = true
canScroll = true
}
@objc func scrDragging() {
homeTableView.setContentOffset(CGPoint(x: 0, y: 365), animated: true)
}
}
extension YHHKIdentityCardViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
//
// YHHKLifeViewController.swift
// galaxy
//
// Created by EDY on 2024/6/12.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import JXSegmentedView
class YHHKLifeViewController: YHBaseViewController {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var tableHeadView: YHServerTableHeadView!
var orderId : Int?
var canScroll : Bool = true
var myCellHeight : CGFloat {
get {
return view.bounds.size.height
}
}
var myDefaultIndex : Int = 0 {
didSet {
DispatchQueue.global().asyncAfter(wallDeadline: .now() ) {[weak self] in
DispatchQueue.main.async {
self?.cellView.myDefaultNavItemIndex = self?.myDefaultIndex ?? 0
}
}
}
}
lazy var cellView: YHHKControllerHoldViewController = {
let ttt = YHHKControllerHoldViewController()
ttt.classID = 2
return ttt
}()
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
return tableView
}()
var myHeadView : UIView = {
let view = UIView(frame: CGRect(x: kMargin, y: 0, width: KScreenWidth, height: 365))
view.backgroundColor = .white
return view
}()
//头像
private lazy var headImagV : UIImageView = {
let imageV = UIImageView(image: UIImage(named: "mine_head_default"))
imageV.contentMode = .scaleAspectFill
imageV.layer.cornerRadius = 26.5
imageV.clipsToBounds = true
imageV.layer.borderWidth = 2
imageV.layer.borderColor = UIColor.white.cgColor
return imageV
}()
//姓名
private lazy var nameLable : UILabel = {
let lable0 = UILabel(text: "")
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_M(ofSize: 19)
return lable0
}()
//电话号码
private lazy var phoneLable : UILabel = {
let lable0 = UILabel(text: "")
lable0.textColor = UIColor.labelTextColor2
lable0.font = UIFont.PFSC_R(ofSize: 14)
return lable0
}()
// MARK: - 生命周期方法
override func viewDidLoad() {
super.viewDidLoad()
NotificationCenter.default.addObserver(self, selector: #selector(leaveTopOp), name:Notification.Name(rawValue: "leaveTop0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(beginDragging), name:Notification.Name(rawValue: "scrollViewWillBeginDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(scrDragging), name:Notification.Name(rawValue: "scrollViewDidToTop"), object: nil)
//1.UI
initView()
//2.网络请求
loadData()
// updateDefaultSearchKeyWord()
}
// func updateDefaultSearchKeyWord() {
// var placeHolder = "香港生活"
// if isHaveLocalSearchRecords() {
// let latestValidSearchWord = getLatestValidSearchWord()
// if !latestValidSearchWord.isEmpty {
// placeHolder = latestValidSearchWord
// }
// }
//// tableHeadView.searchPlaceHolder = placeHolder
// }
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
cellView.view.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: myCellHeight)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
// updateDefaultSearchKeyWord()
}
}
// MARK: - 私有方法
extension YHHKLifeViewController {
func loadData() {
self.tableHeadView.bannarView.dataArr = [YHBannerModel.localDefaultItem()]
homeViewModel.getHomeBanner(2){[weak self] success, error in
guard let self = self else { return }
self.tableHeadView.bannarView.dataArr = self.homeViewModel.banners ?? [YHBannerModel.localDefaultItem()]
}
}
private func initView() {
gk_navigationBar.isHidden = true
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.bottom.equalToSuperview()
}
tableHeadView = YHServerTableHeadView()
tableHeadView.titleLabel.text = "香港生活攻略"
tableHeadView.frame = CGRect(x: 0, y: -YHServerTableHeadView.viewH - 48, width: KScreenWidth, height: YHServerTableHeadView.viewH)
homeTableView.tableHeaderView = tableHeadView
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHHKLifeViewController : 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 0.001
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.001))
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.001
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 0.001))
return view
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return myCellHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = UITableViewCell()
cellView.view.frame = CGRect(x: 0, y: 0, width: cell.contentView.bounds.size.width, height: myCellHeight)
cell.contentView.addSubview(cellView.view)
cellView.view.snp.makeConstraints { make in
make.edges.equalTo(0)
}
return cell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
}
}
extension YHHKLifeViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let bottomCellOffset: CGFloat = homeTableView.rect(forSection: 0).origin.y
if (scrollView.contentOffset.y >= bottomCellOffset) {
scrollView.contentOffset = CGPointMake(0, bottomCellOffset)
if canScroll == true {
canScroll = false
//传递参数到 子VC
cellView.canScroll = true
}
canScroll = false
//传递参数到 子VC
cellView.canScroll = true
}else{
if canScroll == false {
scrollView.contentOffset = CGPoint(x: 0, y: bottomCellOffset)
}
}
self.homeTableView.showsVerticalScrollIndicator = false
}
}
extension YHHKLifeViewController {
@objc func leaveTopOp() {
canScroll = true
}
@objc func beginDragging() {
homeTableView.isScrollEnabled = false
canScroll = false
}
@objc func endDragging() {
homeTableView.isScrollEnabled = true
canScroll = true
}
@objc func scrDragging() {
homeTableView.setContentOffset(CGPoint(x: 0, y: 365), animated: true)
}
}
extension YHHKLifeViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
//
// 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 cell: YHServerHKLifeViewCell!
var dataSouce: [YHHomeListModel?] = [] {
didSet {
homeCollectView.reloadData()
}
}
lazy var homeCollectView = {
// 设置布局方向
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 8, 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()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
updateDefaultSearchKeyWord()
}
func updateDefaultSearchKeyWord() {
var placeHolder = "香港生活"
if isHaveLocalSearchRecords() {
let latestValidSearchWord = getLatestValidSearchWord()
if !latestValidSearchWord.isEmpty {
placeHolder = latestValidSearchWord
}
}
// tableHeadView.searchPlaceHolder = placeHolder
}
}
extension YHServerHKLifeViewController {
func loadData() {
self.tableHeadView.bannarView.dataArr = [YHBannerModel.localDefaultItem()]
homeViewModel.getHomeBanner(2){[weak self] success, error in
guard let self = self else { return }
self.tableHeadView.bannarView.dataArr = self.homeViewModel.banners ?? [YHBannerModel.localDefaultItem()]
}
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
if self.classId == 0 {
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.homeCollectView.es.noticeNoMoreData()
}
}
}
}
}
}
}
func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = .white
sectionView = {
let view = YHServiceSectionView()
view.block = {[weak self] model in
guard let self = self else { return }
self.homeCollectView.es.resetNoMoreData()
if homeCollectView.contentOffset.y > -48 {
self.homeCollectView.setContentOffset(CGPoint(x: 0, y: -48), animated: false)
}
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.homeCollectView.es.noticeNoMoreData()
}
}
}
return view
}()
view.addSubview(homeCollectView)
homeCollectView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
tableHeadView = YHServerTableHeadView()
tableHeadView.titleLabel.text = "香港生活攻略"
tableHeadView.frame = CGRect(x: 0, y: -YHServerTableHeadView.viewH - 48, width: KScreenWidth, height: YHServerTableHeadView.viewH)
sectionView.frame = CGRect(x: 0, y: -48, width: KScreenWidth, height: 48)
homeCollectView.addSubview(tableHeadView)
homeCollectView.addSubview(sectionView)
homeCollectView.contentInset = UIEdgeInsets(top: YHServerTableHeadView.viewH + 48, left: 0, bottom: 0, right: 0)
homeCollectView.delegate = self
homeCollectView.dataSource = self
homeCollectView.es.addInfiniteScrolling {
self.loadMoreData()
}
}
func loadMoreData() {
self.homeViewModel.getList(false, self.classId) {[weak self] success, error in
guard let self = self else { return }
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.35, execute: {
CATransaction.setDisableActions(true)
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
CATransaction.commit()
self.homeCollectView.es.stopLoadingMore()
if self.homeViewModel.hasMoreForHomeNews == false {
self.homeCollectView.es.noticeNoMoreData()
}
})
}
}
}
extension YHServerHKLifeViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.dataSouce.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHHomeCollectionViewCell
cell.listModel = self.dataSouce[indexPath.row]
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let model = self.dataSouce[indexPath.row] else { return }
if model.type == 2 {
let vc = YHHomeWebViewController()
vc.url = YHBaseUrlManager.shared.curH5URL() + "articleDetail.html" + "?id=\(model.id)"
vc.id = model.id
vc.block = { item in
let arr = self.dataSouce
for (index,targetItem) in arr.enumerated() {
guard let target = targetItem else { return }
if target.id == item.id {
target.is_like = item.is_like
target.like_count = item.like_count
self.homeCollectView.reloadItems(at: [IndexPath.SubSequence(item: index, section: 0)])
}
}
}
self.navigationController?.pushViewController(vc)
} else if model.type == 1 {
printLog("直接播放视频")
}
}
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let offset = scrollView.contentOffset.y
if offset > -48 {
sectionView.frame.origin.y = offset
} else {
sectionView.frame.origin.y = -48
}
}
}
extension YHServerHKLifeViewController : CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
guard let model = self.dataSouce[indexPath.row] else { return CGSize.zero }
return CGSize(width: model.img_width_cell, height: model.img_height_cell)
}
}
extension YHServerHKLifeViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
class YHServerHKLifeViewCell: UITableViewCell {
typealias LoadBlock = () -> ()
var moreBlock: LoadBlock?
typealias ScrollBlock = (Bool) -> ()
var scrollBlock: ScrollBlock?
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.moreBlock = {[weak self] in
guard let self = self else { return }
if let block = self.moreBlock {
block()
}
}
tableFootView.scrollBlock = {[weak self] flag in
guard let self = self else { return }
if let block = self.scrollBlock {
block(flag)
}
}
// tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)
contentView.addSubview(tableFootView)
tableFootView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
}
}
//
// YHServiceCenterSecondViewController.swift
// galaxy
//
// Created by davidhuangA on 2024/1/24.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
//服务中心
class YHServiceCenterSecondViewController: YHBaseViewController {
var orderId : Int = 0
var mobile: String?
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private var unfoldFlag : Bool = true //是否展开
private lazy var downArrowImagev : UIImageView = {
let imagV = UIImageView(frame: CGRect(x: KScreenWidth - 16 - 32, y: 17, width: 16, height: 16))
imagV.image = UIImage(named: "service_center_down_arrow")
imagV.contentMode = .scaleAspectFill
return imagV
}()
private lazy var topBkg : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "service_center_head_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false
tableView.register(YHContractMainItemStatusCell.self,forCellReuseIdentifier: YHContractMainItemStatusCell.cellReuseIdentifier)
return tableView
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
loadData2()
loadData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHServiceCenterSecondViewController {
func loadData2() {
self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in
}
}
func loadData() {
self.serviceCenterMainReqVM.getContactStatus(params: ["orderId":orderId]) { success, error in
self.homeTableView.reloadData()
}
}
func setupUI() {
gk_navTitle = "服务中心"
gk_navBarAlpha = 1.0
gk_navLineHidden = false
view.addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(216)
}
homeTableView.delegate = self
homeTableView.dataSource = self
view.addSubview(homeTableView)
homeTableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.right.bottom.equalToSuperview()
}
}
@objc func clickUnfoldView() {
unfoldFlag = !unfoldFlag
if unfoldFlag == true {
UIView.animate(withDuration: 0.25) {
self.downArrowImagev.transform = CGAffineTransform.identity
}
} else {
UIView.animate(withDuration: 0.25) {
self.downArrowImagev.transform = CGAffineTransform(rotationAngle: .pi)
}
}
homeTableView.reloadSections(IndexSet(integer: 0), with: UITableView.RowAnimation.automatic)
}
}
// MARK: - UITableViewDelegate 和 UITableViewDataSource
extension YHServiceCenterSecondViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if unfoldFlag == true {
return self.serviceCenterMainReqVM.arrContactStausItmes.count
}
return 0
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 40
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 40))
view.backgroundColor = .clear
let lable = UILabel(frame: CGRect(x: 16, y: 0, width: 200, height: 40))
lable.text = "身份申请"
lable.font = UIFont.PFSC_M(ofSize: 17)
lable.textColor = .mainTextColor
view.addSubview(lable)
lable.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalTo(kMargin)
}
view.addSubview(downArrowImagev)
downArrowImagev.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(-kMargin)
make.width.height.equalTo(16)
}
let tap = UITapGestureRecognizer(target: self, action: #selector(clickUnfoldView))
view.addGestureRecognizer(tap)
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 YHContractMainItemStatusCell.cellHeight
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let newCell = tableView.dequeueReusableCell(withClass: YHContractMainItemStatusCell.self)
newCell.selectionStyle = .none
newCell.dataModel = self.serviceCenterMainReqVM.arrContactStausItmes[indexPath.row]
return newCell
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
let model = self.serviceCenterMainReqVM.arrContactStausItmes[indexPath.row]
if model.type == 1 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
return
}
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
} else if model.type == 2 {
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
} else if model.type == 3 {
let vc = YHScoreDetailViewController()
vc.orderId = orderId
vc.model = serviceCenterMainReqVM.allInfoScoreModel
navigationController?.pushViewController(vc)
} else if model.type == 4 {
let vc = YHMyDocumentsListViewController()
vc.orderId = orderId
vc.mobile = mobile ?? ""
navigationController?.pushViewController(vc)
} else if model.type == 5 {
let vc = YHMySignatureListViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
} else if model.type == 6 {
let vc = YHMineSchemeViewController()
navigationController?.pushViewController(vc)
}
else {
}
}
}
private extension YHServiceCenterSecondViewController {
func showTipsAlert() {
YHInformationFillTipsAlertView.showCheckView { agree in
if agree == true {
printLog("点击了 确认 按钮")
self.submitSweetNotify()
} else {
printLog("点击了 取消 按钮")
}
}
}
func submitSweetNotify() {
let params = ["option":1,"order_id":orderId]
serviceCenterMainReqVM.submitSweetNotifyOp(params: params as [String : Any]) { success, error in
if success == true {
YHInformationFillTipsAlertView.hideCheckView()
self.loadData2()
let vc = YHInformationPerfectListVC()
vc.orderId = self.orderId
self.navigationController?.pushViewController(vc)
} else {
YHHUD.flash(message: error?.errorMsg ?? "发生错误,请重试")
}
}
}
}
//
// 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 {
let homeViewModel: YHHomePageViewModel = YHHomePageViewModel()
var tableHeadView: YHServerTableHeadView!
var tableFootView: YHServiceTableFootView!
var sectionView: YHServiceSectionView!
var classId: Int = 0
var cell: YHServerHKLifeViewCell!
var dataSouce: [YHHomeListModel?] = [] {
didSet {
homeCollectView.reloadData()
}
}
lazy var homeCollectView = {
// 设置布局方向
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 8, 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()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
}
}
extension YHServiceListViewController {
func loadData() {
self.tableHeadView.bannarView.dataArr = [YHBannerModel.localDefaultItem()]
homeViewModel.getHomeBanner(1){[weak self] success, error in
guard let self = self else { return }
self.tableHeadView.bannarView.dataArr = self.homeViewModel.banners ?? [YHBannerModel.localDefaultItem()]
}
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.sectionView.items = model.children
if self.classId == 0 {
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.homeCollectView.es.noticeNoMoreData()
}
}
}
}
}
}
}
func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = .white
sectionView = {
let view = YHServiceSectionView()
view.block = {[weak self] model in
guard let self = self else { return }
self.homeCollectView.es.resetNoMoreData()
if homeCollectView.contentOffset.y > -48 {
self.homeCollectView.setContentOffset(CGPoint(x: 0, y: -48), animated: false)
}
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.homeCollectView.es.noticeNoMoreData()
}
}
}
return view
}()
view.addSubview(homeCollectView)
homeCollectView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
tableHeadView = YHServerTableHeadView()
tableHeadView.titleLabel.text = "香港身份攻略"
tableHeadView.frame = CGRect(x: 0, y: -YHServerTableHeadView.viewH - 48, width: KScreenWidth, height: YHServerTableHeadView.viewH)
sectionView.frame = CGRect(x: 0, y: -YHServiceSectionView.viewH, width: KScreenWidth, height: YHServiceSectionView.viewH)
homeCollectView.addSubview(tableHeadView)
homeCollectView.addSubview(sectionView)
homeCollectView.contentInset = UIEdgeInsets(top: YHServerTableHeadView.viewH + YHServiceSectionView.viewH, left: 0, bottom: 0, right: 0)
homeCollectView.delegate = self
homeCollectView.dataSource = self
homeCollectView.es.addInfiniteScrolling {
self.loadMoreData()
}
}
func loadMoreData() {
self.homeViewModel.getList(false, self.classId) {[weak self] success, error in
guard let self = self else { return }
DispatchQueue.main.asyncAfter(wallDeadline: .now() + 0.35, execute: {
CATransaction.setDisableActions(true)
self.dataSouce = self.homeViewModel.arrHomeNewsData ?? []
CATransaction.commit()
self.homeCollectView.es.stopLoadingMore()
if self.homeViewModel.hasMoreForHomeNews == false {
self.homeCollectView.es.noticeNoMoreData()
}
})
}
}
}
extension YHServiceListViewController: UICollectionViewDelegate, UICollectionViewDataSource {
func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
return self.dataSouce.count
}
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHHomeCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHHomeCollectionViewCell
cell.listModel = self.dataSouce[indexPath.row]
return cell
}
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
guard let model = self.dataSouce[indexPath.row] else { return }
if model.type == 2 {
let vc = YHHomeWebViewController()
vc.url = YHBaseUrlManager.shared.curH5URL() + "articleDetail.html" + "?id=\(model.id)"
vc.id = model.id
vc.block = { item in
let arr = self.dataSouce
for (index,targetItem) in arr.enumerated() {
guard let target = targetItem else { return }
if target.id == item.id {
target.is_like = item.is_like
target.like_count = item.like_count
self.homeCollectView.reloadItems(at: [IndexPath.SubSequence(item: index, section: 0)])
}
}
}
self.navigationController?.pushViewController(vc)
} else if model.type == 1 {
printLog("直接播放视频")
}
}
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let offset = scrollView.contentOffset.y
if offset > -48 {
sectionView.frame.origin.y = offset
} else {
sectionView.frame.origin.y = -48
}
}
}
extension YHServiceListViewController : CollectionViewWaterfallLayoutDelegate {
func collectionView(_ collectionView: UICollectionView, layout: UICollectionViewLayout, sizeForItemAtIndexPath indexPath: NSIndexPath) -> CGSize {
guard let model = self.dataSouce[indexPath.row] else { return CGSize.zero }
return CGSize(width: model.img_width_cell, height: model.img_height_cell)
}
}
//JXSegmentedListContainerViewListDelegate
extension YHServiceListViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
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