From 63763776a9a3ecf4223c04fcbe3ef60cbecc3d1a Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Mon, 21 Feb 2022 20:06:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=96=B0=E7=9A=84UI=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 1 + Podfile.lock | 6 +- xplan-ios.xcodeproj/project.pbxproj | 104 +++++++- .../home_recommend_hot.imageset/Contents.json | 22 ++ .../home_recommend_hot@2x.png | Bin 0 -> 440 bytes .../home_recommend_hot@3x.png | Bin 0 -> 660 bytes .../Contents.json | 22 ++ .../home_recommend_hot_cover_bg@2x.png | Bin 0 -> 1333 bytes .../home_recommend_hot_cover_bg@3x.png | Bin 0 -> 2524 bytes .../Contents.json | 22 ++ .../home_recommend_room_more@2x.png | Bin 0 -> 167 bytes .../home_recommend_room_more@3x.png | Bin 0 -> 220 bytes .../Contents.json | 22 ++ .../home_recommend_room_placeholder@2x.png | Bin 0 -> 4398 bytes .../home_recommend_room_placeholder@3x.png | Bin 0 -> 7461 bytes .../Contents.json | 22 ++ .../home_recommend_section_logo@2x.png | Bin 0 -> 1238 bytes .../home_recommend_section_logo@3x.png | Bin 0 -> 2330 bytes xplan-ios/Main/Home/Api/Api+Home.h | 20 ++ xplan-ios/Main/Home/Api/Api+Home.m | 28 ++ .../Main/Home/Model/HomeBannerInfoModel.h | 32 +++ .../Main/Home/Model/HomeBannerInfoModel.m | 12 + xplan-ios/Main/Home/Model/HomeMenuInfoModel.h | 38 +++ xplan-ios/Main/Home/Model/HomeMenuInfoModel.m | 17 ++ .../Main/Home/Model/HomeRecommendRoomModel.h | 12 +- .../Home/Presenter/XPHomeRecommendPresenter.h | 23 ++ .../Home/Presenter/XPHomeRecommendPresenter.m | 53 ++++ .../Home/Protocol/XPHomeRecommendProtocol.h | 23 ++ .../View/Cell/XPHomeBannerTableViewCell.h | 26 ++ .../View/Cell/XPHomeBannerTableViewCell.m | 82 ++++++ .../Cell/XPHomeHotRoomCollectionViewCell.h | 16 ++ .../Cell/XPHomeHotRoomCollectionViewCell.m | 212 +++++++++++++++ .../View/Cell/XPHomeHotRoomTableViewCell.h | 16 ++ .../View/Cell/XPHomeHotRoomTableViewCell.m | 87 ++++++ .../Home/View/Cell/XPHomeMenuTableViewCell.h | 27 ++ .../Home/View/Cell/XPHomeMenuTableViewCell.m | 135 ++++++++++ .../Cell/XPHomeRecommendCollectionViewCell.h | 16 ++ .../Cell/XPHomeRecommendCollectionViewCell.m | 170 ++++++++++++ .../View/Cell/XPHomeRecommendTableViewCell.h | 16 ++ .../View/Cell/XPHomeRecommendTableViewCell.m | 90 +++++++ .../Main/Home/View/SubViews/XPHomeNavView.h | 7 +- .../Main/Home/View/SubViews/XPHomeNavView.m | 112 +++++--- .../View/SubViews/XPHomeRecommendHeadView.h | 16 ++ .../View/SubViews/XPHomeRecommendHeadView.m | 38 +++ .../Home/View/SubViews/XPHomeSectionView.h | 22 ++ .../Home/View/SubViews/XPHomeSectionView.m | 148 +++++++++++ ...h => XPHomePartyContainerViewController.h} | 4 +- ...m => XPHomePartyContainerViewController.m} | 97 ++----- .../Home/View/XPHomePartyViewController.h | 18 ++ .../Home/View/XPHomePartyViewController.m | 180 +++++++++++++ .../Home/View/XPHomeRecommendViewController.h | 16 ++ .../Home/View/XPHomeRecommendViewController.m | 249 ++++++++++++++++++ .../Main/Home/View/XPHomeViewController.h | 10 +- .../Main/Home/View/XPHomeViewController.m | 216 ++++++--------- xplan-ios/Main/Tabbar/TabbarViewController.m | 4 +- 55 files changed, 2237 insertions(+), 272 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/home_recommend_hot@2x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/home_recommend_hot@3x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/home_recommend_hot_cover_bg@2x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/home_recommend_hot_cover_bg@3x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/home_recommend_room_more@2x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/home_recommend_room_more@3x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_room_placeholder.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_room_placeholder.imageset/home_recommend_room_placeholder@2x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_room_placeholder.imageset/home_recommend_room_placeholder@3x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/home_recommend_section_logo@2x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/home_recommend_section_logo@3x.png create mode 100644 xplan-ios/Main/Home/Model/HomeBannerInfoModel.h create mode 100644 xplan-ios/Main/Home/Model/HomeBannerInfoModel.m create mode 100644 xplan-ios/Main/Home/Model/HomeMenuInfoModel.h create mode 100644 xplan-ios/Main/Home/Model/HomeMenuInfoModel.m create mode 100644 xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.h create mode 100644 xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.m create mode 100644 xplan-ios/Main/Home/Protocol/XPHomeRecommendProtocol.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.m create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.m create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.m create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.m create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.m create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.m create mode 100644 xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.h create mode 100644 xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.m create mode 100644 xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h create mode 100644 xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.m rename xplan-ios/Main/Home/View/{XPHomeContainerViewController.h => XPHomePartyContainerViewController.h} (53%) rename xplan-ios/Main/Home/View/{XPHomeContainerViewController.m => XPHomePartyContainerViewController.m} (58%) create mode 100644 xplan-ios/Main/Home/View/XPHomePartyViewController.h create mode 100644 xplan-ios/Main/Home/View/XPHomePartyViewController.m create mode 100644 xplan-ios/Main/Home/View/XPHomeRecommendViewController.h create mode 100644 xplan-ios/Main/Home/View/XPHomeRecommendViewController.m diff --git a/Podfile b/Podfile index f9a2d452..915f434c 100644 --- a/Podfile +++ b/Podfile @@ -52,6 +52,7 @@ target 'xplan-ios' do pod 'SVGAPlayer', '~> 2.3' # 滑动标签栏 pod 'JXCategoryView' + pod 'JXPagingView/Pager' #UM统计 pod 'UMCommon' pod 'UMDevice' diff --git a/Podfile.lock b/Podfile.lock index 72548075..8bf84631 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -21,6 +21,7 @@ PODS: - HappyDNS (0.3.17) - IAPHelper (1.1) - JXCategoryView (1.5.9) + - JXPagingView/Pager (2.1.2) - LookinServer (1.0.4) - MarqueeLabel-ObjC (3.3.0) - Masonry (1.1.0) @@ -91,6 +92,7 @@ DEPENDENCIES: - FFPopup - IAPHelper - JXCategoryView + - JXPagingView/Pager - LookinServer - MarqueeLabel-ObjC - Masonry @@ -120,6 +122,7 @@ DEPENDENCIES: SPEC REPOS: https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git: + - JXPagingView - NTESBaseComponent - NTESQuickPass trunk: @@ -170,6 +173,7 @@ SPEC CHECKSUMS: HappyDNS: 848ef73e24f2b0e2752064223ce2dc0dd88900ea IAPHelper: fd74f53b0ac142eed085777b88b86a11746a2dd4 JXCategoryView: 2ef9ecfd3735158d009ce02d1f29811aa822da65 + JXPagingView: 90924b364a2ff7e94db534fad1fa50925ff69ee4 LookinServer: 743c1681771d0a8dcc38825325a080c3186404a5 MarqueeLabel-ObjC: 696eaa82e4fcc7fb53e4fdf37ac138f03bf022d6 Masonry: 678fab65091a9290e40e2832a55e7ab731aad201 @@ -199,6 +203,6 @@ SPEC CHECKSUMS: YYText: 5c461d709e24d55a182d1441c41dc639a18a4849 YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928 -PODFILE CHECKSUM: 1fa9307cda450b37197ea1356c5e0679d82d1d41 +PODFILE CHECKSUM: 8120dbc8eb506e124ccb97e8ce2ecf2420ac8b5f COCOAPODS: 1.11.2 diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 5f094d9f..d478d2d7 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -257,7 +257,7 @@ E878894C273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E878894B273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m */; }; E8788950273A699900BF1D57 /* ThemeColor+SendGift.m in Sources */ = {isa = PBXBuildFile; fileRef = E878894F273A699900BF1D57 /* ThemeColor+SendGift.m */; }; E87A24F1272935920086A794 /* XPMessageRemoteExtModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A24F0272935920086A794 /* XPMessageRemoteExtModel.m */; }; - E87A26F627587C48002DDC7A /* XPHomeContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26F527587C48002DDC7A /* XPHomeContainerViewController.m */; }; + E87A26F627587C48002DDC7A /* XPHomePartyContainerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26F527587C48002DDC7A /* XPHomePartyContainerViewController.m */; }; E87A26F927587C62002DDC7A /* XPHomeContainerPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26F827587C62002DDC7A /* XPHomeContainerPresenter.m */; }; E87A26FD27587E17002DDC7A /* HomeTagModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26FC27587E17002DDC7A /* HomeTagModel.m */; }; E87A270027588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E87A26FF27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m */; }; @@ -376,7 +376,7 @@ E8B846DC26FDE24300A777FE /* RechargeListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8B846DB26FDE24300A777FE /* RechargeListModel.m */; }; E8C21501274B76F60079E6BF /* XPRoomAnimationHitView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C21500274B76F60079E6BF /* XPRoomAnimationHitView.m */; }; E8C6FFCA27548120004DC9F0 /* XPHomePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC027548120004DC9F0 /* XPHomePresenter.m */; }; - E8C6FFCB27548120004DC9F0 /* XPHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC527548120004DC9F0 /* XPHomeViewController.m */; }; + E8C6FFCB27548120004DC9F0 /* XPHomePartyViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC527548120004DC9F0 /* XPHomePartyViewController.m */; }; E8C6FFCC27548120004DC9F0 /* Api+Home.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFC827548120004DC9F0 /* Api+Home.m */; }; E8C6FFD027548256004DC9F0 /* XPHomeListCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFCF27548256004DC9F0 /* XPHomeListCollectionViewCell.m */; }; E8C6FFD42754AA87004DC9F0 /* XPNoteView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8C6FFD32754AA87004DC9F0 /* XPNoteView.m */; }; @@ -401,6 +401,19 @@ E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DEC9A32764A6600078CB70 /* XPMoreMenuPresenter.m */; }; E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DEC9A72764A68B0078CB70 /* Api+MoreMenu.m */; }; E8DEC9AC2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8DEC9AB2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m */; }; + E8E5E18B27C332EE00F457D8 /* XPHomeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E18A27C332EE00F457D8 /* XPHomeViewController.m */; }; + E8E5E18E27C3331E00F457D8 /* XPHomeRecommendViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E18D27C3331E00F457D8 /* XPHomeRecommendViewController.m */; }; + E8E5E19127C369F000F457D8 /* XPHomeRecommendHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19027C369F000F457D8 /* XPHomeRecommendHeadView.m */; }; + E8E5E19427C36BA600F457D8 /* XPHomeBannerTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19327C36BA600F457D8 /* XPHomeBannerTableViewCell.m */; }; + E8E5E19727C36BE700F457D8 /* XPHomeRecommendTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19627C36BE700F457D8 /* XPHomeRecommendTableViewCell.m */; }; + E8E5E19A27C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19927C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m */; }; + E8E5E19D27C36C3500F457D8 /* XPHomeMenuTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19C27C36C3500F457D8 /* XPHomeMenuTableViewCell.m */; }; + E8E5E1A027C36E3F00F457D8 /* HomeBannerInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E19F27C36E3F00F457D8 /* HomeBannerInfoModel.m */; }; + E8E5E1A327C3730B00F457D8 /* XPHomeSectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1A227C3730B00F457D8 /* XPHomeSectionView.m */; }; + E8E5E1A627C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1A527C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m */; }; + E8E5E1A927C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1A827C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m */; }; + E8E5E1AF27C3920100F457D8 /* XPHomeRecommendPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1AE27C3920100F457D8 /* XPHomeRecommendPresenter.m */; }; + E8E5E1B327C397A400F457D8 /* HomeMenuInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E5E1B227C397A400F457D8 /* HomeMenuInfoModel.m */; }; E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7626F2F15100F03460 /* XPMineViewController.m */; }; E8E70D7A26F2F16600F03460 /* XPMinePresent.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7926F2F16600F03460 /* XPMinePresent.m */; }; E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */ = {isa = PBXBuildFile; fileRef = E8E70D7D26F2F19D00F03460 /* Api+Mine.m */; }; @@ -937,8 +950,8 @@ E878894F273A699900BF1D57 /* ThemeColor+SendGift.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "ThemeColor+SendGift.m"; sourceTree = ""; }; E87A24EF272935920086A794 /* XPMessageRemoteExtModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMessageRemoteExtModel.h; sourceTree = ""; }; E87A24F0272935920086A794 /* XPMessageRemoteExtModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMessageRemoteExtModel.m; sourceTree = ""; }; - E87A26F427587C48002DDC7A /* XPHomeContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeContainerViewController.h; sourceTree = ""; }; - E87A26F527587C48002DDC7A /* XPHomeContainerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeContainerViewController.m; sourceTree = ""; }; + E87A26F427587C48002DDC7A /* XPHomePartyContainerViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomePartyContainerViewController.h; sourceTree = ""; }; + E87A26F527587C48002DDC7A /* XPHomePartyContainerViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomePartyContainerViewController.m; sourceTree = ""; }; E87A26F727587C62002DDC7A /* XPHomeContainerPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeContainerPresenter.h; sourceTree = ""; }; E87A26F827587C62002DDC7A /* XPHomeContainerPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeContainerPresenter.m; sourceTree = ""; }; E87A26FA27587C83002DDC7A /* XPHomeContainerProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeContainerProtocol.h; sourceTree = ""; }; @@ -1163,8 +1176,8 @@ E8C6FFBF27548120004DC9F0 /* XPHomePresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomePresenter.h; sourceTree = ""; }; E8C6FFC027548120004DC9F0 /* XPHomePresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomePresenter.m; sourceTree = ""; }; E8C6FFC227548120004DC9F0 /* XPHomeProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeProtocol.h; sourceTree = ""; }; - E8C6FFC527548120004DC9F0 /* XPHomeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomeViewController.m; sourceTree = ""; }; - E8C6FFC627548120004DC9F0 /* XPHomeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeViewController.h; sourceTree = ""; }; + E8C6FFC527548120004DC9F0 /* XPHomePartyViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPHomePartyViewController.m; sourceTree = ""; }; + E8C6FFC627548120004DC9F0 /* XPHomePartyViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomePartyViewController.h; sourceTree = ""; }; E8C6FFC827548120004DC9F0 /* Api+Home.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "Api+Home.m"; sourceTree = ""; }; E8C6FFC927548120004DC9F0 /* Api+Home.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Api+Home.h"; sourceTree = ""; }; E8C6FFCE27548256004DC9F0 /* XPHomeListCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeListCollectionViewCell.h; sourceTree = ""; }; @@ -1214,6 +1227,33 @@ E8DEC9A72764A68B0078CB70 /* Api+MoreMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+MoreMenu.m"; sourceTree = ""; }; E8DEC9AA2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomMoreMenuCollectionViewCell.h; sourceTree = ""; }; E8DEC9AB2764A6CD0078CB70 /* XPRoomMoreMenuCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomMoreMenuCollectionViewCell.m; sourceTree = ""; }; + E8E5E18927C332EE00F457D8 /* XPHomeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeViewController.h; sourceTree = ""; }; + E8E5E18A27C332EE00F457D8 /* XPHomeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeViewController.m; sourceTree = ""; }; + E8E5E18C27C3331E00F457D8 /* XPHomeRecommendViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendViewController.h; sourceTree = ""; }; + E8E5E18D27C3331E00F457D8 /* XPHomeRecommendViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendViewController.m; sourceTree = ""; }; + E8E5E18F27C369F000F457D8 /* XPHomeRecommendHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendHeadView.h; sourceTree = ""; }; + E8E5E19027C369F000F457D8 /* XPHomeRecommendHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendHeadView.m; sourceTree = ""; }; + E8E5E19227C36BA600F457D8 /* XPHomeBannerTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeBannerTableViewCell.h; sourceTree = ""; }; + E8E5E19327C36BA600F457D8 /* XPHomeBannerTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeBannerTableViewCell.m; sourceTree = ""; }; + E8E5E19527C36BE700F457D8 /* XPHomeRecommendTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendTableViewCell.h; sourceTree = ""; }; + E8E5E19627C36BE700F457D8 /* XPHomeRecommendTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendTableViewCell.m; sourceTree = ""; }; + E8E5E19827C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeHotRoomTableViewCell.h; sourceTree = ""; }; + E8E5E19927C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeHotRoomTableViewCell.m; sourceTree = ""; }; + E8E5E19B27C36C3500F457D8 /* XPHomeMenuTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeMenuTableViewCell.h; sourceTree = ""; }; + E8E5E19C27C36C3500F457D8 /* XPHomeMenuTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeMenuTableViewCell.m; sourceTree = ""; }; + E8E5E19E27C36E3F00F457D8 /* HomeBannerInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeBannerInfoModel.h; sourceTree = ""; }; + E8E5E19F27C36E3F00F457D8 /* HomeBannerInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeBannerInfoModel.m; sourceTree = ""; }; + E8E5E1A127C3730B00F457D8 /* XPHomeSectionView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeSectionView.h; sourceTree = ""; }; + E8E5E1A227C3730B00F457D8 /* XPHomeSectionView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeSectionView.m; sourceTree = ""; }; + E8E5E1A427C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendCollectionViewCell.h; sourceTree = ""; }; + E8E5E1A527C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendCollectionViewCell.m; sourceTree = ""; }; + E8E5E1A727C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeHotRoomCollectionViewCell.h; sourceTree = ""; }; + E8E5E1A827C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeHotRoomCollectionViewCell.m; sourceTree = ""; }; + E8E5E1AD27C3920100F457D8 /* XPHomeRecommendPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendPresenter.h; sourceTree = ""; }; + E8E5E1AE27C3920100F457D8 /* XPHomeRecommendPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeRecommendPresenter.m; sourceTree = ""; }; + E8E5E1B027C3920E00F457D8 /* XPHomeRecommendProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeRecommendProtocol.h; sourceTree = ""; }; + E8E5E1B127C397A400F457D8 /* HomeMenuInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeMenuInfoModel.h; sourceTree = ""; }; + E8E5E1B227C397A400F457D8 /* HomeMenuInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeMenuInfoModel.m; sourceTree = ""; }; E8E70D7526F2F15100F03460 /* XPMineViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineViewController.h; sourceTree = ""; }; E8E70D7626F2F15100F03460 /* XPMineViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineViewController.m; sourceTree = ""; }; E8E70D7826F2F16600F03460 /* XPMinePresent.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMinePresent.h; sourceTree = ""; }; @@ -3231,6 +3271,8 @@ E8C6FFE52754FE53004DC9F0 /* XPHomeSearchPresenter.m */, E87A26F727587C62002DDC7A /* XPHomeContainerPresenter.h */, E87A26F827587C62002DDC7A /* XPHomeContainerPresenter.m */, + E8E5E1AD27C3920100F457D8 /* XPHomeRecommendPresenter.h */, + E8E5E1AE27C3920100F457D8 /* XPHomeRecommendPresenter.m */, ); path = Presenter; sourceTree = ""; @@ -3241,6 +3283,7 @@ E8C6FFC227548120004DC9F0 /* XPHomeProtocol.h */, E8C6FFE72754FE66004DC9F0 /* XPHomeSearchProtocol.h */, E87A26FA27587C83002DDC7A /* XPHomeContainerProtocol.h */, + E8E5E1B027C3920E00F457D8 /* XPHomeRecommendProtocol.h */, ); path = Protocol; sourceTree = ""; @@ -3254,6 +3297,10 @@ E8C6FFEC27550CC2004DC9F0 /* HomeSearchResultModel.m */, E87A26FB27587E17002DDC7A /* HomeTagModel.h */, E87A26FC27587E17002DDC7A /* HomeTagModel.m */, + E8E5E19E27C36E3F00F457D8 /* HomeBannerInfoModel.h */, + E8E5E19F27C36E3F00F457D8 /* HomeBannerInfoModel.m */, + E8E5E1B127C397A400F457D8 /* HomeMenuInfoModel.h */, + E8E5E1B227C397A400F457D8 /* HomeMenuInfoModel.m */, ); path = Model; sourceTree = ""; @@ -3263,10 +3310,14 @@ children = ( E8C6FFCD27548154004DC9F0 /* Cell */, E8C6FFD12754AA6A004DC9F0 /* SubViews */, - E8C6FFC627548120004DC9F0 /* XPHomeViewController.h */, - E8C6FFC527548120004DC9F0 /* XPHomeViewController.m */, - E87A26F427587C48002DDC7A /* XPHomeContainerViewController.h */, - E87A26F527587C48002DDC7A /* XPHomeContainerViewController.m */, + E8C6FFC627548120004DC9F0 /* XPHomePartyViewController.h */, + E8C6FFC527548120004DC9F0 /* XPHomePartyViewController.m */, + E87A26F427587C48002DDC7A /* XPHomePartyContainerViewController.h */, + E87A26F527587C48002DDC7A /* XPHomePartyContainerViewController.m */, + E8E5E18927C332EE00F457D8 /* XPHomeViewController.h */, + E8E5E18A27C332EE00F457D8 /* XPHomeViewController.m */, + E8E5E18C27C3331E00F457D8 /* XPHomeRecommendViewController.h */, + E8E5E18D27C3331E00F457D8 /* XPHomeRecommendViewController.m */, E8C6FFDE2754EEF9004DC9F0 /* XPHomeSearchViewController.h */, E8C6FFDF2754EEF9004DC9F0 /* XPHomeSearchViewController.m */, E87A27012758BC81002DDC7A /* XPRoomSearchContainerViewController.h */, @@ -3293,6 +3344,18 @@ E8C6FFE22754F349004DC9F0 /* XPSearchListTableViewCell.m */, E87A26FE27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.h */, E87A26FF27588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m */, + E8E5E19227C36BA600F457D8 /* XPHomeBannerTableViewCell.h */, + E8E5E19327C36BA600F457D8 /* XPHomeBannerTableViewCell.m */, + E8E5E19B27C36C3500F457D8 /* XPHomeMenuTableViewCell.h */, + E8E5E19C27C36C3500F457D8 /* XPHomeMenuTableViewCell.m */, + E8E5E19527C36BE700F457D8 /* XPHomeRecommendTableViewCell.h */, + E8E5E19627C36BE700F457D8 /* XPHomeRecommendTableViewCell.m */, + E8E5E1A427C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.h */, + E8E5E1A527C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m */, + E8E5E19827C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.h */, + E8E5E19927C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m */, + E8E5E1A727C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.h */, + E8E5E1A827C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m */, ); path = Cell; sourceTree = ""; @@ -3306,6 +3369,10 @@ E8C6FFD62754BC61004DC9F0 /* XPHomeNavView.m */, E8C6FFE82755040B004DC9F0 /* XPHomeSearchNavView.h */, E8C6FFE92755040B004DC9F0 /* XPHomeSearchNavView.m */, + E8E5E18F27C369F000F457D8 /* XPHomeRecommendHeadView.h */, + E8E5E19027C369F000F457D8 /* XPHomeRecommendHeadView.m */, + E8E5E1A127C3730B00F457D8 /* XPHomeSectionView.h */, + E8E5E1A227C3730B00F457D8 /* XPHomeSectionView.m */, ); path = SubViews; sourceTree = ""; @@ -3742,6 +3809,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( + E8E5E1AF27C3920100F457D8 /* XPHomeRecommendPresenter.m in Sources */, 181D7F1B2726CE2A00B7C059 /* StageView.m in Sources */, 18EE3FF12750D2AD00A452BF /* NIMTimeUtils.m in Sources */, E84BF7DA277C72AC00EF8877 /* XPRoomRoleTableViewCell.m in Sources */, @@ -3786,6 +3854,7 @@ E8A03DF3276328FC0098D9EA /* CandyTreeRecordModel.m in Sources */, E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */, E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */, + E8E5E19427C36BA600F457D8 /* XPHomeBannerTableViewCell.m in Sources */, E824543D26F58C3A00BE8163 /* XPLoginBindSuccessView.m in Sources */, E8EEB8F726FC2673007C6EBA /* UserPhoto.m in Sources */, E81C27A226EF23490031E639 /* XPEnum.h in Sources */, @@ -3825,6 +3894,7 @@ E81C1B2F277071670020D1E4 /* XPArrangeMicInfoModel.m in Sources */, 9B0086CA27BA4F570032BD2B /* AnchorMicroView.m in Sources */, E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */, + E8E5E19727C36BE700F457D8 /* XPHomeRecommendTableViewCell.m in Sources */, 18EE3FF42750FA3700A452BF /* UIView+NIM.m in Sources */, E8A03DFF27635F960098D9EA /* XPRoomCandyGiftView.m in Sources */, 180116F9279E8C4C00F2CBC0 /* PLTimeUtil.m in Sources */, @@ -3848,6 +3918,7 @@ E8A1E45B27620F4900B294CA /* XPRoomHalfWebView.m in Sources */, 9B7D80562753C595003DAC0C /* SendMessageView.m in Sources */, E84B0E3F2727EDF6008818C6 /* XPRoomMessageTableViewCell.m in Sources */, + E8E5E18B27C332EE00F457D8 /* XPHomeViewController.m in Sources */, E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */, E80DE4102775C34E00BE5BCB /* XPFirstRechargeSuccessView.m in Sources */, E8412FB32779E285006E1101 /* Api+RoomSetting.m in Sources */, @@ -3864,6 +3935,7 @@ 189DD6FF26E20E5900AB55B1 /* HttpRequestHelper.m in Sources */, E8788945273A55C200BF1D57 /* XPGiftInfoView.m in Sources */, E8AEAED6271412EC0017FCE0 /* XPRoomViewController.m in Sources */, + E8E5E1A327C3730B00F457D8 /* XPHomeSectionView.m in Sources */, E8E70D9226F2F60C00F03460 /* XPMineItemModel.m in Sources */, 189DD74A26E21D8400AB55B1 /* SSKeychain.m in Sources */, E8DACCFE27673F870052092C /* GiftValueInfoModel.m in Sources */, @@ -3903,6 +3975,7 @@ 9B0E1C5926E77022005D4442 /* BaseNavigationController.m in Sources */, E8C6FFD027548256004DC9F0 /* XPHomeListCollectionViewCell.m in Sources */, E84BF7DD277C765400EF8877 /* XPRoomRoleEmptyTableViewCell.m in Sources */, + E8E5E1A027C36E3F00F457D8 /* HomeBannerInfoModel.m in Sources */, E8EEB8F426FC2050007C6EBA /* SDBrowserImageView.m in Sources */, E824544626F5934700BE8163 /* XPMinePayPwdPresenter.m in Sources */, 189DD54B26DE338800AB55B1 /* BaseViewController.m in Sources */, @@ -3919,6 +3992,7 @@ E878893C273A54C300BF1D57 /* Api+Gift.m in Sources */, E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */, E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */, + E8E5E19D27C36C3500F457D8 /* XPHomeMenuTableViewCell.m in Sources */, E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */, E81C27A026EEF83D0031E639 /* XPHtmlUrl.m in Sources */, E8A03DF0276303D40098D9EA /* XPCandyTreeRankTableViewCell.m in Sources */, @@ -3951,7 +4025,7 @@ 18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */, E8C6FFE62754FE53004DC9F0 /* XPHomeSearchPresenter.m in Sources */, E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */, - E8C6FFCB27548120004DC9F0 /* XPHomeViewController.m in Sources */, + E8C6FFCB27548120004DC9F0 /* XPHomePartyViewController.m in Sources */, E8680718271967B00024F48F /* MicroView.m in Sources */, E896EF942771AAC100AD2CC1 /* XPMineFansPresenter.m in Sources */, E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */, @@ -3966,6 +4040,7 @@ E8AE427327153A3500BEEBB2 /* XPRoomActivityContainerView.m in Sources */, E86596432701611A00846EBD /* UIImage+ImageEffects.m in Sources */, 18486217271EAB8C005FC5DC /* BaseRtcImpl.m in Sources */, + E8E5E1A627C37F0C00F457D8 /* XPHomeRecommendCollectionViewCell.m in Sources */, E8DACCFB2766EDC60052092C /* MicroGiftValueView.m in Sources */, E8CEA03D26EA3DE500644B44 /* LoginPasswordPresent.m in Sources */, E8E70D7726F2F15100F03460 /* XPMineViewController.m in Sources */, @@ -3986,7 +4061,7 @@ E81C279326EB394D0031E639 /* LoginForgetPasswordViewController.m in Sources */, E81C278D26EAFAF60031E639 /* DESEncrypt.m in Sources */, E81366E726F0A49E0076364C /* NSString+Utils.m in Sources */, - E87A26F627587C48002DDC7A /* XPHomeContainerViewController.m in Sources */, + E87A26F627587C48002DDC7A /* XPHomePartyContainerViewController.m in Sources */, E8EEB90126FC31B6007C6EBA /* XPMineUserInfoPresenter.m in Sources */, 18F404BB2760982000A6C548 /* ChatLimitModel.m in Sources */, 189DD56526DE465A00AB55B1 /* LoginViewController.m in Sources */, @@ -3999,6 +4074,7 @@ E839532A276A002800CF2F24 /* XPMineDressUpViewController.m in Sources */, E88B5CAD26FB16A800DA9178 /* XPMineTeenagerDesView.m in Sources */, E896EF972771AAE400AD2CC1 /* XPMineAttentionPresenter.m in Sources */, + E8E5E19127C369F000F457D8 /* XPHomeRecommendHeadView.m in Sources */, E8C6FFDA2754BE81004DC9F0 /* ThemeColor+Home.m in Sources */, E824545126F5CE6E00BE8163 /* XPMineModifPayPwdPresenter.m in Sources */, E8EEB90F26FC6AB8007C6EBA /* XPMineUserInfoEditPresenter.m in Sources */, @@ -4009,6 +4085,7 @@ E81C1B29277069DD0020D1E4 /* XPArrangeMicEmptyTableViewCell.m in Sources */, E8AC721C26F4720B007D6E91 /* XPMineSettingPresent.m in Sources */, E88B5CA526FB088600DA9178 /* XPMineTeenagerViewController.m in Sources */, + E8E5E1B327C397A400F457D8 /* HomeMenuInfoModel.m in Sources */, E8AEAEF027141C430017FCE0 /* XPRoomMenuContainerView.m in Sources */, E8DEC99527648FA50078CB70 /* ClientConfig.m in Sources */, E8EEB90926FC579A007C6EBA /* XPMineUserInfoEditTableViewCell.m in Sources */, @@ -4022,6 +4099,7 @@ E866B6E52759F96F009B002A /* XPMiniRoomView.m in Sources */, 9B7B605B27BB53060070BB72 /* XPAnchorAudienceUpMicView.m in Sources */, E8B825BF26E9E57D009E8E9F /* LoginTicketInfo.m in Sources */, + E8E5E18E27C3331E00F457D8 /* XPHomeRecommendViewController.m in Sources */, E8E7DAE82744F5EF00C631CC /* XPGiftStorage.m in Sources */, E87AE7FC277AAC450037823A /* XPRoomTagPresenter.m in Sources */, E878894C273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m in Sources */, @@ -4057,11 +4135,13 @@ E88B5CC126FB407B00DA9178 /* XPMineUserInfoViewController.m in Sources */, 18F4043A275E20D900A6C548 /* TRTCRtcImpl.m in Sources */, E8899C7F27853B6A007944BE /* DatingMicroView.m in Sources */, + E8E5E19A27C36C0B00F457D8 /* XPHomeHotRoomTableViewCell.m in Sources */, E824545926F5E65900BE8163 /* XPMineVerifIdentityView.m in Sources */, 189DD74026E21C3F00AB55B1 /* YYUtility+App.m in Sources */, 189DD74526E21CCC00AB55B1 /* YYReachability.m in Sources */, E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */, E8E70D8F26F2F5DB00F03460 /* XPMineMenuTableViewCell.m in Sources */, + E8E5E1A927C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m in Sources */, 187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */, E896EFA92771AEEC00AD2CC1 /* XPMineAttentionTableViewCell.m in Sources */, E8AC722126F47E23007D6E91 /* XPMineAboutUsViewController.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/Contents.json new file mode 100644 index 00000000..4ae26fb6 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_recommend_hot@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_recommend_hot@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/home_recommend_hot@2x.png b/xplan-ios/Assets.xcassets/Home/home_recommend_hot.imageset/home_recommend_hot@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..12522050c3162cb8c1fc1a0af9042ee6c22d3b05 GIT binary patch literal 440 zcmeAS@N?(olHy`uVBq!ia0vp^QXtI13?%1G+4BcTwFmfwxB}^~|NsB||Nq1P|384} z-~TTV#{d7n|AW9cF#7)Q|96P^-~Ye<{fB4)N&y8y;{QM<0MVa6ATAI9)d0CbqkvqX zVxUSO8^{2f2^9GZHVP;RR09#bWw*l-=oIymAirRSzfLTFeqGxf6}|d+&Er4BY0VzVyz+T>Zd*p&_RKnrhBD z6&`qMztro*$(wJV1x*U->X^B?lK-5`CJUpZ`wS;eS*~ni?`iB=amUKw#e&M7^G*@c zDGxI|U!3T?+7pnS&E9#fqt{W+i>qOJOjtgji`PWn4^yn!jO`vJ=eWzAU2b;gB6Eh| m`h$libc+S8-LAR)3?z5gE@TH%+XH+;T!Hle|Nnpd|Nryf|1bal zfB*mg8<_hG%=ii80u=zIfLtI0q!_3N41jE)E{H5#3ZfEdAPD{b{~M&m$;OJ+5uh6h@!^IX4ta(Yi$zNd=??~6lg=D8Xh=FL>7JC-WFU)fk}aWUiW1G{sYbBtf_-zINi^wz2|^z^RX zOzY-9FWh}i_t2sTDd*=VMqKwzKl9LHZ;6m;Oz3X+-3}I&rz38*pNhNZe2%*>AV*vD zsc4R=$_^nRrMHo;>w~4==`VS*Y|)NsN|&CnExm61?bYc^4;3$koa}ClTrcFe`Tq1N z>dn9V9ym-$-*r{}JKOZFDvM6B)SdijYR20TZDeD#)33l#Ov%(zaf#pSGe-P8c`?t` zvcCyV_3AKxd|%k=FL%}bEH$6aPkBs=pYuq*+?qej!77029e_5tqJ@zx{O^MCs->3MK X)Lq=&118D>f literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/Contents.json new file mode 100644 index 00000000..56bf7c4f --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_recommend_hot_cover_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_recommend_hot_cover_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/home_recommend_hot_cover_bg@2x.png b/xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/home_recommend_hot_cover_bg@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..d4bcc0670c485a7b8138d3bc56386ec3f2b9192d GIT binary patch literal 1333 zcmeAS@N?(olHy`uVBq!ia0y~yV5|VL4{$I8Nz1hz7C>rCfKQ0)|DgkbPKG%4shYYX zkYimEdkz{Iv! zMX}GzqNd7+oo&wC(#OZZT)5Ulo`He+tEY=&NX4x?)7$e78Hl+0il0q;Kl4bBfzTnJ zKmY%SPJdwHx~f}5vEqHrp^KNl8g>TFxp39?5QFo+K#`>(T9xy*M~PbK&j~-5VstaF zH1@hluGQRWr=NN)EwTt%eKl(Bw__`>zwUKATzXew#@V#vixVY2|E$@bZ8m#tSoYpH zeKGktfA`(ZE4P~awCLsU#2atRs`tk2zyJTqidDbPN%F8Aet5y;?8S_bCpl)1Ki=5% zX0r2Q`Jj)k;fW6>cHQUtc+37#bI2b*rF;9u)}J~Wy)AcsMvdw`sRjPF)gLVN?S4Fd zB)(HGu0uRr|46iyv*Wi%;X9YR>D}8O_~+U7iuSZ4vsv33pFEmh`na{Cec2;jnR}My z6)~#8!d_-^YV+cb1glsp@3~)`^=;G2osl(jI?N@+PB@##?ah5GTV>|INU3R_rvlHh zWAR6J^YA`-X>F%`&+$XPki&}~E;TX}Cnz#G9q0bYF`ezevEq+b&MXu9?7P29$So-O z6KOMR2Fultg)OJ7=ky&{l?ynoEW*F+v80+psmqA`=|^5U`)5EF4zc-nt<;zp8WI(r+%MHNc`d&} z;lN{dx%dYk*FIRt?SH5)8}P~E zpS{gAfzA^jD}Q|9niwHdugKs3RZwc9g1!r|J6Je;`r}sFyU&h)KeU(qQQ!aVmblDpb2%5`t22P*2!p4qpUXO@ GgeCydALbhX literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/home_recommend_hot_cover_bg@3x.png b/xplan-ios/Assets.xcassets/Home/home_recommend_hot_cover_bg.imageset/home_recommend_hot_cover_bg@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..115d5cfad21c19335c3f2f65e6c85bc11e9d69fa GIT binary patch literal 2524 zcmeH{ZB!Fi8pjjDLgWwyV}YcIh?s!V3Y&o{Fjjf7jF=1>p{}wb%ApKUUL?FVKrL2w zp`;2?3sFW~B2z3yL41L2krt$Y64)eaFd$$w3M6PnC#_Q48_ma_{j}$7KkS_IJOBIq z@4a)M=b1CNG)nLR!;Wo7p->n|MA$Y8#R{TOsP1$caE`uUEeFyXwPkzwt3TuevilEt zd7t+cgB3xdZ31CT6gM$8HU7EZ)e@gytB-#1c)GXnPs{Z+?Vqi?vC*;Xa9+kYq9HlF zV5yq*7DIa}@?HzYe@t^OBK+&q{-dEz6bk($61H)B-W`L?xKp*k;m|JmnLV9W)LknJ zN|(HoYzNhkzP!5TVfkRrg_^_@jQPs^a}$M%lLN>@Ok!wsb)MCAd-;2EmXnhgaFIz0ErcRvy3p;Dd|^SHBOtZSNgmF^O^6 zFCiliuzsn^_Mf%1_D_EepX2mDExy8C?>N|fAb(L#Co9jr;~++^MNV0FK$GM3y^_T} zfxLv29jpi`jmv1vR8R(4l#hb3J&d5P4b>~wc3I0S6bBXxkJUeuXWlyh=eOn6i&@_x zG-a@>UgoQfn5yLbE#R1(dc>x&SpPH{;Vq0%?ZaGR>Zi6iE7oGM>R$PIt^uy%c+IKpBG~NAERj=?)>&j&I#7ayQ~PN>HcwqS+t+FRy7wS;j@3P z+2kp?BG|?r#^|g0=-3@U&n-`$L(XxZPY3e1&VFK-D@&<>TIkmwLub}Vg3(%!0myye zpp%T;s!9~IfBVKb8TceKT}z6_62vXa1TxsshyO{^QJ0WoCEqScL-*Y8pgX(o6%Us#+O+9t?Iaee!(1vktIL(i z;^KgGOng=(<9#n^hp*+xlwR#{xFf&s ztrhBwr5BfD&sIy)P(Lk`E7>X%Cw~W1&8w@7h!n^pAo@k(oK%`G-FoABt|{&$lY5+! zX*-e1STld^Jkf)@g?8bWjD7qrylA?Q&nt(&HS|UD%HXBL($Fe6n!KNN80H)Mh6e~J2OaowY0v{3T01xmH)emqR(F^!OydSLq)L7KkbRS=3!EL4w_6I}* zmX1ipWq|f8T+@;^u1O6rt0?2m%l{V#NZ=q2sB?ph`sziNp5dSIx)NuQy$2xBq6;k* zn5%$61<8Q3fIv$nqD*wg+uWk8H##}~rbVyY)CF491Ly}Fw6y5|2mBXXL|jbyDR4p9 zMwd;i8HYGBpF`K2a;kQ8hSB>9UzwCvBb2h2aUX9{nCzwTq?<UVBAU&9CAqq z{qYHnFi+)k8(3PXuC4?=LvA13oowE6@yW|>JVbnUqN5ZZxIpNJ)KjNR;g#g}==Yk~ zBy<~}@`ZHuU@o7iE~$4)=Nqsu;hPVK)OY{Vh3hrKn-G*ey=<{z@&kle-l3f2ymG&}8H+Ku)J%0v%2Q^{^HHxu@+?!obeLs79{7dr% Ng@g;jnnLyz{~OQ&U?Ttk literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/Contents.json new file mode 100644 index 00000000..9d62e5ef --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_recommend_room_more@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_recommend_room_more@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/home_recommend_room_more@2x.png b/xplan-ios/Assets.xcassets/Home/home_recommend_room_more.imageset/home_recommend_room_more@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..4248ed4993b5c00d93fc78999bd3ccc56fbba224 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0vp^JU}eM!VDz6?;TVEQqloFA+A8$#Kgqd*x1m}5J>9k z>Hsn&;Rs*C=+($-t1ySb;J7GzyW$biB;5(j>5Z>}s`*NS{DK)~wizh)YSs0~aAu}S8+mE$0Llb=x;TbN zTuwf~btZx5SqF+|L1?$*}c(bKO;o<7o*x>Q;_1f9t+}z~n=kVX&=kxRS-rM8t?eN~+FMp;+T-~6``z8< z>S@6m000nuNklc+j|#h%bmm`u)G-+Ro1IW%e*LZRtF}TTk+DBpB7fDcCDKOiB5qIHd%S;y}~T z0%u5zFgys?G1?d*F??GIXdiViImXdjJY{xl14VciO~b$mT%{!Pw1pWHoFZcP^r(9Y z;PP;A0uIs}K5SnCGn~PY@BMlA@)T~v)VjwNUXCj!P@B-ks{BIZn`K!DLz@C2lKA$^ zyhLHqF^jBE?M?DRh*qBW(EK#bK}2R*@9kY(YqkrDfuD_KS!7eQuJ3JqUDq7NhVkPk zS9Ex>Hm0ho{fNun+K{w3cmaiV%pUQ1ooSvZ$C`uPCr80tT2@pUZs*jFwI$pf zT!_7;VBmHo_}V>PdvaP3F)-XN+S)}JE>r?e|LS<83b#QBUIrIO7y+o=>CBJOZX2oFf21 z-4L7Qygb%3e#q)cfE``a)-I1$hgVK`W&qz zHi-zR{7&4>%Y$6$X2OK6i)JXL%X%dMnf!D>?tI)}*$2`#L!G8OAR(x(I@isS`m!$x`M257V z^+4_xxte@ha%$Z+QRQWCKSy)UCq1mgw-nnc38rSfH@aDo#B|IyvZM_GZO8YS!MIxR z(k7*K+f;Ok30)t3rsXDhVvmm5pxOl@jqQ_L8Sm zbbsX@U_Z-}a%1;#3QVI?srec>`k!*S%7Vm6*&G1F7M=|pOx=Xqq}M7R?sVcb!R;*Xb0-R;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fW?!2;7uf>_n0C7CTGYS>c zbY$5Xw&b#L=#@sK1gjY8;0Az$h-sNJd)?Rh19fEtvt+>rc;kvkLZ-cZhRVyMDp6M| zuaqK_kup{?m!1?f2(|?7ZORNg1dXmK2W(`x%z9KN9>Cd_9ft(&O9%FV6LqCwIGfGD z7su(4l0AX@)V*V)H;o1hZeo!Eoqg3=Q(fcLaB^iA9b5qm&ThC^n$5(Wbj-eDihX`4 z?jJ}5`+f!|$Ykr_W<<=1c$s4FpVhqUie`-K7dWZuv<<&KZaGUH*!U8(av5ZAqk%Il zH0_wS<^VRW?%qyT!qL%7ztK?|_#`mQF`a3-!t16L>^RCqfRwC;i|3UoWMDaHT5HdF o0G1q$jT~noSYb%707*qoM6N<$f-hdI-T(jq literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_room_placeholder.imageset/home_recommend_room_placeholder@3x.png b/xplan-ios/Assets.xcassets/Home/home_recommend_room_placeholder.imageset/home_recommend_room_placeholder@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..f0bbbc1ed31e32ac507b716069388542014f3105 GIT binary patch literal 7461 zcmV+=9opiFP)00Bw}0{{R3O!wwD0001HP)t-s=;-nP z|NqU+*8KeZ`1ttx`ugSN>hA9J(9qfQ^Z3!x+RV(>-rVHp=I`t4^V8GZ*4Ezb?eX>X z_|(+h+S=mdbD$Sk!-q^ z>V|`J!ArLb$|Sa$%|s6pO`lu|*5}PqJOj{dI^?E#@WG}eVx!qYK)}#phP%o`ovpPs zc_~{A(0N3V4vV;pHOWv*l9VTBHV_d9fKF@pl>O|Z*~rXT36trQle*o|1lbNq9cK8G z>aE$xL?AYxFQ!kKve`)XkZdLFwM%z(vw>B@V6A}fwo5k~aRJC$n}B=G@XbsDVy&$R zJ$C7viU`3Tc;Io;V1AsNDqyt-0Wbuc-`-*WcV-^Hp9F6*yhy;K#monyJFU;du@+^qRzUNnGw-FNq5=*Lc&SNaL z%yu!3a}Xw?6mrz6^ClN_VD!X7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#Ff()*DR|A2E9yQ4x}-10P1#;~=1dpY`|gd)jjMnd&Gti{_>rBV)(E&N%8!-Zf? zPaL&NM@)9}7p6aO0oJm!N&nJ(zrlvuUKH`k?#UkTvp#%EPxZODWfbUQ%T^tV>V{bk|DT|Dc*slQr_Dz-Hg2pee4c jjb4Z@9%MRy6AAqbzH)%ST7?k200000NkvXXu0mjf$oGWj literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/Contents.json new file mode 100644 index 00000000..62c4f8c8 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "home_recommend_section_logo@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "home_recommend_section_logo@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/home_recommend_section_logo@2x.png b/xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/home_recommend_section_logo@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..0e4c4f11416aca606d9520d045bad504cdf72c2e GIT binary patch literal 1238 zcmWks4Nwwx6epFwYb{NiH7i|Hw60s)*X+v#QS$?g$*HptQA9)`F+~OBL$I^5{Jn%(T0tI10fDfqx1(*`Vrzf=p29p+*l}77!)C&4uU+U{^qK zxr@wEf~*#H9{}NDNZ~^U4^m2CrwCYuz{>+3+tnK-fkF;YRZzeMZmEl5S3{x%vK2s- z!9FPzDM8u@d+H#I4P+s(bAX@#f(+tCfR_U|8!FF1iUfEZNEX3v5ip8fyt)h2&QbYL z{4=D>fLY{(4#r+c5kqQVwYaP9X>{1BU}5D-l5ocq#gK0=>4t)JJ$Yf^OY|YXhk9 z9ON`1Nh6|hV8V*VUc>MUxc><0ufX9>sA>mEJMilvy$<55QAQOilA(Mtq6-mKfJR;* z<4w?+(AkUVgaNg7qLW%EYekwyq&kkI8lb39W@RD8@2&H$WPVb@E{w+qyZz;ZRjKp+HcOoES&gw0`AchhxfavyF|8nn#8o|Iu@?ORsBfZE02= zl8LyvECwwtEp6+T&A|ZyGfJA9Q!yAfS`0pdvhmLg15B!KgxB<8vOf)L=;-^R;c401 zp0yDTLB8Eu;~m55_v)vR_vXg<{5i9fi9(6YpN;a*ZRaJYk=R72liO~KO|Ehz2o=$qm$>WEDOms9UYxhgwxw@ zyjnwF_-Q}K-JfT8@>gotxEtY>?x1n>GV26KpyWoq@HUd}6BqL4`S zhv)9(-i{+Ju#0w0r#|_6}s7UDap79edDrfBN)EtT|xY zGmn&dA0E9nI6UZ;O@FlansKlew|R2KR2kDRaQ$hmrsuaC9xVS5_hqezVLLU+Y_Yxd$Gte|lWEU_f!W9vckOQ&$;$y1>u$kH#qiPB{rgJX=y9J zbj;ee_bZa7t!c&nWVM8Pl!g_0nj$Uz^%u<9O4Ax#c zI`#gR@lLhro%V!|dZuS!NNf#T+|=z$*>p2^k@7!{Nx-{q+(5nF^7W;zSbkmaFN)h@ hMznBb(?j#eX@xVxix{(x3_Bkg6GKSAx9^}y{|Be+sxbfn literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/home_recommend_section_logo@3x.png b/xplan-ios/Assets.xcassets/Home/home_recommend_section_logo.imageset/home_recommend_section_logo@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..11695d0e1523ab108e0223cbb4b4773ce80953cb GIT binary patch literal 2330 zcmXX`3p~@^8&{G`)IX&3cAF9^boWX^MzgV8YoT0*Hf*+88)l4cY?9D&iIr=;64INJ zl3qpm=;l&LyeWj-=|cHE@7CvkKF@j1Ip6bKzUQ3hbHvX0BN}RJ)f5yIG#oH!SJ`+_ z-c=Okh@O$Pg2Li?XGeEC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@TEd-M1D~_EYwThlj@Q#ZoQ_Y48X%zV%x|rfY|u4s7_8 z?9RxTK#QIX#BA1S4XNlzy_1(wLO4I6y~WDJ%2;>xw`W-KPf6FlX%R*sdbJu(%)v1VvpWng2U|pj6ds`k;h12gI zUG!=$DBM+^?W&7jk>vf5_U&elR~$q055j}$C{LrvtlP@PY~~zNd!6c?a7L>uDMWF` zByZnX9_azI&+x$9-dAB-xEl2%`c@`ag_eiCS6QQ0p|guHU5)0XMzfqhgP-uWQFUE+ zUNLMFtzSQLwn0;MaHxkn@awQHP1ohv1*?gXCZ!#rapfn9+V5^W;dZk>Z4BGX;I}zB zrGy@jG@EHzb}Usi>NH`lG%U_3>>Tee-C4Xfs` + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, HomeBannerInfoSkipType) { + ///跳转房间 + HomeBannerInfoSkipType_Room = 2, + ///跳转h5 + HomeBannerInfoSkipType_Web = 3, +}; + +@interface HomeBannerInfoModel : NSObject +///ID +@property (nonatomic,copy)NSString *bannerId; +///名字 +@property (nonatomic,copy)NSString *bannerName; +///图片 +@property (nonatomic, copy)NSString *bannerPic; +///跳转的地址 +@property (nonatomic, copy)NSString *skipUri; +///跳转的类型 +@property (nonatomic, assign)HomeBannerInfoSkipType skipType; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Model/HomeBannerInfoModel.m b/xplan-ios/Main/Home/Model/HomeBannerInfoModel.m new file mode 100644 index 00000000..70cf7b48 --- /dev/null +++ b/xplan-ios/Main/Home/Model/HomeBannerInfoModel.m @@ -0,0 +1,12 @@ +// +// HomeBannerInfoModel.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "HomeBannerInfoModel.h" + +@implementation HomeBannerInfoModel + +@end diff --git a/xplan-ios/Main/Home/Model/HomeMenuInfoModel.h b/xplan-ios/Main/Home/Model/HomeMenuInfoModel.h new file mode 100644 index 00000000..16faf591 --- /dev/null +++ b/xplan-ios/Main/Home/Model/HomeMenuInfoModel.h @@ -0,0 +1,38 @@ +// +// HomeMenuInfoModel.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, HomeMenuResourceType) { + ///进入牌照房 + HomeMenuResourceType_Room_Licnese = 1, + ///进入相亲房 + HomeMenuResourceType_Room_Dating, + ///进入PK房 + HomeMenuResourceType_Room_PK, + ///进入Game房 + HomeMenuResourceType_Room_Game, + ///进入H5 + HomeMenuResourceType_H5, + ///进入自定义房 + HomeMenuResourceType_Room_Custom, +}; + +@interface HomeMenuInfoModel : NSObject +///ID 映射字段 +@property (nonatomic,copy) NSString *hid; +///显示的图片 +@property (nonatomic, copy)NSString *icon; +///类型 +@property (nonatomic, assign)HomeMenuResourceType resourceType; +///跳转h5的时候 跳转链接 +@property (nonatomic, copy)NSString *resourceContent; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Model/HomeMenuInfoModel.m b/xplan-ios/Main/Home/Model/HomeMenuInfoModel.m new file mode 100644 index 00000000..c5a802d9 --- /dev/null +++ b/xplan-ios/Main/Home/Model/HomeMenuInfoModel.m @@ -0,0 +1,17 @@ +// +// HomeMenuInfoModel.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "HomeMenuInfoModel.h" + +@implementation HomeMenuInfoModel + +///如果一个模型中需要字段映射的话 比如id -> ID name -> other.name ++ (NSDictionary *)replacedKeyFromPropertyName { + return @{@"id":@"hid"}; +} + +@end diff --git a/xplan-ios/Main/Home/Model/HomeRecommendRoomModel.h b/xplan-ios/Main/Home/Model/HomeRecommendRoomModel.h index 55745d17..563ef3a2 100644 --- a/xplan-ios/Main/Home/Model/HomeRecommendRoomModel.h +++ b/xplan-ios/Main/Home/Model/HomeRecommendRoomModel.h @@ -6,7 +6,7 @@ // #import - +#import "XPEnum.h" NS_ASSUME_NONNULL_BEGIN @interface HomeRecommendRoomModel : NSObject @@ -22,6 +22,16 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,copy) NSString *title; ///tag的图片 @property (nonatomic,copy) NSString *tagPict; +///性别 +@property (nonatomic,assign) GenderType gender; +///房主的昵称 +@property (nonatomic,copy) NSString *nick; +///房间的id +@property (nonatomic,copy) NSString *roomId; +///房主的uid +@property (nonatomic,copy) NSString *uid; +///用户简介 +@property(nonatomic, copy) NSString *userDesc; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.h b/xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.h new file mode 100644 index 00000000..f844e214 --- /dev/null +++ b/xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.h @@ -0,0 +1,23 @@ +// +// XPHomeRecommendPresenter.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "BaseMvpPresenter.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeRecommendPresenter : BaseMvpPresenter +/// 获取首页顶部的轮播图 +- (void)getHomeTopBannerList; +/// 获取首页资源列表 +- (void)getHomeMenuList; +/// 获取首页推荐列表 +- (void)getHomeRecommendRoomList; +/// 获取首页热门房间列表 +- (void)getHomeHotRoomList; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.m b/xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.m new file mode 100644 index 00000000..65aab846 --- /dev/null +++ b/xplan-ios/Main/Home/Presenter/XPHomeRecommendPresenter.m @@ -0,0 +1,53 @@ +// +// XPHomeRecommendPresenter.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "XPHomeRecommendPresenter.h" +#import "Api+Home.h" +#import "AccountInfoStorage.h" +#import "HomeMenuInfoModel.h" +#import "HomeRecommendRoomModel.h" +#import "HomeBannerInfoModel.h" +#import "XPHomeRecommendProtocol.h" +@implementation XPHomeRecommendPresenter + + +/// 获取首页顶部的轮播图 +- (void)getHomeTopBannerList { + NSString * uid = [AccountInfoStorage instance].getUid; + [Api homeBannerList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [HomeBannerInfoModel modelsWithArray:data.data]; + [[self getView] getHomeTopBannerListSuccess:array]; + }] uid:uid type:@"9"]; +} + +/// 获取首页资源列表 +- (void)getHomeMenuList { + NSString * uid = [AccountInfoStorage instance].getUid; + [Api homeMenuList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [HomeMenuInfoModel modelsWithArray:data.data]; + [[self getView] getHomeMenuListSuccess:array]; + }] uid:uid]; +} + +/// 获取首页推荐列表 +- (void)getHomeRecommendRoomList { + NSString * uid = [AccountInfoStorage instance].getUid; + [Api homeRecommendRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data]; + [[self getView] getHomeRecommendRoomListSuccess:array]; + }] uid:uid]; +} + +/// 获取首页热门房间列表 +- (void)getHomeHotRoomList { + [Api homeHotRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [HomeRecommendRoomModel modelsWithArray:data.data]; +// [[self getView] getHomeHotRoomListSuccess:array]; + }]]; +} + +@end diff --git a/xplan-ios/Main/Home/Protocol/XPHomeRecommendProtocol.h b/xplan-ios/Main/Home/Protocol/XPHomeRecommendProtocol.h new file mode 100644 index 00000000..812090d7 --- /dev/null +++ b/xplan-ios/Main/Home/Protocol/XPHomeRecommendProtocol.h @@ -0,0 +1,23 @@ +// +// XPHomeRecommendProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPHomeRecommendProtocol +///获取首页轮播图列表成功 +- (void)getHomeTopBannerListSuccess:(NSArray*)list; +///获取首页菜单列表成功 +- (void)getHomeMenuListSuccess:(NSArray *)list; +///获取首页推荐列表成功 +- (void)getHomeRecommendRoomListSuccess:(NSArray *)list; +///获取首页热门房列表成功 +- (void)getHomeHotRoomListSuccess:(NSArray *)list; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.h new file mode 100644 index 00000000..093313da --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.h @@ -0,0 +1,26 @@ +// +// XPHomeBannerTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class HomeBannerInfoModel, XPHomeBannerTableViewCell; + +@protocol XPHomeBannerTableViewCellDelegate + +///点击了某个banner +- (void)xPHomeBannerTableViewCell:(XPHomeBannerTableViewCell *)view didClickBanner:(HomeBannerInfoModel *)info; + +@end + +@interface XPHomeBannerTableViewCell : UITableViewCell +@property (nonatomic,strong) NSArray *bannerList; +///代理 +@property (nonatomic,weak) id delegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.m new file mode 100644 index 00000000..47c9b560 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeBannerTableViewCell.m @@ -0,0 +1,82 @@ +// +// XPHomeBannerTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// 轮播图 + +#import "XPHomeBannerTableViewCell.h" +///Third +#import +#import +///Model +#import "HomeBannerInfoModel.h" + +@interface XPHomeBannerTableViewCell () +@property (nonatomic, strong) SDCycleScrollView *cycleScrollView; +@end + +@implementation XPHomeBannerTableViewCell + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + self.backgroundColor = [UIColor clearColor]; + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.cycleScrollView]; +} + +- (void)initSubViewConstraints { + [self.cycleScrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.contentView); + make.bottom.mas_equalTo(self.contentView).offset(-10); + make.left.right.mas_equalTo(self.contentView).inset(15); + }]; +} +#pragma mark - SDCycleScrollViewDelegate +- (void)cycleScrollView:(SDCycleScrollView *)cycleScrollView didSelectItemAtIndex:(NSInteger)index { + HomeBannerInfoModel * bannerInfo = [self.bannerList objectAtIndex:index]; + if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeBannerTableViewCell:didClickBanner:)]) { + [self.delegate xPHomeBannerTableViewCell:self didClickBanner:bannerInfo]; + } +} + +#pragma mark - Getters And Setters +- (void)setBannerList:(NSArray *)bannerList { + _bannerList = bannerList; + if (_bannerList.count > 0) { + NSMutableArray * array = [NSMutableArray array]; + [_bannerList enumerateObjectsUsingBlock:^(HomeBannerInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if (obj.bannerPic.length > 0) { + [array addObject:obj.bannerPic]; + } + }]; + if (array.count > 0) { + self.cycleScrollView.imageURLStringsGroup = array; + [self.cycleScrollView autoScroll]; + } + } +} + +- (SDCycleScrollView *)cycleScrollView { + if (!_cycleScrollView) { + _cycleScrollView = [[SDCycleScrollView alloc] init]; + _cycleScrollView.backgroundColor = [UIColor clearColor]; + _cycleScrollView.layer.cornerRadius = 10; + _cycleScrollView.layer.masksToBounds = YES; + _cycleScrollView.delegate = self; + _cycleScrollView.showPageControl = NO; + _cycleScrollView.autoScrollTimeInterval = 5.0; + } + return _cycleScrollView; +} + + +@end diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.h new file mode 100644 index 00000000..7d377996 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.h @@ -0,0 +1,16 @@ +// +// XPHomeHotRoomCollectionViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class HomeRecommendRoomModel; +@interface XPHomeHotRoomCollectionViewCell : UICollectionViewCell +@property (nonatomic,strong) HomeRecommendRoomModel * hotRoomInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.m new file mode 100644 index 00000000..33425632 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomCollectionViewCell.m @@ -0,0 +1,212 @@ +// +// XPHomeHotRoomCollectionViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "XPHomeHotRoomCollectionViewCell.h" +///Third +#import +///Tool +#import "NetImageView.h" +#import "ThemeColor.h" +#import "UIImage+Utils.h" +///Model +#import "HomeRecommendRoomModel.h" + +@interface XPHomeHotRoomCollectionViewCell () +///头像的背景 +@property (nonatomic,strong) NetImageView *backImageView; +///头像 +@property (nonatomic,strong) NetImageView *avatarImageView; +///房间标题 +@property (nonatomic,strong) UILabel *roomTitleLabel; +///昵称 +@property (nonatomic,strong) UILabel *nickLabel; +///性别 +@property (nonatomic,strong) UIImageView *sexImageView; +///房间话题的容器 +@property (nonatomic,strong) UIView * roomDesView; +///房间的标签 +@property (nonatomic,strong) NetImageView *roomTagImageView; +///房间的话题 +@property (nonatomic,strong) UILabel *roomDesLabel; +///覆盖的图片 +@property (nonatomic,strong) UIImageView *coverImageView; +@end + +@implementation XPHomeHotRoomCollectionViewCell + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self.contentView addSubview:self.backImageView]; + [self.contentView addSubview:self.coverImageView]; + [self.contentView addSubview:self.avatarImageView]; + [self.contentView addSubview:self.roomTitleLabel]; + [self.contentView addSubview:self.nickLabel]; + [self.contentView addSubview:self.sexImageView]; + [self.contentView addSubview:self.roomDesView]; + + + [self.roomDesView addSubview:self.roomTagImageView]; + [self.roomDesView addSubview:self.roomDesLabel]; +} + +- (void)initSubViewConstraints { + [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.contentView); + }]; + + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(48, 48)); + make.top.left.mas_equalTo(self.contentView).offset(9); + }]; + + [self.coverImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.backImageView); + }]; + + [self.roomTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.avatarImageView.mas_right).offset(7); + make.top.mas_equalTo(self.avatarImageView); + make.right.mas_lessThanOrEqualTo(self.contentView); + }]; + + [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.roomTitleLabel); + make.top.mas_equalTo(self.roomTitleLabel.mas_bottom).offset(2); + }]; + + [self.sexImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.nickLabel.mas_right).offset(4); + make.centerY.mas_equalTo(self.nickLabel); + make.size.mas_equalTo(CGSizeMake(14, 14)); + }]; + + [self.roomDesView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.contentView).offset(10); + make.left.mas_equalTo(self.contentView).offset(9); + make.height.mas_equalTo(28); + make.bottom.mas_equalTo(self.contentView).offset(-8); + }]; + + [self.roomTagImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(38, 18)); + make.left.mas_equalTo(self.roomDesView).offset(8); + make.centerY.mas_equalTo(self.roomDesView); + }]; + + [self.roomDesLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.roomDesView.mas_right).offset(4); + make.centerY.mas_equalTo(self.roomDesView); + }]; +} +#pragma mark - Getters And Setters +- (void)setHotRoomInfo:(HomeRecommendRoomModel *)hotRoomInfo { + _hotRoomInfo = hotRoomInfo; + if (_hotRoomInfo) { + self.avatarImageView.imageUrl = _hotRoomInfo.avatar; + self.backImageView.imageUrl = _hotRoomInfo.avatar; + self.roomTitleLabel.text = _hotRoomInfo.title; + self.roomTagImageView.imageUrl = _hotRoomInfo.tagPict; + self.nickLabel.text = _hotRoomInfo.nick; + self.sexImageView.image = _hotRoomInfo.gender == GenderType_Female ? [UIImage imageNamed:@"common_female"] : [UIImage imageNamed:@"common_male"]; + self.roomDesLabel.text = _hotRoomInfo.userDesc; + } +} + +- (NetImageView *)backImageView { + if (!_backImageView) { + _backImageView = [[NetImageView alloc] init]; + _backImageView.contentMode = UIViewContentModeScaleAspectFill; + _backImageView.layer.masksToBounds = YES; + _backImageView.layer.cornerRadius = 8; + } + return _backImageView; +} + +- (NetImageView *)avatarImageView { + if (!_avatarImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _avatarImageView = [[NetImageView alloc] initWithConfig:config]; + _avatarImageView.layer.masksToBounds = YES; + _avatarImageView.layer.cornerRadius = 48/2; + } + return _avatarImageView; +} + +- (UILabel *)roomTitleLabel { + if (!_roomTitleLabel) { + _roomTitleLabel = [[UILabel alloc] init]; + _roomTitleLabel.font = [UIFont boldSystemFontOfSize:14]; + _roomTitleLabel.textColor = [ThemeColor mainTextColor]; + } + return _roomTitleLabel; +} + +- (UILabel *)nickLabel { + if (!_nickLabel) { + _nickLabel = [[UILabel alloc] init]; + _nickLabel.font = [UIFont systemFontOfSize:12]; + _nickLabel.textColor = [ThemeColor mainTextColor]; + } + return _nickLabel; +} + +- (UIImageView *)sexImageView { + if (!_sexImageView) { + _sexImageView = [[UIImageView alloc] init]; + _sexImageView.userInteractionEnabled = YES; + } + return _sexImageView; +} + +- (UIView *)roomDesView { + if (!_roomDesView) { + _roomDesView = [[UIView alloc] init]; + _roomDesView.backgroundColor = UIColorRGBAlpha(0x9DADFF, 0.3); + _roomDesView.layer.masksToBounds = YES; + _roomDesView.layer.cornerRadius = 14; + } + return _roomDesView; +} + +- (NetImageView *)roomTagImageView { + if (!_roomTagImageView) { + _roomTagImageView = [[NetImageView alloc] init]; + _roomTagImageView.userInteractionEnabled = YES; + } + return _roomTagImageView; +} +- (UILabel *)roomDesLabel { + if (!_roomDesLabel) { + _roomDesLabel = [[UILabel alloc] init]; + _roomDesLabel.font = [UIFont systemFontOfSize:12]; + _roomDesLabel.textColor = [ThemeColor mainTextColor]; + } + return _roomDesLabel; +} + +- (UIImageView *)coverImageView { + if (!_coverImageView) { + _coverImageView = [[UIImageView alloc] init]; + _coverImageView.userInteractionEnabled = YES; + _coverImageView.image = [UIImage imageNamed:@"home_recommend_hot_cover_bg"]; + } + return _coverImageView; +} + +@end diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.h new file mode 100644 index 00000000..edee94a6 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.h @@ -0,0 +1,16 @@ +// +// XPHomeHotRoomTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeHotRoomTableViewCell : UITableViewCell +@property (nonatomic,strong) NSArray *hotAnchorList; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.m new file mode 100644 index 00000000..36dacc25 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeHotRoomTableViewCell.m @@ -0,0 +1,87 @@ +// +// XPHomeHotRoomTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// 人气主播 + +#import "XPHomeHotRoomTableViewCell.h" +///Third +#import +///Tool +#import "XPMacro.h" +///View +#import "XPHomeHotRoomCollectionViewCell.h" + +@interface XPHomeHotRoomTableViewCell () +///列表 +@property (nonatomic,strong) UICollectionView *collectionView; +@end + +@implementation XPHomeHotRoomTableViewCell + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + self.backgroundColor = [UIColor clearColor]; + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.collectionView]; +} + +- (void)initSubViewConstraints { + [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.contentView).inset(15); + make.top.bottom.mas_equalTo(self.contentView); + }]; +} + +#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + return CGSizeMake(188, 96); +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.hotAnchorList.count; +} + +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + XPHomeHotRoomCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeHotRoomCollectionViewCell class]) forIndexPath:indexPath]; + HomeRecommendRoomModel * info = [self.hotAnchorList objectAtIndex:indexPath.row]; + cell.hotRoomInfo = info; + return cell; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; +} + + +#pragma mark - Getters And Setters +- (void)setHotAnchorList:(NSArray *)hotAnchorList { + _hotAnchorList = hotAnchorList; + [self.collectionView reloadData]; +} + +- (UICollectionView *)collectionView{ + if (!_collectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + layout.minimumLineSpacing = 8; + layout.minimumInteritemSpacing = 0; + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _collectionView.dataSource = self; + _collectionView.delegate = self; + _collectionView.backgroundColor = [UIColor clearColor]; + [_collectionView registerClass:[XPHomeHotRoomCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeHotRoomCollectionViewCell class])]; + } + return _collectionView; +} + +@end diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.h new file mode 100644 index 00000000..acb0bb2e --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.h @@ -0,0 +1,27 @@ +// +// XPHomeMenuTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class HomeMenuInfoModel, XPHomeMenuTableViewCell; + +@protocol XPHomeMenuTableViewCellDelegate + +///点击了某个菜单 +- (void)xPHomeMenuTableViewCell:(XPHomeMenuTableViewCell *)view didClickMenuInfo:(HomeMenuInfoModel *)info; + +@end + +@interface XPHomeMenuTableViewCell : UITableViewCell +@property (nonatomic,strong) NSArray *menuList; + +///代理 +@property (nonatomic,weak) id delegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.m new file mode 100644 index 00000000..908bf0ea --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeMenuTableViewCell.m @@ -0,0 +1,135 @@ +// +// XPHomeMenuTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// 扩列交友 心动匹配 小游戏 + +#import "XPHomeMenuTableViewCell.h" +///Third +#import +///Tool +#import "ThemeColor.h" +#import "NetImageView.h" +#import "XPMacro.h" +///Model +#import "HomeMenuInfoModel.h" + +@interface XPHomeMenuTableViewCell () +@property (nonatomic,strong) NetImageView *firstMenuView; +@property (nonatomic,strong) NetImageView *secondMenuView; +@property (nonatomic,strong) NetImageView *thirdMenuView; +///自view的数组 +@property (nonatomic,strong) NSArray *menuViewList; +@end + +@implementation XPHomeMenuTableViewCell + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + self.backgroundColor = [UIColor clearColor]; + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.firstMenuView]; + [self.contentView addSubview:self.secondMenuView]; + [self.contentView addSubview:self.thirdMenuView]; + self.menuViewList = @[self.firstMenuView, self.secondMenuView, self.thirdMenuView]; +} + +- (void)initSubViewConstraints { + CGFloat width1 = (KScreenWidth - 30 - 8) * 176 / (176 + 82 + 80); + CGFloat width2 = (KScreenWidth - 30 - 8) * 82 / (176 + 82 + 80); + CGFloat width3 = (KScreenWidth - 30 - 8) * 80 / (176 + 82 + 80); + [self.firstMenuView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(15); + make.bottom.mas_equalTo(0); + make.height.mas_equalTo(60); + make.width.mas_equalTo(width1); + }]; + [self.secondMenuView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.firstMenuView.mas_right).mas_offset(4); + make.bottom.mas_equalTo(0); + make.height.mas_equalTo(60); + make.width.mas_equalTo(width2); + }]; + [self.thirdMenuView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.secondMenuView.mas_right).mas_offset(4); + make.bottom.mas_equalTo(0); + make.height.mas_equalTo(60); + make.width.mas_equalTo(width3); + }]; +} +#pragma mark - Event Response +- (void)onTapMenuRecognizer:(UITapGestureRecognizer *)tap { + UIView * view = [tap view]; + HomeMenuInfoModel * homeInfoModel = [self.menuList objectAtIndex:view.tag -1000]; + if (homeInfoModel && self.delegate && [self.delegate respondsToSelector:@selector(xPHomeMenuTableViewCell:didClickMenuInfo:)]) { + [self.delegate xPHomeMenuTableViewCell:self didClickMenuInfo:homeInfoModel]; + } +} + +#pragma mark - Getters And Setters +- (void)setMenuList:(NSArray *)menuList { + _menuList = menuList; + NSMutableArray * array = [_menuList mutableCopy]; + if (_menuList.count > 3) { + _menuList = [array subarrayWithRange:NSMakeRange(0, 3)]; + } + + for (int i = 0; i< _menuList.count; i++) { + NetImageView * imageView = [self.menuViewList objectAtIndex:i]; + HomeMenuInfoModel * menuInfoModel = [_menuList objectAtIndex:i]; + imageView.imageUrl = menuInfoModel.icon; + } +} + +- (NetImageView *)firstMenuView { + if (!_firstMenuView) { + _firstMenuView = [[NetImageView alloc] init]; + _firstMenuView.userInteractionEnabled = YES; + _firstMenuView.contentMode = UIViewContentModeScaleAspectFill; + _firstMenuView.layer.masksToBounds = YES; + _firstMenuView.tag = 1000; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapMenuRecognizer:)]; + [_firstMenuView addGestureRecognizer:tap]; + } + return _firstMenuView; +} + +- (NetImageView *)secondMenuView { + if (!_secondMenuView) { + _secondMenuView = [[NetImageView alloc] init]; + _secondMenuView.userInteractionEnabled = YES; + _secondMenuView.image = [UIImage imageNamed:@"home_recommend_icon"]; + _secondMenuView.contentMode = UIViewContentModeScaleAspectFill; + _secondMenuView.layer.masksToBounds = YES; + _secondMenuView.tag = 1001; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapMenuRecognizer:)]; + [_secondMenuView addGestureRecognizer:tap]; + } + return _secondMenuView; +} + +- (NetImageView *)thirdMenuView { + if (!_thirdMenuView) { + _thirdMenuView = [[NetImageView alloc] init]; + _thirdMenuView.userInteractionEnabled = YES; + _thirdMenuView.image = [UIImage imageNamed:@"home_recommend_icon"]; + _thirdMenuView.contentMode = UIViewContentModeScaleAspectFill; + _thirdMenuView.layer.masksToBounds = YES; + _thirdMenuView.tag = 1002; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onTapMenuRecognizer:)]; + [_thirdMenuView addGestureRecognizer:tap]; + } + return _thirdMenuView; +} + + +@end diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.h new file mode 100644 index 00000000..1067b5d5 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.h @@ -0,0 +1,16 @@ +// +// XPHomeRecommendCollectionViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class HomeRecommendRoomModel; +@interface XPHomeRecommendCollectionViewCell : UICollectionViewCell +@property (nonatomic,strong, nullable) HomeRecommendRoomModel *recommendRoomInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.m new file mode 100644 index 00000000..567ea0f5 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendCollectionViewCell.m @@ -0,0 +1,170 @@ +// +// XPHomeRecommendCollectionViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "XPHomeRecommendCollectionViewCell.h" +///Third +#import +///Tool +#import "ThemeColor+Home.h" +#import "NetImageView.h" +///Model +#import "HomeRecommendRoomModel.h" + +@interface XPHomeRecommendCollectionViewCell () +///背景 +@property (nonatomic,strong) UIView * backView; +///头像 +@property (nonatomic,strong) NetImageView *avatarImageView; +///容器 +@property (nonatomic,strong) UIView * personContainerView; +///显示🔥 +@property (nonatomic,strong) UIImageView *hotImageView; +///显示在线人数 +@property (nonatomic,strong) UILabel *numberLabel; +///显示名字 +@property (nonatomic,strong) UILabel *nickLabel; +@end + +@implementation XPHomeRecommendCollectionViewCell + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + self.backgroundColor = [UIColor clearColor]; + [self.contentView addSubview:self.backView]; + + [self.backView addSubview:self.avatarImageView]; + [self.backView addSubview:self.personContainerView]; + [self.backView addSubview:self.nickLabel]; + + [self.personContainerView addSubview:self.hotImageView]; + [self.personContainerView addSubview:self.numberLabel]; +} + +- (void)initSubViewConstraints { + [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.contentView); + }]; + + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self.backView); + make.height.mas_equalTo(self.avatarImageView.mas_width); + }]; + + [self.personContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.backView).offset(6); + make.height.mas_equalTo(16); + make.bottom.mas_equalTo(self.avatarImageView.mas_bottom).offset(-3); + make.right.mas_equalTo(self.numberLabel.mas_right).offset(3); + }]; + + [self.hotImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(13, 13)); + make.left.mas_equalTo(self.personContainerView).offset(3); + make.centerY.mas_equalTo(self.personContainerView); + }]; + + [self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.hotImageView.mas_right).offset(2); + make.centerY.mas_equalTo(self.personContainerView); + }]; + + [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.backView).offset(3); + make.right.mas_equalTo(self.backView); + make.height.mas_equalTo(22); + make.top.mas_equalTo(self.avatarImageView.mas_bottom); + }]; +} + +#pragma mark - Getters And Setters +- (void)setRecommendRoomInfo:(HomeRecommendRoomModel *)recommendRoomInfo { + _recommendRoomInfo = recommendRoomInfo; + if (_recommendRoomInfo) { + self.avatarImageView.imageUrl = _recommendRoomInfo.avatar; + self.numberLabel.text = [NSString stringWithFormat:@"%ld", _recommendRoomInfo.onlineNum]; + self.nickLabel.text = _recommendRoomInfo.title; + self.personContainerView.hidden = NO; + } else { + self.avatarImageView.image = [UIImage imageNamed:@"home_recommend_room_placeholder"]; + self.nickLabel.text = @"虚位以待"; + self.personContainerView.hidden = YES; + } +} + +- (UIView *)backView { + if (!_backView) { + _backView = [[UIView alloc] init]; + _backView.backgroundColor = [ThemeColor appCellBackgroundColor]; + _backView.layer.masksToBounds = YES; + _backView.layer.cornerRadius = 8; + _backView.layer.shadowColor = UIColorRGBAlpha(0xE5E5F2, 0.34).CGColor; + _backView.layer.shadowOffset = CGSizeMake(5, 5); + } + return _backView; +} + + +- (NetImageView *)avatarImageView { + if (!_avatarImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _avatarImageView = [[NetImageView alloc] initWithConfig:config]; + _avatarImageView.layer.masksToBounds = YES; + _avatarImageView.layer.cornerRadius = 8; + } + return _avatarImageView; +} + +- (UIView *)personContainerView { + if (!_personContainerView) { + _personContainerView = [[UIView alloc] init]; + _personContainerView.backgroundColor = [UIColor colorWithWhite:0 alpha:0.2]; + _personContainerView.layer.masksToBounds = YES; + _personContainerView.layer.cornerRadius = 8; + } + return _personContainerView; +} + +- (UIImageView *)hotImageView { + if (!_hotImageView) { + _hotImageView = [[UIImageView alloc] init]; + _hotImageView.userInteractionEnabled = YES; + _hotImageView.image = [UIImage imageNamed:@"home_recommend_hot"]; + } + return _hotImageView; +} + +- (UILabel *)nickLabel { + if (!_nickLabel) { + _nickLabel = [[UILabel alloc] init]; + _nickLabel.font = [UIFont systemFontOfSize:12]; + _nickLabel.textColor = [ThemeColor mainTextColor]; + } + return _nickLabel; +} + +- (UILabel *)numberLabel { + if (!_numberLabel) { + _numberLabel = [[UILabel alloc] init]; + _numberLabel.font = [UIFont systemFontOfSize:12]; + _numberLabel.textColor = [UIColor whiteColor]; + } + return _numberLabel; +} + +@end diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.h new file mode 100644 index 00000000..882ff2de --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.h @@ -0,0 +1,16 @@ +// +// XPHomeRecommendTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeRecommendTableViewCell : UITableViewCell +@property (nonatomic,strong) NSArray *recommendList; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.m new file mode 100644 index 00000000..0ca9abc2 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeRecommendTableViewCell.m @@ -0,0 +1,90 @@ +// +// XPHomeRecommendTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// 最新推荐 + +#import "XPHomeRecommendTableViewCell.h" +///Third +#import +///Tool +#import "XPMacro.h" +///View +#import "XPHomeRecommendCollectionViewCell.h" + +@interface XPHomeRecommendTableViewCell () +///列表 +@property (nonatomic,strong) UICollectionView *collectionView; +@end + +@implementation XPHomeRecommendTableViewCell + +- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + self.backgroundColor = [UIColor clearColor]; + self.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.collectionView]; +} + +- (void)initSubViewConstraints { + [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.contentView).inset(15); + make.top.bottom.mas_equalTo(self.contentView); + }]; +} + +#pragma mark - UICollectionViewDelegate And UICollectionViewDatasource +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + CGFloat itemWidth = (CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 4) / (CGFloat)3; + return CGSizeMake(itemWidth, itemWidth+ 22); +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return 6; +} + +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + XPHomeRecommendCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeRecommendCollectionViewCell class]) forIndexPath:indexPath]; + if (indexPath.row <= (self.recommendList.count -1)) { + HomeRecommendRoomModel * info = [self.recommendList objectAtIndex:indexPath.row]; + cell.recommendRoomInfo = info; + } else { + cell.recommendRoomInfo = nil; + } + + return cell; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; +} +#pragma mark - Getters And Setters +- (void)setRecommendList:(NSArray *)recommendList { + _recommendList = recommendList; + [self.collectionView reloadData]; +} + +- (UICollectionView *)collectionView{ + if (!_collectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.minimumLineSpacing = 16; + layout.minimumInteritemSpacing = 8; + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _collectionView.dataSource = self; + _collectionView.delegate = self; + _collectionView.backgroundColor = [UIColor clearColor]; + [_collectionView registerClass:[XPHomeRecommendCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeRecommendCollectionViewCell class])]; + } + return _collectionView; +} + +@end diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.h b/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.h index 99974f29..ce3b6aca 100644 --- a/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.h +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.h @@ -6,14 +6,14 @@ // #import - +#import NS_ASSUME_NONNULL_BEGIN @class XPHomeNavView; @protocol XPHomeNavViewDelegate ///点击了搜索按钮 -- (void)xPHomeNavView:(XPHomeNavView *)view didClickSearch:(UIButton *)sender; +- (void)xPHomeNavViewDidClickSearch:(XPHomeNavView *)view; ///点击了榜单按钮 - (void)xPHomeNavView:(XPHomeNavView *)view didClickRank:(UIButton *)sender; @@ -21,7 +21,8 @@ NS_ASSUME_NONNULL_BEGIN @interface XPHomeNavView : UIView - +///滑块 +@property (nonatomic, strong, readonly) JXCategoryTitleView *titleView; ///代理 @property (nonatomic,weak) id delegate; diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m b/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m index 9afecb2f..f2d18f8c 100644 --- a/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m @@ -8,18 +8,19 @@ #import "XPHomeNavView.h" ///Third #import + ///Tool #import "ThemeColor+Home.h" #import "XPMacro.h" #import "UIImage+Utils.h" -@interface XPHomeNavView () -///搜索按钮 -@property (nonatomic,strong) UIButton *searchButton; -///标题 -@property (nonatomic,strong) UILabel *titleLabel; +@interface XPHomeNavView () ///排行榜 @property (nonatomic,strong) UIButton *rankButton; +///搜索框 +@property (nonatomic,strong) UITextField *searchTextField; +///滑块 +@property (nonatomic,strong) JXCategoryTitleView *titleView; @end @implementation XPHomeNavView @@ -37,35 +38,42 @@ #pragma mark - Private Method - (void)initSubViews { self.backgroundColor = [UIColor clearColor]; - [self addSubview:self.searchButton]; - [self addSubview:self.titleLabel]; + [self addSubview:self.titleView]; + [self addSubview:self.searchTextField]; [self addSubview:self.rankButton]; } - (void)initSubViewConstraints { - [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self).offset(statusbarHeight); - make.height.mas_equalTo(44); - make.left.right.mas_equalTo(self); + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self).offset(12); + make.height.mas_equalTo(40); + make.centerY.mas_equalTo(self.searchTextField); + make.width.mas_equalTo(150); }]; - [self.searchButton mas_makeConstraints:^(MASConstraintMaker *make) { - make.size.mas_equalTo(CGSizeMake(22, 22)); - make.left.mas_equalTo(14); - make.centerY.mas_equalTo(self.titleLabel); + [self.searchTextField mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.titleView.mas_right).offset(2); + make.right.mas_equalTo(self.rankButton.mas_left).offset(-10); + make.height.mas_equalTo(30); + make.top.mas_equalTo(statusbarHeight + 14); }]; [self.rankButton mas_makeConstraints:^(MASConstraintMaker *make) { make.size.mas_equalTo(CGSizeMake(22, 22)); make.right.mas_equalTo(-14); - make.centerY.mas_equalTo(self.titleLabel); + make.centerY.mas_equalTo(self.searchTextField); }]; } +#pragma mark - UITextFieldDelegate +- (BOOL)textFieldShouldBeginEditing:(UITextField *)textField { + return NO; +} + #pragma mark - Event Response -- (void)searchButtonAction:(UIButton *)sender { - if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeNavView:didClickSearch:)]) { - [self.delegate xPHomeNavView:self didClickSearch:sender]; +- (void)didTapTextFieldRecognizer { + if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeNavViewDidClickSearch:)]) { + [self.delegate xPHomeNavViewDidClickSearch:self]; } } @@ -76,25 +84,30 @@ } #pragma mark - Getters And Setters -- (UIButton *)searchButton { - if (!_searchButton) { - _searchButton = [UIButton buttonWithType:UIButtonTypeCustom]; - [_searchButton setImage:[UIImage imageNamed:@"home_search"] forState:UIControlStateNormal]; - [_searchButton setImage:[UIImage imageNamed:@"home_search"] forState:UIControlStateSelected]; - [_searchButton addTarget:self action:@selector(searchButtonAction:) forControlEvents:UIControlEventTouchUpInside]; +- (UITextField *)searchTextField { + if (!_searchTextField) { + _searchTextField = [[UITextField alloc] init]; + _searchTextField.layer.cornerRadius = 15; + _searchTextField.layer.masksToBounds = YES; + _searchTextField.backgroundColor = [ThemeColor appCellBackgroundColor]; + _searchTextField.font = [UIFont systemFontOfSize:13]; + _searchTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"搜索昵称或ID" attributes:@{NSFontAttributeName : [UIFont systemFontOfSize:13], NSForegroundColorAttributeName : [ThemeColor textThirdColor]}]; + UIImageView *searchIcon = [[UIImageView alloc] init]; + searchIcon.image = [UIImage imageNamed:@"home_search_input_search"]; + searchIcon.frame = CGRectMake(11, 7, 16, 16); + searchIcon.contentMode = UIViewContentModeCenter; + UIView *searchIconView = [[UIView alloc] init]; + [searchIconView addSubview:searchIcon]; + searchIconView.frame = CGRectMake(0, 0, 34, 30); + _searchTextField.leftView = searchIconView; + _searchTextField.leftViewMode = UITextFieldViewModeAlways; + _searchTextField.clearButtonMode = UITextFieldViewModeWhileEditing; + _searchTextField.returnKeyType = UIReturnKeySearch; + _searchTextField.enablesReturnKeyAutomatically = YES; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(didTapTextFieldRecognizer)]; + [_searchTextField addGestureRecognizer:tap]; } - return _searchButton; -} - -- (UILabel *)titleLabel { - if (!_titleLabel) { - _titleLabel = [[UILabel alloc] init]; - _titleLabel.text = AppName; - _titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Bold" size:20]; - _titleLabel.textColor = [ThemeColor mainTextColor]; - _titleLabel.textAlignment = NSTextAlignmentCenter; - } - return _titleLabel; + return _searchTextField; } - (UIButton *)rankButton { @@ -106,4 +119,29 @@ } return _rankButton; } + +- (JXCategoryTitleView *)titleView { + if (!_titleView) { + _titleView = [[JXCategoryTitleView alloc] initWithFrame:CGRectZero]; + _titleView.backgroundColor =[UIColor clearColor]; + _titleView.titleColor = UIColorFromRGB(0x444444); + _titleView.titleSelectedColor = [ThemeColor mainTextColor]; + _titleView.titleFont = [UIFont systemFontOfSize:20 weight:UIFontWeightSemibold]; + _titleView.titleSelectedFont = [UIFont systemFontOfSize:24 weight:UIFontWeightHeavy]; + _titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter; + _titleView.contentScrollViewClickTransitionAnimationEnabled = NO; + _titleView.averageCellSpacingEnabled = NO; + _titleView.defaultSelectedIndex = 0; + _titleView.cellSpacing = 20; + + JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init]; + lineView.indicatorWidth = 48; + lineView.indicatorHeight = 12; + lineView.indicatorCornerRadius = 7; + lineView.verticalMargin = 5; + lineView.indicatorImageView.image = [UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFFD15A), UIColorFromRGB(0xFFC000)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(48, 12)]; + _titleView.indicators = @[lineView]; + } + return _titleView; +} @end diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.h b/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.h new file mode 100644 index 00000000..aa119aff --- /dev/null +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.h @@ -0,0 +1,16 @@ +// +// XPHomeRecommendHeadView.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeRecommendHeadView : UIView + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.m b/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.m new file mode 100644 index 00000000..2e6db81f --- /dev/null +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeadView.m @@ -0,0 +1,38 @@ +// +// XPHomeRecommendHeadView.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "XPHomeRecommendHeadView.h" + +@interface XPHomeRecommendHeadView () +///列表 +@property (nonatomic,strong) UITableView *tableView; +@end + +@implementation XPHomeRecommendHeadView + +- (instancetype)initWithFrame:(CGRect)frame { + if (self= [super initWithFrame:frame]) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + +} + +- (void)initSubViewConstraints { + +} + +#pragma mark - Getters And Setters + + + +@end diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h b/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h new file mode 100644 index 00000000..e3950ca0 --- /dev/null +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h @@ -0,0 +1,22 @@ +// +// XPHomeSectionView.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeSectionView : UIView +///显示标题 +@property (nonatomic,copy) NSString *title; +///显示图片的名称 +@property (nonatomic,copy) NSString *imageName; +///是否隐藏logo +@property (nonatomic,assign) BOOL isHiddenLogo; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.m b/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.m new file mode 100644 index 00000000..92b3124b --- /dev/null +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.m @@ -0,0 +1,148 @@ +// +// XPHomeSectionView.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "XPHomeSectionView.h" +///Third +#import +///Tool +#import "ThemeColor+Home.h" + +@interface XPHomeSectionView () +///标志的容器 +@property (nonatomic,strong) UIStackView *logoStackView; +///显示图片 +@property (nonatomic,strong) UIImageView *logoImageView; +///显示标题 +@property (nonatomic,strong) UILabel *titleLabel; +///更多的容器 +@property (nonatomic,strong) UIStackView *moreStackView; +///更多 +@property (nonatomic,strong) UILabel *moreLabel; +///箭头 +@property (nonatomic,strong) UIImageView *arrowImageView; +@end + +@implementation XPHomeSectionView +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + if (self) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self addSubview:self.logoStackView]; + [self addSubview:self.moreStackView]; + + [self.logoStackView addArrangedSubview:self.logoImageView]; + [self.logoStackView addArrangedSubview:self.titleLabel]; + [self.moreStackView addArrangedSubview:self.moreLabel]; + [self.moreStackView addArrangedSubview:self.arrowImageView]; +} + +- (void)initSubViewConstraints { + [self.logoStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self).offset(15); + make.centerY.mas_equalTo(self); + }]; + + [self.logoImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(20, 20)); + }]; + + [self.moreStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self).offset(-15); + make.centerY.mas_equalTo(self); + }]; + + [self.arrowImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(6, 10)); + }]; +} + +#pragma mark - Getters And Setters +- (void)setImageName:(NSString *)imageName { + _imageName = imageName; + if (_imageName.length > 0) { + self.logoImageView.image = [UIImage imageNamed:_imageName]; + } +} + +- (void)setTitle:(NSString *)title { + _title = title; + if (_title.length > 0) { + self.titleLabel.text = _title; + } +} + +- (void)setIsHiddenLogo:(BOOL)isHiddenLogo { + _isHiddenLogo = isHiddenLogo; + self.logoImageView.hidden = isHiddenLogo; +} + +- (UIStackView *)logoStackView { + if (!_logoStackView) { + _logoStackView = [[UIStackView alloc] init]; + _logoStackView.axis = UILayoutConstraintAxisHorizontal; + _logoStackView.distribution = UIStackViewDistributionFill; + _logoStackView.alignment = UIStackViewAlignmentCenter; + _logoStackView.spacing = 2; + } + return _logoStackView; +} + +- (UIStackView *)moreStackView { + if (!_moreStackView) { + _moreStackView = [[UIStackView alloc] init]; + _moreStackView.axis = UILayoutConstraintAxisHorizontal; + _moreStackView.distribution = UIStackViewDistributionFill; + _moreStackView.alignment = UIStackViewAlignmentCenter; + _moreStackView.spacing = 2; + } + return _moreStackView; +} + +- (UILabel *)moreLabel { + if (!_moreLabel) { + _moreLabel = [[UILabel alloc] init]; + _moreLabel.text = @"更多"; + _moreLabel.font = [UIFont systemFontOfSize:12]; + _moreLabel.textColor = [ThemeColor textThirdColor]; + } + return _moreLabel; +} + +- (UIImageView *)arrowImageView { + if (!_arrowImageView) { + _arrowImageView = [[UIImageView alloc] init]; + _arrowImageView.userInteractionEnabled = YES; + _arrowImageView.image = [UIImage imageNamed:@"home_recommend_room_more"]; + } + return _arrowImageView; +} + +- (UIImageView *)logoImageView { + if (!_logoImageView) { + _logoImageView = [[UIImageView alloc] init]; + } + return _logoImageView; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightSemibold]; + _titleLabel.textColor = [ThemeColor mainTextColor]; + } + return _titleLabel; +} + + +@end diff --git a/xplan-ios/Main/Home/View/XPHomeContainerViewController.h b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.h similarity index 53% rename from xplan-ios/Main/Home/View/XPHomeContainerViewController.h rename to xplan-ios/Main/Home/View/XPHomePartyContainerViewController.h index 7156ced3..e6f6f35a 100644 --- a/xplan-ios/Main/Home/View/XPHomeContainerViewController.h +++ b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.h @@ -6,10 +6,10 @@ // #import "MvpViewController.h" - +#import NS_ASSUME_NONNULL_BEGIN -@interface XPHomeContainerViewController : MvpViewController +@interface XPHomePartyContainerViewController : MvpViewController @end diff --git a/xplan-ios/Main/Home/View/XPHomeContainerViewController.m b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.m similarity index 58% rename from xplan-ios/Main/Home/View/XPHomeContainerViewController.m rename to xplan-ios/Main/Home/View/XPHomePartyContainerViewController.m index f4770229..43a46c66 100644 --- a/xplan-ios/Main/Home/View/XPHomeContainerViewController.m +++ b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.m @@ -5,7 +5,7 @@ // Created by 冯硕 on 2021/12/2. // -#import "XPHomeContainerViewController.h" +#import "XPHomePartyContainerViewController.h" ///Third #import #import @@ -17,22 +17,15 @@ ///Model #import "HomeTagModel.h" ///View -#import "XPHomeNavView.h" #import "XPRoomSearchContainerViewController.h" -#import "XPHomeViewController.h" +#import "XPHomePartyViewController.h" #import "XPWebViewController.h" ///P #import "XPHomeContainerPresenter.h" #import "XPHomeContainerProtocol.h" -@interface XPHomeContainerViewController () -///背景 -@property (nonatomic,strong) UIImageView *backImageView; -///导航栏 -@property (nonatomic,strong) XPHomeNavView *navView; -///背景图 -@property (nonatomic,strong) UIView * backView; +@interface XPHomePartyContainerViewController () ///分页标题 @property (nonatomic, strong) NSArray *titles; ///分页控件 @@ -42,10 +35,10 @@ ///tag的列表 @property (nonatomic,copy) NSArray *tagList; ///刷新的话 会重新走一次init的方法 -@property (nonatomic, strong) NSMutableDictionary *> *listCache; +@property (nonatomic, strong) NSMutableDictionary *> *listCache; @end -@implementation XPHomeContainerViewController +@implementation XPHomePartyContainerViewController - (BOOL)isHiddenNavBar { return YES; @@ -63,37 +56,20 @@ #pragma mark - Private Method - (void)initSubViews { - [self.view addSubview:self.backImageView]; - [self.view addSubview:self.navView]; - [self.view addSubview:self.backView]; - [self.backView addSubview:self.titleView]; - [self.backView addSubview:self.contentView]; + self.view.backgroundColor = [UIColor clearColor]; + [self.view addSubview:self.titleView]; + [self.view addSubview:self.contentView]; } - (void)initSubViewConstraints { - [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.top.right.mas_equalTo(self.view); - make.height.mas_equalTo(336); - }]; - - [self.navView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.top.mas_equalTo(self.view); - make.height.mas_equalTo(kNavigationHeight + 10); - }]; - - [self.backView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.bottom.mas_equalTo(self.view); - make.top.mas_equalTo(self.navView.mas_bottom).offset(-10); - }]; - [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.top.mas_equalTo(self.backView); + make.left.right.top.mas_equalTo(self.view); make.height.mas_equalTo(50); }]; [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(self.titleView.mas_bottom).offset(10); - make.left.right.bottom.mas_equalTo(self.backView); + make.left.right.bottom.mas_equalTo(self.view); }]; } @@ -108,11 +84,11 @@ - (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { HomeTagModel * hometag = [self.tagList objectAtIndex:index]; - XPHomeViewController * list = _listCache[hometag.tid]; + XPHomePartyViewController * list = _listCache[hometag.tid]; if (list) { return list; } else { - XPHomeViewController * homeVC = [[XPHomeViewController alloc] init]; + XPHomePartyViewController * homeVC = [[XPHomePartyViewController alloc] init]; homeVC.tabId = hometag.tid; //①自己缓存已经初始化的列表 _listCache[hometag.tid] = homeVC; @@ -122,10 +98,15 @@ - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index { HomeTagModel * hometag = [self.tagList objectAtIndex:index]; - XPHomeViewController * list = _listCache[hometag.tid]; + XPHomePartyViewController * list = _listCache[hometag.tid]; list.tabId = hometag.tid; } +#pragma mark - JXCategoryListContentViewDelegate +- (UIView *)listView { + return self.view; +} + #pragma mark - XPHomeContainerProtocol - (void)getHomeTagListSuccess:(NSArray *)array { self.tagList = array; @@ -140,25 +121,13 @@ [self.titleView reloadData]; } -#pragma mark - XPHoneNavViewDelegate -- (void)xPHomeNavView:(XPHomeNavView *)view didClickSearch:(UIButton *)sender { - XPRoomSearchContainerViewController * searchVC = [[XPRoomSearchContainerViewController alloc] init]; - searchVC.modalPresentationStyle = UIModalPresentationFullScreen; - [self.navigationController presentViewController:searchVC animated:YES completion:nil]; -} - -- (void)xPHomeNavView:(XPHomeNavView *)view didClickRank:(UIButton *)sender { - XPWebViewController * webVC =[[XPWebViewController alloc] init]; - webVC.url = URLWithType(kHomeRankURL); - [self.navigationController pushViewController:webVC animated:YES]; -} - #pragma mark - Getters And Setters - (JXCategoryTitleView *)titleView { if (!_titleView) { _titleView = [[JXCategoryTitleView alloc] init]; _titleView.delegate = self; _titleView.titles = self.titles; + _titleView.backgroundColor = [UIColor clearColor]; _titleView.titleColor = [ThemeColor secondTextColor]; _titleView.titleSelectedColor = [ThemeColor mainTextColor]; _titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:13]; @@ -178,32 +147,4 @@ } return _contentView; } - -- (UIView *)backView { - if (!_backView) { - _backView = [[UIView alloc] init]; - _backView.backgroundColor = [ThemeColor appBackgroundColor]; - _backView.layer.masksToBounds = YES; - _backView.layer.cornerRadius = 15; - } - return _backView; -} -- (XPHomeNavView *)navView { - if (!_navView) { - _navView = [[XPHomeNavView alloc] init]; - _navView.delegate = self; - } - return _navView; -} - -- (UIImageView *)backImageView { - if (!_backImageView) { - _backImageView = [[UIImageView alloc] init]; - _backImageView.userInteractionEnabled = YES; - _backImageView.image = [UIImage imageNamed:@"home_nav_background"]; - } - return _backImageView; -} - - @end diff --git a/xplan-ios/Main/Home/View/XPHomePartyViewController.h b/xplan-ios/Main/Home/View/XPHomePartyViewController.h new file mode 100644 index 00000000..29ca641a --- /dev/null +++ b/xplan-ios/Main/Home/View/XPHomePartyViewController.h @@ -0,0 +1,18 @@ +// +// XPHomeViewController.h +// xplan-ios +// +// Created by 冯硕 on 2021/11/29. +// + +#import "MvpViewController.h" +#import +NS_ASSUME_NONNULL_BEGIN + + +@interface XPHomePartyViewController : MvpViewController +///模块的 ID +@property (nonatomic,copy) NSString *tabId; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/XPHomePartyViewController.m b/xplan-ios/Main/Home/View/XPHomePartyViewController.m new file mode 100644 index 00000000..a13336d0 --- /dev/null +++ b/xplan-ios/Main/Home/View/XPHomePartyViewController.m @@ -0,0 +1,180 @@ +// +// XPHomeViewController.m +// xplan-ios +// +// Created by 冯硕 on 2021/11/29. +// + +#import "XPHomePartyViewController.h" +///Third +#import +#import +///Tool +#import "XPMacro.h" +#import "ThemeColor.h" +///Model +#import "HomeRecommendRoomModel.h" +///View +#import "XPHomeListCollectionViewCell.h" +#import "XPHomeListEmptyCollectionViewCell.h" +///P +#import "XPHomePresenter.h" +#import "XPHomeProtocol.h" +///VC +#import "XPRoomViewController.h" + +@interface XPHomePartyViewController () +///数据源 +@property (nonatomic,strong) NSMutableArray *datasource; +///列表 +@property (nonatomic,strong) UICollectionView *collectionView; +///当前的页数 +@property (nonatomic,assign) int page; +///没有新的数据了 +@property (nonatomic,assign) BOOL hasNoMoreData; +@end + +@implementation XPHomePartyViewController + +- (BOOL)isHiddenNavBar { + return YES; +} + +- (XPHomePresenter *)createPresenter { + return [[XPHomePresenter alloc] init]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [self initHeaderAndFooterRrfresh]; + [self initSubViews]; + [self initSubViewConstraints]; +} +#pragma mark - Private Method +- (void)initSubViews { + self.view.backgroundColor = [UIColor clearColor]; + [self.view addSubview:self.collectionView]; +} + +- (void)initSubViewConstraints { + [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.view); + }]; +} + + +- (void)initHeaderAndFooterRrfresh { + MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)]; + header.stateLabel.font = [UIFont systemFontOfSize:10.0]; + header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0]; + header.stateLabel.textColor = [ThemeColor secondTextColor]; + header.lastUpdatedTimeLabel.textColor = [ThemeColor secondTextColor]; + self.collectionView.mj_header = header; + + MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)]; + footer.stateLabel.textColor = [ThemeColor secondTextColor]; + footer.stateLabel.font = [UIFont systemFontOfSize:10.0]; + self.collectionView.mj_footer = footer; +} + +#pragma mark - 刷新的fangfa +- (void)headerRefresh { + self.page = 1; + [self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:NO]; +} + +- (void)footerRefresh { + if (self.hasNoMoreData) { + [self showErrorToast:@"没有更多房间了"]; + return; + } + self.page++; + [self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:YES]; +} + +#pragma mark - UICollectionViewDataSource +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.datasource.count > 0 ? self.datasource.count : 1; +} + +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + if (self.datasource.count > 0) { + XPHomeListCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class]) forIndexPath:indexPath]; + HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item]; + cell.roomModel = model; + return cell; + } + + XPHomeListEmptyCollectionViewCell * emptyCell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class]) forIndexPath:indexPath]; + return emptyCell; + +} +#pragma mark - UICollectionViewDelegate +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; + if (self.datasource.count > 0) { + HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item]; + [XPRoomViewController openRoom:model.roomUid viewController:self]; + } +} + +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { + if (self.datasource.count <= 0) { + return CGSizeMake(KScreenWidth, KScreenHeight- kNavigationHeight - 49 - 20); + } + return CGSizeMake((KScreenWidth - 15 * 3) / 2, 157 + 36); +} +#pragma mark - XPHomeProtocol +- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state { + if (state == 0) { + [self.datasource removeAllObjects]; + [self.collectionView.mj_header endRefreshing]; + } else { + [self.collectionView.mj_footer endRefreshing]; + } + if (list.count > 0) { + self.hasNoMoreData = NO; + [self.datasource addObjectsFromArray:list]; + } else { + self.hasNoMoreData = YES; + [self.collectionView.mj_footer endRefreshingWithNoMoreData]; + } + [self.collectionView reloadData]; +} +#pragma mark - JXCategoryListContentViewDelegate +- (UIView *)listView { + return self.view; +} +#pragma mark - Getters And Setters +- (void)setTabId:(NSString *)tabId { + _tabId = tabId; + [self headerRefresh]; +} + + +- (UICollectionView *)collectionView{ + if (!_collectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + + layout.minimumLineSpacing = 0; + layout.minimumInteritemSpacing = 15; + layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15); + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _collectionView.dataSource = self; + _collectionView.delegate = self; + _collectionView.backgroundColor = [UIColor clearColor]; + [_collectionView registerClass:[XPHomeListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class])]; + [_collectionView registerClass:[XPHomeListEmptyCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class])]; + } + return _collectionView; +} + +- (NSMutableArray *)datasource { + if (!_datasource) { + _datasource = [NSMutableArray array]; + } + return _datasource; +} + + +@end diff --git a/xplan-ios/Main/Home/View/XPHomeRecommendViewController.h b/xplan-ios/Main/Home/View/XPHomeRecommendViewController.h new file mode 100644 index 00000000..51ad271e --- /dev/null +++ b/xplan-ios/Main/Home/View/XPHomeRecommendViewController.h @@ -0,0 +1,16 @@ +// +// XPHomeRecommendViewController.h +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "MvpViewController.h" +#import +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeRecommendViewController : MvpViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/XPHomeRecommendViewController.m b/xplan-ios/Main/Home/View/XPHomeRecommendViewController.m new file mode 100644 index 00000000..b97132fb --- /dev/null +++ b/xplan-ios/Main/Home/View/XPHomeRecommendViewController.m @@ -0,0 +1,249 @@ +// +// XPHomeRecommendViewController.m +// xplan-ios +// +// Created by 冯硕 on 2022/2/21. +// + +#import "XPHomeRecommendViewController.h" +///Third +#import +///Tool +#import "XPMacro.h" +///View +#import "XPHomeBannerTableViewCell.h" +#import "XPHomeMenuTableViewCell.h" +#import "XPHomeRecommendTableViewCell.h" +#import "XPHomeHotRoomTableViewCell.h" +#import "XPHomeSectionView.h" +///Model +#import "HomeMenuInfoModel.h" +#import "HomeBannerInfoModel.h" +#import "HomeRecommendRoomModel.h" +///P +#import "XPHomeRecommendPresenter.h" +#import "XPHomeRecommendProtocol.h" +///VC +#import "XPWebViewController.h" +#import "XPRoomViewController.h" +@interface XPHomeRecommendViewController () +///列表 +@property (nonatomic,strong) UITableView *tableView; +///菜单列表 +@property (nonatomic,strong) NSArray *menuList; +///轮播图 +@property (nonatomic,strong) NSArray *bannerList; +///推荐房 +@property (nonatomic,strong) NSArray *recommendList; +///热门房 +@property (nonatomic,strong) NSArray *hotRoomList; + +@end + +@implementation XPHomeRecommendViewController +- (XPHomeRecommendPresenter *)createPresenter { + return [[XPHomeRecommendPresenter alloc] init]; +} +- (BOOL)isHiddenNavBar { + return YES; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + [self initHttpRequest]; + [self initSubViews]; + [self initSubViewConstraints]; +} +#pragma mark - InitHttp +- (void)initHttpRequest { + [self.presenter getHomeTopBannerList]; + [self.presenter getHomeMenuList]; + [self.presenter getHomeRecommendRoomList]; + [self.presenter getHomeHotRoomList]; +} + +#pragma mark - Private Method +- (void)initSubViews { + self.view.backgroundColor = [UIColor clearColor]; + [self.view addSubview:self.tableView]; +} + +- (void)initSubViewConstraints { + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self.view); + }]; +} +#pragma mark - UITableViewDelegate And UITableViewDataSource +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + return 4; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + if (section == 0) { + return self.bannerList.count >0 ? 1 : 0; + } else if(section == 1) { + return self.menuList.count > 0 ? 1 : 0; + } else if(section == 2) { + return self.recommendList.count > 0 ? 1 : 0; + } else if(section == 3) { + return self.hotRoomList.count > 0 ? 1 : 0; + } + return 0; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.section == 0) { + return 140; + } else if(indexPath.section == 1) { + return 60; + } else if(indexPath.section == 2) { + CGFloat itemHeight = (CGFloat)(KScreenWidth - 15 * 2 - 8 * 2 - 4) / (CGFloat)3 + 22; + return itemHeight * 2 + 16; + } else if(indexPath.section == 3) { + return 96; + } + return 0; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + if (section == 2) { + return self.recommendList.count > 0 ? 38 : 0; + } else if(section == 3) { + return self.hotRoomList.count > 0 ? 38 : 0; + } + return 0; +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + if (section == 2) { + XPHomeSectionView * sectionView = [[XPHomeSectionView alloc] init]; + sectionView.frame = CGRectMake(0, 0, KScreenWidth, 38); + sectionView.imageName = @"home_recommend_section_logo"; + sectionView.title = @"最新推荐"; + return sectionView; + } else if (section == 3) { + XPHomeSectionView * sectionView = [[XPHomeSectionView alloc] init]; + sectionView.frame = CGRectMake(0, 0, KScreenWidth, 38); + sectionView.isHiddenLogo = YES; + sectionView.title = @"人气主播"; + return sectionView; + } + return [UIView new]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.section == 0) { + XPHomeBannerTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])]; + if (cell == nil) { + cell = [[XPHomeBannerTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])]; + } + cell.delegate = self; + cell.bannerList = self.bannerList; + return cell; + } else if(indexPath.section == 1) { + XPHomeMenuTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeMenuTableViewCell class])]; + if (cell == nil) { + cell = [[XPHomeMenuTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeMenuTableViewCell class])]; + } + cell.delegate = self; + cell.menuList = self.menuList; + return cell; + } else if(indexPath.section == 2) { + XPHomeRecommendTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeRecommendTableViewCell class])]; + if (cell == nil) { + cell = [[XPHomeRecommendTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeRecommendTableViewCell class])]; + } + cell.recommendList = self.recommendList; + return cell; + } else { + XPHomeHotRoomTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeHotRoomTableViewCell class])]; + if (cell == nil) { + cell = [[XPHomeHotRoomTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeHotRoomTableViewCell class])]; + } + cell.hotAnchorList = self.hotRoomList; + return cell; + } +} +#pragma mark - XPHomeRecommendProtocol +- (void)getHomeMenuListSuccess:(NSArray *)list { + self.menuList = list; + [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:1] withRowAnimation:UITableViewRowAnimationNone]; +} + +- (void)getHomeTopBannerListSuccess:(NSArray *)list { + self.bannerList = list; + [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:0] withRowAnimation:UITableViewRowAnimationNone]; +} + +- (void)getHomeRecommendRoomListSuccess:(NSArray *)list { + self.recommendList = list; + [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:2] withRowAnimation:UITableViewRowAnimationNone]; + + [self getHomeHotRoomListSuccess:list]; +} + +- (void)getHomeHotRoomListSuccess:(NSArray *)list { + self.hotRoomList = list; + [self.tableView reloadSections:[NSIndexSet indexSetWithIndex:3] withRowAnimation:UITableViewRowAnimationNone]; +} + +#pragma mark - XPHomeMenuTableViewCellDelegate +- (void)xPHomeMenuTableViewCell:(XPHomeMenuTableViewCell *)view didClickMenuInfo:(HomeMenuInfoModel *)info { + if (info.resourceType == HomeMenuResourceType_H5) { + XPWebViewController * webVC = [[ XPWebViewController alloc] init]; + webVC.url = info.resourceContent; + [self.navigationController pushViewController:webVC animated:YES]; + } else { + if (info.hid.length > 0) { + [XPRoomViewController openRoom:info.hid viewController:self]; + } + } +} + +#pragma mark - XPHomeBannerTableViewCellDelegate +- (void)xPHomeBannerTableViewCell:(XPHomeBannerTableViewCell *)view didClickBanner:(HomeBannerInfoModel *)info { + switch (info.skipType) { + case HomeBannerInfoSkipType_Room: + { + if (info.skipUri.length > 0) { + [XPRoomViewController openRoom:info.skipUri viewController:self]; + } + } + break; + case HomeBannerInfoSkipType_Web: + { + XPWebViewController *vc = [[XPWebViewController alloc]init]; + vc.url = info.skipUri; + [self.navigationController pushViewController:vc animated:YES]; + } + break; + default: + break; + } +} + +#pragma mark - JXCategoryListContentViewDelegate +- (UIView *)listView { + return self.view; +} +#pragma mark - Getters And Setters +- (UITableView *)tableView { + if (!_tableView) { + _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStylePlain]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.tableFooterView = [UIView new]; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _tableView.backgroundColor = [UIColor clearColor]; + if (@available(iOS 11.0, *)) { + _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + [_tableView registerClass:[XPHomeBannerTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeBannerTableViewCell class])]; + [_tableView registerClass:[XPHomeMenuTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeMenuTableViewCell class])]; + [_tableView registerClass:[XPHomeRecommendTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeRecommendTableViewCell class])]; + [_tableView registerClass:[XPHomeHotRoomTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeHotRoomTableViewCell class])]; + } + return _tableView; +} + +@end diff --git a/xplan-ios/Main/Home/View/XPHomeViewController.h b/xplan-ios/Main/Home/View/XPHomeViewController.h index fd7a681f..a7f3b8ec 100644 --- a/xplan-ios/Main/Home/View/XPHomeViewController.h +++ b/xplan-ios/Main/Home/View/XPHomeViewController.h @@ -2,17 +2,15 @@ // XPHomeViewController.h // xplan-ios // -// Created by 冯硕 on 2021/11/29. +// Created by 冯硕 on 2022/2/21. // -#import "MvpViewController.h" -#import +#import "BaseViewController.h" + NS_ASSUME_NONNULL_BEGIN +@interface XPHomeViewController : BaseViewController -@interface XPHomeViewController : MvpViewController -///模块的 ID -@property (nonatomic,copy) NSString *tabId; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/XPHomeViewController.m b/xplan-ios/Main/Home/View/XPHomeViewController.m index bbc53179..0476fb78 100644 --- a/xplan-ios/Main/Home/View/XPHomeViewController.m +++ b/xplan-ios/Main/Home/View/XPHomeViewController.m @@ -2,36 +2,32 @@ // XPHomeViewController.m // xplan-ios // -// Created by 冯硕 on 2021/11/29. +// Created by 冯硕 on 2022/2/21. // #import "XPHomeViewController.h" ///Third #import -#import +#import ///Tool +#import "ThemeColor+Home.h" #import "XPMacro.h" -#import "ThemeColor.h" -///Model -#import "HomeRecommendRoomModel.h" +#import "XPHtmlURL.h" ///View -#import "XPHomeListCollectionViewCell.h" -#import "XPHomeListEmptyCollectionViewCell.h" -///P -#import "XPHomePresenter.h" -#import "XPHomeProtocol.h" -///VC -#import "XPRoomViewController.h" +#import "XPHomeNavView.h" +#import "XPHomeRecommendViewController.h" +#import "XPRoomSearchContainerViewController.h" +#import "XPHomePartyContainerViewController.h" +#import "XPWebViewController.h" -@interface XPHomeViewController () -///数据源 -@property (nonatomic,strong) NSMutableArray *datasource; -///列表 -@property (nonatomic,strong) UICollectionView *collectionView; -///当前的页数 -@property (nonatomic,assign) int page; -///没有新的数据了 -@property (nonatomic,assign) BOOL hasNoMoreData; +@interface XPHomeViewController () +///标题 +@property (nonatomic,strong) NSArray *titles; +@property (nonatomic, strong) JXCategoryListContainerView *listContainerView; +///背景 +@property (nonatomic,strong) UIImageView *topBackImageView; +///导航栏 +@property (nonatomic,strong) XPHomeNavView *homeNavView; @end @implementation XPHomeViewController @@ -40,141 +36,101 @@ return YES; } -- (XPHomePresenter *)createPresenter { - return [[XPHomePresenter alloc] init]; -} - - (void)viewDidLoad { [super viewDidLoad]; - [self initHeaderAndFooterRrfresh]; [self initSubViews]; [self initSubViewConstraints]; } + #pragma mark - Private Method - (void)initSubViews { - self.view.backgroundColor = [UIColor clearColor]; - [self.view addSubview:self.collectionView]; + [self.view addSubview:self.topBackImageView]; + [self.view addSubview:self.homeNavView]; + [self.view addSubview:self.listContainerView]; + + self.homeNavView.titleView.titles = self.titles; + self.homeNavView.titleView.delegate = self; + self.homeNavView.titleView.listContainer = self.listContainerView; + [self.homeNavView.titleView reloadData]; } - (void)initSubViewConstraints { - [self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.mas_equalTo(self.view); + [self.topBackImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.top.right.mas_equalTo(self.view); + make.height.mas_equalTo(336); + }]; + + [self.homeNavView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self.view); + make.height.mas_equalTo(kNavigationHeight); + }]; + + [self.listContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.view); + make.top.mas_equalTo(self.homeNavView.mas_bottom); }]; } - -- (void)initHeaderAndFooterRrfresh { - MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingTarget:self refreshingAction:@selector(headerRefresh)]; - header.stateLabel.font = [UIFont systemFontOfSize:10.0]; - header.lastUpdatedTimeLabel.font = [UIFont systemFontOfSize:10.0]; - header.stateLabel.textColor = [ThemeColor secondTextColor]; - header.lastUpdatedTimeLabel.textColor = [ThemeColor secondTextColor]; - self.collectionView.mj_header = header; - - MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)]; - footer.stateLabel.textColor = [ThemeColor secondTextColor]; - footer.stateLabel.font = [UIFont systemFontOfSize:10.0]; - self.collectionView.mj_footer = footer; +#pragma mark - JXCategoryListContainerViewDelegate +- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView { + return self.titles.count; } -#pragma mark - 刷新的fangfa -- (void)headerRefresh { - self.page = 1; - [self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:NO]; +// 根据下标 index 返回对应遵守并实现 `JXCategoryListContentViewDelegate` 协议的列表实例 +- (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { + if (index == 0) { + return [[XPHomeRecommendViewController alloc] init]; + }else if (index == 1) { + return [[XPHomePartyContainerViewController alloc] init]; + } + return nil; } -- (void)footerRefresh { - if (self.hasNoMoreData) { - [self showErrorToast:@"没有更多房间了"]; - return; - } - self.page++; - [self.presenter getRecommendRoomList:self.tabId page:self.page pageSize:20 state:YES]; +#pragma mark - XPHoneNavViewDelegate +- (void)xPHomeNavViewDidClickSearch:(XPHomeNavView *)view { + XPRoomSearchContainerViewController * searchVC = [[XPRoomSearchContainerViewController alloc] init]; + searchVC.modalPresentationStyle = UIModalPresentationFullScreen; + [self.navigationController presentViewController:searchVC animated:YES completion:nil]; } -#pragma mark - UICollectionViewDataSource -- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { - return self.datasource.count > 0 ? self.datasource.count : 1; -} - -- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { - if (self.datasource.count > 0) { - XPHomeListCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class]) forIndexPath:indexPath]; - HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item]; - cell.roomModel = model; - return cell; - } - - XPHomeListEmptyCollectionViewCell * emptyCell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class]) forIndexPath:indexPath]; - return emptyCell; - -} -#pragma mark - UICollectionViewDelegate -- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { - [collectionView deselectItemAtIndexPath:indexPath animated:YES]; - if (self.datasource.count > 0) { - HomeRecommendRoomModel * model = [self.datasource objectAtIndex:indexPath.item]; - [XPRoomViewController openRoom:model.roomUid viewController:self]; - } -} - -- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout *)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath { - if (self.datasource.count <= 0) { - return CGSizeMake(KScreenWidth, KScreenHeight- kNavigationHeight - 49 - 20); - } - return CGSizeMake((KScreenWidth - 15 * 3) / 2, 157 + 36); -} -#pragma mark - XPHomeProtocol -- (void)getHomeRecommendRoomListSuccess:(NSArray *)list state:(BOOL)state { - if (state == 0) { - [self.datasource removeAllObjects]; - [self.collectionView.mj_header endRefreshing]; - } else { - [self.collectionView.mj_footer endRefreshing]; - } - if (list.count > 0) { - self.hasNoMoreData = NO; - [self.datasource addObjectsFromArray:list]; - } else { - self.hasNoMoreData = YES; - [self.collectionView.mj_footer endRefreshingWithNoMoreData]; - } - [self.collectionView reloadData]; -} -#pragma mark - JXCategoryListContentViewDelegate -- (UIView *)listView { - return self.view; +- (void)xPHomeNavView:(XPHomeNavView *)view didClickRank:(UIButton *)sender { + XPWebViewController * webVC =[[XPWebViewController alloc] init]; + webVC.url = URLWithType(kHomeRankURL); + [self.navigationController pushViewController:webVC animated:YES]; } #pragma mark - Getters And Setters -- (void)setTabId:(NSString *)tabId { - _tabId = tabId; - [self headerRefresh]; -} - - -- (UICollectionView *)collectionView{ - if (!_collectionView) { - UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; - - layout.minimumLineSpacing = 0; - layout.minimumInteritemSpacing = 15; - layout.sectionInset = UIEdgeInsetsMake(0, 15, 0, 15); - _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; - _collectionView.dataSource = self; - _collectionView.delegate = self; - _collectionView.backgroundColor = [UIColor clearColor]; - [_collectionView registerClass:[XPHomeListCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListCollectionViewCell class])]; - [_collectionView registerClass:[XPHomeListEmptyCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeListEmptyCollectionViewCell class])]; +- (JXCategoryListContainerView *)listContainerView { + if (!_listContainerView) { + _listContainerView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self]; } - return _collectionView; + return _listContainerView; } -- (NSMutableArray *)datasource { - if (!_datasource) { - _datasource = [NSMutableArray array]; +- (XPHomeNavView *)homeNavView { + if (!_homeNavView) { + _homeNavView = [[XPHomeNavView alloc] init]; + _homeNavView.delegate = self; } - return _datasource; + return _homeNavView; } +- (UIImageView *)topBackImageView { + if (!_topBackImageView) { + _topBackImageView = [[UIImageView alloc] init]; + _topBackImageView.userInteractionEnabled = YES; + _topBackImageView.image = [UIImage imageNamed:@"home_nav_background"]; + } + return _topBackImageView; +} + +- (NSArray *)titles { + if (!_titles) { + _titles = @[@"推荐",@"派对"]; + } + return _titles; +} + + + @end diff --git a/xplan-ios/Main/Tabbar/TabbarViewController.m b/xplan-ios/Main/Tabbar/TabbarViewController.m index 6029f540..aa248239 100644 --- a/xplan-ios/Main/Tabbar/TabbarViewController.m +++ b/xplan-ios/Main/Tabbar/TabbarViewController.m @@ -34,7 +34,7 @@ #import "XplanFBFlutterViewContainer.h" #import "XPMineViewController.h" #import "SessionListViewController.h" -#import "XPHomeContainerViewController.h" +#import "XPHomeViewController.h" #import "XPMiniRoomView.h" #import "XPTeenagerAlertView.h" #import "XPRoomViewController.h" @@ -221,7 +221,7 @@ msg = [[SessionListViewController alloc] init]; me = [[XPMineViewController alloc] init]; - home = [[XPHomeContainerViewController alloc] init]; + home = [[XPHomeViewController alloc] init]; } else { game = [[BaseViewController alloc]init]; msg = [[SessionListViewController alloc]init];