From e784fee8dac168af44b30e64dd37fb9999cb3ee1 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Wed, 2 Mar 2022 19:18:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E6=B4=BE=E5=AF=B9=E9=87=8C?= =?UTF-8?q?=E9=9D=A2=E5=96=9C=E6=AC=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile.lock | 2 +- xplan-ios.xcodeproj/project.pbxproj | 44 +++ .../Assets.xcassets/Home/Note/Contents.json | 6 + .../home_note_00000.imageset/Contents.json | 21 + .../home_note_00000.png | Bin 0 -> 551 bytes .../home_note_00001.imageset/Contents.json | 21 + .../home_note_00001.png | Bin 0 -> 560 bytes .../home_note_00002.imageset/Contents.json | 21 + .../home_note_00002.png | Bin 0 -> 526 bytes .../home_note_00003.imageset/Contents.json | 21 + .../home_note_00003.png | Bin 0 -> 532 bytes .../home_note_00004.imageset/Contents.json | 21 + .../home_note_00004.png | Bin 0 -> 530 bytes .../home_note_00005.imageset/Contents.json | 21 + .../home_note_00005.png | Bin 0 -> 535 bytes .../home_note_00006.imageset/Contents.json | 21 + .../home_note_00006.png | Bin 0 -> 543 bytes .../home_note_00007.imageset/Contents.json | 21 + .../home_note_00007.png | Bin 0 -> 561 bytes .../home_note_00008.imageset/Contents.json | 21 + .../home_note_00008.png | Bin 0 -> 548 bytes .../home_note_00009.imageset/Contents.json | 21 + .../home_note_0009.png | Bin 0 -> 488 bytes .../home_note_00010.imageset/Contents.json | 21 + .../home_note_00010.png | Bin 0 -> 555 bytes .../home_note_00011.imageset/Contents.json | 21 + .../home_note_00011.png | Bin 0 -> 563 bytes .../Contents.json | 22 ++ .../home_like_across_pk_bg@2x.png | Bin 0 -> 748 bytes .../home_like_across_pk_bg@3x.png | Bin 0 -> 1769 bytes .../Contents.json | 22 ++ .../room_like_collect_room_hot@2x.png | Bin 0 -> 1024 bytes .../room_like_collect_room_hot@3x.png | Bin 0 -> 1785 bytes xplan-ios/Main/Home/Api/Api+Home.h | 12 + xplan-ios/Main/Home/Api/Api+Home.m | 19 +- .../Main/Home/Model/HomeCollectRoomModel.h | 33 ++ .../Main/Home/Model/HomeCollectRoomModel.m | 12 + xplan-ios/Main/Home/Model/HomeLiveRoomModel.h | 23 ++ xplan-ios/Main/Home/Model/HomeLiveRoomModel.m | 12 + .../Main/Home/Presenter/XPHomeLikePresenter.h | 20 + .../Main/Home/Presenter/XPHomeLikePresenter.m | 43 ++ .../Main/Home/Protocol/XPHomeLikeProtocol.h | 26 ++ .../Cell/XPHomeAttentionCollectionViewCell.h | 16 + .../Cell/XPHomeAttentionCollectionViewCell.m | 153 ++++++++ .../View/Cell/XPHomeAttentionTableViewCell.h | 23 ++ .../View/Cell/XPHomeAttentionTableViewCell.m | 86 ++++ .../Cell/XPHomeCollectRoomTableViewCell.h | 16 + .../Cell/XPHomeCollectRoomTableViewCell.m | 367 ++++++++++++++++++ .../Main/Home/View/SubViews/XPHomeNavView.m | 1 + .../View/SubViews/XPHomeRecommendHeaderView.m | 1 + .../Home/View/SubViews/XPHomeSectionView.h | 5 +- .../Home/View/SubViews/XPHomeSectionView.m | 11 +- .../Main/Home/View/XPHomeLikeViewController.h | 16 + .../Main/Home/View/XPHomeLikeViewController.m | 299 ++++++++++++++ .../View/XPHomePartyContainerViewController.h | 2 +- .../View/XPHomePartyContainerViewController.m | 73 +++- .../Main/Home/View/XPHomeViewController.m | 24 +- 57 files changed, 1619 insertions(+), 22 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Home/Note/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00000.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00000.imageset/home_note_00000.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00001.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00001.imageset/home_note_00001.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00002.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00002.imageset/home_note_00002.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00003.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00003.imageset/home_note_00003.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00004.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00004.imageset/home_note_00004.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00005.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00005.imageset/home_note_00005.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00006.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00006.imageset/home_note_00006.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00007.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00007.imageset/home_note_00007.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00008.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00008.imageset/home_note_00008.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00009.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00009.imageset/home_note_0009.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00010.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00010.imageset/home_note_00010.png create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00011.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/Note/home_note_00011.imageset/home_note_00011.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_like_across_pk_bg.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/home_like_across_pk_bg.imageset/home_like_across_pk_bg@2x.png create mode 100644 xplan-ios/Assets.xcassets/Home/home_like_across_pk_bg.imageset/home_like_across_pk_bg@3x.png create mode 100644 xplan-ios/Assets.xcassets/Home/room_like_collect_room_hot.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Home/room_like_collect_room_hot.imageset/room_like_collect_room_hot@2x.png create mode 100644 xplan-ios/Assets.xcassets/Home/room_like_collect_room_hot.imageset/room_like_collect_room_hot@3x.png create mode 100644 xplan-ios/Main/Home/Model/HomeCollectRoomModel.h create mode 100644 xplan-ios/Main/Home/Model/HomeCollectRoomModel.m create mode 100644 xplan-ios/Main/Home/Model/HomeLiveRoomModel.h create mode 100644 xplan-ios/Main/Home/Model/HomeLiveRoomModel.m create mode 100644 xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.h create mode 100644 xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.m create mode 100644 xplan-ios/Main/Home/Protocol/XPHomeLikeProtocol.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.m create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.m create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.h create mode 100644 xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.m create mode 100644 xplan-ios/Main/Home/View/XPHomeLikeViewController.h create mode 100644 xplan-ios/Main/Home/View/XPHomeLikeViewController.m diff --git a/Podfile.lock b/Podfile.lock index 8bf84631..5babd586 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -205,4 +205,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 8120dbc8eb506e124ccb97e8ce2ecf2420ac8b5f -COCOAPODS: 1.11.2 +COCOAPODS: 1.11.0 diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 9dc5dc9b..1987668d 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -334,6 +334,13 @@ E8A1E460276220DA00B294CA /* candyTree_banner.svga in Resources */ = {isa = PBXBuildFile; fileRef = E8A1E45D276220DA00B294CA /* candyTree_banner.svga */; }; E8A1E461276220DA00B294CA /* candyTree.svga in Resources */ = {isa = PBXBuildFile; fileRef = E8A1E45E276220DA00B294CA /* candyTree.svga */; }; E8A1E462276220DA00B294CA /* candyTree_light.svga in Resources */ = {isa = PBXBuildFile; fileRef = E8A1E45F276220DA00B294CA /* candyTree_light.svga */; }; + E8A6C28C27CF436300AC7442 /* XPHomeLikeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A6C28B27CF436300AC7442 /* XPHomeLikeViewController.m */; }; + E8A6C28F27CF43D600AC7442 /* XPHomeAttentionTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A6C28E27CF43D600AC7442 /* XPHomeAttentionTableViewCell.m */; }; + E8A6C29527CF441200AC7442 /* XPHomeAttentionCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A6C29427CF441200AC7442 /* XPHomeAttentionCollectionViewCell.m */; }; + E8A6C29827CF448700AC7442 /* XPHomeCollectRoomTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A6C29727CF448700AC7442 /* XPHomeCollectRoomTableViewCell.m */; }; + E8A6C29B27CF53BF00AC7442 /* XPHomeLikePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A6C29A27CF53BF00AC7442 /* XPHomeLikePresenter.m */; }; + E8A6C29F27CF5FE500AC7442 /* HomeLiveRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A6C29E27CF5FE500AC7442 /* HomeLiveRoomModel.m */; }; + E8A6C2A227CF856E00AC7442 /* HomeCollectRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A6C2A127CF856E00AC7442 /* HomeCollectRoomModel.m */; }; E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC720F26F43955007D6E91 /* UIImageConstant.m */; }; E8AC721326F46ADD007D6E91 /* XPMineSettingViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721226F46ADD007D6E91 /* XPMineSettingViewController.m */; }; E8AC721626F46B06007D6E91 /* XPMineSettingTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8AC721526F46B06007D6E91 /* XPMineSettingTableViewCell.m */; }; @@ -1102,6 +1109,21 @@ E8A1E45D276220DA00B294CA /* candyTree_banner.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree_banner.svga; sourceTree = ""; }; E8A1E45E276220DA00B294CA /* candyTree.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree.svga; sourceTree = ""; }; E8A1E45F276220DA00B294CA /* candyTree_light.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree_light.svga; sourceTree = ""; }; + E8A6C28A27CF436300AC7442 /* XPHomeLikeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeLikeViewController.h; sourceTree = ""; }; + E8A6C28B27CF436300AC7442 /* XPHomeLikeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeLikeViewController.m; sourceTree = ""; }; + E8A6C28D27CF43D600AC7442 /* XPHomeAttentionTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeAttentionTableViewCell.h; sourceTree = ""; }; + E8A6C28E27CF43D600AC7442 /* XPHomeAttentionTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeAttentionTableViewCell.m; sourceTree = ""; }; + E8A6C29327CF441200AC7442 /* XPHomeAttentionCollectionViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeAttentionCollectionViewCell.h; sourceTree = ""; }; + E8A6C29427CF441200AC7442 /* XPHomeAttentionCollectionViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeAttentionCollectionViewCell.m; sourceTree = ""; }; + E8A6C29627CF448700AC7442 /* XPHomeCollectRoomTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeCollectRoomTableViewCell.h; sourceTree = ""; }; + E8A6C29727CF448700AC7442 /* XPHomeCollectRoomTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeCollectRoomTableViewCell.m; sourceTree = ""; }; + E8A6C29927CF53BF00AC7442 /* XPHomeLikePresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeLikePresenter.h; sourceTree = ""; }; + E8A6C29A27CF53BF00AC7442 /* XPHomeLikePresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPHomeLikePresenter.m; sourceTree = ""; }; + E8A6C29C27CF53E100AC7442 /* XPHomeLikeProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPHomeLikeProtocol.h; sourceTree = ""; }; + E8A6C29D27CF5FE500AC7442 /* HomeLiveRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeLiveRoomModel.h; sourceTree = ""; }; + E8A6C29E27CF5FE500AC7442 /* HomeLiveRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeLiveRoomModel.m; sourceTree = ""; }; + E8A6C2A027CF856E00AC7442 /* HomeCollectRoomModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeCollectRoomModel.h; sourceTree = ""; }; + E8A6C2A127CF856E00AC7442 /* HomeCollectRoomModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeCollectRoomModel.m; sourceTree = ""; }; E8AC720E26F43955007D6E91 /* UIImageConstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIImageConstant.h; sourceTree = ""; }; E8AC720F26F43955007D6E91 /* UIImageConstant.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIImageConstant.m; sourceTree = ""; }; E8AC721126F46ADD007D6E91 /* XPMineSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingViewController.h; sourceTree = ""; }; @@ -3288,6 +3310,8 @@ E87A26F827587C62002DDC7A /* XPHomeContainerPresenter.m */, E8E5E1AD27C3920100F457D8 /* XPHomeRecommendPresenter.h */, E8E5E1AE27C3920100F457D8 /* XPHomeRecommendPresenter.m */, + E8A6C29927CF53BF00AC7442 /* XPHomeLikePresenter.h */, + E8A6C29A27CF53BF00AC7442 /* XPHomeLikePresenter.m */, ); path = Presenter; sourceTree = ""; @@ -3299,6 +3323,7 @@ E8C6FFE72754FE66004DC9F0 /* XPHomeSearchProtocol.h */, E87A26FA27587C83002DDC7A /* XPHomeContainerProtocol.h */, E8E5E1B027C3920E00F457D8 /* XPHomeRecommendProtocol.h */, + E8A6C29C27CF53E100AC7442 /* XPHomeLikeProtocol.h */, ); path = Protocol; sourceTree = ""; @@ -3318,6 +3343,10 @@ E8E5E1B227C397A400F457D8 /* HomeMenuInfoModel.m */, E8ACEFF027C8E8F000F66D1A /* HomePlayRoomModel.h */, E8ACEFF127C8E8F000F66D1A /* HomePlayRoomModel.m */, + E8A6C29D27CF5FE500AC7442 /* HomeLiveRoomModel.h */, + E8A6C29E27CF5FE500AC7442 /* HomeLiveRoomModel.m */, + E8A6C2A027CF856E00AC7442 /* HomeCollectRoomModel.h */, + E8A6C2A127CF856E00AC7442 /* HomeCollectRoomModel.m */, ); path = Model; sourceTree = ""; @@ -3329,6 +3358,8 @@ E8C6FFD12754AA6A004DC9F0 /* SubViews */, E8C6FFC627548120004DC9F0 /* XPHomePartyViewController.h */, E8C6FFC527548120004DC9F0 /* XPHomePartyViewController.m */, + E8A6C28A27CF436300AC7442 /* XPHomeLikeViewController.h */, + E8A6C28B27CF436300AC7442 /* XPHomeLikeViewController.m */, E87A26F427587C48002DDC7A /* XPHomePartyContainerViewController.h */, E87A26F527587C48002DDC7A /* XPHomePartyContainerViewController.m */, E8E5E18927C332EE00F457D8 /* XPHomeViewController.h */, @@ -3379,6 +3410,12 @@ E8E5E1A827C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m */, E8ACEFED27C8C45100F66D1A /* XPHomeHapppyRoomTableViewCell.h */, E8ACEFEE27C8C45100F66D1A /* XPHomeHapppyRoomTableViewCell.m */, + E8A6C28D27CF43D600AC7442 /* XPHomeAttentionTableViewCell.h */, + E8A6C28E27CF43D600AC7442 /* XPHomeAttentionTableViewCell.m */, + E8A6C29327CF441200AC7442 /* XPHomeAttentionCollectionViewCell.h */, + E8A6C29427CF441200AC7442 /* XPHomeAttentionCollectionViewCell.m */, + E8A6C29627CF448700AC7442 /* XPHomeCollectRoomTableViewCell.h */, + E8A6C29727CF448700AC7442 /* XPHomeCollectRoomTableViewCell.m */, ); path = Cell; sourceTree = ""; @@ -3882,6 +3919,7 @@ E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */, E8E5E19427C36BA600F457D8 /* XPHomeBannerTableViewCell.m in Sources */, E824543D26F58C3A00BE8163 /* XPLoginBindSuccessView.m in Sources */, + E8A6C29527CF441200AC7442 /* XPHomeAttentionCollectionViewCell.m in Sources */, E8EEB8F726FC2673007C6EBA /* UserPhoto.m in Sources */, E81C27A226EF23490031E639 /* XPEnum.h in Sources */, E88B5CB526FB20B800DA9178 /* XPMineTeenagerPwdView.m in Sources */, @@ -3893,6 +3931,7 @@ E81C1B1F27705F7A0020D1E4 /* XPArrangeMicViewController.m in Sources */, E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */, E824544E26F5BC1A00BE8163 /* XPMineModifPayPwdView.m in Sources */, + E8A6C2A227CF856E00AC7442 /* HomeCollectRoomModel.m in Sources */, E8A03DE22762FA000098D9EA /* XPCandyTreeMoreView.m in Sources */, E8B825CA26EA1231009E8E9F /* LoginVerifCodeViewController.m in Sources */, 189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */, @@ -3949,6 +3988,7 @@ E82325FC274E4735003A3332 /* XPUserCardItemModel.m in Sources */, E80DE4102775C34E00BE5BCB /* XPFirstRechargeSuccessView.m in Sources */, E8412FB32779E285006E1101 /* Api+RoomSetting.m in Sources */, + E8A6C29827CF448700AC7442 /* XPHomeCollectRoomTableViewCell.m in Sources */, E8EEB8F226FC2050007C6EBA /* SDPhotoBrowser.m in Sources */, E81C27AB26EF2D920031E639 /* ThirdUserInfo.m in Sources */, E8788950273A699900BF1D57 /* ThemeColor+SendGift.m in Sources */, @@ -3990,6 +4030,7 @@ 18F404C927609A4300A6C548 /* MessagePresenter.m in Sources */, E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */, 189DD68426E1FDBB00AB55B1 /* XCHUDTool.m in Sources */, + E8A6C29B27CF53BF00AC7442 /* XPHomeLikePresenter.m in Sources */, 189DD73F26E21C3F00AB55B1 /* YYUtility+Carrier.m in Sources */, E87AE7F9277AABE50037823A /* XPRoomTagListViewController.m in Sources */, 18E7B26926E8D5D60064BC9B /* XCCurrentVCStackManager.m in Sources */, @@ -4019,6 +4060,7 @@ E878893C273A54C300BF1D57 /* Api+Gift.m in Sources */, E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */, E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */, + E8A6C28F27CF43D600AC7442 /* XPHomeAttentionTableViewCell.m in Sources */, E8E5E19D27C36C3500F457D8 /* XPHomeMenuTableViewCell.m in Sources */, E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */, E81C27A026EEF83D0031E639 /* XPHtmlUrl.m in Sources */, @@ -4056,6 +4098,7 @@ E8680718271967B00024F48F /* MicroView.m in Sources */, E896EF942771AAC100AD2CC1 /* XPMineFansPresenter.m in Sources */, E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */, + E8A6C29F27CF5FE500AC7442 /* HomeLiveRoomModel.m in Sources */, E84150B827747B8B00A7F548 /* XPFirstRechargeViewController.m in Sources */, E88B5CBD26FB3BDF00DA9178 /* XPTeenagerAlertView.m in Sources */, E82D5C70276AE60000858D6D /* HeadwearModel.m in Sources */, @@ -4168,6 +4211,7 @@ 189DD74026E21C3F00AB55B1 /* YYUtility+App.m in Sources */, 189DD74526E21CCC00AB55B1 /* YYReachability.m in Sources */, E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */, + E8A6C28C27CF436300AC7442 /* XPHomeLikeViewController.m in Sources */, E8E70D8F26F2F5DB00F03460 /* XPMineMenuTableViewCell.m in Sources */, E8E5E1A927C3850400F457D8 /* XPHomeHotRoomCollectionViewCell.m in Sources */, 187EEEE126E89BFB002833B2 /* AccountModel.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Home/Note/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/Contents.json new file mode 100644 index 00000000..73c00596 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00000.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/home_note_00000.imageset/Contents.json new file mode 100644 index 00000000..bd0445e3 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/home_note_00000.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home_note_00000.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00000.imageset/home_note_00000.png b/xplan-ios/Assets.xcassets/Home/Note/home_note_00000.imageset/home_note_00000.png new file mode 100644 index 0000000000000000000000000000000000000000..9afa994bc00a10acd7d9c6a69ccc91a7bd1d9550 GIT binary patch literal 551 zcmeAS@N?(olHy`uVBq!ia0vp^20$#r!3-q-JoK9iq^1S!){+}+)vh~ajE33t} z_C_aj_RYL&%burbH_vU~J@30(H9J<^==di0WJMaAPL)cgbUd3&eFpmmp{X7p=520r zUXi(ybIv=9oTuFy(gzbdUM6TSE#dGu%Oc==*(dMBiaGYWXJ;;2u6Xw3wwX$=$9+n=M+jWqK z4Igg~uP{c;|N+?Gv*LlRtOp`p5jov7N7!?*(zm{|jI5wM3yre&6+eV7M}Py85}S Ib4q9e00svE@b7?s`*^TRAQQWi5qlzs{`pmAa_Lyt_Zx)=^jJ!3xW3Tj$3rihX|hWa;#j z@!{wbUvm98sM7$2(3OoDTeojN8+Z>}; zt>0o&$~JvY-MpLqouc{TJy!~6KDS-d-Kn%uv3s7W)=V`p}Z|FBvdN-jXoH3il%-LuL zTchDW>j&54eEvUYzEtzZcCu^WA9n`F`nB52UBsJa9RFWM%A+^u5e|(Teu#gwEdr PhAxArtDnm{r-UW|vP(&2 literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00002.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/home_note_00002.imageset/Contents.json new file mode 100644 index 00000000..e4a6fd93 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/home_note_00002.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home_note_00002.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00002.imageset/home_note_00002.png b/xplan-ios/Assets.xcassets/Home/Note/home_note_00002.imageset/home_note_00002.png new file mode 100644 index 0000000000000000000000000000000000000000..db6e2808e1cfd6284cc64d6cee18532bd3620601 GIT binary patch literal 526 zcmeAS@N?(olHy`uVBq!ia0vp^20$#r!3-q-JoK9iq#C4LU(-Pu|~4`YotES{bcAuI9e&4~%cp}u5Q# zdm(>^MvhlNUIppvDf1dT$^{#T!5KR zVut3~Q^p<}&ALctGw{U&PF}7%CP@HeiBBCgAm*LC$guj#L)zA86zTnm5%a1os z5-OLIkPfQnUB@x|pHR#vV++q-C9@st)~pYFUHC-7$LInp&-AMvk1MqQZL6768^&~H qndv9VfXS2BN9B8(O#HCv7nA*Vg{SIP5F1%Ud&x(wr|>uXm|D^2l!*pnQp`}W|x z^c_Yw85kH@JY5_^G|r!$>|NZfAkw;C;Ri!+eowxz>BS{a|Nr0pXv(sgnbw`gkzaHY z3eRtUFpqhULtRwbKd}S1Vgq-v8WhhAPWX~z8KCcdw%+*Tsu_|6MTtx~noBva+*+tcHTYo&WVdhzHc&{kmhZXZ*7G|c7K=Dm`iGGY>G=-q?Z3cRm0G9L-2Ce zb%_#wZ$wp_-!%LxWIe{fZx`4sVAB%tL0CcUm~upxM|eY0k37RE!N1uFb+0bAvc0=j z^{aU8At@#Q^k@nWb(T%!z7u|| s6Eau*R90{epOX8_;pU{DAB<`lu30EPI`G9&78sNap00i_>zopr0LO+eh5!Hn literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00004.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/home_note_00004.imageset/Contents.json new file mode 100644 index 00000000..86ac6f4e --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/home_note_00004.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home_note_00004.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00004.imageset/home_note_00004.png b/xplan-ios/Assets.xcassets/Home/Note/home_note_00004.imageset/home_note_00004.png new file mode 100644 index 0000000000000000000000000000000000000000..a4ca15fb87e6a90c7c1172df92da877b2ab763c6 GIT binary patch literal 530 zcmeAS@N?(olHy`uVBq!ia0vp^20$#r!3-q-JoK9iq$UUWgt!9f|AP!%v{sD+I?JFW z$S;`T>6Qkb+G>|uEf-CN3s`a@Rd(}#I9VzBcwY+2bD@vl<^P96H*RW47{rCRh$0b&R9H(MT;#U_M6>~0Ga=eOh_lpbr*Rv^K*NuNL m#q@d)=RUS4Dc^AHyTb(THL!qT?x`F~rtFK6@Fly`YY`PnRL zWFFLfc$8)!rkD3==h<3Qzwf1d zFXQ{oBznd7ZFOAHvhd~S$IXZ4+BeslGwzGs5+l|Z`j6jKXsO%ED-r=^J6AcLm{U_R w#ee_A^=4vU*S#?Po*MUl=A1dwA7XwpSv{6ty)Z?$78sfgp00i_>zopr0HMt=0{{R3 literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00006.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/home_note_00006.imageset/Contents.json new file mode 100644 index 00000000..ca0599f9 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/home_note_00006.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home_note_00006.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00006.imageset/home_note_00006.png b/xplan-ios/Assets.xcassets/Home/Note/home_note_00006.imageset/home_note_00006.png new file mode 100644 index 0000000000000000000000000000000000000000..d426b5f00949c8871f537b38a98901cbf8c9c902 GIT binary patch literal 543 zcmeAS@N?(olHy`uVBq!ia0vp^20$#r!3-q-JoK9iq$ULTgt!9f|APrkW03p+bd!Eb zkY6yv)6GqFw|IoJ&8j(E%8T;&S@z7d7QK6MgRUIgT2FPU&u^DG7%ogae|+c4J|D60 zqwRXd3=E9?o-U3d8t1o8x?R*{AmZwury}9(p!Bp)>Bgk38!i{l_ekJSWLNo~|NYbBj@AcBJ(>d9Z<$PPA9>1<;?^m|a4w*1mC6T>h0_Ha z*4}-?)}Zb5eZs3*CbkJSrBn7u+w?Ysmg})6_;LttI9;eyLJH-yJNP3E)lnXoH(Z#1Xzq?U!!2iAXLJp54JlX2ZlXJDu@c)I$ztaD0e F0suqtHNF4< literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00007.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/home_note_00007.imageset/Contents.json new file mode 100644 index 00000000..44205016 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/home_note_00007.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home_note_00007.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00007.imageset/home_note_00007.png b/xplan-ios/Assets.xcassets/Home/Note/home_note_00007.imageset/home_note_00007.png new file mode 100644 index 0000000000000000000000000000000000000000..62c3793b8ca5db0a74c1271f05911bfb964c5839 GIT binary patch literal 561 zcmeAS@N?(olHy`uVBq!ia0vp^20$#r!3-q-JoK9iq-F;Agt!9f|AP`-m1PM5I?kvh z$S;`T>6V&C?wdJg!Y*R0E%gO_7k4i!4N?|h{I=fGPgAF7 zi4IdPcyb_O>pEFY_y7Mw(~D-MYLc(F z++=S{{BE#8=E3~tA9Z5qL<8p}TAl0l?S1k1(gAxzM$eiPXA4tTYizA6zy4(L3Wd_E zcNj%Zo@iWEQp>098u*T>X8S5{gV0dd1aD12k@m00WEgHqKIhR8Yl+Jap4_tI{2pJ1 z&{JDY8E#y>AjeYF{e)?Y+^yF;{P*}YT(6U1T$DMB@%=_A>FaI=Z9nuGR{L9tA4u$B zJt{$x~D=DnrGxnE7n*dFdo{q*^vR5jC-;~BI08s=5Fv6`IV*t;@Otc*2weVgGb z#VwboOD*hU{^hVwRw&__yZPRe*I#U|Dn4{Lf3I}E-YgTe~DWM4fiLgZW literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00008.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/home_note_00008.imageset/Contents.json new file mode 100644 index 00000000..03cc4cd4 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/home_note_00008.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home_note_00008.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00008.imageset/home_note_00008.png b/xplan-ios/Assets.xcassets/Home/Note/home_note_00008.imageset/home_note_00008.png new file mode 100644 index 0000000000000000000000000000000000000000..61fd170f3e41eea8943478effb8556dcf5f55f55 GIT binary patch literal 548 zcmeAS@N?(olHy`uVBq!ia0vp^20$#r!3-q-JoK9iq-F;Agt!9f|AP`-m1PM5I?kvh z$S;`T>6W@iXYQNTrXqVdw~;+|NK8L%96W_Bk6jY z*tDfPk55YH`{VxenCXY<)jox~*A_Qzj%#+>{zV|=dk5>2s$VzvoOx%Z)@c2$mth;* z=|&CjcQSolld{%->McCul(6lUDDnnP!&}>heV2G$Pe6>(2hG8k?W&S$8bx z(E3M_`#5~c9x~-sRppv}<@@x_J-_|ihvQ#a4`eGnSDBzopr02h5c AXaE2J literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00009.imageset/Contents.json b/xplan-ios/Assets.xcassets/Home/Note/home_note_00009.imageset/Contents.json new file mode 100644 index 00000000..2dd0cce0 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Home/Note/home_note_00009.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "filename" : "home_note_0009.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Home/Note/home_note_00009.imageset/home_note_0009.png b/xplan-ios/Assets.xcassets/Home/Note/home_note_00009.imageset/home_note_0009.png new file mode 100644 index 0000000000000000000000000000000000000000..e4e6f992b57a3f3d1804c8fbe7e1c93e0ef33485 GIT binary patch literal 488 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 DLUg20 literal 0 HcmV?d00001 diff --git a/xplan-ios/Main/Home/Api/Api+Home.h b/xplan-ios/Main/Home/Api/Api+Home.h index 1b18d1b5..e2a5f03b 100644 --- a/xplan-ios/Main/Home/Api/Api+Home.h +++ b/xplan-ios/Main/Home/Api/Api+Home.h @@ -71,6 +71,18 @@ NS_ASSUME_NONNULL_BEGIN /// @param pageSize 一页多少个 + (void)homePlayGameTeam:(HttpRequestHelperCompletion)completion uid:(NSString *)uid pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize; +/// 请求首页关注列表 +/// @param completion 完成 +/// @param uid 用户的uid ++ (void)homeAttentionList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid; + +/// 请求收藏房间列表 +/// @param completion 完成 +/// @param uid 用户的uid +/// @param page 当前页数 +/// @param pageSize 一页多少个 ++ (void)homeCollectRoomList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize; + @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Api/Api+Home.m b/xplan-ios/Main/Home/Api/Api+Home.m index 42f6ada7..74c76979 100644 --- a/xplan-ios/Main/Home/Api/Api+Home.m +++ b/xplan-ios/Main/Home/Api/Api+Home.m @@ -14,7 +14,7 @@ /// @param complection 完成 /// @param uid 用户的uid + (void)homeTagComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid { - [self makeRequest:@"home/tag" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, nil]; + [self makeRequest:@"home/tagV2" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, nil]; } /// 查看推荐列表 @@ -79,4 +79,21 @@ + (void)homePlayGameTeam:(HttpRequestHelperCompletion)completion uid:(NSString *)uid pageNum:(NSString *)pageNum pageSize:(NSString *)pageSize { [self makeRequest:@"home/playV2" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,uid , pageNum, pageSize,nil]; } + +/// 请求首页关注列表 +/// @param completion 完成 +/// @param uid 用户的uid ++ (void)homeAttentionList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid { + [self makeRequest:@"fans/partTabFollowList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,uid ,nil]; +} + +/// 请求收藏房间列表 +/// @param completion 完成 +/// @param uid 用户的uid +/// @param page 当前页数 +/// @param pageSize 一页多少个 ++ (void)homeCollectRoomList:(HttpRequestHelperCompletion)completion uid:(NSString *)uid page:(NSString *)page pageSize:(NSString *)pageSize { + [self makeRequest:@"fans/fansRoomList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,uid , page, pageSize,nil]; +} + @end diff --git a/xplan-ios/Main/Home/Model/HomeCollectRoomModel.h b/xplan-ios/Main/Home/Model/HomeCollectRoomModel.h new file mode 100644 index 00000000..bfc26f96 --- /dev/null +++ b/xplan-ios/Main/Home/Model/HomeCollectRoomModel.h @@ -0,0 +1,33 @@ +// +// HomeCollectRoomModel.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import +#import "HomePlayRoomModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface HomeCollectRoomModel : NSObject +///昵称 +@property (nonatomic,copy) NSString *nick; +///头像 +@property (nonatomic,copy) NSString *roomAvatar; +///昵称 +@property (nonatomic,copy) NSString *roomName; +///f在线人数 +@property (nonatomic,copy) NSString *roomOnlineNum; +///是否跨房Pk +@property (nonatomic,assign) BOOL crossPking; +///平台id +@property (nonatomic,copy) NSString *erbanNo; +///tag +@property (nonatomic,copy) NSString *tagPict; +///房主的uid +@property (nonatomic,copy) NSString *roomUid; +///麦上用户 +@property (nonatomic, strong) NSArray *micUsers; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Model/HomeCollectRoomModel.m b/xplan-ios/Main/Home/Model/HomeCollectRoomModel.m new file mode 100644 index 00000000..705c4c75 --- /dev/null +++ b/xplan-ios/Main/Home/Model/HomeCollectRoomModel.m @@ -0,0 +1,12 @@ +// +// HomeCollectRoomModel.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "HomeCollectRoomModel.h" + +@implementation HomeCollectRoomModel + +@end diff --git a/xplan-ios/Main/Home/Model/HomeLiveRoomModel.h b/xplan-ios/Main/Home/Model/HomeLiveRoomModel.h new file mode 100644 index 00000000..c0fd472b --- /dev/null +++ b/xplan-ios/Main/Home/Model/HomeLiveRoomModel.h @@ -0,0 +1,23 @@ +// +// HomeLiveRoomModel.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface HomeLiveRoomModel : NSObject +///昵称 +@property (nonatomic, copy) NSString *nick; +///头像 +@property (nonatomic, copy) NSString *avatar; +///用户的id +@property (nonatomic,assign) NSInteger uid; +///在房间中用户的uid +@property (nonatomic, assign) NSInteger roomUid; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Model/HomeLiveRoomModel.m b/xplan-ios/Main/Home/Model/HomeLiveRoomModel.m new file mode 100644 index 00000000..36f3f044 --- /dev/null +++ b/xplan-ios/Main/Home/Model/HomeLiveRoomModel.m @@ -0,0 +1,12 @@ +// +// HomeLiveRoomModel.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "HomeLiveRoomModel.h" + +@implementation HomeLiveRoomModel + +@end diff --git a/xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.h b/xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.h new file mode 100644 index 00000000..d3946a2a --- /dev/null +++ b/xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.h @@ -0,0 +1,20 @@ +// +// XPHomeLikePresenter.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "BaseMvpPresenter.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeLikePresenter : BaseMvpPresenter +/// 获取关注房间列表 +- (void)getHomeAttectionList; +/// 获取收藏房间列表 +/// @param page 当前页数 +- (void)getHomeCollectRoomList:(int)page state:(int)state; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.m b/xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.m new file mode 100644 index 00000000..55371313 --- /dev/null +++ b/xplan-ios/Main/Home/Presenter/XPHomeLikePresenter.m @@ -0,0 +1,43 @@ +// +// XPHomeLikePresenter.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "XPHomeLikePresenter.h" +#import "Api+Home.h" +#import "XPHomeLikeProtocol.h" +#import "AccountInfoStorage.h" +#import "HomePlayRoomModel.h" +#import "HomeLiveRoomModel.h" +#import "HomeCollectRoomModel.h" +@implementation XPHomeLikePresenter + + +/// 获取关注房间列表 +- (void)getHomeAttectionList { + NSString * uid = [AccountInfoStorage instance].getUid; + [Api homeAttentionList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [HomeLiveRoomModel modelsWithArray:data.data]; + [[self getView] getHomeAttentionListSuccess:array]; + }fail:^(NSInteger code, NSString * _Nullable msg) { + [[self getView] getHomeAttentionListFail:msg]; + }] uid:uid]; +} + + +/// 获取收藏房间列表 +/// @param page 当前页数 +- (void)getHomeCollectRoomList:(int)page state:(int)state{ + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * pageStr = [NSString stringWithFormat:@"%d", page]; + [Api homeCollectRoomList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + NSArray * array = [HomeCollectRoomModel modelsWithArray:data.data[@"fansRoomList"]]; + [[self getView] getHomeCollectRoomListSuccess:array state:state]; + }fail:^(NSInteger code, NSString * _Nullable msg) { + [[self getView] getHomeCollectRoomListFail:msg state:state]; + }] uid:uid page:pageStr pageSize:@"20"]; +} + +@end diff --git a/xplan-ios/Main/Home/Protocol/XPHomeLikeProtocol.h b/xplan-ios/Main/Home/Protocol/XPHomeLikeProtocol.h new file mode 100644 index 00000000..1d911501 --- /dev/null +++ b/xplan-ios/Main/Home/Protocol/XPHomeLikeProtocol.h @@ -0,0 +1,26 @@ +// +// XPHomeLikeProtocol.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@protocol XPHomeLikeProtocol + +///获取首页关注列表成功 +- (void)getHomeAttentionListSuccess:(NSArray *)liveList; +///获取首页关注列表失败 +- (void)getHomeAttentionListFail:(NSString *)message; + +///获取首页收藏房间列表成功 +- (void)getHomeCollectRoomListSuccess:(NSArray *)roomList state:(int)state; +///获取首页收藏房间列表失败 +- (void)getHomeCollectRoomListFail:(NSString *)message state:(int)state; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.h new file mode 100644 index 00000000..e0629a98 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.h @@ -0,0 +1,16 @@ +// +// XPHomeAttentionCollectionViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class HomeLiveRoomModel; +@interface XPHomeAttentionCollectionViewCell : UICollectionViewCell +@property (nonatomic,strong) HomeLiveRoomModel *liveRoom; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.m new file mode 100644 index 00000000..d57c8b5f --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionCollectionViewCell.m @@ -0,0 +1,153 @@ +// +// XPHomeAttentionCollectionViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "XPHomeAttentionCollectionViewCell.h" +///Third +#import +///Tool +#import "NetImageView.h" +#import "ThemeColor.h" +///Model +#import "HomeLiveRoomModel.h" + +@interface XPHomeAttentionCollectionViewCell () +///头像 +@property (nonatomic,strong) NetImageView *avatarImageView; +///昵称 +@property (nonatomic,strong) UILabel *nickLabel; +///阴影 +@property (nonatomic, strong) UIVisualEffectView *blurView; +///音符动销 +@property (nonatomic,strong) UIImageView *noteImageView; +///动画的数组 +@property (nonatomic,strong) NSArray *animationArray; +@end + +@implementation XPHomeAttentionCollectionViewCell + +- (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.avatarImageView]; + [self.contentView addSubview:self.nickLabel]; + + [self.avatarImageView addSubview:self.blurView]; + [self.avatarImageView addSubview:self.noteImageView]; +} + +- (void)initSubViewConstraints { + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(56, 56)); + make.centerX.mas_equalTo(self.contentView); + make.top.mas_equalTo(self.contentView); + }]; + + [self.blurView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self.avatarImageView); + make.height.mas_equalTo(14); + }]; + + [self.noteImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.centerY.mas_equalTo(self.blurView); + make.height.mas_equalTo(10); + make.width.mas_equalTo(24); + }]; + [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.avatarImageView); + make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(4); + }]; +} + +#pragma mark - Getters And Setters +- (void)setLiveRoom:(HomeLiveRoomModel *)liveRoom { + _liveRoom = liveRoom; + if (_liveRoom) { + self.avatarImageView.imageUrl = _liveRoom.avatar; + self.nickLabel.text = _liveRoom.nick; + self.blurView.hidden = _liveRoom.roomUid <=0; + self.noteImageView.hidden = _liveRoom.roomUid <=0; + if (_liveRoom.roomUid > 0) { + self.noteImageView.animationImages = self.animationArray; + [self.noteImageView startAnimating]; + }else { + self.noteImageView.animationImages = nil; + [self.noteImageView stopAnimating]; + } + } +} + +- (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 = 56/2; + _avatarImageView.layer.borderColor = [UIColor whiteColor].CGColor; + } + return _avatarImageView; +} + +- (UILabel *)nickLabel { + if (!_nickLabel) { + _nickLabel = [[UILabel alloc] init]; + _nickLabel.font = [UIFont systemFontOfSize:12]; + _nickLabel.textColor = [ThemeColor mainTextColor]; + } + return _nickLabel; +} + +- (UIVisualEffectView *)blurView { + if (!_blurView) { + UIBlurEffect *blurEffect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; + _blurView = [[UIVisualEffectView alloc] initWithEffect:blurEffect]; + _blurView.alpha = 0.3; + } + return _blurView; +} + +- (UIImageView *)noteImageView { + if (!_noteImageView) { + _noteImageView = [[UIImageView alloc] init]; + _noteImageView.userInteractionEnabled = YES; + _noteImageView.animationRepeatCount = HUGE; + _noteImageView.image = [UIImage imageNamed:@"home_note_0000"]; + } + return _noteImageView; +} + +- (NSArray *)animationArray { + if (!_animationArray) { + NSMutableArray * array = [NSMutableArray array]; + for (int i = 0; i < 12; i++) { + NSString * imageName; + if (i> 9) { + imageName = [NSString stringWithFormat:@"home_note_000%d",i]; + } else { + imageName = [NSString stringWithFormat:@"home_note_0000%d",i]; + } + + + UIImage * image = [UIImage imageNamed:imageName]; + [array addObject:image]; + } + _animationArray = [array copy]; + } + return _animationArray; +} + +@end diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.h new file mode 100644 index 00000000..37dfbdfc --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.h @@ -0,0 +1,23 @@ +// +// XPHomeAttentionTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class XPHomeAttentionTableViewCell, HomeLiveRoomModel; +@protocol XPHomeAttentionTableViewCellDelegate +///点击了某个item +- (void)xPHomeAttentionTableViewCell:(XPHomeAttentionTableViewCell *)view didClickItem:(HomeLiveRoomModel *)model; + +@end +@interface XPHomeAttentionTableViewCell : UITableViewCell +@property (nonatomic,strong) NSArray *attentionList; +///代理 +@property (nonatomic,weak) id delegate; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.m new file mode 100644 index 00000000..ab7bfbea --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeAttentionTableViewCell.m @@ -0,0 +1,86 @@ +// +// XPHomeAttentionTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "XPHomeAttentionTableViewCell.h" +///Third +#import +///View +#import "XPHomeAttentionCollectionViewCell.h" + +@interface XPHomeAttentionTableViewCell () +///列表 +@property (nonatomic,strong) UICollectionView *collectionView; +@end + +@implementation XPHomeAttentionTableViewCell + +- (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.edges.mas_equalTo(self.contentView); + }]; +} + +#pragma mark - UICollectionViewCellDelegate And UICollectionViewDatasource +- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath { + XPHomeAttentionCollectionViewCell * cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([XPHomeAttentionCollectionViewCell class]) forIndexPath:indexPath]; + cell.liveRoom = [self.attentionList objectAtIndex:indexPath.item]; + return cell; +} + +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section { + return self.attentionList.count; +} + +- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath { + [collectionView deselectItemAtIndexPath:indexPath animated:YES]; + if (self.attentionList.count > 0) { + HomeLiveRoomModel * liveModel = [self.attentionList objectAtIndex:indexPath.item]; + if (self.delegate && [self.delegate respondsToSelector:@selector(xPHomeAttentionTableViewCell:didClickItem:)]) { + [self.delegate xPHomeAttentionTableViewCell:self didClickItem:liveModel]; + } + } + +} + +#pragma mark - Getters And Setters +- (void)setAttentionList:(NSArray *)attentionList { + _attentionList = attentionList; + [self.collectionView reloadData]; +} + +- (UICollectionView *)collectionView{ + if (!_collectionView) { + UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init]; + layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + layout.minimumLineSpacing = 8; + layout.itemSize = CGSizeMake(56, 56+ 24); + layout.sectionInset = UIEdgeInsetsMake(12, 15, 12, 15); + _collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout]; + _collectionView.dataSource = self; + _collectionView.delegate = self; + _collectionView.backgroundColor = [UIColor clearColor]; + [_collectionView registerClass:[XPHomeAttentionCollectionViewCell class] forCellWithReuseIdentifier:NSStringFromClass([XPHomeAttentionCollectionViewCell class])]; + } + return _collectionView; +} + +@end diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.h b/xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.h new file mode 100644 index 00000000..5d482ef4 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.h @@ -0,0 +1,16 @@ +// +// XPHomeCollectRoomTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class HomeCollectRoomModel; +@interface XPHomeCollectRoomTableViewCell : UITableViewCell +@property (nonatomic,strong) HomeCollectRoomModel *roomInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.m b/xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.m new file mode 100644 index 00000000..fba33fd8 --- /dev/null +++ b/xplan-ios/Main/Home/View/Cell/XPHomeCollectRoomTableViewCell.m @@ -0,0 +1,367 @@ +// +// XPHomeCollectRoomTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// 收藏房间 + +#import "XPHomeCollectRoomTableViewCell.h" +///Third +#import +///Tool +#import "ThemeColor.h" +#import "NetImageView.h" +#import "UIImage+Utils.h" +///Model +#import "HomeCollectRoomModel.h" + +@interface XPHomeCollectRoomTableViewCell () +///是否在PK中 +@property (nonatomic,strong) UIButton *pkButton; +///显示头像 +@property (nonatomic,strong) NetImageView *avatarImageView; +///显示背景 +@property (nonatomic,strong) UIImageView *backImageView; +///显示名字 +@property (nonatomic,strong) UILabel *nickLabel; +///显示tag +@property (nonatomic,strong) NetImageView *tagImageView; +///显示id +@property (nonatomic,strong) UILabel *idLabel; +///容器 +@property (nonatomic,strong) UIView * personContainerView; +///显示🔥 +@property (nonatomic,strong) UIImageView *hotImageView; +///显示在线人数 +@property (nonatomic,strong) UILabel *numberLabel; +///房间在线人数 +@property (nonatomic,strong) UIView *micContainerView; +///第一个 +@property (nonatomic,strong) NetImageView *firstImageView; +///第二个 +@property (nonatomic,strong) NetImageView *secondImageView; +///第三个 +@property (nonatomic,strong) NetImageView *thirdImageView; +///第四个 +@property (nonatomic,strong) NetImageView *fourImageView; +///第五个 +@property (nonatomic,strong) NetImageView *fifImageView; +@end + +@implementation XPHomeCollectRoomTableViewCell + +- (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.backImageView]; + [self.contentView addSubview:self.avatarImageView]; + + [self.backImageView addSubview:self.nickLabel]; + [self.backImageView addSubview:self.tagImageView]; + [self.backImageView addSubview:self.idLabel]; + [self.backImageView addSubview:self.personContainerView]; + [self.backImageView addSubview:self.micContainerView]; + + [self.personContainerView addSubview:self.hotImageView]; + [self.personContainerView addSubview:self.numberLabel]; + + [self.avatarImageView addSubview:self.pkButton]; + + [self.micContainerView addSubview:self.firstImageView]; + [self.micContainerView addSubview:self.secondImageView]; + [self.micContainerView addSubview:self.thirdImageView]; + [self.micContainerView addSubview:self.fourImageView]; + [self.micContainerView addSubview:self.fifImageView]; +} + +- (void)initSubViewConstraints { + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(74, 74)); + make.left.mas_equalTo(self.contentView).offset(15); + make.top.mas_equalTo(self.contentView); + }]; + + [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self.contentView).inset(15); + make.top.mas_equalTo(self.contentView).offset(8); + make.height.mas_equalTo(66); + }]; + + [self.pkButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(44, 16)); + make.left.top.mas_equalTo(self.avatarImageView); + }]; + + [self.nickLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.backImageView).offset(82); + make.top.mas_equalTo(self.backImageView).offset(12); + make.right.mas_lessThanOrEqualTo(self.personContainerView.mas_left).offset(-5); + }]; + + [self.tagImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(38, 14)); + make.left.mas_equalTo(self.nickLabel); + make.top.mas_equalTo(self.nickLabel.mas_bottom).offset(13); + }]; + + [self.idLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.tagImageView); + make.left.mas_equalTo(self.tagImageView.mas_right).offset(8); + }]; + + [self.personContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.hotImageView.mas_left).offset(-4); + make.height.mas_equalTo(16); + make.top.mas_equalTo(self.backImageView).offset(3); + make.right.mas_equalTo(self.backImageView).offset(-3); + }]; + + [self.hotImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(13, 13)); + make.right.mas_equalTo(self.numberLabel.mas_left).offset(-2); + make.centerY.mas_equalTo(self.personContainerView); + }]; + + [self.numberLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.personContainerView.mas_right).offset(-4); + make.centerY.mas_equalTo(self.personContainerView); + }]; + + [self.micContainerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.backImageView).offset(-13); + make.height.mas_equalTo(16); + make.centerY.mas_equalTo(self.tagImageView); + make.left.mas_equalTo(self.fifImageView.mas_left).offset(-5); + }]; + + [self.firstImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.mas_equalTo(CGSizeMake(16, 16)); + make.right.mas_equalTo(self.micContainerView); + make.centerY.mas_equalTo(self.micContainerView); + }]; + + [self.secondImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstImageView); + make.right.mas_equalTo(self.firstImageView.mas_left).offset(-3); + }]; + + [self.thirdImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstImageView); + make.right.mas_equalTo(self.secondImageView.mas_left).offset(-3); + }]; + + [self.fourImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstImageView); + make.right.mas_equalTo(self.thirdImageView.mas_left).offset(-3); + }]; + + [self.fifImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.size.centerY.mas_equalTo(self.firstImageView); + make.right.mas_equalTo(self.fourImageView.mas_left).offset(-3); + }]; +} +#pragma mark - Getters And Setters +- (void)setRoomInfo:(HomeCollectRoomModel *)roomInfo { + _roomInfo = roomInfo; + if (_roomInfo) { + self.avatarImageView.imageUrl = _roomInfo.roomAvatar; + self.nickLabel.text = _roomInfo.roomName; + self.tagImageView.imageUrl = _roomInfo.tagPict; + self.idLabel.text = [NSString stringWithFormat:@"ID:%@", _roomInfo.erbanNo]; + self.numberLabel.text = _roomInfo.roomOnlineNum; + self.pkButton.hidden = !_roomInfo.crossPking; + for (int i = 0; i< self.micContainerView.subviews.count; i++) { + NetImageView * imageView = [self.micContainerView.subviews objectAtIndex:i]; + if (i< _roomInfo.micUsers.count) { + HomePlayMicUserModel * micUserInfo = [_roomInfo.micUsers objectAtIndex:i]; + imageView.imageUrl = micUserInfo.avatar; + imageView.hidden = NO; + } else { + imageView.hidden = YES; + } + } + } +} + +- (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; + _avatarImageView.layer.borderColor = [ThemeColor appMainColor].CGColor; + } + return _avatarImageView; +} + +- (UIButton *)pkButton { + if (!_pkButton) { + _pkButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_pkButton setTitle:@"pk中" forState:UIControlStateNormal]; + [_pkButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + _pkButton.titleLabel.font = [UIFont systemFontOfSize:12]; + [_pkButton setBackgroundImage:[UIImage imageNamed:@"home_like_across_pk_bg"] forState:UIControlStateNormal]; + _pkButton.layer.masksToBounds = YES; + _pkButton.layer.cornerRadius = 10; + } + return _pkButton; +} + +- (UIImageView *)backImageView { + if (!_backImageView) { + _backImageView = [[UIImageView alloc] init]; + _backImageView.userInteractionEnabled = YES; + _backImageView.layer.masksToBounds = YES; + _backImageView.layer.shadowColor = UIColorRGBAlpha(0xE5E5F2, 0.34).CGColor; + _backImageView.layer.cornerRadius = 12; + _backImageView.layer.shadowOffset = CGSizeMake(4, 4); + _backImageView.image = [UIImage imageWithColor:[ThemeColor appCellBackgroundColor]]; + } + return _backImageView; +} + +- (UILabel *)nickLabel { + if (!_nickLabel) { + _nickLabel = [[UILabel alloc] init]; + _nickLabel.font = [UIFont systemFontOfSize:14]; + _nickLabel.textColor = [ThemeColor mainTextColor]; + } + return _nickLabel; +} + +- (NetImageView *)tagImageView { + if (!_tagImageView) { + _tagImageView = [[NetImageView alloc] init]; + } + return _tagImageView; +} + +- (UILabel *)idLabel { + if (!_idLabel) { + _idLabel = [[UILabel alloc] init]; + _idLabel.font = [UIFont systemFontOfSize:12]; + _idLabel.textColor = [ThemeColor secondTextColor]; + } + return _idLabel; +} + +- (UIView *)personContainerView { + if (!_personContainerView) { + _personContainerView = [[UIView alloc] init]; + _personContainerView.backgroundColor = [UIColor clearColor]; + _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:@"room_like_collect_room_hot"]; + } + return _hotImageView; +} + +- (UILabel *)numberLabel { + if (!_numberLabel) { + _numberLabel = [[UILabel alloc] init]; + _numberLabel.font = [UIFont boldSystemFontOfSize:12]; + _numberLabel.textColor = [ThemeColor mainTextColor]; + } + return _numberLabel; +} + +- (UIView *)micContainerView { + if (!_micContainerView) { + _micContainerView = [[UIView alloc] init]; + _micContainerView.backgroundColor = [UIColor clearColor]; + } + return _micContainerView; +} + +- (NetImageView *)firstImageView { + if (!_firstImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _firstImageView = [[NetImageView alloc] initWithConfig:config]; + _firstImageView.layer.masksToBounds = YES; + _firstImageView.layer.cornerRadius = 8; + _firstImageView.layer.borderColor = [UIColor whiteColor].CGColor; + _firstImageView.layer.borderWidth = 1; + } + return _firstImageView; +} + +- (NetImageView *)secondImageView { + if (!_secondImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _secondImageView = [[NetImageView alloc] initWithConfig:config]; + _secondImageView.layer.masksToBounds = YES; + _secondImageView.layer.cornerRadius = 8; + _secondImageView.layer.borderColor = [UIColor whiteColor].CGColor; + _secondImageView.layer.borderWidth = 1; + } + return _secondImageView; +} + +- (NetImageView *)thirdImageView { + if (!_thirdImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _thirdImageView = [[NetImageView alloc] initWithConfig:config]; + _thirdImageView.layer.masksToBounds = YES; + _thirdImageView.layer.cornerRadius = 8; + _thirdImageView.layer.borderColor = [UIColor whiteColor].CGColor; + _thirdImageView.layer.borderWidth = 1; + } + return _thirdImageView; +} + +- (NetImageView *)fourImageView { + if (!_fourImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _fourImageView = [[NetImageView alloc] initWithConfig:config]; + _fourImageView.layer.masksToBounds = YES; + _fourImageView.layer.cornerRadius = 8; + _fourImageView.layer.borderColor = [UIColor whiteColor].CGColor; + _fourImageView.layer.borderWidth = 1; + } + return _fourImageView; +} + + +- (NetImageView *)fifImageView { + if (!_fifImageView) { + NetImageConfig * config = [[NetImageConfig alloc]init]; + config.imageType = ImageTypeUserIcon; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + _fifImageView = [[NetImageView alloc] initWithConfig:config]; + _fifImageView.layer.masksToBounds = YES; + _fifImageView.layer.cornerRadius = 8; + _fifImageView.layer.borderColor = [UIColor whiteColor].CGColor; + _fifImageView.layer.borderWidth = 1; + } + return _fifImageView; +} + + + +@end diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m b/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m index f2d18f8c..d286e77e 100644 --- a/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeNavView.m @@ -133,6 +133,7 @@ _titleView.averageCellSpacingEnabled = NO; _titleView.defaultSelectedIndex = 0; _titleView.cellSpacing = 20; + _titleView.contentEdgeInsetLeft = 15; JXCategoryIndicatorImageView *lineView = [[JXCategoryIndicatorImageView alloc] init]; lineView.indicatorWidth = 48; diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeaderView.m b/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeaderView.m index 22d53480..f9064289 100644 --- a/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeaderView.m +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeRecommendHeaderView.m @@ -249,6 +249,7 @@ UIKIT_EXTERN NSString * kHomeMoreScrollPageKey; #pragma mark - XPHomeSectionViewDelegate - (void)didClickXPHomeSectionView:(XPHomeSectionView *)view { NSInteger section = view.tag - 1000; + section = 3; NSString * sectionStr = [NSString stringWithFormat:@"%ld",section]; NSDictionary * dic = @{@"section": sectionStr}; [[NSNotificationCenter defaultCenter] postNotificationName:kHomeMoreScrollPageKey object:dic]; diff --git a/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h b/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h index f57052fa..b12845ff 100644 --- a/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.h @@ -21,7 +21,10 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,copy) NSString *imageName; ///代理 @property (nonatomic,weak) id delegate; - +///是否隐藏头部的图片 +@property (nonatomic,assign) BOOL isHiddenLogo; +///是否隐藏更多 +@property (nonatomic,assign) BOOL isHiddenMore; @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 index e640c9f8..b0283499 100644 --- a/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.m +++ b/xplan-ios/Main/Home/View/SubViews/XPHomeSectionView.m @@ -76,7 +76,7 @@ } #pragma mark - Event Response - (void)moreControlAction:(UIControl *)sender { - if (self.delegate && [self.delegate respondsToSelector:@selector(didClickXPHomeSectionView:)]) { + if (!self.isHiddenMore && self.delegate && [self.delegate respondsToSelector:@selector(didClickXPHomeSectionView:)]) { [self.delegate didClickXPHomeSectionView:self]; } } @@ -96,6 +96,15 @@ } } +- (void)setIsHiddenLogo:(BOOL)isHiddenLogo { + _isHiddenLogo = isHiddenLogo; + self.logoImageView.hidden = _isHiddenLogo; +} + +- (void)setIsHiddenMore:(BOOL)isHiddenMore { + _isHiddenMore = isHiddenMore; + self.moreStackView.hidden = _isHiddenMore; +} - (UIStackView *)logoStackView { if (!_logoStackView) { diff --git a/xplan-ios/Main/Home/View/XPHomeLikeViewController.h b/xplan-ios/Main/Home/View/XPHomeLikeViewController.h new file mode 100644 index 00000000..b933e83e --- /dev/null +++ b/xplan-ios/Main/Home/View/XPHomeLikeViewController.h @@ -0,0 +1,16 @@ +// +// XPHomeLikeViewController.h +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "MvpViewController.h" +#import +NS_ASSUME_NONNULL_BEGIN + +@interface XPHomeLikeViewController : MvpViewController + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/XPHomeLikeViewController.m b/xplan-ios/Main/Home/View/XPHomeLikeViewController.m new file mode 100644 index 00000000..197e7bd9 --- /dev/null +++ b/xplan-ios/Main/Home/View/XPHomeLikeViewController.m @@ -0,0 +1,299 @@ +// +// XPHomeLikeViewController.m +// xplan-ios +// +// Created by 冯硕 on 2022/3/2. +// + +#import "XPHomeLikeViewController.h" +///Third +#import +#import +///Tool +#import "XPMacro.h" +#import "ThemeColor.h" +///Model +#import "HomeLiveRoomModel.h" +#import "HomeCollectRoomModel.h" +///View +#import "XPHomeAttentionTableViewCell.h" +#import "XPHomeCollectRoomTableViewCell.h" +#import "XPHomeListEmptyTableViewCell.h" +#import "XPHomeSectionView.h" +#import "XPMineAttentionViewController.h" +#import "XPRoomViewController.h" +#import "XPMineUserInfoViewController.h" +///P +#import "XPHomeLikePresenter.h" +#import "XPHomeLikeProtocol.h" + +@interface XPHomeLikeViewController () +///列表 +@property (nonatomic,strong) UITableView *tableView; +///关注列表 +@property (nonatomic,strong) NSArray *attentionList; +///收藏的房间 +@property (nonatomic,strong) NSMutableArray *collectRoomList; +///当前的页数 +@property (nonatomic,assign) int page; +@end + +@implementation XPHomeLikeViewController + +- (BOOL)isHiddenNavBar { + return YES; +} + +- (XPHomeLikePresenter *)createPresenter { + return [[XPHomeLikePresenter alloc] init]; +} + +- (void)viewDidLoad { + [super viewDidLoad]; + self.view.backgroundColor = [UIColor clearColor]; + [self initHeaderAndFooterRrfresh]; + [self initSubViews]; + [self initSubViewConstraints]; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self.view addSubview:self.tableView]; +} + +- (void)initSubViewConstraints { + [self.tableView 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.tableView.mj_header = header; + + MJRefreshBackNormalFooter *footer = [MJRefreshBackNormalFooter footerWithRefreshingTarget:self refreshingAction:@selector(footerRefresh)]; + footer.stateLabel.textColor = [ThemeColor secondTextColor]; + footer.stateLabel.font = [UIFont systemFontOfSize:10.0]; + self.tableView.mj_footer = footer; + + [self headerRefresh]; +} + +- (void)headerRefresh { + self.page = 1; + [self.presenter getHomeAttectionList]; + [self.presenter getHomeCollectRoomList:self.page state:0]; +} + +- (void)footerRefresh { + self.page++; + [self.presenter getHomeCollectRoomList:self.page state:1]; +} + +//去掉UItableview headerview黏性 +- (void)scrollViewDidScroll:(UIScrollView *)scrollView { + CGFloat sectionHeaderHeight = 38; + if (scrollView.contentOffset.y<=sectionHeaderHeight&&scrollView.contentOffset.y>=0) { + scrollView.contentInset = UIEdgeInsetsMake(-scrollView.contentOffset.y, 0, 0, 0); + } else if (scrollView.contentOffset.y>=sectionHeaderHeight) { + scrollView.contentInset = UIEdgeInsetsMake(-sectionHeaderHeight, 0, 0, 0); + } +} + +#pragma mark - UITableViewDelegate And UITableViewDataSource +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { + /// 关注的人 收藏的房间 空的展位图 + return 3; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + if (section == 0) { + return self.attentionList.count > 0 ? 1 : 0; + } else if(section == 1) { + return self.collectRoomList.count> 0 ? self.collectRoomList.count : 0; + } else { + return (self.collectRoomList.count <=0 && self.attentionList.count <=0) ? 1 : 0; + } +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.section == 0) { + return 56 + 24 + 12 * 2; + } else if(indexPath.section == 1) { + return 66 + 8 + 10; + } else { + return 400; + } +} + +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section { + if (section == 0) { + return self.attentionList.count > 0 ? 38 : 0; + } else if(section == 1) { + return self.collectRoomList.count > 0 ? 38 : 0; + } + return 0.01f; +} + +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section { + if (section == 0) { + XPHomeSectionView * sectionView = [[XPHomeSectionView alloc] init]; + sectionView.frame = CGRectMake(0, 0, KScreenWidth, 38); + sectionView.tag = 1000 + section; + sectionView.isHiddenLogo = YES; + sectionView.title = @"关注的人"; + sectionView.delegate= self; + return sectionView; + } else if (section == 1) { + XPHomeSectionView * sectionView = [[XPHomeSectionView alloc] init]; + sectionView.frame = CGRectMake(0, 0, KScreenWidth, 38); + sectionView.isHiddenLogo = YES; + sectionView.title = @"收藏的房间"; + sectionView.tag = 1000 + section; + sectionView.isHiddenMore = YES; + return sectionView; + } + return [UIView new]; +} +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section{ + return 0.01f; +} + +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section{ + return [[UIView alloc]init]; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if (indexPath.section == 0) { + XPHomeAttentionTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeAttentionTableViewCell class])]; + if (cell == nil) { + cell = [[XPHomeAttentionTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeAttentionTableViewCell class])]; + } + cell.attentionList = self.attentionList; + cell.delegate = self; + return cell; + } else if(indexPath.section == 1) { + XPHomeCollectRoomTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeCollectRoomTableViewCell class])]; + if (cell == nil) { + cell = [[XPHomeCollectRoomTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeCollectRoomTableViewCell class])]; + } + cell.roomInfo = [self.collectRoomList objectAtIndex:indexPath.row]; + return cell; + } else { + XPHomeListEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPHomeListEmptyTableViewCell class])]; + if (cell == nil) { + cell = [[XPHomeListEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPHomeListEmptyTableViewCell class])]; + } + return cell; + } +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + if (indexPath.section == 1 && self.collectRoomList.count > 0) { + HomeCollectRoomModel * roomInfo = [self.collectRoomList objectAtIndex:indexPath.row]; + if (roomInfo.roomUid.integerValue > 0) { + [XPRoomViewController openRoom:roomInfo.roomUid viewController:self]; + } + + } +} + +#pragma mark - XPHomeLikeProtocol +- (void)getHomeCollectRoomListFail:(NSString *)message state:(int)state { + if (state == 0) { + [self.tableView.mj_header endRefreshing]; + } else { + [self.tableView.mj_footer endRefreshing]; + } +} + +- (void)getHomeCollectRoomListSuccess:(NSArray *)roomList state:(int)state { + if (state == 9) { + [self.collectRoomList removeAllObjects]; + } + + if (roomList.count > 0) { + [self.collectRoomList addObjectsFromArray:roomList]; + } + + if (state == 0) { + [self.tableView.mj_header endRefreshing]; + } else { + if (roomList.count > 0) { + [self.tableView.mj_footer endRefreshing]; + } else { + [self.tableView.mj_footer endRefreshingWithNoMoreData]; + } + } + [self.tableView reloadData]; +} + +- (void)getHomeAttentionListSuccess:(NSArray *)liveList { + self.attentionList = liveList; + [self.tableView.mj_header endRefreshing]; + [self.tableView reloadData]; +} + +- (void)getHomeAttentionListFail:(NSString *)message { + [self.tableView.mj_header endRefreshing]; +} + +#pragma mark - XPHomeSectionViewDelegate +- (void)didClickXPHomeSectionView:(XPHomeSectionView *)view { + XPMineAttentionViewController * attentionVC = [[XPMineAttentionViewController alloc] init]; + [self.navigationController pushViewController:attentionVC animated:YES]; +} + +#pragma mark - XPHomeAttentionTableViewCellDelegate +- (void)xPHomeAttentionTableViewCell:(XPHomeAttentionTableViewCell *)view didClickItem:(HomeLiveRoomModel *)model { + if (model.roomUid > 0) { + [XPRoomViewController openRoom:[NSString stringWithFormat:@"%ld", model.uid] viewController:self]; + } else { + if (model.uid > 0) { + XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init]; + userInfoVC.uid = model.uid; + [self.navigationController pushViewController:userInfoVC animated:YES]; + } + } +} + +#pragma mark - JXCategoryListContentViewDelegate +- (UIView *)listView { + return self.view; +} + +#pragma mark - Getters And Setters +- (UITableView *)tableView { + if (!_tableView) { + _tableView = [[UITableView alloc] initWithFrame:CGRectZero style:UITableViewStyleGrouped]; + _tableView.delegate = self; + _tableView.dataSource = self; + _tableView.tableHeaderView = [UIView new]; + _tableView.tableFooterView = [UIView new]; + _tableView.separatorStyle = UITableViewCellSeparatorStyleNone; + _tableView.backgroundColor = [UIColor clearColor]; + if (@available(iOS 11.0, *)) { + _tableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever; + } + [_tableView registerClass:[XPHomeAttentionTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeAttentionTableViewCell class])]; + [_tableView registerClass:[XPHomeCollectRoomTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeCollectRoomTableViewCell class])]; + [_tableView registerClass:[XPHomeListEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPHomeListEmptyTableViewCell class])]; + } + return _tableView; +} + +- (NSMutableArray *)collectRoomList { + if (!_collectRoomList) { + _collectRoomList = [NSMutableArray array]; + } + return _collectRoomList; +} + + + +@end diff --git a/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.h b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.h index e6f6f35a..9360c742 100644 --- a/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.h +++ b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface XPHomePartyContainerViewController : MvpViewController - +@property (nonatomic,assign) NSInteger defaultSelectedIndex; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.m b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.m index 43a46c66..a3c3ad93 100644 --- a/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.m +++ b/xplan-ios/Main/Home/View/XPHomePartyContainerViewController.m @@ -9,6 +9,7 @@ ///Third #import #import +#import #import ///Tool #import "XPMacro.h" @@ -20,10 +21,12 @@ #import "XPRoomSearchContainerViewController.h" #import "XPHomePartyViewController.h" #import "XPWebViewController.h" +#import "XPHomeLikeViewController.h" ///P #import "XPHomeContainerPresenter.h" #import "XPHomeContainerProtocol.h" +UIKIT_EXTERN NSString * kHomeMoreScrollPageKey; @interface XPHomePartyContainerViewController () ///分页标题 @@ -35,7 +38,7 @@ ///tag的列表 @property (nonatomic,copy) NSArray *tagList; ///刷新的话 会重新走一次init的方法 -@property (nonatomic, strong) NSMutableDictionary *> *listCache; +@property (nonatomic, strong) NSMutableDictionary *> *listCache; @end @implementation XPHomePartyContainerViewController @@ -56,6 +59,7 @@ #pragma mark - Private Method - (void)initSubViews { + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(recommendMoreNotification:) name:kHomeMoreScrollPageKey object:nil]; self.view.backgroundColor = [UIColor clearColor]; [self.view addSubview:self.titleView]; [self.view addSubview:self.contentView]; @@ -63,12 +67,13 @@ - (void)initSubViewConstraints { [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.right.top.mas_equalTo(self.view); - make.height.mas_equalTo(50); + make.top.mas_equalTo(self.view).offset(10); + make.left.right.mas_equalTo(self.view); + make.height.mas_equalTo(30); }]; [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { - make.top.mas_equalTo(self.titleView.mas_bottom).offset(10); + make.top.mas_equalTo(self.titleView.mas_bottom); make.left.right.bottom.mas_equalTo(self.view); }]; } @@ -84,22 +89,32 @@ - (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { HomeTagModel * hometag = [self.tagList objectAtIndex:index]; - XPHomePartyViewController * list = _listCache[hometag.tid]; + UIViewController * list = _listCache[hometag.tid]; if (list) { return list; } else { - XPHomePartyViewController * homeVC = [[XPHomePartyViewController alloc] init]; - homeVC.tabId = hometag.tid; - //①自己缓存已经初始化的列表 - _listCache[hometag.tid] = homeVC; - return homeVC; + if ([hometag.name isEqualToString:@"喜欢"]) { + XPHomeLikeViewController * likeVC = [[XPHomeLikeViewController alloc] init]; + //①自己缓存已经初始化的列表 + _listCache[hometag.tid] = likeVC; + return likeVC; + } else { + XPHomePartyViewController * homeVC = [[XPHomePartyViewController alloc] init]; + homeVC.tabId = hometag.tid; + //①自己缓存已经初始化的列表 + _listCache[hometag.tid] = homeVC; + return homeVC; + } } } - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index { HomeTagModel * hometag = [self.tagList objectAtIndex:index]; - XPHomePartyViewController * list = _listCache[hometag.tid]; - list.tabId = hometag.tid; + if (![hometag.name isEqualToString:@"喜欢"]) { + XPHomePartyViewController * list = (XPHomePartyViewController *)_listCache[hometag.tid]; + list.tabId = hometag.tid; + } + } #pragma mark - JXCategoryListContentViewDelegate @@ -121,6 +136,23 @@ [self.titleView reloadData]; } +#pragma mark - Event Response +- (void)recommendMoreNotification:(NSNotification *)notification { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + if ([notification.object[@"section"] integerValue] == 3) { + __block NSUInteger index; + [self.tagList enumerateObjectsUsingBlock:^(HomeTagModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + if ([obj.name containsString:@"个播"]) { + index = idx; + *stop = YES; + } + }]; + self.titleView.defaultSelectedIndex = index; + [self.titleView reloadData]; + } + }); +} + #pragma mark - Getters And Setters - (JXCategoryTitleView *)titleView { if (!_titleView) { @@ -135,7 +167,16 @@ _titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter; _titleView.contentScrollViewClickTransitionAnimationEnabled = NO; _titleView.defaultSelectedIndex = 0; + _titleView.cellSpacing = 0; + _titleView.cellWidthIncrement = 20; _titleView.listContainer = self.contentView; + + JXCategoryIndicatorBackgroundView * indocator = [[JXCategoryIndicatorBackgroundView alloc] init]; + indocator.indicatorColor = [ThemeColor appMainColor]; + indocator.indicatorHeight = 24; + indocator.indicatorWidthIncrement = 10; + indocator.indicatorCornerRadius = 12; + _titleView.indicators = @[indocator]; } return _titleView; } @@ -147,4 +188,12 @@ } return _contentView; } + +- (NSMutableDictionary *> *)listCache { + if (!_listCache) { + _listCache = [NSMutableDictionary dictionary]; + } + return _listCache; +} + @end diff --git a/xplan-ios/Main/Home/View/XPHomeViewController.m b/xplan-ios/Main/Home/View/XPHomeViewController.m index e6b846b3..13d659c5 100644 --- a/xplan-ios/Main/Home/View/XPHomeViewController.m +++ b/xplan-ios/Main/Home/View/XPHomeViewController.m @@ -31,6 +31,9 @@ UIKIT_EXTERN NSString *kHomeMoreScrollPageKey; @property (nonatomic,strong) UIImageView *topBackImageView; ///导航栏 @property (nonatomic,strong) XPHomeNavView *homeNavView; +@property (nonatomic,assign) NSInteger defaultSelectedIndex; +@property (nonatomic,strong) XPHomeRecommendViewController *recommendVC; +@property (nonatomic,strong) XPHomePartyContainerViewController *partyVC; @end @implementation XPHomeViewController @@ -83,9 +86,9 @@ UIKIT_EXTERN NSString *kHomeMoreScrollPageKey; // 根据下标 index 返回对应遵守并实现 `JXCategoryListContentViewDelegate` 协议的列表实例 - (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { if (index == 0) { - return [[XPHomeRecommendViewController alloc] init]; + return self.recommendVC; }else if (index == 1) { - return [[XPHomePartyContainerViewController alloc] init]; + return self.partyVC; } return nil; } @@ -105,9 +108,7 @@ UIKIT_EXTERN NSString *kHomeMoreScrollPageKey; #pragma mark - Event Response - (void)recommendMoreNotification:(NSNotification *)notification { - NSDictionary * dic = notification.object; - //TODO: 跳转对应的tad - [self.homeNavView.titleView selectItemAtIndex:1]; + [self.homeNavView.titleView selectItemAtIndex:1]; } #pragma mark - Getters And Setters @@ -145,6 +146,19 @@ UIKIT_EXTERN NSString *kHomeMoreScrollPageKey; } +- (XPHomeRecommendViewController *)recommendVC { + if (!_recommendVC) { + _recommendVC = [[XPHomeRecommendViewController alloc] init]; + } + return _recommendVC; +} + +- (XPHomePartyContainerViewController *)partyVC { + if (!_partyVC) { + _partyVC = [[XPHomePartyContainerViewController alloc] init]; + } + return _partyVC; +} @end