From 2a1e90dbe58abc6e2aa54c6af54787ec11f52345 Mon Sep 17 00:00:00 2001 From: fengshuo <963787902@qq.com> Date: Fri, 10 Dec 2021 19:19:02 +0800 Subject: [PATCH] =?UTF-8?q?=E7=B3=96=E6=9E=9C=E6=A0=91=E9=80=81=E7=A4=BC?= =?UTF-8?q?=E7=89=A9=E7=9A=84=E6=A8=AA=E5=B9=85=20=E8=B4=AD=E4=B9=B0?= =?UTF-8?q?=E7=B3=96=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- xplan-ios.xcodeproj/project.pbxproj | 70 +++++- .../Contents.json | 22 ++ .../room_candy_tree_record_refresh@2x.png | Bin 0 -> 457 bytes .../room_candy_tree_record_refresh@3x.png | Bin 0 -> 647 bytes .../Contents.json | 22 ++ .../room_candytree_wish_num1@2x.png | Bin 0 -> 1444 bytes .../room_candytree_wish_num1@3x.png | Bin 0 -> 2529 bytes .../Contents.json | 22 ++ .../room_candytree_wish_num2@2x.png | Bin 0 -> 1820 bytes .../room_candytree_wish_num2@3x.png | Bin 0 -> 2566 bytes .../Contents.json | 22 ++ .../room_candytree_wish_num3@2x.png | Bin 0 -> 1430 bytes .../room_candytree_wish_num3@3x.png | Bin 0 -> 2699 bytes xplan-ios/Global/XPHtmlUrl.h | 6 +- xplan-ios/Global/XPHtmlUrl.m | 24 ++- xplan-ios/Main/IM/Model/AttachmentModel.h | 19 +- .../View/AnimationView/XPRoomAnimationView.m | 55 +++++ .../View/AnimationView/XPRoomCandyGiftView.h | 17 ++ .../View/AnimationView/XPRoomCandyGiftView.m | 90 ++++++++ .../Room/View/CandyTree/Api/Api+CandyTree.h | 23 ++ .../Room/View/CandyTree/Api/Api+CandyTree.m | 20 ++ .../CandyTree/Model/CandyTreeRecordModel.h | 23 ++ .../CandyTree/Model/CandyTreeRecordModel.m | 12 ++ .../CandyTree/Model/CandyTreeResultModel.h | 46 ++++ .../CandyTree/Model/CandyTreeResultModel.m | 22 ++ .../Presenter/XPCandyTreePresenter.h | 5 + .../Presenter/XPCandyTreePresenter.m | 15 ++ .../CandyTree/Protocol/XPCandyTreeProtocol.h | 7 +- .../View/Cell/XPCandyTreeEmptyableViewCell.h | 16 ++ .../View/Cell/XPCandyTreeEmptyableViewCell.m | 70 ++++++ .../View/Cell/XPCandyTreeRankTableViewCell.h | 17 ++ .../View/Cell/XPCandyTreeRankTableViewCell.m | 199 ++++++++++++++++++ .../CandyTree/View/XPCandyRankContainerView.h | 16 ++ .../CandyTree/View/XPCandyRankContainerView.m | 161 ++++++++++++++ .../View/CandyTree/View/XPCandyTreeGiftView.h | 17 ++ .../View/CandyTree/View/XPCandyTreeGiftView.m | 90 ++++++++ .../View/CandyTree/View/XPCandyTreeMoreView.h | 16 ++ .../View/CandyTree/View/XPCandyTreeMoreView.m | 153 ++++++++++++++ .../View/CandyTree/View/XPCandyTreeRankView.h | 24 +++ .../View/CandyTree/View/XPCandyTreeRankView.m | 187 ++++++++++++++++ .../View/XPCandyTreeViewController.h | 4 +- .../View/XPCandyTreeViewController.m | 93 ++++++-- .../View/CandyTree/View/XPRoomHalfWebView.h | 9 - .../View/CandyTree/View/XPRoomHalfWebView.m | 26 ++- xplan-ios/Main/Room/View/ThemeColor+Room.h | 7 + xplan-ios/Main/Room/View/ThemeColor+Room.m | 15 ++ ...ndyTree_lightsvga => candyTree_light.svga} | Bin 47 files changed, 1615 insertions(+), 47 deletions(-) create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/room_candy_tree_record_refresh@2x.png create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/room_candy_tree_record_refresh@3x.png create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/room_candytree_wish_num1@2x.png create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/room_candytree_wish_num1@3x.png create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num2.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num2.imageset/room_candytree_wish_num2@2x.png create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num2.imageset/room_candytree_wish_num2@3x.png create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/Contents.json create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/room_candytree_wish_num3@2x.png create mode 100644 xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/room_candytree_wish_num3@3x.png create mode 100644 xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.h create mode 100644 xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.m create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.h create mode 100644 xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.m rename xplan-ios/Sources/{candyTree_lightsvga => candyTree_light.svga} (100%) diff --git a/xplan-ios.xcodeproj/project.pbxproj b/xplan-ios.xcodeproj/project.pbxproj index 813fcc08..6159493b 100644 --- a/xplan-ios.xcodeproj/project.pbxproj +++ b/xplan-ios.xcodeproj/project.pbxproj @@ -228,6 +228,15 @@ E89DA66727006443008483C1 /* RechargeStorage.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DA66627006443008483C1 /* RechargeStorage.m */; }; E89DA67227008D59008483C1 /* WalletInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DA67127008D59008483C1 /* WalletInfoModel.m */; }; E89DA67527009ACD008483C1 /* XPMineRechargeNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = E89DA67427009ACD008483C1 /* XPMineRechargeNavView.m */; }; + E8A03DE22762FA000098D9EA /* XPCandyTreeMoreView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DE12762FA000098D9EA /* XPCandyTreeMoreView.m */; }; + E8A03DE9276301CC0098D9EA /* XPCandyRankContainerView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DE8276301CC0098D9EA /* XPCandyRankContainerView.m */; }; + E8A03DEC276301EF0098D9EA /* XPCandyTreeRankView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DEB276301EF0098D9EA /* XPCandyTreeRankView.m */; }; + E8A03DF0276303D40098D9EA /* XPCandyTreeRankTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DEF276303D40098D9EA /* XPCandyTreeRankTableViewCell.m */; }; + E8A03DF3276328FC0098D9EA /* CandyTreeRecordModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DF2276328FC0098D9EA /* CandyTreeRecordModel.m */; }; + E8A03DF62763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DF52763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m */; }; + E8A03DF927634A590098D9EA /* CandyTreeResultModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DF827634A590098D9EA /* CandyTreeResultModel.m */; }; + E8A03DFC276350A60098D9EA /* XPCandyTreeGiftView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DFB276350A60098D9EA /* XPCandyTreeGiftView.m */; }; + E8A03DFF27635F960098D9EA /* XPRoomCandyGiftView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A03DFE27635F960098D9EA /* XPRoomCandyGiftView.m */; }; E8A1E44E2761F98600B294CA /* XPCandyTreeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A1E44D2761F98600B294CA /* XPCandyTreeViewController.m */; }; E8A1E4512762082A00B294CA /* Api+CandyTree.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A1E4502762082A00B294CA /* Api+CandyTree.m */; }; E8A1E454276208E500B294CA /* CandyTreeInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A1E453276208E500B294CA /* CandyTreeInfoModel.m */; }; @@ -235,7 +244,7 @@ E8A1E45B27620F4900B294CA /* XPRoomHalfWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = E8A1E45A27620F4900B294CA /* XPRoomHalfWebView.m */; }; 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_lightsvga in Resources */ = {isa = PBXBuildFile; fileRef = E8A1E45F276220DA00B294CA /* candyTree_lightsvga */; }; + E8A1E462276220DA00B294CA /* candyTree_light.svga in Resources */ = {isa = PBXBuildFile; fileRef = E8A1E45F276220DA00B294CA /* candyTree_light.svga */; }; 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 */; }; @@ -764,6 +773,24 @@ E89DA67127008D59008483C1 /* WalletInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = WalletInfoModel.m; sourceTree = ""; }; E89DA67327009ACD008483C1 /* XPMineRechargeNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeNavView.h; sourceTree = ""; }; E89DA67427009ACD008483C1 /* XPMineRechargeNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeNavView.m; sourceTree = ""; }; + E8A03DE02762FA000098D9EA /* XPCandyTreeMoreView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeMoreView.h; sourceTree = ""; }; + E8A03DE12762FA000098D9EA /* XPCandyTreeMoreView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeMoreView.m; sourceTree = ""; }; + E8A03DE7276301CC0098D9EA /* XPCandyRankContainerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyRankContainerView.h; sourceTree = ""; }; + E8A03DE8276301CC0098D9EA /* XPCandyRankContainerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyRankContainerView.m; sourceTree = ""; }; + E8A03DEA276301EF0098D9EA /* XPCandyTreeRankView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeRankView.h; sourceTree = ""; }; + E8A03DEB276301EF0098D9EA /* XPCandyTreeRankView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeRankView.m; sourceTree = ""; }; + E8A03DEE276303D40098D9EA /* XPCandyTreeRankTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeRankTableViewCell.h; sourceTree = ""; }; + E8A03DEF276303D40098D9EA /* XPCandyTreeRankTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeRankTableViewCell.m; sourceTree = ""; }; + E8A03DF1276328FC0098D9EA /* CandyTreeRecordModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CandyTreeRecordModel.h; sourceTree = ""; }; + E8A03DF2276328FC0098D9EA /* CandyTreeRecordModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CandyTreeRecordModel.m; sourceTree = ""; }; + E8A03DF42763367F0098D9EA /* XPCandyTreeEmptyableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeEmptyableViewCell.h; sourceTree = ""; }; + E8A03DF52763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeEmptyableViewCell.m; sourceTree = ""; }; + E8A03DF727634A590098D9EA /* CandyTreeResultModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CandyTreeResultModel.h; sourceTree = ""; }; + E8A03DF827634A590098D9EA /* CandyTreeResultModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CandyTreeResultModel.m; sourceTree = ""; }; + E8A03DFA276350A60098D9EA /* XPCandyTreeGiftView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeGiftView.h; sourceTree = ""; }; + E8A03DFB276350A60098D9EA /* XPCandyTreeGiftView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeGiftView.m; sourceTree = ""; }; + E8A03DFD27635F960098D9EA /* XPRoomCandyGiftView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomCandyGiftView.h; sourceTree = ""; }; + E8A03DFE27635F960098D9EA /* XPRoomCandyGiftView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomCandyGiftView.m; sourceTree = ""; }; E8A1E44C2761F98600B294CA /* XPCandyTreeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeViewController.h; sourceTree = ""; }; E8A1E44D2761F98600B294CA /* XPCandyTreeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeViewController.m; sourceTree = ""; }; E8A1E44F2762082A00B294CA /* Api+CandyTree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+CandyTree.h"; sourceTree = ""; }; @@ -777,7 +804,7 @@ E8A1E45A27620F4900B294CA /* XPRoomHalfWebView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomHalfWebView.m; sourceTree = ""; }; 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_lightsvga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree_lightsvga; sourceTree = ""; }; + E8A1E45F276220DA00B294CA /* candyTree_light.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree_light.svga; 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 = ""; }; @@ -1817,6 +1844,8 @@ E83DB47C2746372300D8CBD1 /* XPRoomGiftBannerView.m */, E83DB4822746661800D8CBD1 /* XPRoomGiftBroadcastView.h */, E83DB4832746661800D8CBD1 /* XPRoomGiftBroadcastView.m */, + E8A03DFD27635F960098D9EA /* XPRoomCandyGiftView.h */, + E8A03DFE27635F960098D9EA /* XPRoomCandyGiftView.m */, E838D99E275E1BF60079E0B5 /* XPRoomAnimationView.h */, E838D99F275E1BF60079E0B5 /* XPRoomAnimationView.m */, ); @@ -2131,6 +2160,17 @@ path = IAPHelper; sourceTree = ""; }; + E8A03DED276303BA0098D9EA /* Cell */ = { + isa = PBXGroup; + children = ( + E8A03DEE276303D40098D9EA /* XPCandyTreeRankTableViewCell.h */, + E8A03DEF276303D40098D9EA /* XPCandyTreeRankTableViewCell.m */, + E8A03DF42763367F0098D9EA /* XPCandyTreeEmptyableViewCell.h */, + E8A03DF52763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m */, + ); + path = Cell; + sourceTree = ""; + }; E8A1E4462761F8EA00B294CA /* CandyTree */ = { isa = PBXGroup; children = ( @@ -2163,10 +2203,19 @@ E8A1E4492761F92100B294CA /* View */ = { isa = PBXGroup; children = ( + E8A03DED276303BA0098D9EA /* Cell */, E8A1E44C2761F98600B294CA /* XPCandyTreeViewController.h */, E8A1E44D2761F98600B294CA /* XPCandyTreeViewController.m */, + E8A03DE02762FA000098D9EA /* XPCandyTreeMoreView.h */, + E8A03DE12762FA000098D9EA /* XPCandyTreeMoreView.m */, E8A1E45927620F4900B294CA /* XPRoomHalfWebView.h */, E8A1E45A27620F4900B294CA /* XPRoomHalfWebView.m */, + E8A03DE7276301CC0098D9EA /* XPCandyRankContainerView.h */, + E8A03DE8276301CC0098D9EA /* XPCandyRankContainerView.m */, + E8A03DEA276301EF0098D9EA /* XPCandyTreeRankView.h */, + E8A03DEB276301EF0098D9EA /* XPCandyTreeRankView.m */, + E8A03DFA276350A60098D9EA /* XPCandyTreeGiftView.h */, + E8A03DFB276350A60098D9EA /* XPCandyTreeGiftView.m */, ); path = View; sourceTree = ""; @@ -2185,6 +2234,10 @@ children = ( E8A1E452276208E500B294CA /* CandyTreeInfoModel.h */, E8A1E453276208E500B294CA /* CandyTreeInfoModel.m */, + E8A03DF1276328FC0098D9EA /* CandyTreeRecordModel.h */, + E8A03DF2276328FC0098D9EA /* CandyTreeRecordModel.m */, + E8A03DF727634A590098D9EA /* CandyTreeResultModel.h */, + E8A03DF827634A590098D9EA /* CandyTreeResultModel.m */, ); path = Model; sourceTree = ""; @@ -2193,7 +2246,7 @@ isa = PBXGroup; children = ( E8A1E45D276220DA00B294CA /* candyTree_banner.svga */, - E8A1E45F276220DA00B294CA /* candyTree_lightsvga */, + E8A1E45F276220DA00B294CA /* candyTree_light.svga */, E8A1E45E276220DA00B294CA /* candyTree.svga */, ); path = Sources; @@ -2737,7 +2790,7 @@ E8A1E461276220DA00B294CA /* candyTree.svga in Resources */, 189DD53C26DE255600AB55B1 /* LaunchScreen.storyboard in Resources */, E8A1E460276220DA00B294CA /* candyTree_banner.svga in Resources */, - E8A1E462276220DA00B294CA /* candyTree_lightsvga in Resources */, + E8A1E462276220DA00B294CA /* candyTree_light.svga in Resources */, 189DD53926DE255600AB55B1 /* Assets.xcassets in Resources */, 186A52E726FC559700D67B2C /* yw_1222_0769.jpg in Resources */, 186A52E326FC559200D67B2C /* RPSDK.bundle in Resources */, @@ -2838,6 +2891,7 @@ E8AC722926F488DA007D6E91 /* XPMineFeedbackProtocol.h in Sources */, E8AC721E26F472BF007D6E91 /* XPMineSettingProtocol.h in Sources */, E83DB47A27462C4500D8CBD1 /* XPGiftBigPrizeModel.m in Sources */, + E8A03DF3276328FC0098D9EA /* CandyTreeRecordModel.m in Sources */, E81366F826F0C12A0076364C /* LoginFullInfoProtocol.h in Sources */, E8E70D7E26F2F19D00F03460 /* Api+Mine.m in Sources */, E824543D26F58C3A00BE8163 /* XPLoginBindSuccessView.m in Sources */, @@ -2850,6 +2904,7 @@ E82109B026F1D83500FC3319 /* LoginBindPhonePresent.m in Sources */, E8B825C726EA0D9A009E8E9F /* LoginVerifCodeProtocol.h in Sources */, E824544E26F5BC1A00BE8163 /* XPMineModifPayPwdView.m in Sources */, + E8A03DE22762FA000098D9EA /* XPCandyTreeMoreView.m in Sources */, E8B825CA26EA1231009E8E9F /* LoginVerifCodeViewController.m in Sources */, 189DD76226E60DDC00AB55B1 /* Api+Login.m in Sources */, 9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */, @@ -2866,12 +2921,14 @@ E87A270027588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m in Sources */, E82325F5274E2E09003A3332 /* XPUserCardPresenter.m in Sources */, E8AC723D26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m in Sources */, + E8A03DFC276350A60098D9EA /* XPCandyTreeGiftView.m in Sources */, 189DD73E26E21C3F00AB55B1 /* YYUtility.m in Sources */, E87A26FD27587E17002DDC7A /* HomeTagModel.m in Sources */, E8E70D8926F2F58F00F03460 /* XPMineMatchTableViewCell.m in Sources */, E88B5CA826FB089C00DA9178 /* XPMineTeenagePwdViewController.m in Sources */, E81C279626EB39CC0031E639 /* LoginForgetPasswordPresent.m in Sources */, 18EE3FF42750FA3700A452BF /* UIView+NIM.m in Sources */, + E8A03DFF27635F960098D9EA /* XPRoomCandyGiftView.m in Sources */, E8AC723526F49939007D6E91 /* XPMineNotificaPresenter.m in Sources */, 18EE3FE22750C29D00A452BF /* NIMBadgeView.m in Sources */, E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */, @@ -2944,6 +3001,7 @@ E81C279026EB314D0031E639 /* LoginForgetEditView.m in Sources */, E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */, E81C27A026EEF83D0031E639 /* XPHtmlUrl.m in Sources */, + E8A03DF0276303D40098D9EA /* XPCandyTreeRankTableViewCell.m in Sources */, 18E7B1B726E8B2D10064BC9B /* Api+Main.m in Sources */, E8B846D326FDDBE600A777FE /* XPMineRechargeTableViewCell.m in Sources */, E824546126F5F4E400BE8163 /* XPMineResetPayPwdViewController.m in Sources */, @@ -2951,6 +3009,7 @@ E8B825C226EA00DF009E8E9F /* LoginVerifCodePresent.m in Sources */, E88B5CB026FB1C6500DA9178 /* XPMineTeenagerPresenter.m in Sources */, E899C68927508F4E00E189E5 /* XPUserCardInfoModel.m in Sources */, + E8A03DE9276301CC0098D9EA /* XPCandyRankContainerView.m in Sources */, 186A534B26FC6ED900D67B2C /* TTPopupManagerService.m in Sources */, 18E7B1B226E8AF980064BC9B /* MainPresenter.m in Sources */, E81366F626F0C0DF0076364C /* LoginFullInfoPresenter.m in Sources */, @@ -2973,6 +3032,7 @@ E8680718271967B00024F48F /* MicroView.m in Sources */, E8B825CD26EA18C8009E8E9F /* ThemeColor.m in Sources */, E88B5CBD26FB3BDF00DA9178 /* XPTeenagerAlertView.m in Sources */, + E8A03DEC276301EF0098D9EA /* XPCandyTreeRankView.m in Sources */, 18F404C3276098F100A6C548 /* Api+Message.m in Sources */, E8C6FFED27550CC2004DC9F0 /* HomeSearchResultModel.m in Sources */, E8AEAEF327141C7C0017FCE0 /* XPRoomMessageContainerView.m in Sources */, @@ -3044,6 +3104,7 @@ 186A534D26FC6ED900D67B2C /* TTActionSheetView.m in Sources */, E83DB481274649FB00D8CBD1 /* XPGiftBannerUserInfoModel.m in Sources */, E878893F273A54F500BF1D57 /* XPGiftPresenter.m in Sources */, + E8A03DF62763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m in Sources */, E8AEAEED27141AE20017FCE0 /* XPRoomBackContainerView.m in Sources */, E88B5CC126FB407B00DA9178 /* XPMineUserInfoViewController.m in Sources */, 18F4043A275E20D900A6C548 /* TRTCRtcImpl.m in Sources */, @@ -3083,6 +3144,7 @@ E89D60C1271D64B9001F8895 /* RoomInfoModel.m in Sources */, E89DA66727006443008483C1 /* RechargeStorage.m in Sources */, 189DD53F26DE255600AB55B1 /* main.m in Sources */, + E8A03DF927634A590098D9EA /* CandyTreeResultModel.m in Sources */, E872308D26E89DAA00B90D4F /* LoginInputView.m in Sources */, E8788948273A55D000BF1D57 /* XPGiftBarView.m in Sources */, 189DD58F26DF97E700AB55B1 /* LoginPresenter.m in Sources */, diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/Contents.json new file mode 100644 index 00000000..d3dda4f9 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_candy_tree_record_refresh@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_candy_tree_record_refresh@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/room_candy_tree_record_refresh@2x.png b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candy_tree_record_refresh.imageset/room_candy_tree_record_refresh@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..394317deca5d614a1fbbb33225792c516923d49a GIT binary patch literal 457 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX3?zBp#Z3TGnE^f_u0T2s1Ei*=CL|<4gn?`f zd5}O#N(x*&Jv|-5h6uv7Kn#J%IyQV;0<=u2B*-tA;YY``6?SsoZ0}wssh|G*u8q>RQ=Y|#W6(VeDCC!ea!|uY;%{i{LXoK@Y{{K-|J84 z<~Fb~zWTG-ZPTZleKo!dUc0Q^bn#%5kG5M~aAlG4bH`gU{Z^A1&Rj5OOcK7Ov1wuF z??-hlcW>VlU6HNc_wLs9stb{f?R#rB?J|Qs%PtNn0`QUMT8vd)H)ErGWR(Zcf@ZA;(6yB~5t-qit{MIn}lV zsaG<*Q+>2&76wf?b;{}JvOe*%dk$4+CvgEeY}qX1L4x z^R;&HL-lo^d?m|sWgbt;6u#)f%XNBbZ+%3yZK}!EZX^2*IT7^?42<(VT^vI^jxU}1 za#OPcPb;(5qqy%&_3qaE58u;frKB4^^X1RWGk=&KbM|=P-kL1W?>yyeaz$IvGr`;2 zpWWP4GrOWkZo|nZ=T_aZU{thYoqFh5Wb)bhn`Y_6&$CRK7rblz^~q}vReS$pyni_L zp#P`33~|lJqF3hFa{ZQ7GXE7(r+1ExJ%2_?>fY29r}KK*v}%PDSC_8Hns_;i>HD`5 zjRfmO_oulnlBsupKF{NTgSwj0+ZQ*EpSiX8!SyeBnkAPK&I-Orm>99p_)oES=@*mw zOIMCAlD(jLzQqwY$dm)e)UOo{qpbT+p0p26DL%CfVo4sAGI9lSr-=KaMFIDBHdr+j52q;S8{ANNWzqRm z70cP7DQlhQHqTk56aV}HZ@@C+Ftv+k^P>u<<$eCG`S9~y0k0D&?_W$!iMQ7E?)#-4 n@GaG$x9p>7*Y9wS{V(}n*LX0tD|mkf#w~-VtDnm{r-UW|PrN6$ literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/Contents.json b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/Contents.json new file mode 100644 index 00000000..4304013b --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_candytree_wish_num1@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_candytree_wish_num1@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/room_candytree_wish_num1@2x.png b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/room_candytree_wish_num1@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..8d088c80642ab9b6957994f7d78539c961ad5526 GIT binary patch literal 1444 zcmW+#2~bm46itg3l%1kr5D5X2uuBNCud)R#jR6r_l}ZtmQK$oG5vgcVk*yj^WKj{6 zfs{>9v_b(Lfq=@MkP;xQA%?Yr1wzQb{pp*x-1}zkIp>~v?=~&aPjx4DCkBI2rTTl* z(bEiFBqarOZ{_AkU@%|qp&btPLDP*k75L}~eRvR1fJ2aVXakohZPSEVI~cJ7fi(;g zK}dmVTi_BlyR;;2sxV6d(E&7tMK=)I0fz`;N9f!OVte`hj3bN~%i~c?gkua{dN5!t zFGp`s%!&O-KTg`C2Mf+95zILvgGNZFF3dRr-yC>E=r@At|M6!iFl!GJHVBU(#~0bd zf)mWx!GMuGMdy?)GH49!J+SB^8zKVF6sB!p+!DCvFlG%vg%A5c>;Uu5uXt4h~} zLScU^t2mN=*pp(3SCmTEKCgTdp+h(`Il|=(w70fAudBG9dp9#ZEj2aa+_~`Ye7v1( zNQU}~(of3^b7HY*Tp$=3`Fo(RtFyhnwx*_%RZ&({n8#pbq+Cw=`BMD()1e`>zyJ~< zBD3rW`cz+2y*+~+-gk3E2l+G&%s)JQ*-~}l(Ro4gvC72YMM3g%Gm)Bxp+;(ZYEJLUf>7$g@@tV}Nn|J-(7vnlq;ddK54_?MhXjeUMTO&&YNBacg@7nQI7 zufB7zV#WPv6_}S=o?qbT5&iPzg}vpj zwqByI^m1*d`d(`m*P7i6U^7!WF$Q!a2U_>)6~)H6)g+g(0JoMr{}jnnuV+cwg;d`H zoNF_uwb1*?$?=-e0<(f+whg3O!8A+qNTnf+8Gqwo0QuKb8Jn8#mTR0w3k-T%@MK*j z|AD-161Q7qPP_g1UE3GcHAB(uX*U@+h4#$TCWlTPpk}+VqVfrn=m(W*w;r49zIsJ% z#hF>vK6Ng2etVprUDnN4Uk|JQb%@>Qdt{V)$366-e#Kzq<=esQIV&n}v)mctqJy~Y zIZgSAI*p20YyMOoQWNTeU%o_hE! ztEsk1=1V16Cc0|!@1>W`6kcdL5z4l{6+QI{W@f94E_? zw#?@j@|r9%O2@Ios*bt%662!6oekVk!1@Qpe% zn{;VzDJC0&yGttmcu`tUHZeKkFlUH;~K?<+g-k_fF#kfAmLTs6K(- JHC{hl{|^MG9f$w` literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/room_candytree_wish_num1@3x.png b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num1.imageset/room_candytree_wish_num1@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..b56d2c058c345a6b3ccb89637870f1394390ee0d GIT binary patch literal 2529 zcmX9<2|QH!1J@yKt|Z5ZQ6|T@W=AS zMjmzV06YTd-UVj%A<}#sL~9aefWdgswi984!K0?q4wR@>4fOq(K4^r9!iw`G&})Ez zxjziRJTM7t7zPZPz=~pqI>HR6fG1Ax0}Oq@u|j(I|6DjA&jz^<`$Pf~z$g~!1QE3Y zW9Fa_ZixV9?GT}1EYzt77&{PVI9d+|OcKF}3FyZlVTVl+=i`oK42o>yP!4YvTaDZ!v zT6GX1cuhOdK;Q_^g2v5|GWm886ARmeTD2j%4q)LCWY@;LZb2WGQ@bY43BUdnv| zW>djb9N-4PHO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ynH!ckPrLd|t*txen zNawnp%=Uqn{)a31;2x&xMP=NJBMpsr;KawNCRZh^@f2@rJ)2%4QtB{&mfUh|02)ho7X>eA_%%0j#_Aeq5dN6Z+0% z!I&?F0{tiU^1iS)fx*AE$vFKz&#Z~(ze_sud?hrzu%iU}GA1iEKR4HQy5P}q2IC7v zuRpVCaYs=EDXsOG`$pwotD`q>-Y9(gujaX8;4D=QAowuzJ&&01)ciur<>-eHuy0$E zM>4p%?t$b^P5N4;1K8N=3E%T*js|}UtAACKu5<`b$jMPGu-PpwEhQx-)#eduQQLOQ zY|yi_uDQF`A+-~d=g+rI)gt;cXEtr3<|GGpM91x1#!_ptf}#S8D?Z>ntj#?GpGj>j*Pj1oI`!#yrKMf<=XN@-9$0bcsBp3&+S_9EuVZ2kBt$kx HWPbezK8Vy% literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num2.imageset/room_candytree_wish_num2@3x.png b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num2.imageset/room_candytree_wish_num2@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..76e694d831b07eeafac566412dfc307d4dce0556 GIT binary patch literal 2566 zcmW+%2{_d0AGbtBvfJjqX684)p(IKaiEXtZWgHV~C2d4VB9+e7A!^%H>*&I^8%sH& zNCv|&=Wk}1!5A~T?)3zL6QK@gp46P zk}!lAAR);DW2nQJiL;T^gSb&(fNV*FtOgrRx?91HVGYKDPSs$*PBDT*0P!Oztir4x z3$~2{JzemDb~vvS!D~k~slfJ8BuNCYAtXVnp+ay8hygO#F@hvYK!Oz6x!S;%NuX0~ z*E|X5w}V^)h*g@iv6_8=!b7#oR;e^XcsbZQ0rXQ~Vyp&_>KI1!b-@K~8gc}O3}Z6v zTBmG9jbQ8eDs$Ty&=0NR$wFJnXN@-`K?0+(Y=`O*JR;aGL-a!cn+D>>5Pb{{9w3QU zO_GIR>y$PB3xY$0Q@OT+W|Rgnh(i&?a4{Aj48b{g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.json b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/Contents.json new file mode 100644 index 00000000..96cf7da2 --- /dev/null +++ b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "room_candytree_wish_num3@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "room_candytree_wish_num3@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/room_candytree_wish_num3@2x.png b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/room_candytree_wish_num3@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..1da6be6c06f5c110bf770105167b3c1f9c09a4ad GIT binary patch literal 1430 zcmW+#doLNW`-ebWD)z_{o{MT_ug~w=YBr-d%h)+m@sE24<`fy;T(P_ zGz#3l;P@=I1GYo@BpHENV2g~1L4y$A%VDSuRFRA-Q!*6ljt&7`p&_ujuUH%!1UD$P zRH2jssToQgO`@QQpa!v=D3*gf10DdDER@jYFjWG9kRq1Ht(PdvbbuV(OpKiAkkxL}4A0n#>=x`u7@LJFII}!0#ZHd2~!; z8y0-DN-rtJyzTJAD4WHB2xDlxyW zje;*P$-NMNV4we5H;1{;;})|CmWlg1-ZnA_&!1J`aHaV-u3brpjfuu!&|6o|%}frO zwfyexRx-K%Wnp1PA||5k3X+dNESw4t4T;&w;fjuDdxWfT9NiRp7*?y*r##aKN7M?h zJNAp$$CbL~+bf-F}Xup!$VkwXK;(kwBlU7#NToZF2jpl^- zG7Z%)S!2PDHPzOO582iBD~^w(rh3;{qAEA}-$%beP9EH~|w!L6_Hm}5Z>d#B_Zm~p0 zv_nu=K$Nee^R0(5PNv*3atvWnav?P*cNfH%)rh1Pd9=|FyvmetIN+8c%;@VJo8-3 zQFf}SiaCSnxSb&C+<4Y|!z$G;t*5Zwhp@=l!COEygMdDZe0Ie@ezm3?m_&v-U$4f1MieMty_6wHuj{{65ovd z;Y8EP_TG%Z#7<_O!PNE5UjxYfVFsdnC{9RKWL#h5*1Z5T`0OmUqKu?UbZoN<+yo=e`n-L=X*v*jwHaHimWk?vbkXRw7~b#NPZsz>vqauEhY`@rkiJFDW2{5H2?@U;ex_(@ayKJaR2tQr?_&4t`UdQ0Xcpgy9Ld zAK~Ik9F{bt9}XqmJLr!>jti`koqESfgk@#q)#hT^N@LUOW>!jeC{B%Ijg;-NlF{?% aJiBF=qR^dLNjt%ZLxiI-q163JxBdlvL{&Bb literal 0 HcmV?d00001 diff --git a/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/room_candytree_wish_num3@3x.png b/xplan-ios/Assets.xcassets/Room/CandyTree/room_candytree_wish_num3.imageset/room_candytree_wish_num3@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..4ff9b95f8d504bd47e07987beb5bb5ffd5399acb GIT binary patch literal 2699 zcmX9<2|QK#7ndwEBO{@*q^Y5y`lrPb8INo!SwaYH7=)BvQbVFF(_~3nB-vix{#2x7 z$@08?-xu%M*Y{rN+2`tiKlh${f4_Uq_k6$SoX_X?(8tSN^B03(l$4Y-Jx;lt1KuFu zvHxi^U`O;yoRyT6zx#Oly8_E*KEJjP3!^Z=eM}VUL&^9IpU($l2?&+|&f?YfVjwgY zgwBJ}I9==O8*T%5D1{DX@E}Agk|##61q~Q%UEctbBdW*XU{nT#L`85!Fd7rV5dupT zcM!qiLr63fZxF>5Ly2SriwC7LkZb{zOhaz?Fo9S!0LA1Xxq~SF5R^oN5XdN=7+At6 z^tV_7VE^w42LO2@B%6=o2*Cs@k}E=SMF<85N~EBFfS`oK2s$6g2!H^vzzuxEC`^=K zXoCP>jN}X=fN-7|My5fC6eK{2Oxs|~=A-#y00aO>^CbWofEelr0+8#6iVevKmJmWD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/XPHtmlUrl.h @@ -23,8 +23,12 @@ typedef NS_ENUM(NSUInteger, URLType) { kReportRoomURL,///举报房间 ///分享房间 kShareRoomURL, - /// 参加糖果树 + /// 糖果树获取糖果 kCandyTreeURL, + /// 获奖记录 + kCandyTreeRecordURL, + /// 糖果树玩法规则 + kCandyTreeRuleURL, }; NSString * const URLWithType(URLType type); diff --git a/xplan-ios/Global/XPHtmlUrl.m b/xplan-ios/Global/XPHtmlUrl.m index bd4e067e..4726740d 100644 --- a/xplan-ios/Global/XPHtmlUrl.m +++ b/xplan-ios/Global/XPHtmlUrl.m @@ -12,17 +12,19 @@ NSString * const URLWithType(URLType type) { NSString * prefix = @"yinyou"; NSDictionary * dic = @{ - @(kPrivacyURL): @"modules/rule/privacy-wap.html", - @(kUserProtocalURL) : @"modules/rule/protocol.html", - @(kUserInviteFriendURL): @"modules/game/index.html", - @(kFAQURL) : @"modules/rule/guide.html ",//常见问题 - @(kIdentityURL):@"modules/identity/new.html",//实人认证 - @(kGameBindAccountURL):@"modules/game/bindAccount.html",///绑定账号 - @(kNurseryURL):@"activity/cleanNet/index.html", - @(kRechargePrivacyURL) : @"modules/rule/rechargeAgreement.html",//充值协议 - @(kReportRoomURL) : @"modules/inform/index.html",///举报房间 - @(kShareRoomURL) : @"modules/share_room/index.html",///分享房间 - @(kCandyTreeURL) : @"activity/explore/index.html",///参加糖果树 + @(kPrivacyURL) : @"modules/rule/privacy-wap.html", + @(kUserProtocalURL) : @"modules/rule/protocol.html", + @(kUserInviteFriendURL) : @"modules/game/index.html", + @(kFAQURL) : @"modules/rule/guide.html ",//常见问题 + @(kIdentityURL) : @"modules/identity/new.html",//实人认证 + @(kGameBindAccountURL) : @"modules/game/bindAccount.html",///绑定账号 + @(kNurseryURL) : @"activity/cleanNet/index.html", + @(kRechargePrivacyURL) : @"modules/rule/rechargeAgreement.html",//充值协议 + @(kReportRoomURL) : @"modules/inform/index.html",///举报房间 + @(kShareRoomURL) : @"modules/share_room/index.html",///分享房间 + @(kCandyTreeURL) : @"activity/explore/index.html",///参加糖果树 + @(kCandyTreeRuleURL) : @"modules/rank/index.html#/wishingWellRule",///糖果树规则 + @(kCandyTreeRecordURL) : @"modules/rank/index.html#/wishingWellRecord",///糖果树记录 }; NSString * url = [dic objectForKey:@(type)]; diff --git a/xplan-ios/Main/IM/Model/AttachmentModel.h b/xplan-ios/Main/IM/Model/AttachmentModel.h index a2999f65..033f5481 100644 --- a/xplan-ios/Main/IM/Model/AttachmentModel.h +++ b/xplan-ios/Main/IM/Model/AttachmentModel.h @@ -14,12 +14,16 @@ typedef NS_ENUM(NSUInteger, CustomMessageType) { CustomMessageType_Room_Tip = 2, ///送礼物的接口 CustomMessageType_Gift = 3, + ///账户更新 + CustomMessageType_Account = 5, ///队列操作 CustomMessageType_Queue = 8, ///全麦送 CustomMessageType_AllMicroSend = 12, ///踢出房间 CustomMessageType_Kick_User = 18, + ///糖果树 + CustomMessageType_Candy_Tree = 26, ///福袋消息 CustomMessageType_LuckyBag = 61, }; @@ -43,6 +47,12 @@ typedef NS_ENUM(NSUInteger, CustomMessageSubGift) { Custom_Message_Sub_Gift_LuckySend = 34, }; +///first = CustomMessageType_Account +typedef NS_ENUM(NSUInteger, CustomMessageSubAccount) { + //账户余额钻石变更 + Custom_Message_Sub_Account_Changed = 51, +}; + ///first = CustomMessageType_Queue typedef NS_ENUM(NSInteger, CustomMessageSubQueue) { ///邀请上麦 @@ -69,7 +79,14 @@ typedef NS_ENUM(NSUInteger, CustomNotificationSubKick) { Custom_Message_Sub_Kick_BlackList = 182, ///踢出房间 Custom_Message_Sub_Kick_BeKicked = 181, -} ; +}; + +///first = CustomMessageType_Candy_Tree +typedef NS_ENUM(NSUInteger, CustomMessageSubCandyTree) { + ///开箱子开到全麦送 (服务端发) + Custom_Message_Sub_Candy_Tree_InRoom_NeedAllMicSend = 265, + //暴击的没用 不写了 +}; ///first = CustomMessageType_LuckyBag typedef NS_ENUM(NSUInteger, CustomMessageSubLuckyBag) { diff --git a/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m b/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m index af9759ce..be7ce11f 100644 --- a/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m +++ b/xplan-ios/Main/Room/View/AnimationView/XPRoomAnimationView.m @@ -30,6 +30,7 @@ ///View #import "XPRoomGiftBannerView.h" #import "XPRoomGiftBroadcastView.h" +#import "XPRoomCandyGiftView.h" @interface XPRoomAnimationView () @@ -71,6 +72,8 @@ @property (nonatomic,strong) NSMutableSet * giftReuseArray; ///可见池 @property (nonatomic,strong) NSMutableSet * giftVisibleArray; +///糖果树礼物的队列 +@property (nonatomic,strong) NSMutableArray *candyTreegiftQueue; @end @implementation XPRoomAnimationView @@ -154,11 +157,56 @@ [self receiveGift:receiveInfo]; } else if (attachment.first == CustomMessageType_LuckyBag) {//福袋消息厅内展示 [self receiveLuckyGiftBigPrize:attachment]; + } else if (attachment.first == CustomMessageType_Candy_Tree || attachment.second == Custom_Message_Sub_Candy_Tree_InRoom_NeedAllMicSend ) {//糖果树 + [self receiveCandyTreeGiftHighLevle:attachment]; } } } } +#pragma mark - 糖果树横幅动画 +- (void)receiveCandyTreeGiftHighLevle:(AttachmentModel *)attatchment { + if (self.candyTreegiftQueue.count == 0) { + [self createCandyTreeBannerAnimation:attatchment.data]; + } + [self.candyTreegiftQueue addObject:attatchment.data]; +} + +- (void)createCandyTreeBannerAnimation:(NSDictionary *)dic { + XPRoomCandyGiftView *candyTreeView = [[XPRoomCandyGiftView alloc] initWithFrame:CGRectMake(KScreenWidth, kNavigationHeight + 15, KScreenWidth, 45)]; + candyTreeView.candyInfo = dic; + [self.middleLevelView addSubview:candyTreeView]; + POPSpringAnimation *springAnimation = [POPSpringAnimation animationWithPropertyNamed:kPOPViewCenter]; + springAnimation.springSpeed = 12; + springAnimation.springBounciness = 10.f; + springAnimation.fromValue = [NSValue valueWithCGPoint:candyTreeView.center]; + springAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(candyTreeView.frame.size.width / 2, candyTreeView.center.y)]; + [springAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { + if (finished) { + POPBasicAnimation *moveAnimation = [POPBasicAnimation animationWithPropertyNamed:kPOPViewCenter]; + moveAnimation.fromValue = [NSValue valueWithCGPoint:CGPointMake(candyTreeView.frame.size.width / 2, candyTreeView.center.y)]; + moveAnimation.toValue = [NSValue valueWithCGPoint:CGPointMake(-KScreenWidth/2, candyTreeView.center.y)]; + moveAnimation.beginTime = CACurrentMediaTime() + 3; + moveAnimation.duration = 0.5; + moveAnimation.repeatCount = 1; + moveAnimation.removedOnCompletion = YES; + @kWeakify(self); + [moveAnimation setCompletionBlock:^(POPAnimation *anim, BOOL finished) { + @kStrongify(self); + if (finished) { + [candyTreeView removeFromSuperview]; + [self.candyTreegiftQueue removeObjectAtIndex:0]; + if (self.candyTreegiftQueue.count > 0) { + [self createCandyTreeBannerAnimation:self.candyTreegiftQueue.firstObject]; + } + } + }]; + [candyTreeView pop_addAnimation:moveAnimation forKey:@"moveOutAnimation"]; + } + }]; + [candyTreeView pop_addAnimation:springAnimation forKey:@"candyTreespingOutAnimation"]; +} + #pragma mark - 收到礼物展示动画 - (void)receiveGiftHandleSendGiftAnimation:(AttachmentModel *)attachment { GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data]; @@ -814,4 +862,11 @@ return _giftVisibleArray; } +- (NSMutableArray *)candyTreegiftQueue { + if (!_candyTreegiftQueue) { + _candyTreegiftQueue = [NSMutableArray array]; + } + return _candyTreegiftQueue; +} + @end diff --git a/xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.h b/xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.h new file mode 100644 index 00000000..4cd58378 --- /dev/null +++ b/xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.h @@ -0,0 +1,17 @@ +// +// XPRoomCandyGiftView.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPRoomCandyGiftView : UIView +///糖果的信息 +@property (nonatomic,copy) NSDictionary * candyInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.m b/xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.m new file mode 100644 index 00000000..7577fcfc --- /dev/null +++ b/xplan-ios/Main/Room/View/AnimationView/XPRoomCandyGiftView.m @@ -0,0 +1,90 @@ +// +// XPRoomCandyGiftView.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "XPRoomCandyGiftView.h" +///Third +#import +#import +#import "XPMacro.h" +#import "ThemeColor+Room.h" +@interface XPRoomCandyGiftView () +///动画管理类 +@property (strong, nonatomic) SVGAParser *parser; +///糖果树特效 +@property (nonatomic,strong) SVGAImageView *candyTreeView; +@end + +@implementation XPRoomCandyGiftView + +- (void)dealloc { + NSLog(@"销毁了"); +} + +- (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.candyTreeView]; +} + +- (void)initSubViewConstraints { + [self.candyTreeView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self); + make.height.mas_equalTo(45); + }]; +} + +- (NSAttributedString *)createAttribute:(NSString * )text color:(UIColor *)color { + NSDictionary * attribute = @{NSFontAttributeName:[UIFont systemFontOfSize:22], NSForegroundColorAttributeName:color}; + NSMutableAttributedString *attr = [[NSMutableAttributedString alloc] initWithString:text attributes:attribute]; + return attr; +} + +#pragma mark - Getters And Setters +- (void)setCandyInfo:(NSDictionary *)candyInfo { + if (candyInfo) { + NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init]; + [attribute appendAttributedString:[self createAttribute:@"厉害了! " color:[UIColor whiteColor]]]; + [attribute appendAttributedString:[self createAttribute:candyInfo[@"nick"] color:[ThemeColor messageNickColor]]]; + [attribute appendAttributedString:[self createAttribute:@"摘下糖果得 " color:[UIColor whiteColor]]]; + [attribute appendAttributedString:[self createAttribute:candyInfo[@"prizeName"] color:[ThemeColor appMainColor]]]; + @kWeakify(self); + [self.parser parseWithNamed:@"candyTree_banner" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { + @kStrongify(self); + self.candyTreeView.loops = INT_MAX; + self.candyTreeView.clearsAfterStop = NO; + self.candyTreeView.videoItem = videoItem; + [self.candyTreeView setAttributedText:attribute forKey:@"tgs_copywriting"]; + [self.candyTreeView startAnimation]; + } failureBlock:^(NSError * _Nonnull error) { + + }]; + } +} + +- (SVGAImageView *)candyTreeView { + if (!_candyTreeView) { + _candyTreeView = [[SVGAImageView alloc]init]; + _candyTreeView.backgroundColor = [UIColor clearColor]; + _candyTreeView.userInteractionEnabled = NO; + } + return _candyTreeView; +} + +- (SVGAParser *)parser { + if (!_parser) { + _parser = [[SVGAParser alloc]init]; + } + return _parser; +} +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.h b/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.h index 1996c607..059aeabc 100644 --- a/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.h +++ b/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.h @@ -14,6 +14,29 @@ NS_ASSUME_NONNULL_BEGIN /// @param complection 完成 /// @param uid 用的uid + (void)candyTreeKeyComplection:(HttpRequestHelperCompletion)complection uid:(NSString *)uid; + +/// 摘糖果 +/// @param complection 完成 +/// @param sendMessage 是否发送消息 目前默认发送 +/// @param keyNum 糖果的个数 +/// @param boxType 类型 目前好像只有一种 +/// @param roomUid 房间的uid +/// @param uid 用户自己的uid ++ (void)pickCandyComplection:(HttpRequestHelperCompletion)complection + sendMessage:(NSString *)sendMessage + keyNum:(NSString *)keyNum + boxType:(NSString *)boxType + roomUid:(NSString *)roomUid + uid:(NSString *)uid; +/// 获取糖果树排行榜 +/// @param complection 完成 +/// @param page 当前的页数 +/// @param pageSize 一页多少个 +/// @param datetype 类型 今天榜单的话 1 昨日榜 2 ++ (void)candyTreeRankListComplection:(HttpRequestHelperCompletion)complection + page:(NSString *)page + pageSize:(NSString *)pageSize + datetype:(NSString *)datetype; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.m b/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.m index a029019e..259c5f8d 100644 --- a/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.m +++ b/xplan-ios/Main/Room/View/CandyTree/Api/Api+CandyTree.m @@ -17,4 +17,24 @@ [self makeRequest:@"box/userkey" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, uid, nil]; } +/// 摘糖果 +/// @param complection 完成 +/// @param sendMessage 是否发送消息 目前默认发送 +/// @param keyNum 糖果的个数 +/// @param boxType 类型 目前好像只有一种 +/// @param roomUid 房间的uid ++ (void)pickCandyComplection:(HttpRequestHelperCompletion)complection sendMessage:(NSString *)sendMessage keyNum:(NSString *)keyNum boxType:(NSString *)boxType roomUid:(NSString *)roomUid uid:(NSString *)uid{ + [self makeRequest:@"box/draw" method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, sendMessage, keyNum, boxType, roomUid, uid, nil]; +} + + +/// 获取糖果树排行榜 +/// @param complection 完成 +/// @param page 当前的页数 +/// @param pageSize 一页多少个 +/// @param datetype 类型 今天榜单的话 1 昨日榜 2 ++ (void)candyTreeRankListComplection:(HttpRequestHelperCompletion)complection page:(NSString *)page pageSize:(NSString *)pageSize datetype:(NSString *)datetype { + [self makeRequest:@"box/rankings" method:HttpRequestHelperMethodGET completion:complection, __FUNCTION__, page, pageSize, datetype, nil]; +} + @end diff --git a/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.h b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.h new file mode 100644 index 00000000..ca97502b --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.h @@ -0,0 +1,23 @@ +// +// CandyTreeRecordModel.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface CandyTreeRecordModel : NSObject +///昵称 +@property (copy, nonatomic) NSString *nick; +///头像 +@property (copy, nonatomic) NSString *avatar; +///排名 +@property (nonatomic,copy) NSString *ranking; +///糖果树排行榜钻石 +@property (nonatomic,copy) NSString *amount; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.m b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.m new file mode 100644 index 00000000..886a7f0b --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeRecordModel.m @@ -0,0 +1,12 @@ +// +// CandyTreeRecordModel.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "CandyTreeRecordModel.h" + +@implementation CandyTreeRecordModel + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.h b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.h new file mode 100644 index 00000000..61fc3849 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.h @@ -0,0 +1,46 @@ +// +// CandyTreeResultModel.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, CandyTreeGiftLevel) { + CandyTreeGiftLevel_First = 1, + CandyTreeGiftLevel_Second, + CandyTreeGiftLevel_Third, + CandyTreeGiftLevel_Four, +}; + +@interface CandyTreeGiftInfoModel : NSObject +///奖品数量 +@property (nonatomic, assign) int prizeNum; +///相关实体id +@property (nonatomic, assign) NSInteger referenceId; +///奖品等级 +@property (nonatomic, assign) CandyTreeGiftLevel prizeLevel; +///奖品名称 +@property (nonatomic, copy) NSString *prizeName; +///奖品icon +@property (nonatomic, copy) NSString *prizeImgUrl; +///奖品id +@property (nonatomic, assign) NSInteger prizeId; +///价格 +@property (nonatomic, assign) CGFloat platformValue; +@end + +@interface CandyTreeResultModel : NSObject +///剩余金币数 +@property (nonatomic,assign) NSInteger goldNum; +///开出的礼物 +@property (nonatomic,copy) NSArray *prizeItemList; +///剩余的糖果 +@property (nonatomic,assign) NSInteger remainKeyNum; + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.m b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.m new file mode 100644 index 00000000..414da9dc --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/Model/CandyTreeResultModel.m @@ -0,0 +1,22 @@ +// +// CandyTreeResultModel.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "CandyTreeResultModel.h" + +@implementation CandyTreeGiftInfoModel + + + +@end + +@implementation CandyTreeResultModel + ++ (NSDictionary *)objectClassInArray { + return @{@"prizeItemList": CandyTreeGiftInfoModel.class}; +} + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.h b/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.h index d07e4ec6..e92ac931 100644 --- a/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.h +++ b/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.h @@ -12,6 +12,11 @@ NS_ASSUME_NONNULL_BEGIN @interface XPCandyTreePresenter : BaseMvpPresenter /// 获取糖果树信息 - (void)getCandyTreeInfo; + +/// 摘糖果 +/// @param keyNum 摘取的个数 +/// @param roomUid 房主的uid +- (void)pickCandy:(NSString *)keyNum roomUid:(NSString *)roomUid; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.m b/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.m index 97336d31..1808adea 100644 --- a/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.m +++ b/xplan-ios/Main/Room/View/CandyTree/Presenter/XPCandyTreePresenter.m @@ -10,6 +10,7 @@ #import "AccountInfoStorage.h" #import "XPCandyTreeProtocol.h" #import "CandyTreeInfoModel.h" +#import "CandyTreeResultModel.h" @implementation XPCandyTreePresenter @@ -23,4 +24,18 @@ } showLoading:YES] uid:uid]; } + +/// 摘糖果 +/// @param keyNum 摘取的个数 +/// @param roomUid 房主的uid +- (void)pickCandy:(NSString *)keyNum roomUid:(NSString *)roomUid { + NSString * uid = [AccountInfoStorage instance].getUid; + [Api pickCandyComplection:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + CandyTreeResultModel * resultModel = [CandyTreeResultModel modelWithJSON:data.data]; + [[self getView] pickCandySuccess:resultModel]; + }fail:^(NSInteger code, NSString * _Nullable msg) { + [[self getView] pickCandyFail]; + }] sendMessage:@"1" keyNum:keyNum boxType:@"1" roomUid:roomUid uid:uid]; +} + @end diff --git a/xplan-ios/Main/Room/View/CandyTree/Protocol/XPCandyTreeProtocol.h b/xplan-ios/Main/Room/View/CandyTree/Protocol/XPCandyTreeProtocol.h index b7a15d9c..6ea1bd0a 100644 --- a/xplan-ios/Main/Room/View/CandyTree/Protocol/XPCandyTreeProtocol.h +++ b/xplan-ios/Main/Room/View/CandyTree/Protocol/XPCandyTreeProtocol.h @@ -8,11 +8,14 @@ #import NS_ASSUME_NONNULL_BEGIN -@class CandyTreeInfoModel; +@class CandyTreeInfoModel, CandyTreeResultModel; @protocol XPCandyTreeProtocol ///获取糖果树信息成功 - (void)getCandyTreeInfoSuccess:(CandyTreeInfoModel *)info; - +///摘糖果成功 +- (void)pickCandySuccess:(CandyTreeResultModel *)result; +///摘糖果失败 +- (void)pickCandyFail; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.h b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.h new file mode 100644 index 00000000..6f2caa80 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.h @@ -0,0 +1,16 @@ +// +// XPCandyTreeEmptyableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPCandyTreeEmptyableViewCell : UITableViewCell + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.m b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.m new file mode 100644 index 00000000..903f6bdc --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeEmptyableViewCell.m @@ -0,0 +1,70 @@ +// +// XPCandyTreeEmptyableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "XPCandyTreeEmptyableViewCell.h" +///Third +#import +#import "UIImageConstant.h" +#import "ThemeColor.h" + +@interface XPCandyTreeEmptyableViewCell () +@property (nonatomic,strong) UIImageView *emptyImageView; +@property (nonatomic,strong) UILabel *titleLabel; +@end + +@implementation XPCandyTreeEmptyableViewCell + +- (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.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.emptyImageView]; + [self.contentView addSubview:self.titleLabel]; +} + +- (void)initSubViewConstraints { + [self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.contentView); + make.top.mas_equalTo(self.contentView).offset(50); + make.size.mas_equalTo(CGSizeMake(100, 100)); + }]; + + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.emptyImageView.mas_bottom).offset(20); + make.left.right.mas_equalTo(self.contentView); + }]; +} +#pragma mark - Getters And Setters +- (UIImageView *)emptyImageView { + if (!_emptyImageView) { + _emptyImageView = [[UIImageView alloc] init]; + _emptyImageView.userInteractionEnabled = YES; + _emptyImageView.image = [UIImageConstant defalutEmptyPlaceholder]; + _emptyImageView.layer.masksToBounds = YES; + _emptyImageView.contentMode = UIViewContentModeScaleAspectFit; + } + return _emptyImageView; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.text = @"暂无数据"; + _titleLabel.font = [UIFont systemFontOfSize:16]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textColor = [ThemeColor secondTextColor]; + } + return _titleLabel; +} + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.h b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.h new file mode 100644 index 00000000..fcecdf44 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.h @@ -0,0 +1,17 @@ +// +// XPCandyTreeRankTableViewCell.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class CandyTreeRecordModel; +@interface XPCandyTreeRankTableViewCell : UITableViewCell +/// +@property (nonatomic,strong) CandyTreeRecordModel *roomRankModel; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.m b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.m new file mode 100644 index 00000000..49ecdc36 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/Cell/XPCandyTreeRankTableViewCell.m @@ -0,0 +1,199 @@ +// +// XPCandyTreeRankTableViewCell.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "XPCandyTreeRankTableViewCell.h" +///Third +#import +///Tool +#import "ThemeColor+Room.h" +#import "NetImageView.h" +///Model +#import "CandyTreeRecordModel.h" +@interface XPCandyTreeRankTableViewCell () +///排行榜图片 +@property (nonatomic, strong) UIImageView *rankImageView; +///排行榜 +@property (nonatomic, strong) UILabel *rankLabel; +///头像 +@property (nonatomic, strong) NetImageView *avatarImageView; +///性别 +@property (nonatomic, strong) UIImageView *genderImageView; +///昵称 +@property (nonatomic, strong) UILabel *nickNameLabel; +///金币数 +@property (nonatomic, strong) UILabel *coinNumberLabel; +/// 钻石 +@property (nonatomic, strong) UIImageView *coinImageView; +///分割线 +@property (nonatomic, strong) UIView *sepView; +@end + +@implementation XPCandyTreeRankTableViewCell + +- (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.selectionStyle = UITableViewCellSelectionStyleNone; + [self.contentView addSubview:self.rankImageView]; + [self.contentView addSubview:self.rankLabel]; + [self.contentView addSubview:self.avatarImageView]; + [self.contentView addSubview:self.nickNameLabel]; + [self.contentView addSubview:self.coinNumberLabel]; + [self.contentView addSubview:self.coinImageView]; + [self.contentView addSubview:self.sepView]; +} + +- (void)initSubViewConstraints { + [self.rankLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(15); + make.width.mas_equalTo(26); + make.centerY.mas_equalTo(self); + }]; + + [self.rankImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.center.mas_equalTo(self.rankLabel); + make.width.mas_equalTo(21); + make.height.mas_equalTo(20); + }]; + + [self.avatarImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerY.mas_equalTo(self.contentView); + make.width.height.mas_equalTo(46); + make.left.mas_equalTo(self.rankLabel.mas_right).offset(10); + }]; + + [self.nickNameLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.avatarImageView.mas_right).offset(10); + make.centerY.mas_equalTo(self.avatarImageView); + make.right.mas_lessThanOrEqualTo(self.coinNumberLabel.mas_left).offset(-5); + }]; + + [self.coinImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-15); + make.centerY.mas_equalTo(self.avatarImageView.mas_centerY); + make.width.mas_equalTo(18); + make.height.mas_equalTo(15); + }]; + + [self.coinNumberLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.coinImageView.mas_left).offset(-3); + make.centerY.mas_equalTo(self.avatarImageView); + make.left.mas_equalTo(self.nickNameLabel.mas_right).offset(10); + }]; + + [self.sepView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(5); + make.left.mas_equalTo(self.nickNameLabel.mas_left); + make.right.mas_equalTo(-15); + make.height.mas_equalTo(0.5); + }]; +} + +#pragma mark - Getters And Setters +- (void)setRoomRankModel:(CandyTreeRecordModel *)roomRankModel { + _roomRankModel = roomRankModel; + NSString *rankImage = [NSString stringWithFormat:@"room_candytree_wish_num%d", _roomRankModel.ranking.intValue]; + if (roomRankModel.ranking.intValue <= 3) { + self.rankImageView.image = [UIImage imageNamed:rankImage]; + self.rankImageView.hidden = NO; + self.rankLabel.hidden = YES; + }else { + self.rankLabel.text = _roomRankModel.ranking; + self.rankImageView.hidden = YES; + self.rankLabel.hidden = NO; + } + self.coinNumberLabel.text = roomRankModel.amount; + self.avatarImageView.imageUrl = _roomRankModel.avatar; + self.nickNameLabel.text = _roomRankModel.nick;; +} + +- (UIImageView *)rankImageView { + if (!_rankImageView) { + _rankImageView = [[UIImageView alloc] init]; + } + return _rankImageView; +} + + +- (UILabel *)rankLabel { + if (!_rankLabel) { + _rankLabel = [[UILabel alloc] init]; + _rankLabel.font = [UIFont systemFontOfSize:13]; + _rankLabel.textAlignment = NSTextAlignmentCenter; + _rankLabel.textColor = UIColorFromRGB(0x666666); + } + return _rankLabel; +} + +- (NetImageView *)avatarImageView { + if (!_avatarImageView) { + NetImageConfig * config = [[NetImageConfig alloc] init]; + config.placeHolder = [UIImageConstant defaultAvatarPlaceholder]; + config.imageType = ImageTypeUserIcon; + _avatarImageView = [[NetImageView alloc] initWithConfig:config]; + _avatarImageView.layer.masksToBounds = YES; + _avatarImageView.layer.cornerRadius = 23; + } + return _avatarImageView; +} + + +- (UIImageView *)genderImageView { + if (!_genderImageView) { + _genderImageView = [[UIImageView alloc] init]; + _genderImageView.hidden = YES; + [_genderImageView setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; + } + return _genderImageView; +} + +- (UILabel *)nickNameLabel { + if (!_nickNameLabel) { + _nickNameLabel = [[UILabel alloc] init]; + _nickNameLabel.font = [UIFont systemFontOfSize:15]; + _nickNameLabel.textColor = [ThemeColor candyTreeNickColor]; + } + return _nickNameLabel; +} + + +- (UILabel *)coinNumberLabel{ + if (!_coinNumberLabel) { + _coinNumberLabel = [[UILabel alloc] init]; + _coinNumberLabel.font = [UIFont systemFontOfSize:15]; + _coinNumberLabel.textColor = [ThemeColor candyTreeDiamondColor]; + _coinNumberLabel.textAlignment = NSTextAlignmentRight; + [_coinNumberLabel setContentCompressionResistancePriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal]; + } + return _coinNumberLabel; +} + +- (UIImageView *)coinImageView { + if (!_coinImageView) { + _coinImageView = [[UIImageView alloc] init]; + _coinImageView.image = [UIImage imageNamed:@"common_diamond"]; + } + return _coinImageView; +} + +- (UIView *)sepView { + if (!_sepView) { + _sepView = [UIView new]; + _sepView.backgroundColor = [ThemeColor candyTreeDividerColor]; + } + return _sepView; +} + + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.h b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.h new file mode 100644 index 00000000..1fe9db4a --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.h @@ -0,0 +1,16 @@ +// +// XPCandyRankContainerView.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPCandyRankContainerView : UIView + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.m b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.m new file mode 100644 index 00000000..aee073bc --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyRankContainerView.m @@ -0,0 +1,161 @@ +// +// XPCandyRankContainerView.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "XPCandyRankContainerView.h" +///Third +#import +#import +#import +///Tool +#import "ThemeColor+Room.h" +#import "XPMacro.h" +///View +#import "XPCandyTreeRankView.h" +@interface XPCandyRankContainerView () +///分页标题 +@property (nonatomic, strong) NSArray *titles; +///分页控件 +@property (nonatomic, strong) JXCategoryTitleView *titleView; +///分页lineView +@property (nonatomic, strong) JXCategoryListContainerView *contentView; +///刷新 +@property (nonatomic,strong) UIButton *refreshButton; +///今日榜单 +@property (nonatomic,strong) XPCandyTreeRankView *todayListView; +///昨日榜单 +@property (nonatomic,strong) XPCandyTreeRankView *yesterdayListView; +@end + +@implementation XPCandyRankContainerView +- (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 whiteColor]; + [self addSubview:self.titleView]; + [self addSubview:self.self.refreshButton]; + [self addSubview:self.contentView]; + + CAShapeLayer * layer = [CAShapeLayer layer]; + UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 400) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12, 12)]; + layer.path = path.CGPath; + self.layer.mask = layer; +} + +- (void)initSubViewConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(KScreenWidth); + make.height.mas_equalTo(50+ 350); + }]; + + [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self); + make.height.mas_equalTo(50); + }]; + + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self); + make.top.mas_equalTo(self.titleView.mas_bottom); + }]; + + [self.refreshButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(-15); + make.centerY.mas_equalTo(self.titleView.mas_centerY); + make.width.height.mas_equalTo(50); + }]; +} + +#pragma mark - JXCategoryViewDelegate +- (NSInteger)numberOfListsInlistContainerView:(JXCategoryListContainerView *)listContainerView { + return self.titles.count; +} + +- (id)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index { + if (index == 0) { + return self.todayListView; + } + return self.yesterdayListView; +} + +#pragma mark - Event Response +- (void)refreshButtonAction:(UIButton *)sender { + self.todayListView.type = CandyTreeRecordType_Today; + self.yesterdayListView.type = CandyTreeRecordType_Yesterday; +} + +#pragma mark - Getters And Setters +- (JXCategoryTitleView *)titleView { + if (!_titleView) { + _titleView = [[JXCategoryTitleView alloc] init]; + _titleView.delegate = self; + _titleView.titles = self.titles; + _titleView.titleColor = [ThemeColor textThirdColor]; + _titleView.titleSelectedColor = [ThemeColor candyTreeNickColor]; + _titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16]; + _titleView.titleSelectedFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16]; + _titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter; + _titleView.contentScrollViewClickTransitionAnimationEnabled = NO; + _titleView.defaultSelectedIndex = 0; + _titleView.listContainer = self.contentView; + + JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init]; + lineView.indicatorColor = [ThemeColor appMainColor]; + lineView.indicatorWidth = 8.f; + lineView.indicatorHeight = 4.f; + lineView.indicatorCornerRadius = 2.f; + _titleView.indicators = @[lineView]; + } + return _titleView; +} + +- (JXCategoryListContainerView *)contentView { + if (!_contentView) { + _contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self]; + _contentView.defaultSelectedIndex = 0; + } + return _contentView; +} + +- (NSArray *)titles { + return @[@"今日榜单", @"昨日榜单"]; +} + +- (UIButton *)refreshButton { + if (!_refreshButton) { + _refreshButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_refreshButton setImage:[UIImage imageNamed:@"room_candy_tree_record_refresh"] forState:UIControlStateNormal]; + [_refreshButton setImage:[UIImage imageNamed:@"room_candy_tree_record_refresh"] forState:UIControlStateSelected]; + [_refreshButton addTarget:self action:@selector(refreshButtonAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _refreshButton; +} + +- (XPCandyTreeRankView *)todayListView { + if (!_todayListView) { + _todayListView = [[XPCandyTreeRankView alloc] init]; + _todayListView.type = CandyTreeRecordType_Today; + } + return _todayListView; +} + +- (XPCandyTreeRankView *)yesterdayListView { + if (!_yesterdayListView) { + _yesterdayListView = [[XPCandyTreeRankView alloc] init]; + _yesterdayListView.type = CandyTreeRecordType_Yesterday; + } + return _yesterdayListView; +} + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.h b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.h new file mode 100644 index 00000000..474558b8 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.h @@ -0,0 +1,17 @@ +// +// XPCandyTreeGiftView.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN +@class CandyTreeGiftInfoModel; +@interface XPCandyTreeGiftView : UIView +///礼物的信息 +@property (nonatomic,strong) CandyTreeGiftInfoModel *giftInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.m b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.m new file mode 100644 index 00000000..754cfe7c --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeGiftView.m @@ -0,0 +1,90 @@ +// +// XPCandyTreeGiftView.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "XPCandyTreeGiftView.h" +///Third +#import +#import "CandyTreeResultModel.h" + +@interface XPCandyTreeGiftView () +///礼物背景 +@property (nonatomic,strong) UIImageView *backImageView; +///显示文字 +@property (nonatomic,strong) UILabel *titleLabel; +@end + +@implementation XPCandyTreeGiftView + +- (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.backImageView]; + [self addSubview:self.titleLabel]; +} + +- (void)initSubViewConstraints { + [self.backImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.mas_equalTo(self); + make.height.mas_equalTo(19); + make.right.mas_equalTo(self.titleLabel.mas_right).offset(3); + }]; + + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.backImageView.mas_left).offset(3); + make.centerY.mas_equalTo(self.backImageView); + }]; +} +#pragma mark - Getters And Setters +- (void)setGiftInfo:(CandyTreeGiftInfoModel *)giftInfo { + _giftInfo = giftInfo; + if (_giftInfo) { + NSString * backImage= @""; + if (giftInfo.prizeLevel == CandyTreeGiftLevel_First) { + backImage = @""; + } else if(giftInfo.prizeLevel == CandyTreeGiftLevel_Second) { + backImage = @""; + } else if(giftInfo.prizeLevel == CandyTreeGiftLevel_Third) { + backImage = @""; + } else if(giftInfo.prizeLevel == CandyTreeGiftLevel_Four) { + backImage = @""; + } + self.backImageView.image = [UIImage imageNamed:backImage]; + if (_giftInfo.prizeName.length > 7) { + _giftInfo.prizeName = [_giftInfo.prizeName substringToIndex:7]; + } + NSString * giftTitle = [NSString stringWithFormat:@"%@ x %d", _giftInfo.prizeName, _giftInfo.prizeNum]; + self.titleLabel.text = giftTitle; + } +} + +- (UIImageView *)backImageView { + if (!_backImageView) { + _backImageView = [[UIImageView alloc] init]; + _backImageView.userInteractionEnabled = YES; + } + return _backImageView; +} + +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:10]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textColor = [UIColor whiteColor]; + } + return _titleLabel; +} + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.h b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.h new file mode 100644 index 00000000..01329020 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.h @@ -0,0 +1,16 @@ +// +// XPCandyTreeMoreView.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface XPCandyTreeMoreView : UIView + +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.m b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.m new file mode 100644 index 00000000..af015256 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeMoreView.m @@ -0,0 +1,153 @@ +// +// XPCandyTreeMoreView.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "XPCandyTreeMoreView.h" +///Third +#import +///Tool +#import "XPMacro.h" +#import "ThemeColor.h" +#import "XPHtmlUrl.h" +#import "TTPopup.h" +///View +#import "XPRoomHalfWebView.h" +@interface XPCandyTreeMoreView () +///标题 +@property (nonatomic,strong) UILabel *titleLabel; +///列表 +@property (nonatomic,strong) UITableView *tableView; +///数据 +@property (nonatomic,strong) NSArray *datasource; +@end + +@implementation XPCandyTreeMoreView + +- (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 whiteColor]; + [self addSubview:self.titleLabel]; + [self addSubview:self.tableView]; + CAShapeLayer * layer = [CAShapeLayer layer]; + UIBezierPath * path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, KScreenWidth, 256+44) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(12, 12)]; + layer.path = path.CGPath; + self.layer.mask = layer; +} + +- (void)initSubViewConstraints { + [self mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(KScreenWidth); + make.height.mas_equalTo(256+44); + }]; + + [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self); + make.height.mas_equalTo(44); + }]; + + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.bottom.mas_equalTo(self); + make.top.mas_equalTo(self.titleLabel.mas_bottom); + }]; +} + +#pragma mark - UITableViewDelegate And UITableViewDataSource +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return 50; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.datasource.count; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([UITableViewCell class])]; + if (cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([UITableViewCell class])]; + } + cell.textLabel.text = [self.datasource objectAtIndex:indexPath.row]; + cell.textLabel.textColor = [ThemeColor alertTitleColor]; + cell.textLabel.font = [UIFont systemFontOfSize:15]; + return cell; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { + [tableView deselectRowAtIndexPath:indexPath animated:YES]; + [TTPopup dismiss]; + switch (indexPath.row) { + case 0: + { + XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init]; + webView.url = URLWithType(kCandyTreeURL); + [TTPopup popupView:webView style:TTPopupStyleActionSheet]; + } + break; + case 1: + { + XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init]; + webView.url = URLWithType(kCandyTreeRecordURL); + [TTPopup popupView:webView style:TTPopupStyleActionSheet]; + } + break; + case 2: + { + XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init]; + webView.url = URLWithType(kCandyTreeRuleURL); + [TTPopup popupView:webView style:TTPopupStyleActionSheet]; + } + break; + + default: + break; + } +} + +#pragma mark - Getters And Setters +- (UILabel *)titleLabel { + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.text = @"更多"; + _titleLabel.font = [UIFont fontWithName:@"PingFang-SC-Medium" size:18]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textColor = [ThemeColor alertTitleColor]; + } + return _titleLabel; +} +- (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:[UITableViewCell class] forCellReuseIdentifier:NSStringFromClass([UITableViewCell class])]; + } + return _tableView; +} + +- (NSArray *)datasource { + if (!_datasource) { + _datasource = @[@"参与活动获得糖果", @"获奖记录", @"玩法规则"]; + } + return _datasource; +} + + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.h b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.h new file mode 100644 index 00000000..28816760 --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.h @@ -0,0 +1,24 @@ +// +// XPCandyTreeRankView.h +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import +#import +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSInteger, CandyTreeRecordType) { + ///今天榜单 + CandyTreeRecordType_Today = 1, + ///昨日榜单 + CandyTreeRecordType_Yesterday = 2, +}; + +@interface XPCandyTreeRankView : UIView +///榜单类型 +@property (nonatomic,assign) CandyTreeRecordType type;; +@end + +NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.m b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.m new file mode 100644 index 00000000..80ae443c --- /dev/null +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeRankView.m @@ -0,0 +1,187 @@ +// +// XPCandyTreeRankView.m +// xplan-ios +// +// Created by 冯硕 on 2021/12/10. +// + +#import "XPCandyTreeRankView.h" +///Third +#import +#import +///Tool +#import "ThemeColor.h" +#import "XCHudTool.h" +#import "Api+CandyTree.h" +///Model +#import "CandyTreeRecordModel.h" +///View +#import "XPCandyTreeRankTableViewCell.h" +#import "XPCandyTreeEmptyableViewCell.h" +@interface XPCandyTreeRankView () +///列表 +@property (nonatomic,strong) UITableView *tableView; +///数据列表 +@property (nonatomic,strong) NSMutableArray *datasource; +///当前 的页数 +@property (nonatomic,assign) int page; +///还有更多的数据 +@property (nonatomic,assign) BOOL hasNoMoreData; +@end + +@implementation XPCandyTreeRankView + +- (instancetype)initWithFrame:(CGRect)frame +{ + self = [super initWithFrame:frame]; + if (self) { + [self initHeaderAndFooterRrfresh]; + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; +} +#pragma mark - Public Method +- (void)reloadNewData { + [self.tableView.mj_header beginRefreshing]; + [self headerRefresh]; +} + +#pragma mark - Private Method +- (void)initSubViews { + [self addSubview:self.tableView]; +} + +- (void)initSubViewConstraints { + [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.mas_equalTo(self); + }]; +} + +- (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; +} + +#pragma mark - 刷新的方法 +- (void)headerRefresh { + self.page = 1; + NSString * page = [NSString stringWithFormat:@"%d", self.page]; + NSString * datetype = [NSString stringWithFormat:@"%ld", self.type]; + [Api candyTreeRankListComplection:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSArray * array = [CandyTreeRecordModel modelsWithArray:data.data[@"rankVos"]]; + [self getCandtyTreeRankListSuccess:array state:0]; + } else { + [XCHUDTool showErrorWithMessage:msg]; + } + } page:page pageSize:@"20" datetype:datetype]; +} + +- (void)footerRefresh { + if (self.hasNoMoreData) { + [XCHUDTool showErrorWithMessage:@"没有更多数据了"]; + return; + } + self.page++; + NSString * page = [NSString stringWithFormat:@"%d", self.page]; + NSString * datetype = [NSString stringWithFormat:@"%ld", self.type]; + [Api candyTreeRankListComplection:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSArray * array = [CandyTreeRecordModel modelsWithArray:data.data[@"rankVos"]]; + [self getCandtyTreeRankListSuccess:array state:1]; + } else { + [XCHUDTool showErrorWithMessage:msg]; + } + } page:page pageSize:@"20" datetype:datetype]; +} + +- (void)getCandtyTreeRankListSuccess:(NSArray *)array state:(BOOL)state { + if (state == 0) { + [self.datasource removeAllObjects]; + [self.tableView.mj_header endRefreshing]; + } else { + [self.tableView.mj_footer endRefreshing]; + } + if (array.count > 0) { + self.hasNoMoreData = NO; + [self.datasource addObjectsFromArray:array]; + } else { + self.hasNoMoreData = YES; + [self.tableView.mj_footer endRefreshingWithNoMoreData]; + } + [self.tableView reloadData]; +} + +#pragma mark - UITableViewDelegate And UITableViewDataSource +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { + return self.datasource.count > 0 ? self.datasource.count : 1; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { + return self.datasource.count > 0 ? 75 : 300; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { + if (self.datasource.count <= 0) { + XPCandyTreeEmptyableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPCandyTreeEmptyableViewCell class])]; + if (cell == nil) { + cell = [[XPCandyTreeEmptyableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPCandyTreeEmptyableViewCell class])]; + } + return cell; + } + XPCandyTreeRankTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPCandyTreeRankTableViewCell class])]; + if (cell == nil) { + cell = [[XPCandyTreeRankTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPCandyTreeRankTableViewCell class])]; + } + cell.roomRankModel = [self.datasource objectAtIndex:indexPath.row]; + return cell; +} + +#pragma mark - JXCategoryListContentViewDelegate +- (UIView *)listView { + return self; +} + +#pragma mark - Getters And Setters +- (void)setType:(CandyTreeRecordType)type { + _type = type; + [self.tableView.mj_header beginRefreshing]; + [self headerRefresh]; +} + +- (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:[XPCandyTreeRankTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPCandyTreeRankTableViewCell class])]; + [_tableView registerClass:[XPCandyTreeEmptyableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPCandyTreeEmptyableViewCell class])]; + } + return _tableView; +} + +- (NSMutableArray *)datasource { + if (!_datasource) { + _datasource= [NSMutableArray array]; + } + return _datasource; +} + + +@end diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.h b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.h index 41dc1c78..a637b98d 100644 --- a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.h +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.h @@ -6,11 +6,11 @@ // #import "MvpViewController.h" - +#import "RoomHostDelegate.h" NS_ASSUME_NONNULL_BEGIN @interface XPCandyTreeViewController : MvpViewController - +- (instancetype)initWithDelegate:(id)delegate; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.m b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.m index 5d1db3a2..2f1440cc 100644 --- a/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.m +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPCandyTreeViewController.m @@ -9,19 +9,25 @@ ///Third #import #import +#import ///Tool #import "XPMacro.h" #import "ThemeColor.h" #import "TTPopup.h" #import "XPHtmlUrl.h" ///Model +#import "RoomInfoModel.h" +#import "AttachMentModel.h" #import "CandyTreeInfoModel.h" +#import "CandyTreeResultModel.h" ///View #import "XPRoomHalfWebView.h" +#import "XPCandyTreeMoreView.h" +#import "XPCandyRankContainerView.h" ///P #import "XPCandyTreePresenter.h" #import "XPCandyTreeProtocol.h" -@interface XPCandyTreeViewController () +@interface XPCandyTreeViewController () ///上面点击的view @property (nonatomic,strong) UIView *topTapView; ///下面点击的view @@ -70,10 +76,26 @@ @property (nonatomic,assign) NSInteger numberCandy; ///糖果的信息 @property (nonatomic,strong) CandyTreeInfoModel *candyInfo; +///host代理 +@property (nonatomic,weak) idhostDelegate; +///是否正在采摘 +@property (nonatomic,assign) BOOL isPicking; @end @implementation XPCandyTreeViewController +- (void)dealloc { + [[NIMSDK sharedSDK].systemNotificationManager removeDelegate:self]; +} + +- (instancetype)initWithDelegate:(id)delegate { + if (self = [super init]) { + self.hostDelegate = delegate; + [[NIMSDK sharedSDK].systemNotificationManager addDelegate:self]; + } + return self; +} + - (XPCandyTreePresenter *)createPresenter { return [[XPCandyTreePresenter alloc] init]; } @@ -92,9 +114,30 @@ #pragma mark - XPCandyTreeProtocol - (void)getCandyTreeInfoSuccess:(CandyTreeInfoModel *)info { + self.candyInfo = info; self.countLabel.text = info.keyNum > 0 ? [NSString stringWithFormat:@"%ld", info.keyNum] : @"0"; } +- (void)pickCandyFail { + self.isPicking = NO; +} + +- (void)pickCandySuccess:(CandyTreeResultModel *)result { + self.isPicking = NO; + self.countLabel.text = result.remainKeyNum > 0 ? [NSString stringWithFormat:@"%ld", result.remainKeyNum] : @"0"; +} + +#pragma mark - NIMSystemNotificationManagerDelegate +- (void)onReceiveCustomSystemNotification:(NIMCustomSystemNotification *)notification { + if (notification.receiverType == NIMSessionTypeP2P) { + AttachmentModel *attachment = [AttachmentModel modelWithJSON:notification.content]; + if (attachment.first == CustomMessageType_Account && attachment.second == Custom_Message_Sub_Account_Changed){ + if (attachment.second == Custom_Message_Sub_Account_Changed) { + [self.presenter getCandyTreeInfo]; + } + } + } +} #pragma mark - Private Method - (void)initSubViews { self.view.backgroundColor = [UIColor clearColor]; @@ -209,19 +252,15 @@ make.bottom.mas_equalTo(self.backView).offset(-21); }]; } - -#pragma mark - XPRoomHalfWebViewDelegate -- (void)xPRoomHalfWebView:(XPRoomHalfWebView *)view didClickBackButton:(UIButton *)sender { - [TTPopup dismiss]; -} - #pragma mark - Event Response - (void)moreTapRecognizer:(UITapGestureRecognizer *)tap { - //TODO: 获取糖果 + XPCandyTreeMoreView * moreView = [[XPCandyTreeMoreView alloc] init]; + [TTPopup popupView:moreView style:TTPopupStyleActionSheet]; } - (void)rankTapRecognizer:(UITapGestureRecognizer *)tap { - //TODO: 排行榜 + XPCandyRankContainerView * rankView = [[XPCandyRankContainerView alloc] init]; + [TTPopup popupView:rankView style:TTPopupStyleActionSheet]; } - (void)addButtonAction:(UIButton *)sender { @@ -233,7 +272,7 @@ - (void)subtractButtonAction:(UIButton *)sender { if (self.numberCandy <= 1) return; self.numberCandy -= 1; - self.textFiled.text = [NSString stringWithFormat:@"%ld", self.numberCandy]; + self.textFiled.text = [NSString stringWithFormat:@"%ld", self.numberCandy]; self.expendLabel.text = [NSString stringWithFormat:@"消耗%ld糖果连续摘", self.numberCandy]; } @@ -242,15 +281,33 @@ TTAlertConfig * config = [[TTAlertConfig alloc] init]; config.title = @""; config.message = @"参与活动获得糖果"; + config.confirmButtonConfig.title = @"去参与"; [TTPopup alertWithConfig:config confirmHandler:^{ [TTPopup dismiss]; XPRoomHalfWebView * webView = [[XPRoomHalfWebView alloc] init]; - webView.delegate = self; webView.url = URLWithType(kCandyTreeURL); [TTPopup popupView:webView style:TTPopupStyleAlert]; } cancelHandler:^{ }]; + } else { + if (self.isPicking) return; + self.isPicking = YES; + @kWeakify(self); + [self.parser parseWithNamed:@"candyTree_light" inBundle:[NSBundle mainBundle] completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) { + @kStrongify(self); + self.candyTreeLightView.loops = 1; + self.candyTreeLightView.clearsAfterStop = NO; + self.candyTreeLightView.videoItem = videoItem; + [self.candyTreeLightView startAnimation]; + } failureBlock:^(NSError * _Nonnull error) { + + }]; + ///摘 + NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid]; + NSString * candyNumber = [NSString stringWithFormat:@"%ld", self.numberCandy]; + [self.presenter pickCandy:candyNumber roomUid:roomUid]; + } } @@ -318,6 +375,8 @@ _rankStackView.distribution = UIStackViewDistributionFill; _rankStackView.alignment = UIStackViewAlignmentCenter; _rankStackView.spacing = 5; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(rankTapRecognizer:)]; + [_rankStackView addGestureRecognizer:tap]; } return _rankStackView; } @@ -327,8 +386,6 @@ _rankImageView = [[UIImageView alloc] init]; _rankImageView.userInteractionEnabled = YES; _rankImageView.image = [UIImage imageNamed:@"room_candy_tree_rank"]; - UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(rankTapRecognizer:)]; - [_moreImageView addGestureRecognizer:tap]; } return _rankImageView; } @@ -388,11 +445,19 @@ _candyTreeView = [[SVGAImageView alloc]init]; _candyTreeView.backgroundColor = [UIColor clearColor]; _candyTreeView.userInteractionEnabled = NO; - _candyTreeView.delegate = self; } return _candyTreeView; } +- (SVGAImageView *)candyTreeLightView { + if (!_candyTreeLightView) { + _candyTreeLightView = [[SVGAImageView alloc]init]; + _candyTreeLightView.backgroundColor = [UIColor clearColor]; + _candyTreeLightView.userInteractionEnabled = NO; + } + return _candyTreeLightView; +} + - (SVGAParser *)parser { if (!_parser) { _parser = [[SVGAParser alloc]init]; diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.h b/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.h index 0b8111fc..63ff53a9 100644 --- a/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.h +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.h @@ -8,16 +8,7 @@ #import NS_ASSUME_NONNULL_BEGIN -@class XPRoomHalfWebView; -@protocol XPRoomHalfWebViewDelegate - -- (void)xPRoomHalfWebView:(XPRoomHalfWebView *)view didClickBackButton:(UIButton *)sender; - -@end @interface XPRoomHalfWebView : UIView -///代理 -@property (nonatomic,weak) id delegate; - ///地址 @property (nonatomic,copy) NSString *url; @end diff --git a/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.m b/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.m index 3c91cf2f..96dc0f97 100644 --- a/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.m +++ b/xplan-ios/Main/Room/View/CandyTree/View/XPRoomHalfWebView.m @@ -12,7 +12,10 @@ ///Tool #import "XPMacro.h" #import "ThemeColor.h" +#import "TTPopup.h" @interface XPRoomHalfWebView () +///点击消失的view +@property (nonatomic,strong) UIView * topView; /// 导航栏 @property (nonatomic,strong) UIView * toolView; ///返回按钮 @@ -38,6 +41,7 @@ #pragma mark - Private Method - (void)initSubViews { + [self addSubview:self.topView]; [self addSubview:self.toolView]; [self addSubview:self.webVC.view]; @@ -51,6 +55,11 @@ make.height.mas_equalTo(KScreenHeight); }]; + [self.topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.right.top.mas_equalTo(self); + make.bottom.mas_equalTo(self.toolView.mas_top); + }]; + CGFloat height = 430; [self.webVC.view mas_makeConstraints:^(MASConstraintMaker *make) { make.left.right.mas_equalTo(self); @@ -76,11 +85,12 @@ } #pragma mark - Event Response - (void)didClickCloseButton:(UIButton *)sender { - if (self.delegate && [self.delegate respondsToSelector:@selector(xPRoomHalfWebView:didClickBackButton:)]) { - [self.delegate xPRoomHalfWebView:self didClickBackButton:sender]; - } + [TTPopup dismiss]; } +- (void)topViewRecognizer { + [TTPopup dismiss]; +} #pragma mark - Getters And Setters - (void)setUrl:(NSString *)url { _url = url; @@ -89,6 +99,16 @@ } } +- (UIView *)topView { + if (!_topView) { + _topView = [[UIView alloc] init]; + _topView.backgroundColor = [UIColor clearColor]; + UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(topViewRecognizer)]; + [_topView addGestureRecognizer:tap]; + } + return _topView; +} + - (UIView *)toolView { if (!_toolView) { _toolView = [[UIView alloc] init]; diff --git a/xplan-ios/Main/Room/View/ThemeColor+Room.h b/xplan-ios/Main/Room/View/ThemeColor+Room.h index cb5548ee..02a43998 100644 --- a/xplan-ios/Main/Room/View/ThemeColor+Room.h +++ b/xplan-ios/Main/Room/View/ThemeColor+Room.h @@ -37,6 +37,13 @@ NS_ASSUME_NONNULL_BEGIN ///礼物广播 显示的名字的颜色 #2F0060 + (UIColor *)giftBroadcastNickColor; // ------房间内礼物 End------ / + +/// 糖果树记录钻石的颜色 ++ (UIColor *)candyTreeDiamondColor; +/// 糖果树名字的颜色 ++ (UIColor *)candyTreeNickColor; +/// 糖果树的分割线颜色 ++ (UIColor *)candyTreeDividerColor; @end NS_ASSUME_NONNULL_END diff --git a/xplan-ios/Main/Room/View/ThemeColor+Room.m b/xplan-ios/Main/Room/View/ThemeColor+Room.m index a6649376..59023810 100644 --- a/xplan-ios/Main/Room/View/ThemeColor+Room.m +++ b/xplan-ios/Main/Room/View/ThemeColor+Room.m @@ -65,4 +65,19 @@ return UIColorFromRGB(0xFEF563); } + +/// 糖果树记录钻石的颜色 ++ (UIColor *)candyTreeDiamondColor { + return UIColorFromRGB(0x1194F5); +} + +/// 糖果树的分割线颜色 ++ (UIColor *)candyTreeDividerColor { + return UIColorFromRGB(0xEDEDED); +} + +/// 糖果树名字的颜色 ++ (UIColor *)candyTreeNickColor { + return UIColorFromRGB(0x333333); +} @end diff --git a/xplan-ios/Sources/candyTree_lightsvga b/xplan-ios/Sources/candyTree_light.svga similarity index 100% rename from xplan-ios/Sources/candyTree_lightsvga rename to xplan-ios/Sources/candyTree_light.svga