糖果树送礼物的横幅 购买糖果

This commit is contained in:
fengshuo
2021-12-10 19:19:02 +08:00
parent 5d0f14a3a2
commit 2a1e90dbe5
47 changed files with 1615 additions and 47 deletions

View File

@@ -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 = "<group>"; };
E89DA67327009ACD008483C1 /* XPMineRechargeNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineRechargeNavView.h; sourceTree = "<group>"; };
E89DA67427009ACD008483C1 /* XPMineRechargeNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPMineRechargeNavView.m; sourceTree = "<group>"; };
E8A03DE02762FA000098D9EA /* XPCandyTreeMoreView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeMoreView.h; sourceTree = "<group>"; };
E8A03DE12762FA000098D9EA /* XPCandyTreeMoreView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeMoreView.m; sourceTree = "<group>"; };
E8A03DE7276301CC0098D9EA /* XPCandyRankContainerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyRankContainerView.h; sourceTree = "<group>"; };
E8A03DE8276301CC0098D9EA /* XPCandyRankContainerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyRankContainerView.m; sourceTree = "<group>"; };
E8A03DEA276301EF0098D9EA /* XPCandyTreeRankView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeRankView.h; sourceTree = "<group>"; };
E8A03DEB276301EF0098D9EA /* XPCandyTreeRankView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeRankView.m; sourceTree = "<group>"; };
E8A03DEE276303D40098D9EA /* XPCandyTreeRankTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeRankTableViewCell.h; sourceTree = "<group>"; };
E8A03DEF276303D40098D9EA /* XPCandyTreeRankTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeRankTableViewCell.m; sourceTree = "<group>"; };
E8A03DF1276328FC0098D9EA /* CandyTreeRecordModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CandyTreeRecordModel.h; sourceTree = "<group>"; };
E8A03DF2276328FC0098D9EA /* CandyTreeRecordModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CandyTreeRecordModel.m; sourceTree = "<group>"; };
E8A03DF42763367F0098D9EA /* XPCandyTreeEmptyableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeEmptyableViewCell.h; sourceTree = "<group>"; };
E8A03DF52763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeEmptyableViewCell.m; sourceTree = "<group>"; };
E8A03DF727634A590098D9EA /* CandyTreeResultModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CandyTreeResultModel.h; sourceTree = "<group>"; };
E8A03DF827634A590098D9EA /* CandyTreeResultModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CandyTreeResultModel.m; sourceTree = "<group>"; };
E8A03DFA276350A60098D9EA /* XPCandyTreeGiftView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeGiftView.h; sourceTree = "<group>"; };
E8A03DFB276350A60098D9EA /* XPCandyTreeGiftView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeGiftView.m; sourceTree = "<group>"; };
E8A03DFD27635F960098D9EA /* XPRoomCandyGiftView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPRoomCandyGiftView.h; sourceTree = "<group>"; };
E8A03DFE27635F960098D9EA /* XPRoomCandyGiftView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomCandyGiftView.m; sourceTree = "<group>"; };
E8A1E44C2761F98600B294CA /* XPCandyTreeViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPCandyTreeViewController.h; sourceTree = "<group>"; };
E8A1E44D2761F98600B294CA /* XPCandyTreeViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPCandyTreeViewController.m; sourceTree = "<group>"; };
E8A1E44F2762082A00B294CA /* Api+CandyTree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+CandyTree.h"; sourceTree = "<group>"; };
@@ -777,7 +804,7 @@
E8A1E45A27620F4900B294CA /* XPRoomHalfWebView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPRoomHalfWebView.m; sourceTree = "<group>"; };
E8A1E45D276220DA00B294CA /* candyTree_banner.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree_banner.svga; sourceTree = "<group>"; };
E8A1E45E276220DA00B294CA /* candyTree.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree.svga; sourceTree = "<group>"; };
E8A1E45F276220DA00B294CA /* candyTree_lightsvga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree_lightsvga; sourceTree = "<group>"; };
E8A1E45F276220DA00B294CA /* candyTree_light.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = candyTree_light.svga; sourceTree = "<group>"; };
E8AC720E26F43955007D6E91 /* UIImageConstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UIImageConstant.h; sourceTree = "<group>"; };
E8AC720F26F43955007D6E91 /* UIImageConstant.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UIImageConstant.m; sourceTree = "<group>"; };
E8AC721126F46ADD007D6E91 /* XPMineSettingViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPMineSettingViewController.h; sourceTree = "<group>"; };
@@ -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 = "<group>";
};
E8A03DED276303BA0098D9EA /* Cell */ = {
isa = PBXGroup;
children = (
E8A03DEE276303D40098D9EA /* XPCandyTreeRankTableViewCell.h */,
E8A03DEF276303D40098D9EA /* XPCandyTreeRankTableViewCell.m */,
E8A03DF42763367F0098D9EA /* XPCandyTreeEmptyableViewCell.h */,
E8A03DF52763367F0098D9EA /* XPCandyTreeEmptyableViewCell.m */,
);
path = Cell;
sourceTree = "<group>";
};
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 = "<group>";
@@ -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 = "<group>";
@@ -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 */,

View File

@@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 457 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 647 B

View File

@@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -0,0 +1,22 @@
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "room_candytree_wish_num2@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "room_candytree_wish_num2@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@@ -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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

View File

@@ -23,8 +23,12 @@ typedef NS_ENUM(NSUInteger, URLType) {
kReportRoomURL,///举报房间
///分享房间
kShareRoomURL,
/// 参加糖果树
/// 糖果树获取糖果
kCandyTreeURL,
/// 获奖记录
kCandyTreeRecordURL,
/// 糖果树玩法规则
kCandyTreeRuleURL,
};
NSString * const URLWithType(URLType type);

View File

@@ -12,17 +12,19 @@
NSString * const URLWithType(URLType type) {
NSString * prefix = @"yinyou";
NSDictionary * dic = @{
@(kPrivacyURL): @"modules/rule/privacy-wap.html",
@(kPrivacyURL) : @"modules/rule/privacy-wap.html",
@(kUserProtocalURL) : @"modules/rule/protocol.html",
@(kUserInviteFriendURL): @"modules/game/index.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",
@(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)];

View File

@@ -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) {

View File

@@ -30,6 +30,7 @@
///View
#import "XPRoomGiftBannerView.h"
#import "XPRoomGiftBroadcastView.h"
#import "XPRoomCandyGiftView.h"
@interface XPRoomAnimationView ()<SVGAPlayerDelegate, NIMChatManagerDelegate,NIMBroadcastManagerDelegate, XPRoomGiftBroadcastViewDelegate>
@@ -71,6 +72,8 @@
@property (nonatomic,strong) NSMutableSet<NetImageView *> * giftReuseArray;
///
@property (nonatomic,strong) NSMutableSet<NetImageView *> * 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

View File

@@ -0,0 +1,17 @@
//
// XPRoomCandyGiftView.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPRoomCandyGiftView : UIView
///糖果的信息
@property (nonatomic,copy) NSDictionary * candyInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,90 @@
//
// XPRoomCandyGiftView.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "XPRoomCandyGiftView.h"
///Third
#import <Masonry/Masonry.h>
#import <SVGA.h>
#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

View File

@@ -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

View File

@@ -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

View File

@@ -0,0 +1,23 @@
//
// CandyTreeRecordModel.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <Foundation/Foundation.h>
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

View File

@@ -0,0 +1,12 @@
//
// CandyTreeRecordModel.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "CandyTreeRecordModel.h"
@implementation CandyTreeRecordModel
@end

View File

@@ -0,0 +1,46 @@
//
// CandyTreeResultModel.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <Foundation/Foundation.h>
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<CandyTreeGiftInfoModel *> *prizeItemList;
///剩余的糖果
@property (nonatomic,assign) NSInteger remainKeyNum;
@end
NS_ASSUME_NONNULL_END

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -8,11 +8,14 @@
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class CandyTreeInfoModel;
@class CandyTreeInfoModel, CandyTreeResultModel;
@protocol XPCandyTreeProtocol <NSObject>
///获取糖果树信息成功
- (void)getCandyTreeInfoSuccess:(CandyTreeInfoModel *)info;
///摘糖果成功
- (void)pickCandySuccess:(CandyTreeResultModel *)result;
///摘糖果失败
- (void)pickCandyFail;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,16 @@
//
// XPCandyTreeEmptyableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPCandyTreeEmptyableViewCell : UITableViewCell
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,70 @@
//
// XPCandyTreeEmptyableViewCell.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "XPCandyTreeEmptyableViewCell.h"
///Third
#import <Masonry/Masonry.h>
#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

View File

@@ -0,0 +1,17 @@
//
// XPCandyTreeRankTableViewCell.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class CandyTreeRecordModel;
@interface XPCandyTreeRankTableViewCell : UITableViewCell
///
@property (nonatomic,strong) CandyTreeRecordModel *roomRankModel;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,199 @@
//
// XPCandyTreeRankTableViewCell.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "XPCandyTreeRankTableViewCell.h"
///Third
#import <Masonry/Masonry.h>
///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

View File

@@ -0,0 +1,16 @@
//
// XPCandyRankContainerView.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPCandyRankContainerView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,161 @@
//
// XPCandyRankContainerView.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "XPCandyRankContainerView.h"
///Third
#import <Masonry/Masonry.h>
#import <JXCategoryView/JXCategoryView.h>
#import <JXCategoryView/JXCategoryListContainerView.h>
///Tool
#import "ThemeColor+Room.h"
#import "XPMacro.h"
///View
#import "XPCandyTreeRankView.h"
@interface XPCandyRankContainerView ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate>
///
@property (nonatomic, strong) NSArray<NSString *> *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<JXCategoryListContentViewDelegate>)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<NSString *> *)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

View File

@@ -0,0 +1,17 @@
//
// XPCandyTreeGiftView.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class CandyTreeGiftInfoModel;
@interface XPCandyTreeGiftView : UIView
///礼物的信息
@property (nonatomic,strong) CandyTreeGiftInfoModel *giftInfo;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,90 @@
//
// XPCandyTreeGiftView.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "XPCandyTreeGiftView.h"
///Third
#import <Masonry/Masonry.h>
#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

View File

@@ -0,0 +1,16 @@
//
// XPCandyTreeMoreView.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface XPCandyTreeMoreView : UIView
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,153 @@
//
// XPCandyTreeMoreView.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "XPCandyTreeMoreView.h"
///Third
#import <Masonry/Masonry.h>
///Tool
#import "XPMacro.h"
#import "ThemeColor.h"
#import "XPHtmlUrl.h"
#import "TTPopup.h"
///View
#import "XPRoomHalfWebView.h"
@interface XPCandyTreeMoreView ()<UITableViewDelegate, UITableViewDataSource>
///
@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

View File

@@ -0,0 +1,24 @@
//
// XPCandyTreeRankView.h
// xplan-ios
//
// Created by 冯硕 on 2021/12/10.
//
#import <UIKit/UIKit.h>
#import <JXCategoryView/JXCategoryListContainerView.h>
NS_ASSUME_NONNULL_BEGIN
typedef NS_ENUM(NSInteger, CandyTreeRecordType) {
///今天榜单
CandyTreeRecordType_Today = 1,
///昨日榜单
CandyTreeRecordType_Yesterday = 2,
};
@interface XPCandyTreeRankView : UIView<JXCategoryListContentViewDelegate>
///榜单类型
@property (nonatomic,assign) CandyTreeRecordType type;;
@end
NS_ASSUME_NONNULL_END

View File

@@ -0,0 +1,187 @@
//
// XPCandyTreeRankView.m
// xplan-ios
//
// Created by on 2021/12/10.
//
#import "XPCandyTreeRankView.h"
///Third
#import <Masonry/Masonry.h>
#import <MJRefresh/MJRefresh.h>
///Tool
#import "ThemeColor.h"
#import "XCHudTool.h"
#import "Api+CandyTree.h"
///Model
#import "CandyTreeRecordModel.h"
///View
#import "XPCandyTreeRankTableViewCell.h"
#import "XPCandyTreeEmptyableViewCell.h"
@interface XPCandyTreeRankView ()<UITableViewDelegate, UITableViewDataSource>
///
@property (nonatomic,strong) UITableView *tableView;
///
@property (nonatomic,strong) NSMutableArray<CandyTreeRecordModel *> *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<CandyTreeRecordModel *> *)datasource {
if (!_datasource) {
_datasource= [NSMutableArray array];
}
return _datasource;
}
@end

View File

@@ -6,11 +6,11 @@
//
#import "MvpViewController.h"
#import "RoomHostDelegate.h"
NS_ASSUME_NONNULL_BEGIN
@interface XPCandyTreeViewController : MvpViewController
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
@end
NS_ASSUME_NONNULL_END

View File

@@ -9,19 +9,25 @@
///Third
#import <Masonry/Masonry.h>
#import <SVGA.h>
#import <NIMSDK/NIMSDK.h>
///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 ()<XPCandyTreeProtocol, XPRoomHalfWebViewDelegate>
@interface XPCandyTreeViewController ()<XPCandyTreeProtocol, NIMSystemNotificationManagerDelegate>
///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) id<RoomHostDelegate>hostDelegate;
///
@property (nonatomic,assign) BOOL isPicking;
@end
@implementation XPCandyTreeViewController
- (void)dealloc {
[[NIMSDK sharedSDK].systemNotificationManager removeDelegate:self];
}
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)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 {
@@ -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];

View File

@@ -8,16 +8,7 @@
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@class XPRoomHalfWebView;
@protocol XPRoomHalfWebViewDelegate <NSObject>
- (void)xPRoomHalfWebView:(XPRoomHalfWebView *)view didClickBackButton:(UIButton *)sender;
@end
@interface XPRoomHalfWebView : UIView
///代理
@property (nonatomic,weak) id<XPRoomHalfWebViewDelegate> delegate;
///地址
@property (nonatomic,copy) NSString *url;
@end

View File

@@ -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];

View File

@@ -37,6 +37,13 @@ NS_ASSUME_NONNULL_BEGIN
///礼物广播 显示的名字的颜色 #2F0060
+ (UIColor *)giftBroadcastNickColor;
// ------房间内礼物 End------ /
/// 糖果树记录钻石的颜色
+ (UIColor *)candyTreeDiamondColor;
/// 糖果树名字的颜色
+ (UIColor *)candyTreeNickColor;
/// 糖果树的分割线颜色
+ (UIColor *)candyTreeDividerColor;
@end
NS_ASSUME_NONNULL_END

View File

@@ -65,4 +65,19 @@
return UIColorFromRGB(0xFEF563);
}
///
+ (UIColor *)candyTreeDiamondColor {
return UIColorFromRGB(0x1194F5);
}
/// 线
+ (UIColor *)candyTreeDividerColor {
return UIColorFromRGB(0xEDEDED);
}
///
+ (UIColor *)candyTreeNickColor {
return UIColorFromRGB(0x333333);
}
@end