贵族主页UI及接口
@@ -126,6 +126,12 @@
|
||||
9B208A482779C30100F9E54A /* XCGameRoomFaceContainerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A442779C30100F9E54A /* XCGameRoomFaceContainerCell.m */; };
|
||||
9B208A4E2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A4B2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m */; };
|
||||
9B208A4F2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B208A4D2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m */; };
|
||||
9B2A12D52783EEC700CED41B /* XPNobleCenterTableHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12D42783EEC700CED41B /* XPNobleCenterTableHeadView.m */; };
|
||||
9B2A12D82783F42300CED41B /* XPNoblePrivilegeContentCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12D72783F42300CED41B /* XPNoblePrivilegeContentCell.m */; };
|
||||
9B2A12DB2783F88800CED41B /* XPNoblePrivilegeCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12DA2783F88800CED41B /* XPNoblePrivilegeCell.m */; };
|
||||
9B2A12DE2783FEDD00CED41B /* UserVipInfoVo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12DD2783FEDD00CED41B /* UserVipInfoVo.m */; };
|
||||
9B2A12E127845DD300CED41B /* XPNobleCenterMyNobleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12E027845DD300CED41B /* XPNobleCenterMyNobleView.m */; };
|
||||
9B2A12E427846D7100CED41B /* NobleRechargeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B2A12E327846D7100CED41B /* NobleRechargeModel.m */; };
|
||||
9B7D804A2753783D003DAC0C /* SessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D80492753783D003DAC0C /* SessionViewController.m */; };
|
||||
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804C27537950003DAC0C /* MessageCell.m */; };
|
||||
9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 9B7D804E2753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m */; };
|
||||
@@ -134,6 +140,11 @@
|
||||
9BAA5FF0277A23F4007453F3 /* XPPermissionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAA5FEF277A23F4007453F3 /* XPPermissionsViewController.m */; };
|
||||
9BE29A6B27D1BFF700446AB5 /* anchor_room_speak.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */; };
|
||||
9BE29A6D27D210A500446AB5 /* anchor_room_bg.svga in Resources */ = {isa = PBXBuildFile; fileRef = 9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */; };
|
||||
9BB549592782E6A30090CD26 /* XPNobleCenterPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB549582782E6A30090CD26 /* XPNobleCenterPresenter.m */; };
|
||||
9BB5495C2782E79E0090CD26 /* NobleCenterModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB5495B2782E79E0090CD26 /* NobleCenterModel.m */; };
|
||||
9BB5495F2782E9DB0090CD26 /* NobleAuthInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB5495E2782E9DB0090CD26 /* NobleAuthInfo.m */; };
|
||||
9BB549622782EA1D0090CD26 /* NobleInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB549612782EA1D0090CD26 /* NobleInfo.m */; };
|
||||
9BB54966278303EB0090CD26 /* XPNobleCenterNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BB54965278303EB0090CD26 /* XPNobleCenterNavView.m */; };
|
||||
9BC5C8E9277AB6AE007C8719 /* XPFacePresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8E8277AB6AE007C8719 /* XPFacePresenter.m */; };
|
||||
9BC5C8ED277AFF63007C8719 /* XPNobleCenterViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */; };
|
||||
9BC5C8F6277B0263007C8719 /* XPNobleCenterListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BC5C8F5277B0263007C8719 /* XPNobleCenterListViewController.m */; };
|
||||
@@ -719,6 +730,18 @@
|
||||
9B208A4B2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceTitleDisplayModel.m; sourceTree = "<group>"; };
|
||||
9B208A4C2779C30600F9E54A /* XCGameRoomFaceTitleDisplayModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XCGameRoomFaceTitleDisplayModel.h; sourceTree = "<group>"; };
|
||||
9B208A4D2779C30600F9E54A /* XCGameRoomFaceViewDisplayModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XCGameRoomFaceViewDisplayModel.m; sourceTree = "<group>"; };
|
||||
9B2A12D32783EEC700CED41B /* XPNobleCenterTableHeadView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterTableHeadView.h; sourceTree = "<group>"; };
|
||||
9B2A12D42783EEC700CED41B /* XPNobleCenterTableHeadView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterTableHeadView.m; sourceTree = "<group>"; };
|
||||
9B2A12D62783F42300CED41B /* XPNoblePrivilegeContentCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNoblePrivilegeContentCell.h; sourceTree = "<group>"; };
|
||||
9B2A12D72783F42300CED41B /* XPNoblePrivilegeContentCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNoblePrivilegeContentCell.m; sourceTree = "<group>"; };
|
||||
9B2A12D92783F88800CED41B /* XPNoblePrivilegeCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNoblePrivilegeCell.h; sourceTree = "<group>"; };
|
||||
9B2A12DA2783F88800CED41B /* XPNoblePrivilegeCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNoblePrivilegeCell.m; sourceTree = "<group>"; };
|
||||
9B2A12DC2783FEDD00CED41B /* UserVipInfoVo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserVipInfoVo.h; sourceTree = "<group>"; };
|
||||
9B2A12DD2783FEDD00CED41B /* UserVipInfoVo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserVipInfoVo.m; sourceTree = "<group>"; };
|
||||
9B2A12DF27845DD300CED41B /* XPNobleCenterMyNobleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterMyNobleView.h; sourceTree = "<group>"; };
|
||||
9B2A12E027845DD300CED41B /* XPNobleCenterMyNobleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterMyNobleView.m; sourceTree = "<group>"; };
|
||||
9B2A12E227846D7100CED41B /* NobleRechargeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NobleRechargeModel.h; sourceTree = "<group>"; };
|
||||
9B2A12E327846D7100CED41B /* NobleRechargeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NobleRechargeModel.m; sourceTree = "<group>"; };
|
||||
9B7D80482753783D003DAC0C /* SessionViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SessionViewController.h; sourceTree = "<group>"; };
|
||||
9B7D80492753783D003DAC0C /* SessionViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = "<group>"; };
|
||||
9B7D804B27537950003DAC0C /* MessageCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageCell.h; sourceTree = "<group>"; };
|
||||
@@ -731,6 +754,16 @@
|
||||
9BAA5FEC277A1BBE007453F3 /* XPPrivacyViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPPrivacyViewController.m; sourceTree = "<group>"; };
|
||||
9BAA5FEE277A23F4007453F3 /* XPPermissionsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPPermissionsViewController.h; sourceTree = "<group>"; };
|
||||
9BAA5FEF277A23F4007453F3 /* XPPermissionsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPPermissionsViewController.m; sourceTree = "<group>"; };
|
||||
9BB549572782E6A30090CD26 /* XPNobleCenterPresenter.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterPresenter.h; sourceTree = "<group>"; };
|
||||
9BB549582782E6A30090CD26 /* XPNobleCenterPresenter.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterPresenter.m; sourceTree = "<group>"; };
|
||||
9BB5495A2782E79E0090CD26 /* NobleCenterModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NobleCenterModel.h; sourceTree = "<group>"; };
|
||||
9BB5495B2782E79E0090CD26 /* NobleCenterModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NobleCenterModel.m; sourceTree = "<group>"; };
|
||||
9BB5495D2782E9DB0090CD26 /* NobleAuthInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NobleAuthInfo.h; sourceTree = "<group>"; };
|
||||
9BB5495E2782E9DB0090CD26 /* NobleAuthInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NobleAuthInfo.m; sourceTree = "<group>"; };
|
||||
9BB549602782EA1D0090CD26 /* NobleInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NobleInfo.h; sourceTree = "<group>"; };
|
||||
9BB549612782EA1D0090CD26 /* NobleInfo.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NobleInfo.m; sourceTree = "<group>"; };
|
||||
9BB54964278303EB0090CD26 /* XPNobleCenterNavView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterNavView.h; sourceTree = "<group>"; };
|
||||
9BB54965278303EB0090CD26 /* XPNobleCenterNavView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterNavView.m; sourceTree = "<group>"; };
|
||||
9BB865B4272076140029CDE0 /* RtcImplDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RtcImplDelegate.h; sourceTree = "<group>"; };
|
||||
9BE29A6927D1BFF700446AB5 /* anchor_room_speak.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_speak.svga; sourceTree = "<group>"; };
|
||||
9BE29A6C27D210A500446AB5 /* anchor_room_bg.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = anchor_room_bg.svga; sourceTree = "<group>"; };
|
||||
@@ -1728,6 +1761,8 @@
|
||||
18E7B32026F098650064BC9B /* UserInfoSkillVo.m */,
|
||||
E8EEB8F526FC2673007C6EBA /* UserPhoto.h */,
|
||||
E8EEB8F626FC2673007C6EBA /* UserPhoto.m */,
|
||||
9B2A12DC2783FEDD00CED41B /* UserVipInfoVo.h */,
|
||||
9B2A12DD2783FEDD00CED41B /* UserVipInfoVo.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -2194,6 +2229,23 @@
|
||||
path = Session;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BB549632782F96F0090CD26 /* SubViews */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BB54964278303EB0090CD26 /* XPNobleCenterNavView.h */,
|
||||
9BB54965278303EB0090CD26 /* XPNobleCenterNavView.m */,
|
||||
9B2A12D32783EEC700CED41B /* XPNobleCenterTableHeadView.h */,
|
||||
9B2A12D42783EEC700CED41B /* XPNobleCenterTableHeadView.m */,
|
||||
9B2A12D62783F42300CED41B /* XPNoblePrivilegeContentCell.h */,
|
||||
9B2A12D72783F42300CED41B /* XPNoblePrivilegeContentCell.m */,
|
||||
9B2A12D92783F88800CED41B /* XPNoblePrivilegeCell.h */,
|
||||
9B2A12DA2783F88800CED41B /* XPNoblePrivilegeCell.m */,
|
||||
9B2A12DF27845DD300CED41B /* XPNobleCenterMyNobleView.h */,
|
||||
9B2A12E027845DD300CED41B /* XPNobleCenterMyNobleView.m */,
|
||||
);
|
||||
path = SubViews;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
9BC5C8E6277AAD8B007C8719 /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
@@ -2218,6 +2270,14 @@
|
||||
9BC5C8EE277B0095007C8719 /* Model */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BB5495A2782E79E0090CD26 /* NobleCenterModel.h */,
|
||||
9BB5495B2782E79E0090CD26 /* NobleCenterModel.m */,
|
||||
9BB5495D2782E9DB0090CD26 /* NobleAuthInfo.h */,
|
||||
9BB5495E2782E9DB0090CD26 /* NobleAuthInfo.m */,
|
||||
9BB549602782EA1D0090CD26 /* NobleInfo.h */,
|
||||
9BB549612782EA1D0090CD26 /* NobleInfo.m */,
|
||||
9B2A12E227846D7100CED41B /* NobleRechargeModel.h */,
|
||||
9B2A12E327846D7100CED41B /* NobleRechargeModel.m */,
|
||||
);
|
||||
path = Model;
|
||||
sourceTree = "<group>";
|
||||
@@ -2234,6 +2294,7 @@
|
||||
9BC5C8F0277B00A6007C8719 /* View */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BB549632782F96F0090CD26 /* SubViews */,
|
||||
9BC5C8EB277AFF63007C8719 /* XPNobleCenterViewController.h */,
|
||||
9BC5C8EC277AFF63007C8719 /* XPNobleCenterViewController.m */,
|
||||
9BC5C8F4277B0263007C8719 /* XPNobleCenterListViewController.h */,
|
||||
@@ -2245,6 +2306,8 @@
|
||||
9BC5C8F1277B00B5007C8719 /* Presenter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9BB549572782E6A30090CD26 /* XPNobleCenterPresenter.h */,
|
||||
9BB549582782E6A30090CD26 /* XPNobleCenterPresenter.m */,
|
||||
);
|
||||
path = Presenter;
|
||||
sourceTree = "<group>";
|
||||
@@ -4164,6 +4227,7 @@
|
||||
E8EEB90326FC31DC007C6EBA /* XPMineUserInfoProtocol.h in Sources */,
|
||||
E8232603274E4AA0003A3332 /* ThemeColor+UserCard.m in Sources */,
|
||||
E87A24F1272935920086A794 /* XPMessageRemoteExtModel.m in Sources */,
|
||||
9B2A12E427846D7100CED41B /* NobleRechargeModel.m in Sources */,
|
||||
E88B5CBA26FB329C00DA9178 /* XPMineTeenagerPwdProtocol.h in Sources */,
|
||||
E83953222769F33B00CF2F24 /* XPRoomFunctionContainerView.m in Sources */,
|
||||
E88B5CB226FB1CFF00DA9178 /* XPMineTeenagerProtocol.h in Sources */,
|
||||
@@ -4200,6 +4264,7 @@
|
||||
E8A6C29527CF441200AC7442 /* XPHomeAttentionCollectionViewCell.m in Sources */,
|
||||
E8EEB8F726FC2673007C6EBA /* UserPhoto.m in Sources */,
|
||||
E81C27A226EF23490031E639 /* XPEnum.h in Sources */,
|
||||
9BB54966278303EB0090CD26 /* XPNobleCenterNavView.m in Sources */,
|
||||
E88B5CB526FB20B800DA9178 /* XPMineTeenagerPwdView.m in Sources */,
|
||||
E81C279826EB3AC40031E639 /* LoginForgetPasswordProtocol.h in Sources */,
|
||||
E8C6FFD42754AA87004DC9F0 /* XPNoteView.m in Sources */,
|
||||
@@ -4229,6 +4294,7 @@
|
||||
E87A270027588445002DDC7A /* XPHomeListEmptyCollectionViewCell.m in Sources */,
|
||||
E82325F5274E2E09003A3332 /* XPUserCardPresenter.m in Sources */,
|
||||
E8AC723D26F4B6AA007D6E91 /* XPLoginBindPhoneResultViewController.m in Sources */,
|
||||
9B2A12D52783EEC700CED41B /* XPNobleCenterTableHeadView.m in Sources */,
|
||||
E8A03DFC276350A60098D9EA /* XPCandyTreeGiftView.m in Sources */,
|
||||
189DD73E26E21C3F00AB55B1 /* YYUtility.m in Sources */,
|
||||
E87A26FD27587E17002DDC7A /* HomeTagModel.m in Sources */,
|
||||
@@ -4251,6 +4317,7 @@
|
||||
18EE3FE22750C29D00A452BF /* NIMBadgeView.m in Sources */,
|
||||
E82EE0F8272FDDFA00D15DC1 /* UserPrivacyView.m in Sources */,
|
||||
E8DEC9A42764A6600078CB70 /* XPMoreMenuPresenter.m in Sources */,
|
||||
9B2A12D82783F42300CED41B /* XPNoblePrivilegeContentCell.m in Sources */,
|
||||
189DD53426DE255300AB55B1 /* TabbarViewController.m in Sources */,
|
||||
E87A26F927587C62002DDC7A /* XPHomeContainerPresenter.m in Sources */,
|
||||
18EE401A2754BA9F00A452BF /* NIMMessageMaker.m in Sources */,
|
||||
@@ -4310,6 +4377,7 @@
|
||||
E87E914E2796678D00A7B3F2 /* XPMineDressEmptyTableViewCell.m in Sources */,
|
||||
9B7D804D27537950003DAC0C /* MessageCell.m in Sources */,
|
||||
18F404C927609A4300A6C548 /* MessagePresenter.m in Sources */,
|
||||
9B2A12DB2783F88800CED41B /* XPNoblePrivilegeCell.m in Sources */,
|
||||
E81366E326F0A1FC0076364C /* LoginBindPhoneViewController.m in Sources */,
|
||||
189DD68426E1FDBB00AB55B1 /* XCHUDTool.m in Sources */,
|
||||
E8A6C29B27CF53BF00AC7442 /* XPHomeLikePresenter.m in Sources */,
|
||||
@@ -4378,6 +4446,7 @@
|
||||
E8EEB91426FC7786007C6EBA /* XPMineUserInfoNickViewController.m in Sources */,
|
||||
18E7B31B26F0982E0064BC9B /* UserExpand.m in Sources */,
|
||||
E8C6FFE62754FE53004DC9F0 /* XPHomeSearchPresenter.m in Sources */,
|
||||
9B2A12DE2783FEDD00CED41B /* UserVipInfoVo.m in Sources */,
|
||||
E824543526F57D6E00BE8163 /* XPLoginVerifBindPhoneViewController.m in Sources */,
|
||||
E8C6FFCB27548120004DC9F0 /* XPHomePartyViewController.m in Sources */,
|
||||
E8680718271967B00024F48F /* MicroView.m in Sources */,
|
||||
@@ -4390,6 +4459,7 @@
|
||||
E8A03DEC276301EF0098D9EA /* XPCandyTreeRankView.m in Sources */,
|
||||
18F404C3276098F100A6C548 /* Api+Message.m in Sources */,
|
||||
E8C6FFED27550CC2004DC9F0 /* HomeSearchResultModel.m in Sources */,
|
||||
9BB549592782E6A30090CD26 /* XPNobleCenterPresenter.m in Sources */,
|
||||
E8AEAEF327141C7C0017FCE0 /* XPRoomMessageContainerView.m in Sources */,
|
||||
E8C6FFE02754EEF9004DC9F0 /* XPHomeSearchViewController.m in Sources */,
|
||||
E8AE427327153A3500BEEBB2 /* XPRoomActivityContainerView.m in Sources */,
|
||||
@@ -4468,6 +4538,7 @@
|
||||
E878894C273A607C00BF1D57 /* XPGiftUserCollectionViewCell.m in Sources */,
|
||||
181D7F212727D9DB00B7C059 /* SocialStageView.m in Sources */,
|
||||
187EEEF026E89FE8002833B2 /* AccountInfoStorage.m in Sources */,
|
||||
9BB5495C2782E79E0090CD26 /* NobleCenterModel.m in Sources */,
|
||||
186A536B26FC6F2E00D67B2C /* XPShareItemCell.m in Sources */,
|
||||
E8B846C526FDB41A00A777FE /* XPMineUserInfolbumPresenter.m in Sources */,
|
||||
E83DB47D2746372300D8CBD1 /* XPRoomGiftBannerView.m in Sources */,
|
||||
@@ -4518,6 +4589,7 @@
|
||||
E8EEB8FB26FC2874007C6EBA /* XPMineUserInfoTableViewCell.m in Sources */,
|
||||
E8AC721626F46B06007D6E91 /* XPMineSettingTableViewCell.m in Sources */,
|
||||
18EE3FDF2750C1F700A452BF /* SessionListCell.m in Sources */,
|
||||
9BB549622782EA1D0090CD26 /* NobleInfo.m in Sources */,
|
||||
E80487652717DDD9008595F2 /* XPRoomMenuItem.m in Sources */,
|
||||
E89BD7D4277D471100E31B19 /* XPRoomOnlineTableViewCell.m in Sources */,
|
||||
E8412F9627795E34006E1101 /* XPRoomInviteFansView.m in Sources */,
|
||||
@@ -4557,6 +4629,7 @@
|
||||
E874B88827215D39003954B9 /* MicroStateModel.m in Sources */,
|
||||
E877A7F427842EF800EFACED /* XPRoomDatingVipUpMicView.m in Sources */,
|
||||
E896EF9F2771AE7B00AD2CC1 /* XPMineAttentionViewController.m in Sources */,
|
||||
9B2A12E127845DD300CED41B /* XPNobleCenterMyNobleView.m in Sources */,
|
||||
E89D60C1271D64B9001F8895 /* RoomInfoModel.m in Sources */,
|
||||
E89DA66727006443008483C1 /* RechargeStorage.m in Sources */,
|
||||
189DD53F26DE255600AB55B1 /* main.m in Sources */,
|
||||
@@ -4569,6 +4642,7 @@
|
||||
E8412FA92779C2ED006E1101 /* XPRoomSettingItemModel.m in Sources */,
|
||||
189DD58F26DF97E700AB55B1 /* LoginPresenter.m in Sources */,
|
||||
E896EFB22771C93B00AD2CC1 /* XPMineFriendNumberView.m in Sources */,
|
||||
9BB5495F2782E9DB0090CD26 /* NobleAuthInfo.m in Sources */,
|
||||
E89DA67227008D59008483C1 /* WalletInfoModel.m in Sources */,
|
||||
E80CBDEA27D0C53F001E1EC2 /* XPWeakTimer.m in Sources */,
|
||||
189DD55026DE37F900AB55B1 /* MvpViewController.m in Sources */,
|
||||
|
6
xplan-ios/Assets.xcassets/Mine/Noble/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
22
xplan-ios/Assets.xcassets/Mine/Noble/nobleCenter_head_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "nobleCenter_head_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "nobleCenter_head_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Mine/Noble/nobleCenter_head_bg.imageset/nobleCenter_head_bg@2x.png
vendored
Normal file
After Width: | Height: | Size: 130 KiB |
BIN
xplan-ios/Assets.xcassets/Mine/Noble/nobleCenter_head_bg.imageset/nobleCenter_head_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 252 KiB |
22
xplan-ios/Assets.xcassets/Mine/Noble/noble_myLevel_head.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "noble_myLevel_head@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "noble_myLevel_head@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Mine/Noble/noble_myLevel_head.imageset/noble_myLevel_head@2x.png
vendored
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
xplan-ios/Assets.xcassets/Mine/Noble/noble_myLevel_head.imageset/noble_myLevel_head@3x.png
vendored
Normal file
After Width: | Height: | Size: 4.5 KiB |
22
xplan-ios/Assets.xcassets/Mine/Noble/noble_open_btn.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "noble_open_btn@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "noble_open_btn@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Mine/Noble/noble_open_btn.imageset/noble_open_btn@2x.png
vendored
Normal file
After Width: | Height: | Size: 14 KiB |
BIN
xplan-ios/Assets.xcassets/Mine/Noble/noble_open_btn.imageset/noble_open_btn@3x.png
vendored
Normal file
After Width: | Height: | Size: 22 KiB |
22
xplan-ios/Assets.xcassets/Mine/Noble/noble_privilege_list_bg.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "noble_privilege_list_bg@2x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"filename" : "noble_privilege_list_bg@3x.png",
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
BIN
xplan-ios/Assets.xcassets/Mine/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@2x.png
vendored
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
xplan-ios/Assets.xcassets/Mine/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@3x.png
vendored
Normal file
After Width: | Height: | Size: 129 KiB |
@@ -9,6 +9,7 @@
|
||||
#import "UserExpand.h"
|
||||
#import "UserLevelVo.h"
|
||||
#import "UserInfoSkillVo.h"
|
||||
#import "UserVipInfoVo.h"
|
||||
#import "UserPhoto.h"
|
||||
#import "XPEnum.h"
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
@@ -79,6 +80,9 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,assign) BOOL hasSelectUser;
|
||||
///所选择的麦序
|
||||
@property (nonatomic,assign) int selectMicPosition;
|
||||
///贵族信息
|
||||
@property (nonatomic, strong) UserVipInfoVo *userVipInfoVO;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
23
xplan-ios/Base/MVP/Model/UserVipInfoVo.h
Normal file
@@ -0,0 +1,23 @@
|
||||
//
|
||||
// UserVipInfoVo.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
// 贵族信息
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface UserVipInfoVo : NSObject
|
||||
|
||||
///贵族图标
|
||||
@property (nonatomic, copy) NSString *vipIcon;
|
||||
///贵族等级
|
||||
@property (nonatomic, assign) NSInteger vipLevel;
|
||||
//用户好友昵称颜色
|
||||
@property (nonatomic, copy) NSString *friendNickColour;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Base/MVP/Model/UserVipInfoVo.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// UserVipInfoVo.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import "UserVipInfoVo.h"
|
||||
|
||||
@implementation UserVipInfoVo
|
||||
|
||||
@end
|
@@ -13,7 +13,10 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
/// 贵族中心等级列表
|
||||
/// @param completion 完成
|
||||
+ (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid;
|
||||
+ (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion;
|
||||
|
||||
///获取开通贵族产品列表
|
||||
+ (void)getChargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelType;
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -11,9 +11,13 @@
|
||||
|
||||
/// 贵族中心等级列表
|
||||
/// @param completion 完成
|
||||
+ (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion ticket:(NSString *)ticket uid:(NSString *)uid {
|
||||
// [self makeRequest:@"car/carport/v2/list" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, ticket, uid, nil];
|
||||
+ (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion {
|
||||
[self makeRequest:@"vip/getVipPageInfo" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil];
|
||||
}
|
||||
|
||||
///获取开通贵族产品列表
|
||||
+ (void)getChargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelType {
|
||||
[self makeRequest:@"chargeprod/listV2" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, channelType, nil];
|
||||
}
|
||||
|
||||
@end
|
||||
|
36
xplan-ios/Main/Mine/View/Noble/Model/NobleAuthInfo.h
Normal file
@@ -0,0 +1,36 @@
|
||||
//
|
||||
// NobleAuthInfo.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NobleAuthInfo : NSObject
|
||||
|
||||
///特权短描述
|
||||
@property (nonatomic, copy) NSString *authDesc;
|
||||
///特权icon
|
||||
@property (nonatomic, copy) NSString *authIcon;
|
||||
///特权长描述
|
||||
@property (nonatomic, copy) NSString *authIntro;
|
||||
///特权名称
|
||||
@property (nonatomic, copy) NSString *authName;
|
||||
|
||||
///特权类型:1. 铭牌 2. 头饰 3. 座驾 4. 礼物 5.资料卡 6. 财富值经验加成 7.表情 8.麦序光圈 9.麦位昵称颜色 10. 好友红名
|
||||
@property (nonatomic, assign) NSInteger authType;
|
||||
///描述图片
|
||||
@property (nonatomic, copy) NSString *descPic;
|
||||
///id
|
||||
@property (nonatomic, assign) NSInteger id;
|
||||
///seq
|
||||
@property (nonatomic, assign) NSInteger seq;
|
||||
///status
|
||||
@property (nonatomic, assign) NSInteger status;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Mine/View/Noble/Model/NobleAuthInfo.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// NobleAuthInfo.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import "NobleAuthInfo.h"
|
||||
|
||||
@implementation NobleAuthInfo
|
||||
|
||||
@end
|
29
xplan-ios/Main/Mine/View/Noble/Model/NobleCenterModel.h
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// NobleCenterModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "NobleAuthInfo.h"
|
||||
#import "NobleInfo.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NobleCenterModel : NSObject
|
||||
|
||||
///用户当前贵族等级
|
||||
@property (nonatomic, assign) NSInteger currLevel;
|
||||
///用户当前权力值
|
||||
@property (nonatomic, assign) NSInteger currScore;
|
||||
///贵族到期剩余秒数
|
||||
@property (nonatomic, assign) NSInteger remainSeconds;
|
||||
///贵族权限信息列表
|
||||
@property (nonatomic, strong) NSArray<NobleAuthInfo *> *vipAuthInfos;
|
||||
///贵族信息列表
|
||||
@property (nonatomic, strong) NSArray<NobleInfo *> *vipInfos;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
18
xplan-ios/Main/Mine/View/Noble/Model/NobleCenterModel.m
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// NobleCenterModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import "NobleCenterModel.h"
|
||||
|
||||
@implementation NobleCenterModel
|
||||
|
||||
+ (NSDictionary *)objectClassInArray {
|
||||
return @{@"vipAuthInfos": NobleAuthInfo.class,
|
||||
@"vipInfos": NobleInfo.class
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
35
xplan-ios/Main/Mine/View/Noble/Model/NobleInfo.h
Normal file
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// NobleInfo.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface NobleInfo : NSObject
|
||||
|
||||
///是否敬请期待:1. 否 2.是
|
||||
@property (nonatomic, assign) NSInteger comingSoon;
|
||||
///贵族保级值
|
||||
@property (nonatomic, assign) NSInteger levelKeepScore;
|
||||
///贵族升级值
|
||||
@property (nonatomic, assign) NSInteger levelUpScore;
|
||||
|
||||
@property (nonatomic, copy) NSString *ownAuthTypeStr;
|
||||
///有用的权限type列表
|
||||
@property (nonatomic, copy) NSArray<NSNumber *> *ownAuthTypes;
|
||||
///贵族icon
|
||||
@property (nonatomic, copy) NSString *vipIcon;
|
||||
///贵族等级
|
||||
@property (nonatomic, assign) NSInteger vipLevel;
|
||||
///贵族logo
|
||||
@property (nonatomic, copy) NSString *vipLogo;
|
||||
///贵族名称
|
||||
@property (nonatomic, copy) NSString *vipName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
12
xplan-ios/Main/Mine/View/Noble/Model/NobleInfo.m
Normal file
@@ -0,0 +1,12 @@
|
||||
//
|
||||
// NobleInfo.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import "NobleInfo.h"
|
||||
|
||||
@implementation NobleInfo
|
||||
|
||||
@end
|
22
xplan-ios/Main/Mine/View/Noble/Model/NobleRechargeModel.h
Normal file
@@ -0,0 +1,22 @@
|
||||
//
|
||||
// NobleRechargeModel.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "RechargeListModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@interface NobleRechargeModel : NSObject
|
||||
|
||||
@property (nonatomic, strong) NSArray<RechargeListModel *> *list;
|
||||
@property (nonatomic, assign) NSInteger defaultPayH5;
|
||||
@property (nonatomic, assign) NSInteger defaultPay;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
17
xplan-ios/Main/Mine/View/Noble/Model/NobleRechargeModel.m
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// NobleRechargeModel.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import "NobleRechargeModel.h"
|
||||
|
||||
@implementation NobleRechargeModel
|
||||
|
||||
+ (NSDictionary *)objectClassInArray {
|
||||
return @{@"list": RechargeListModel.class
|
||||
};
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// XPNobleCenterPresenter.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import "BaseMvpPresenter.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterPresenter : BaseMvpPresenter
|
||||
|
||||
/// 获取贵族中心数据
|
||||
- (void)getNobleCenterInfo;
|
||||
|
||||
/// 获取用户信息
|
||||
- (void)getUserInfo;
|
||||
|
||||
///获取贵族充值产品列表
|
||||
- (void)getNobleChargeProductListWithChannelType:(NSString *)channelType;
|
||||
|
||||
/// 生成贵族充值的订单
|
||||
/// @param chargeProdId 苹果服务器的充值 的id
|
||||
- (void)requestNobleIAPRechargeOrderWithChargeProdId:(NSString *)chargeProdId;
|
||||
|
||||
/// 充值成功二次验证
|
||||
/// @param receipt 凭据
|
||||
/// @param orderId 订单编号
|
||||
/// @param transcationId 商品id
|
||||
- (void)checkReceiptWithData:(NSString *)receipt orderId:(NSString *)orderId transcationId:(NSString *)transcationId;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,79 @@
|
||||
//
|
||||
// XPNobleCenterPresenter.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import "XPNobleCenterPresenter.h"
|
||||
|
||||
///Api
|
||||
#import "Api+NobleCenter.h"
|
||||
#import "Api+Mine.h"
|
||||
///Tool
|
||||
#import "AccountInfoStorage.h"
|
||||
#import "YYUtility.h"
|
||||
///Model
|
||||
#import "NobleCenterModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
#import "NobleRechargeModel.h"
|
||||
///P
|
||||
#import "XPNobleCenterProtocol.h"
|
||||
|
||||
@implementation XPNobleCenterPresenter
|
||||
|
||||
/// 获取贵族中心数据
|
||||
- (void)getNobleCenterInfo {
|
||||
[Api nobleCenterLevelList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NobleCenterModel *model = [NobleCenterModel modelWithDictionary:data.data];
|
||||
[[self getView] getNobleCenterInfoSuccess:model];
|
||||
}]];
|
||||
}
|
||||
|
||||
// 获取用户信息
|
||||
- (void)getUserInfo {
|
||||
NSString * uid = [[AccountInfoStorage instance] getUid];
|
||||
[Api getUserInfo:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
UserInfoModel * infoModel = [UserInfoModel modelWithDictionary:data.data];
|
||||
[[self getView] onGetUserInfoSuccess:infoModel];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
|
||||
}] uid:uid];
|
||||
}
|
||||
|
||||
///获取贵族充值产品列表
|
||||
- (void)getNobleChargeProductListWithChannelType:(NSString *)channelType {
|
||||
[Api getChargeList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NobleRechargeModel *model = [NobleRechargeModel modelWithDictionary:data.data];
|
||||
[[self getView] onGetNobleRechargeDataSuccess:model];
|
||||
}] channelType:channelType];
|
||||
}
|
||||
|
||||
/// 生成贵族充值的订单
|
||||
/// @param chargeProdId 苹果服务器的充值 的id
|
||||
- (void)requestNobleIAPRechargeOrderWithChargeProdId:(NSString *)chargeProdId {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
NSString * deviceInfo = [YYUtility deviceID];
|
||||
NSString * clientIp= [YYUtility ipAddress];
|
||||
[Api requestIAPRecharge:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
NSString *orderId = (NSString *)data.data[@"recordId"];
|
||||
[[self getView] requestIAPRechargeOrderSuccess:orderId chargeProdId:chargeProdId];
|
||||
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||
[[self getView] requestIAPRechargeOrderFail];
|
||||
}] chargeProdId:chargeProdId uid:uid ticket:ticket deviceInfo:deviceInfo clientIp:clientIp];
|
||||
}
|
||||
|
||||
/// 充值成功二次验证
|
||||
/// @param receipt 凭据
|
||||
/// @param orderId 订单编号
|
||||
/// @param transcationId 商品id
|
||||
- (void)checkReceiptWithData:(NSString *)receipt orderId:(NSString *)orderId transcationId:(NSString *)transcationId {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[Api checkReceipt:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||
[[self getView] checkReceiptSuccess:transcationId];
|
||||
} showLoading:YES] receipt:receipt chooseEnv:@"true" chargeRecordId:orderId transcationId:transcationId uid:uid ticket:ticket];
|
||||
}
|
||||
|
||||
@end
|
@@ -7,8 +7,24 @@
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
@class NobleCenterModel, UserInfoModel, NobleRechargeModel;
|
||||
@protocol XPNobleCenterProtocol <NSObject>
|
||||
|
||||
///获取贵族信息成功
|
||||
- (void)getNobleCenterInfoSuccess:(NobleCenterModel *)model;
|
||||
|
||||
///获取用户信息成功
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo;
|
||||
|
||||
///获取贵族充值信息成功
|
||||
- (void)onGetNobleRechargeDataSuccess:(NobleRechargeModel *)rechargeInfo;
|
||||
|
||||
///请求充值id的状态成功
|
||||
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId;
|
||||
///请求充值账单失败
|
||||
- (void)requestIAPRechargeOrderFail;
|
||||
|
||||
///二次校验成功
|
||||
- (void)checkReceiptSuccess:(NSString *)transcationId;
|
||||
|
||||
@end
|
||||
|
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// XPNobleCenterMyNobleView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterMyNobleView : UIView
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,194 @@
|
||||
//
|
||||
// XPNobleCenterMyNobleView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import "XPNobleCenterMyNobleView.h"
|
||||
#import <YYText/YYText.h>
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
|
||||
@interface XPNobleCenterMyNobleView ()
|
||||
|
||||
///顶部view
|
||||
@property (nonatomic, strong) UIView *topView;
|
||||
///等级详情
|
||||
@property (nonatomic, strong) YYLabel *nobleLabel;
|
||||
///权利值图标
|
||||
@property (nonatomic, strong) UIImageView *privilegeIconImage;
|
||||
///底层进度条
|
||||
@property (nonatomic, strong) UIView *backProgressView;
|
||||
///当前进度条
|
||||
@property (nonatomic, strong) UIView *currentProgressView;
|
||||
///进度条圆标
|
||||
@property (nonatomic, strong) UIImageView *indicateImageView;
|
||||
///当前权利值
|
||||
@property (nonatomic, strong) UILabel *currentValueLabel;
|
||||
///保级权力值
|
||||
@property (nonatomic, strong) UILabel *safeValueLabel;
|
||||
///升级权力值
|
||||
@property (nonatomic, strong) UILabel *upGradeValueLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterMyNobleView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.topView];
|
||||
[self.topView addSubview:self.nobleLabel];
|
||||
[self addSubview:self.privilegeIconImage];
|
||||
[self addSubview:self.backProgressView];
|
||||
[self.backProgressView addSubview:self.currentProgressView];
|
||||
[self addSubview:self.indicateImageView];
|
||||
[self addSubview:self.currentValueLabel];
|
||||
[self addSubview:self.safeValueLabel];
|
||||
[self addSubview:self.upGradeValueLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.topView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.left.right.mas_equalTo(0);
|
||||
make.height.mas_equalTo(36);
|
||||
}];
|
||||
[self.nobleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.centerY.mas_equalTo(self.topView);
|
||||
}];
|
||||
[self.privilegeIconImage mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(14);
|
||||
make.top.mas_equalTo(self.topView.mas_bottom).mas_offset(24);
|
||||
make.width.mas_equalTo(50);
|
||||
make.height.mas_equalTo(16);
|
||||
}];
|
||||
[self.backProgressView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.privilegeIconImage);
|
||||
make.left.mas_equalTo(self.privilegeIconImage.mas_right).mas_offset(8);
|
||||
make.right.mas_equalTo(-14);
|
||||
make.height.mas_equalTo(12);
|
||||
}];
|
||||
[self.currentProgressView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.bottom.mas_equalTo(self.backProgressView);
|
||||
make.width.mas_equalTo(0);
|
||||
}];
|
||||
|
||||
[self.indicateImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.backProgressView);
|
||||
make.width.height.mas_equalTo(14);
|
||||
make.centerX.mas_equalTo(self.currentProgressView.mas_right);
|
||||
}];
|
||||
|
||||
[self.currentValueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.indicateImageView);
|
||||
make.top.mas_equalTo(self.backProgressView.mas_bottom).mas_offset(5);
|
||||
}];
|
||||
[self.safeValueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.mas_equalTo(self.backProgressView.mas_top).mas_offset(-8);
|
||||
make.height.mas_equalTo(10);
|
||||
}];
|
||||
|
||||
[self.upGradeValueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerY.mas_equalTo(self.safeValueLabel);
|
||||
make.right.mas_equalTo(self.backProgressView);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
|
||||
//- (void)setVipInfo:(NobleInfo *)vipInfo {
|
||||
// self.iconImageView.imageUrl = vipInfo.vipLogo;
|
||||
//}
|
||||
|
||||
|
||||
- (UIView *)topView {
|
||||
if (!_topView) {
|
||||
_topView = [[UIView alloc] init];
|
||||
_topView.backgroundColor = UIColorFromRGB(0x302B20);
|
||||
}
|
||||
return _topView;
|
||||
}
|
||||
- (YYLabel *)nobleLabel {
|
||||
if (!_nobleLabel) {
|
||||
_nobleLabel = [[YYLabel alloc] init];
|
||||
_nobleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_nobleLabel.numberOfLines = 0;
|
||||
}
|
||||
return _nobleLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)privilegeIconImage {
|
||||
if (!_privilegeIconImage) {
|
||||
_privilegeIconImage = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
|
||||
}
|
||||
return _privilegeIconImage;
|
||||
}
|
||||
|
||||
- (UIView *)backProgressView {
|
||||
if (!_backProgressView) {
|
||||
_backProgressView = [[UIView alloc] init];
|
||||
_backProgressView.backgroundColor = UIColorFromRGB(0xB49158);
|
||||
}
|
||||
return _backProgressView;
|
||||
}
|
||||
- (UIView *)currentProgressView {
|
||||
if (!_currentProgressView) {
|
||||
_currentProgressView = [[UIView alloc] init];
|
||||
}
|
||||
return _currentProgressView;
|
||||
}
|
||||
|
||||
- (UIImageView *)indicateImageView {
|
||||
if (!_indicateImageView) {
|
||||
_indicateImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@""]];
|
||||
}
|
||||
return _indicateImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)currentValueLabel {
|
||||
if (!_currentValueLabel) {
|
||||
_currentValueLabel = [[UILabel alloc] init];
|
||||
_currentValueLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_currentValueLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_currentValueLabel.text = @"800";
|
||||
_currentValueLabel.textColor = UIColorFromRGB(0xB59862);
|
||||
}
|
||||
return _currentValueLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)safeValueLabel {
|
||||
if (!_safeValueLabel) {
|
||||
_safeValueLabel = [[UILabel alloc] init];
|
||||
_safeValueLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_safeValueLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_safeValueLabel.text = @"1000";
|
||||
_safeValueLabel.textColor = UIColorFromRGB(0xB59862);
|
||||
}
|
||||
return _safeValueLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)upGradeValueLabel {
|
||||
if (!_upGradeValueLabel) {
|
||||
_upGradeValueLabel = [[UILabel alloc] init];
|
||||
_upGradeValueLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_upGradeValueLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_upGradeValueLabel.text = @"5000";
|
||||
_upGradeValueLabel.textColor = UIColorFromRGB(0xB59862);
|
||||
}
|
||||
return _upGradeValueLabel;
|
||||
}
|
||||
|
||||
|
||||
@end
|
@@ -0,0 +1,28 @@
|
||||
//
|
||||
// XPNobleCenterNavView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@class XPNobleCenterNavView;
|
||||
@protocol XPNobleCenterNavViewDelegate <NSObject>
|
||||
|
||||
///点击了返回按钮
|
||||
- (void)xPNobleCenterNavView:(XPNobleCenterNavView *)view didClickBackButton:(UIButton *)sender;
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@interface XPNobleCenterNavView : UIView
|
||||
|
||||
///代理
|
||||
@property (nonatomic,weak) id<XPNobleCenterNavViewDelegate> delegate;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// XPNobleCenterNavView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/3.
|
||||
//
|
||||
|
||||
#import "XPNobleCenterNavView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "UIButton+EnlargeTouchArea.h"
|
||||
|
||||
@interface XPNobleCenterNavView ()
|
||||
///返回按钮
|
||||
@property (nonatomic,strong) UIButton *backButton;
|
||||
///显示文本
|
||||
@property (nonatomic,strong) UILabel *titleLabel;
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterNavView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
#pragma mark - Response
|
||||
- (void)backButtonAction:(UIButton *)sender {
|
||||
if (self.delegate && [self.delegate respondsToSelector:@selector(xPNobleCenterNavView:didClickBackButton:)]) {
|
||||
[self.delegate xPNobleCenterNavView:self didClickBackButton:sender];
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.backButton];
|
||||
[self addSubview:self.titleLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.backButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.mas_equalTo(15);
|
||||
make.centerY.equalTo(self.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
|
||||
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.centerY.equalTo(self.mas_bottom).mas_offset(-22);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (UIButton *)backButton {
|
||||
if (!_backButton) {
|
||||
_backButton = [UIButton buttonWithType:UIButtonTypeCustom];
|
||||
[_backButton setImage:[UIImage imageNamed:@"home_search_white_back"] forState:UIControlStateNormal];
|
||||
_backButton.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
|
||||
[_backButton addTarget:self action:@selector(backButtonAction:) forControlEvents:UIControlEventTouchUpInside];
|
||||
[_backButton setEnlargeEdgeWithTop:10 right:10 bottom:10 left:10];
|
||||
}
|
||||
return _backButton;
|
||||
}
|
||||
|
||||
|
||||
- (UILabel *)titleLabel {
|
||||
if (!_titleLabel) {
|
||||
_titleLabel = [[UILabel alloc] init];
|
||||
_titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_titleLabel.font = [UIFont systemFontOfSize:15];
|
||||
_titleLabel.text = @"贵族中心";
|
||||
_titleLabel.textColor = [UIColor whiteColor];
|
||||
}
|
||||
return _titleLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,25 @@
|
||||
//
|
||||
// XPNobleCenterTableHeadView.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "NobleCenterModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterTableHeadView : UIView
|
||||
|
||||
@property (nonatomic, strong) NobleInfo *vipInfo;
|
||||
|
||||
///用户是否为当前等级
|
||||
@property (nonatomic, assign) BOOL isCurrentLevel;
|
||||
|
||||
///当前权利值
|
||||
@property (nonatomic, assign) NSInteger currentScore;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,139 @@
|
||||
//
|
||||
// XPNobleCenterTableHeadView.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
|
||||
#import "XPNobleCenterTableHeadView.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
|
||||
#import "NetImageView.h"
|
||||
|
||||
@interface XPNobleCenterTableHeadView ()
|
||||
|
||||
///贵族图标
|
||||
@property (nonatomic, strong) NetImageView *iconImageView;
|
||||
///我的等级图标
|
||||
@property (nonatomic, strong) UIImageView *myLevelImageView;
|
||||
///当前权利值
|
||||
@property (nonatomic, strong) UILabel *currentValueLabel;
|
||||
///尚未开通贵族
|
||||
@property (nonatomic, strong) UILabel *noOpenNobleLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterTableHeadView
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
self = [super initWithFrame:frame];
|
||||
if (self) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self addSubview:self.iconImageView];
|
||||
[self addSubview:self.myLevelImageView];
|
||||
[self addSubview:self.currentValueLabel];
|
||||
[self addSubview:self.noOpenNobleLabel];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(12);
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.width.mas_equalTo(108);
|
||||
make.height.mas_equalTo(98);
|
||||
}];
|
||||
[self.noOpenNobleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.iconImageView.mas_bottom).mas_offset(21);
|
||||
make.height.mas_equalTo(17);
|
||||
}];
|
||||
[self.myLevelImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.iconImageView.mas_bottom).mas_offset(21);
|
||||
make.width.mas_equalTo(300);
|
||||
make.height.mas_equalTo(22);
|
||||
}];
|
||||
[self.currentValueLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.myLevelImageView.mas_bottom).mas_offset(3);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
|
||||
- (void)setVipInfo:(NobleInfo *)vipInfo {
|
||||
self.iconImageView.imageUrl = vipInfo.vipLogo;
|
||||
}
|
||||
|
||||
- (void)setIsCurrentLevel:(BOOL)isCurrentLevel {
|
||||
if (isCurrentLevel) {
|
||||
self.noOpenNobleLabel.hidden = YES;
|
||||
self.myLevelImageView.hidden = NO;
|
||||
self.currentValueLabel.hidden = NO;
|
||||
} else {
|
||||
self.noOpenNobleLabel.hidden = NO;
|
||||
self.myLevelImageView.hidden = YES;
|
||||
self.currentValueLabel.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setCurrentScore:(NSInteger)currentScore {
|
||||
if (self.isCurrentLevel) {
|
||||
self.currentValueLabel.text = [NSString stringWithFormat:@"当前权利值:%zd", currentScore];
|
||||
}
|
||||
}
|
||||
|
||||
- (NetImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[NetImageView alloc] init];
|
||||
_iconImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)noOpenNobleLabel {
|
||||
if (!_noOpenNobleLabel) {
|
||||
_noOpenNobleLabel = [[UILabel alloc] init];
|
||||
_noOpenNobleLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightMedium];
|
||||
_noOpenNobleLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_noOpenNobleLabel.text = @"尚未开通贵族";
|
||||
_noOpenNobleLabel.textColor = UIColorFromRGB(0xB59862);
|
||||
}
|
||||
return _noOpenNobleLabel;
|
||||
}
|
||||
|
||||
- (UIImageView *)myLevelImageView {
|
||||
if (!_myLevelImageView) {
|
||||
_myLevelImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"noble_myLevel_head"]];
|
||||
_myLevelImageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||
_myLevelImageView.hidden = YES;
|
||||
}
|
||||
return _myLevelImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)currentValueLabel {
|
||||
if (!_currentValueLabel) {
|
||||
_currentValueLabel = [[UILabel alloc] init];
|
||||
_currentValueLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_currentValueLabel.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium];
|
||||
_currentValueLabel.text = @"当前权利值:";
|
||||
_currentValueLabel.textColor = UIColorFromRGB(0xFFE7CF);
|
||||
_currentValueLabel.hidden = YES;
|
||||
}
|
||||
return _currentValueLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPNoblePrivilegeCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "NobleAuthInfo.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNoblePrivilegeCell : UICollectionViewCell
|
||||
|
||||
@property (nonatomic, strong) NobleAuthInfo *vipInfo;
|
||||
///是否是当前等级能点亮的
|
||||
@property (nonatomic, assign) BOOL isOwn;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,122 @@
|
||||
//
|
||||
// XPNoblePrivilegeCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import "XPNoblePrivilegeCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "NetImageView.h"
|
||||
|
||||
@interface XPNoblePrivilegeCell()
|
||||
|
||||
///特权icon
|
||||
@property (nonatomic, strong) NetImageView *iconImageView;
|
||||
///蒙版层
|
||||
@property (nonatomic, strong) UIView *alphaView;
|
||||
///特权名称
|
||||
@property (nonatomic, strong) UILabel *privilegeLabel;
|
||||
///特权描述
|
||||
@property (nonatomic, strong) UILabel *descLabel;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNoblePrivilegeCell
|
||||
|
||||
- (instancetype)initWithFrame:(CGRect)frame {
|
||||
if (self = [super initWithFrame:frame]) {
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
[self.contentView addSubview:self.iconImageView];
|
||||
[self.contentView addSubview:self.alphaView];
|
||||
[self.contentView addSubview:self.privilegeLabel];
|
||||
[self.contentView addSubview:self.descLabel];
|
||||
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.iconImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(0);
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.width.height.mas_equalTo(46);
|
||||
}];
|
||||
[self.alphaView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(0);
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.width.height.mas_equalTo(46);
|
||||
}];
|
||||
[self.privilegeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.iconImageView.mas_bottom).mas_offset(7);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
[self.descLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.privilegeLabel.mas_bottom).mas_offset(4);
|
||||
make.height.mas_equalTo(14);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setVipInfo:(NobleAuthInfo *)vipInfo {
|
||||
_vipInfo = vipInfo;
|
||||
self.iconImageView.imageUrl = vipInfo.authIcon;
|
||||
self.privilegeLabel.text = vipInfo.authName;
|
||||
self.descLabel.text = vipInfo.authDesc;
|
||||
self.alphaView.hidden = self.isOwn;
|
||||
}
|
||||
|
||||
- (NetImageView *)iconImageView {
|
||||
if (!_iconImageView) {
|
||||
_iconImageView = [[NetImageView alloc] init];
|
||||
_iconImageView.layer.cornerRadius = 23;
|
||||
_iconImageView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _iconImageView;
|
||||
}
|
||||
|
||||
- (UIView *)alphaView {
|
||||
if (!_alphaView) {
|
||||
_alphaView = [[UIView alloc] init];
|
||||
_alphaView.backgroundColor = UIColorFromRGB(0x000000);
|
||||
_alphaView.alpha = 0.3;
|
||||
_alphaView.hidden = YES;
|
||||
_alphaView.layer.cornerRadius = 23;
|
||||
_alphaView.layer.masksToBounds = YES;
|
||||
}
|
||||
return _alphaView;
|
||||
}
|
||||
|
||||
- (UILabel *)privilegeLabel {
|
||||
if (!_privilegeLabel) {
|
||||
_privilegeLabel = [[UILabel alloc] init];
|
||||
_privilegeLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_privilegeLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_privilegeLabel.textColor = UIColorFromRGB(0x9F8052);
|
||||
}
|
||||
return _privilegeLabel;
|
||||
}
|
||||
|
||||
- (UILabel *)descLabel {
|
||||
if (!_descLabel) {
|
||||
_descLabel = [[UILabel alloc] init];
|
||||
_descLabel.font = [UIFont systemFontOfSize:12 weight:UIFontWeightRegular];
|
||||
_descLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_descLabel.textColor = UIColorFromRGB(0x8B7245);
|
||||
}
|
||||
return _descLabel;
|
||||
}
|
||||
|
||||
@end
|
@@ -0,0 +1,21 @@
|
||||
//
|
||||
// XPNoblePrivilegeContentCell.h
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
#import "NobleCenterModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNoblePrivilegeContentCell : UITableViewCell
|
||||
|
||||
@property (nonatomic, strong) NobleInfo *vipInfo;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *vipAuthInfos;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
@@ -0,0 +1,125 @@
|
||||
//
|
||||
// XPNoblePrivilegeContentCell.m
|
||||
// xplan-ios
|
||||
//
|
||||
// Created by GreenLand on 2022/1/4.
|
||||
//
|
||||
|
||||
#import "XPNoblePrivilegeContentCell.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "XPMacro.h"
|
||||
#import "NSArray+Lookin.h"
|
||||
///View
|
||||
#import "XPNoblePrivilegeCell.h"
|
||||
|
||||
@interface XPNoblePrivilegeContentCell()<UICollectionViewDelegateFlowLayout, UICollectionViewDataSource, UICollectionViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) UIImageView *bgImageView;
|
||||
///已有特权数量
|
||||
@property (nonatomic, strong) UILabel *privilegeLabel;
|
||||
|
||||
@property (nonatomic, strong) UICollectionView *collectionView;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *dataArray;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNoblePrivilegeContentCell
|
||||
|
||||
- (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.layer.masksToBounds = YES;
|
||||
self.backgroundColor = [UIColor clearColor];
|
||||
// [self.contentView addSubview:self.bgImageView];
|
||||
[self.contentView addSubview:self.privilegeLabel];
|
||||
[self.contentView addSubview:self.collectionView];
|
||||
self.contentView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
// [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(0);
|
||||
// }];
|
||||
[self.privilegeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(60);
|
||||
make.height.mas_equalTo(16);
|
||||
}];
|
||||
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(90);
|
||||
make.left.right.bottom.mas_equalTo(0);
|
||||
}];
|
||||
}
|
||||
|
||||
#pragma mark - UICollectionViewDataSource
|
||||
- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section {
|
||||
return self.vipAuthInfos.count;
|
||||
}
|
||||
|
||||
- (__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath {
|
||||
XPNoblePrivilegeCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass(XPNoblePrivilegeCell.class) forIndexPath:indexPath];
|
||||
NobleAuthInfo *info = [self.vipAuthInfos lookin_safeObjectAtIndex:indexPath.row];
|
||||
if ([self.vipInfo.ownAuthTypes containsObject:@(info.authType)]) {
|
||||
cell.isOwn = YES;
|
||||
}
|
||||
cell.vipInfo = info;
|
||||
return cell;
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (void)setVipAuthInfos:(NSMutableArray *)vipAuthInfos {
|
||||
_vipAuthInfos = [NSMutableArray arrayWithArray:vipAuthInfos];
|
||||
self.privilegeLabel.text = [NSString stringWithFormat:@"%zd/%zd", self.vipInfo.ownAuthTypes.count, self.vipAuthInfos.count];
|
||||
[self.collectionView reloadData];
|
||||
}
|
||||
|
||||
- (void)setVipInfo:(NobleInfo *)vipInfo {
|
||||
_vipInfo = vipInfo;
|
||||
}
|
||||
|
||||
- (UIImageView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"noble_privilege_list_bg"]];
|
||||
_bgImageView.contentMode = UIViewContentModeScaleToFill;
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
||||
- (UILabel *)privilegeLabel {
|
||||
if (!_privilegeLabel) {
|
||||
_privilegeLabel = [[UILabel alloc] init];
|
||||
_privilegeLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_privilegeLabel.textAlignment = NSTextAlignmentCenter;
|
||||
_privilegeLabel.textColor = UIColorFromRGB(0xFFE7CF);
|
||||
_privilegeLabel.text = @"0/12";
|
||||
}
|
||||
return _privilegeLabel;
|
||||
}
|
||||
|
||||
- (UICollectionView *)collectionView {
|
||||
if (!_collectionView) {
|
||||
UICollectionViewFlowLayout *layout = [[UICollectionViewFlowLayout alloc] init];
|
||||
layout.itemSize = CGSizeMake(KScreenWidth / 3, 105);
|
||||
layout.minimumLineSpacing = 0;
|
||||
layout.minimumInteritemSpacing = 0;
|
||||
_collectionView = [[UICollectionView alloc] initWithFrame:CGRectZero collectionViewLayout:layout];
|
||||
_collectionView.dataSource = self;
|
||||
_collectionView.delegate = self;
|
||||
[_collectionView registerClass:XPNoblePrivilegeCell.class forCellWithReuseIdentifier:NSStringFromClass(XPNoblePrivilegeCell.class)];
|
||||
_collectionView.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
return _collectionView;
|
||||
}
|
||||
|
||||
@end
|
@@ -7,11 +7,22 @@
|
||||
|
||||
#import "MvpViewController.h"
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
#import "NobleCenterModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterListViewController : MvpViewController<JXCategoryListContentViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) NobleInfo *vipInfo;
|
||||
|
||||
@property (nonatomic, strong) NSMutableArray *vipAuthInfos;
|
||||
///用户是否为当前等级
|
||||
@property (nonatomic, assign) BOOL isCurrentLevel;
|
||||
///当前权利值
|
||||
@property (nonatomic, assign) NSInteger currentScore;
|
||||
///当前用户是否开通了贵族
|
||||
@property (nonatomic, assign) BOOL isOpenNoble;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -11,23 +11,28 @@
|
||||
///Tool
|
||||
#import "XPMacro.h"
|
||||
///View
|
||||
|
||||
#import "XPNobleCenterTableHeadView.h"
|
||||
#import "XPNoblePrivilegeContentCell.h"
|
||||
///P
|
||||
#import "XPNobleCenterProtocol.h"
|
||||
|
||||
@interface XPNobleCenterListViewController ()<XPNobleCenterProtocol>
|
||||
@interface XPNobleCenterListViewController ()<UITableViewDelegate, UITableViewDataSource>
|
||||
///列表
|
||||
@property (nonatomic,strong) UITableView *tableView;
|
||||
///数据源
|
||||
@property (nonatomic,strong) NSArray *datasource;
|
||||
//@property (nonatomic,strong) NSArray *datasource;
|
||||
///列表头view
|
||||
@property (nonatomic, strong) XPNobleCenterTableHeadView *headView;
|
||||
|
||||
@property (nonatomic, strong) UIImageView *bgImageView;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterListViewController
|
||||
|
||||
//- (XPMineDressUpPresenter *)createPresenter {
|
||||
// return [[XPMineDressUpPresenter alloc] init];
|
||||
//}
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
@@ -37,138 +42,102 @@
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
// [self.view addSubview:self.tableView];
|
||||
self.view.backgroundColor = [UIColor clearColor];
|
||||
[self.view addSubview:self.tableView];
|
||||
self.tableView.tableHeaderView = self.headView;
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
// [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
// make.edges.mas_equalTo(self.view);
|
||||
// }];
|
||||
[self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.edges.mas_equalTo(self.view);
|
||||
}];
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - XPMineDressUpProtocol
|
||||
//- (void)getUserHeadwearListSuccess:(NSArray *)array {
|
||||
// self.datasource = array;
|
||||
// [self.tableView reloadData];
|
||||
//}
|
||||
//
|
||||
//- (void)getUserCarListSuccess:(NSArray *)array {
|
||||
// self.datasource = array;
|
||||
// [self.tableView reloadData];
|
||||
//}
|
||||
//
|
||||
//- (void)getUserNameplateListSuccess:(NSArray *)array {
|
||||
// self.datasource = array;
|
||||
// [self.tableView reloadData];
|
||||
//}
|
||||
//
|
||||
//- (void)useHeadwearSuccess:(NSString *)headWearId {
|
||||
// [self.presenter getUserHeadwearList];
|
||||
// [self showSuccessToast:headWearId.integerValue == 0 ? @"取消使用头饰成功" : @"头饰使用成功"];
|
||||
//
|
||||
//}
|
||||
//
|
||||
//- (void)useCarSuccess:(NSString *)carId {
|
||||
// [self.presenter getUserCarList];
|
||||
// [self showSuccessToast:carId.integerValue == 0 ? @"取消使用座驾成功" : @"座驾使用成功"];
|
||||
//}
|
||||
//
|
||||
//- (void)useNameplateSuccess:(NSString *)nameplateId {
|
||||
// [self.presenter getUserNameplateList];
|
||||
// [self showSuccessToast:nameplateId.integerValue == 0 ? @"取消使用铭牌成功" : @"铭牌使用成功"];
|
||||
//}
|
||||
#pragma mark - JXCategoryListContentViewDelegate
|
||||
- (UIView *)listView {
|
||||
return self.view;
|
||||
}
|
||||
/*
|
||||
|
||||
#pragma mark - UITableViewDelegate And UITableViewDataSource
|
||||
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
|
||||
return self.datasource.count > 0 ? self.datasource.count : 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
return self.datasource.count > 0 ? 120 : (KScreenHeight - kNavigationHeight - 100 -50);
|
||||
NSInteger itemCount = self.vipAuthInfos.count;
|
||||
CGFloat lineCount = (itemCount % 3 == 0) ? itemCount / 3 : (itemCount / 3 + 1);
|
||||
CGFloat itemHeight = 105;
|
||||
return 90 + lineCount * itemHeight;
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
if (self.type == DressUpListType_HeadWear) {
|
||||
XPMineHeadwearTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineHeadwearTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])];
|
||||
}
|
||||
cell.headwearModel = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
} else if(self.type == DressUpListType_Car) {
|
||||
XPMineCarTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineCarTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineCarTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])];
|
||||
}
|
||||
cell.carInfo = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
} else {
|
||||
XPMineNameplateTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineNameplateTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])];
|
||||
}
|
||||
cell.nameplateModel = [self.datasource objectAtIndex:indexPath.row];
|
||||
cell.delegate = self;
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
|
||||
XPMineDressEmptyTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPMineDressEmptyTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
|
||||
}
|
||||
cell.emptyTitle = self.type == DressUpListType_HeadWear ? @"亲爱的用户,你还没有头饰噢!" : self.type == DressUpListType_Car ? @"亲爱的用户,你还没有座驾噢!" : @"亲爱的用户,你还没有铭牌噢!";
|
||||
XPNoblePrivilegeContentCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPNoblePrivilegeContentCell class])];
|
||||
cell.selectionStyle = UITableViewCellSelectionStyleNone;
|
||||
cell.vipInfo = self.vipInfo;
|
||||
cell.vipAuthInfos = self.vipAuthInfos;
|
||||
return cell;
|
||||
}
|
||||
*/
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
//- (void)setType:(DressUpListType)type {
|
||||
// _type = type;
|
||||
// switch (type) {
|
||||
// case DressUpListType_HeadWear:
|
||||
// [self.presenter getUserHeadwearList];
|
||||
// break;
|
||||
// case DressUpListType_Car:
|
||||
// [self.presenter getUserCarList];
|
||||
// break;
|
||||
// case DressUpListType_Nameplate:
|
||||
// [self.presenter getUserNameplateList];
|
||||
// break;
|
||||
//
|
||||
// default:
|
||||
// break;
|
||||
// }
|
||||
//}
|
||||
- (void)setVipInfo:(NobleInfo *)vipInfo {
|
||||
_vipInfo = vipInfo;
|
||||
self.headView.vipInfo = vipInfo;
|
||||
}
|
||||
|
||||
//- (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:[XPMineNameplateTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineNameplateTableViewCell class])];
|
||||
// [_tableView registerClass:[XPMineCarTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineCarTableViewCell class])];
|
||||
// [_tableView registerClass:[XPMineHeadwearTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineHeadwearTableViewCell class])];
|
||||
// [_tableView registerClass:[XPMineDressEmptyTableViewCell class] forCellReuseIdentifier:NSStringFromClass([XPMineDressEmptyTableViewCell class])];
|
||||
//
|
||||
// }
|
||||
// return _tableView;
|
||||
//}
|
||||
- (void)setVipAuthInfos:(NSMutableArray *)vipAuthInfos {
|
||||
_vipAuthInfos = [NSMutableArray arrayWithArray:vipAuthInfos];
|
||||
[self.tableView reloadData];
|
||||
}
|
||||
|
||||
- (void)setIsCurrentLevel:(BOOL)isCurrentLevel {
|
||||
_isCurrentLevel = isCurrentLevel;
|
||||
self.headView.isCurrentLevel = isCurrentLevel;
|
||||
}
|
||||
|
||||
- (void)setCurrentScore:(NSInteger)currentScore {
|
||||
_currentScore = currentScore;
|
||||
self.headView.currentScore = currentScore;
|
||||
}
|
||||
|
||||
- (void)setIsOpenNoble:(BOOL)isOpenNoble {
|
||||
_isOpenNoble = isOpenNoble;
|
||||
if (isOpenNoble) {
|
||||
[self.tableView setContentInset:UIEdgeInsetsMake(0, 0, kSafeAreaBottomHeight + 91, 0)];
|
||||
} else {
|
||||
[self.tableView setContentInset:UIEdgeInsetsMake(0, 0, kSafeAreaBottomHeight + 5 + 44, 0)];
|
||||
}
|
||||
}
|
||||
|
||||
- (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:[XPNoblePrivilegeContentCell class] forCellReuseIdentifier:NSStringFromClass([XPNoblePrivilegeContentCell class])];
|
||||
// _tableView.backgroundView = self.bgImageView;
|
||||
|
||||
}
|
||||
return _tableView;
|
||||
}
|
||||
|
||||
- (XPNobleCenterTableHeadView *)headView {
|
||||
if (!_headView) {
|
||||
_headView = [[XPNobleCenterTableHeadView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, 170)];
|
||||
}
|
||||
return _headView;
|
||||
}
|
||||
|
||||
- (UIImageView *)bgImageView {
|
||||
if (!_bgImageView) {
|
||||
_bgImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"noble_privilege_list_bg"]];
|
||||
}
|
||||
return _bgImageView;
|
||||
}
|
||||
|
||||
@end
|
||||
|
@@ -5,11 +5,11 @@
|
||||
// Created by GreenLand on 2021/12/28.
|
||||
//
|
||||
|
||||
#import "BaseViewController.h"
|
||||
#import "MvpViewController.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@interface XPNobleCenterViewController : BaseViewController
|
||||
@interface XPNobleCenterViewController : MvpViewController
|
||||
|
||||
@end
|
||||
|
||||
|
@@ -6,58 +6,237 @@
|
||||
//
|
||||
|
||||
#import "XPNobleCenterViewController.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
///Third
|
||||
#import <Masonry/Masonry.h>
|
||||
#import <JXCategoryView/JXCategoryView.h>
|
||||
#import <JXCategoryView/JXCategoryListContainerView.h>
|
||||
#import <SDCycleScrollView/SDCycleScrollView.h>
|
||||
#import <Base64/MF_Base64Additions.h>
|
||||
///Tool
|
||||
#import "ThemeColor.h"
|
||||
#import "Api+NobleCenter.h"
|
||||
#import "XPMacro.h"
|
||||
#import "NSArray+Lookin.h"
|
||||
#import "XPIAPHelper.h"
|
||||
#import "RechargeStorage.h"
|
||||
#import "AccountInfoStorage.h"
|
||||
///View
|
||||
#import "XPNobleCenterListViewController.h"
|
||||
#import "XPNobleCenterNavView.h"
|
||||
#import "XPNobleCenterMyNobleView.h"
|
||||
///P
|
||||
#import "XPNobleCenterPresenter.h"
|
||||
///model
|
||||
#import "NobleCenterModel.h"
|
||||
#import "UserInfoModel.h"
|
||||
#import "NobleRechargeModel.h"
|
||||
|
||||
@interface XPNobleCenterViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate, SDCycleScrollViewDelegate>
|
||||
@interface XPNobleCenterViewController ()<JXCategoryViewDelegate, JXCategoryListContainerViewDelegate,XPNobleCenterNavViewDelegate, XPIAPHelperDelegate>
|
||||
///分页标题
|
||||
@property (nonatomic, strong) NSArray<NSString *> *titles;
|
||||
///分页控件
|
||||
@property (nonatomic, strong) JXCategoryTitleView *titleView;
|
||||
///分页lineView
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *contentView;
|
||||
@property (nonatomic, strong) JXCategoryListContainerView *lineView;
|
||||
///头饰
|
||||
@property (nonatomic,strong) XPNobleCenterListViewController *nobleListView;
|
||||
///头部背景图
|
||||
@property (nonatomic, strong) UIImageView *headBGImgeView;
|
||||
|
||||
@property (nonatomic, strong) XPNobleCenterNavView *navView;
|
||||
|
||||
///总数据
|
||||
@property (nonatomic, strong) NobleCenterModel *model;
|
||||
///用户信息
|
||||
@property (nonatomic, strong) UserInfoModel *userInfo;
|
||||
///开通贵族
|
||||
@property (nonatomic, strong) UIButton *openNobleButton;
|
||||
///当前用户贵族信息-开通了贵族才显示
|
||||
@property (nonatomic, strong) XPNobleCenterMyNobleView *myNobleView;
|
||||
|
||||
///充值-----
|
||||
@property (nonatomic, strong) NobleRechargeModel *rechargeModel;
|
||||
///订单编号
|
||||
@property (nonatomic,copy) NSString *orderId;
|
||||
|
||||
@property (nonatomic, assign) BOOL isVip;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPNobleCenterViewController
|
||||
|
||||
- (void)dealloc {
|
||||
[XPIAPHelper shareHelper].delegate = nil;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
|
||||
[self requestNobleTagList];
|
||||
[XPIAPHelper shareHelper].delegate = self;
|
||||
[self requestHttp];
|
||||
[self initSubViews];
|
||||
[self initSubViewConstraints];
|
||||
}
|
||||
|
||||
- (BOOL)isHiddenNavBar {
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
[self hideNavigationBar];
|
||||
}
|
||||
|
||||
- (XPNobleCenterPresenter *)createPresenter {
|
||||
return [[XPNobleCenterPresenter alloc] init];
|
||||
}
|
||||
|
||||
#pragma mark - Private Method
|
||||
- (void)initSubViews {
|
||||
self.title = @"贵族中心";
|
||||
self.view.backgroundColor = UIColorFromRGB(0x221E13);
|
||||
[self.view addSubview:self.headBGImgeView];
|
||||
[self.view addSubview:self.navView];
|
||||
[self.view addSubview:self.titleView];
|
||||
[self.view addSubview:self.contentView];
|
||||
[self.view addSubview:self.lineView];
|
||||
[self.view addSubview:self.openNobleButton];
|
||||
[self.view addSubview:self.myNobleView];
|
||||
}
|
||||
|
||||
- (void)initSubViewConstraints {
|
||||
[self.headBGImgeView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.top.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(290);
|
||||
}];
|
||||
|
||||
[self.navView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.top.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(kNavigationHeight);
|
||||
}];
|
||||
[self.titleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.mas_equalTo(self.view);
|
||||
make.height.mas_equalTo(50);
|
||||
make.top.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.navView.mas_bottom);
|
||||
}];
|
||||
|
||||
[self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
|
||||
[self.lineView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.left.right.bottom.mas_equalTo(self.view);
|
||||
make.top.mas_equalTo(self.titleView.mas_bottom);
|
||||
}];
|
||||
[self.openNobleButton mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self.view);
|
||||
make.bottom.mas_equalTo(-kSafeAreaBottomHeight - 5);
|
||||
make.width.mas_equalTo(300);
|
||||
make.height.mas_equalTo(44);
|
||||
}];
|
||||
[self.myNobleView mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.height.mas_equalTo(91+kSafeAreaBottomHeight);
|
||||
make.left.bottom.right.mas_equalTo(0);
|
||||
}];
|
||||
}
|
||||
|
||||
///请求贵族中心数据
|
||||
- (void)requestHttp {
|
||||
[self.presenter getUserInfo];
|
||||
[self.presenter getNobleChargeProductListWithChannelType:@"10"];
|
||||
}
|
||||
|
||||
#pragma mark - XPNobleCenterProtocol
|
||||
///获取用户信息成功
|
||||
- (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo {
|
||||
self.userInfo = userInfo;
|
||||
[self.presenter getNobleCenterInfo];
|
||||
}
|
||||
|
||||
- (void)getNobleCenterInfoSuccess:(NobleCenterModel *)model {
|
||||
self.model = model;
|
||||
__block NSMutableArray<NSString *> *names = [NSMutableArray array];
|
||||
for (int index = 0; index < model.vipInfos.count; index++) {
|
||||
NobleInfo *tagInfo = [model.vipInfos objectAtIndex:index];
|
||||
[names addObject:tagInfo.vipName];
|
||||
}
|
||||
self.titles = names.copy;
|
||||
self.titleView.titles = self.titles;
|
||||
// self.openNobleButton.hidden = self.userInfo.userVipInfoVO.vipLevel;
|
||||
// self.myNobleView.hidden = !self.userInfo.userVipInfoVO.vipLevel;
|
||||
self.openNobleButton.hidden = self.isVip;
|
||||
self.myNobleView.hidden = !self.isVip;
|
||||
[self.titleView reloadData];
|
||||
[self.lineView reloadData];
|
||||
}
|
||||
|
||||
///获取贵族充值信息成功
|
||||
- (void)onGetNobleRechargeDataSuccess:(NobleRechargeModel *)rechargeInfo {
|
||||
self.rechargeModel = rechargeInfo;
|
||||
}
|
||||
|
||||
///请求充值id的状态成功
|
||||
- (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId {
|
||||
if (orderId.length > 0) {
|
||||
self.orderId = orderId;
|
||||
[[XPIAPHelper shareHelper] buyAppProductWithAppProductId:chargeProdId];
|
||||
}
|
||||
}
|
||||
///请求充值账单失败
|
||||
- (void)requestIAPRechargeOrderFail {
|
||||
[self hideHUD];
|
||||
}
|
||||
|
||||
///二次校验成功
|
||||
- (void)checkReceiptSuccess:(NSString *)transcationId {
|
||||
[self deleteRechageReciptWithTransactionIdentifier:transcationId];
|
||||
///刷新一下用户的💎
|
||||
[self.presenter getUserInfo];
|
||||
self.orderId = nil;
|
||||
}
|
||||
|
||||
///删除本地保存的
|
||||
- (void)deleteRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL deleteSuccess = [RechargeStorage delegateTranscationId:transactionIdentifier uid:uid];
|
||||
if (deleteSuccess) {
|
||||
#warning to do 保存失败 需要埋点
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - XPIAPHelperDelegate
|
||||
///当前充值的状态
|
||||
- (void)rechargeProcessStatus:(PaymentStatus)status {
|
||||
[self hideHUD];
|
||||
if (status == PaymentStatus_Purchased) {
|
||||
[self showLoading];
|
||||
} else if (status == PaymentStatus_Purchasing) {
|
||||
[self showLoading];
|
||||
} else if (status == PaymentStatus_Failed) {
|
||||
[self showErrorToast:@"购买失败"];
|
||||
} else if (status == PaymentStatus_Deferred) {
|
||||
[self showErrorToast:@"出现未知错误,请重新尝试"];
|
||||
}
|
||||
}
|
||||
|
||||
///充值成功回调id
|
||||
- (void)rechargeSuccess:(NSString *)transactionIdentifier {
|
||||
///保存唯一凭证
|
||||
[self saveRechageReciptWithTransactionIdentifier:transactionIdentifier];
|
||||
NSData *receiptData = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
|
||||
NSString * receipt = [MF_Base64Codec base64StringFromData:receiptData];
|
||||
///二次验证
|
||||
[self.presenter checkReceiptWithData:receipt orderId:self.orderId transcationId:transactionIdentifier];
|
||||
}
|
||||
|
||||
///充值成功之后保存订单到钥匙串
|
||||
- (void)saveRechageReciptWithTransactionIdentifier:(NSString *)transactionIdentifier {
|
||||
NSData *receipt = [NSData dataWithContentsOfURL:[[NSBundle mainBundle] appStoreReceiptURL]];
|
||||
NSString *encodeStr = [receipt base64EncodedStringWithOptions:NSDataBase64EncodingEndLineWithLineFeed];
|
||||
NSMutableDictionary *dictionary = [NSMutableDictionary dictionary];
|
||||
[dictionary setObject:transactionIdentifier forKey:@"transcationId"];
|
||||
[dictionary setObject:encodeStr forKey:@"recipt"];
|
||||
[dictionary setObject:self.orderId forKey:@"orderId"];
|
||||
NSString *reciptJson = [dictionary toJSONString];
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
BOOL saveSuccess = [RechargeStorage saveTranscationId:transactionIdentifier recipt:reciptJson uid:uid];
|
||||
if (!saveSuccess) {
|
||||
#warning to do 保存失败 需要埋点
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - JXCategoryViewDelegate
|
||||
@@ -66,7 +245,16 @@
|
||||
}
|
||||
|
||||
- (id<JXCategoryListContentViewDelegate>)listContainerView:(JXCategoryListContainerView *)listContainerView initListForIndex:(NSInteger)index {
|
||||
return self.nobleListView;
|
||||
// return self.nobleListView;
|
||||
XPNobleCenterListViewController *VC = [[XPNobleCenterListViewController alloc] init];
|
||||
// VC.isOpenNoble = self.userInfo.userVipInfoVO.vipLevel;
|
||||
VC.isOpenNoble = self.isVip;
|
||||
NobleInfo *vipInfo = [self.model.vipInfos lookin_safeObjectAtIndex:index];
|
||||
VC.vipInfo = vipInfo;
|
||||
VC.vipAuthInfos = self.model.vipAuthInfos;
|
||||
VC.isCurrentLevel = self.userInfo.userVipInfoVO.vipLevel == vipInfo.vipLevel;
|
||||
VC.currentScore = self.model.currScore;
|
||||
return VC;
|
||||
}
|
||||
|
||||
// 点击选中或者滚动选中都会调用该方法。适用于只关心选中事件,不关心具体是点击还是滚动选中的。
|
||||
@@ -75,20 +263,33 @@
|
||||
self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0);
|
||||
}
|
||||
|
||||
#pragma mark - XPNobleCenterNavViewDelegate
|
||||
- (void)xPNobleCenterNavView:(XPNobleCenterNavView *)view didClickBackButton:(UIButton *)sender {
|
||||
[self.navigationController popViewControllerAnimated:YES];
|
||||
}
|
||||
|
||||
#pragma mark - events
|
||||
- (void)onOpenNobleButtonClick:(UIButton *)button {
|
||||
self.isVip = YES;
|
||||
[self requestHttp];
|
||||
// RechargeListModel *rechargeModel = self.rechargeModel.list[0];
|
||||
// [self.presenter requestNobleIAPRechargeOrderWithChargeProdId:rechargeModel.chargeProdId];
|
||||
}
|
||||
|
||||
#pragma mark - Getters And Setters
|
||||
- (JXCategoryTitleView *)titleView {
|
||||
if (!_titleView) {
|
||||
_titleView = [[JXCategoryTitleView alloc] init];
|
||||
_titleView.delegate = self;
|
||||
_titleView.titles = self.titles;
|
||||
_titleView.titleColor = [ThemeColor secondTextColor];
|
||||
_titleView.titleSelectedColor = [ThemeColor mainTextColor];
|
||||
_titleView.titleFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
|
||||
_titleView.titleSelectedFont = [UIFont fontWithName:@"PingFang-SC-Medium" size:16];
|
||||
_titleView.titleColor = UIColorFromRGB(0xBC9E66);
|
||||
_titleView.titleSelectedColor = UIColorFromRGB(0xFFE3AF);
|
||||
_titleView.titleFont = [UIFont systemFontOfSize:14];
|
||||
_titleView.titleSelectedFont = [UIFont systemFontOfSize:14 weight:UIFontWeightSemibold];
|
||||
_titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleCenter;
|
||||
_titleView.contentScrollViewClickTransitionAnimationEnabled = NO;
|
||||
_titleView.defaultSelectedIndex = 0;
|
||||
_titleView.listContainer = self.contentView;
|
||||
_titleView.listContainer = self.lineView;
|
||||
|
||||
JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init];
|
||||
lineView.indicatorColor = [ThemeColor appMainColor];
|
||||
@@ -100,18 +301,18 @@
|
||||
return _titleView;
|
||||
}
|
||||
|
||||
- (JXCategoryListContainerView *)contentView {
|
||||
if (!_contentView) {
|
||||
_contentView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
_contentView.scrollView.backgroundColor = [UIColor clearColor];
|
||||
_contentView.defaultSelectedIndex = 0;
|
||||
- (JXCategoryListContainerView *)lineView {
|
||||
if (!_lineView) {
|
||||
_lineView = [[JXCategoryListContainerView alloc] initWithType:JXCategoryListContainerType_ScrollView delegate:self];
|
||||
_lineView.scrollView.backgroundColor = [UIColor clearColor];
|
||||
_lineView.defaultSelectedIndex = 0;
|
||||
}
|
||||
return _contentView;
|
||||
return _lineView;
|
||||
}
|
||||
|
||||
- (NSArray<NSString *> *)titles {
|
||||
if (!_titles) {
|
||||
_titles = @[@"骑士", @"男爵", @"子爵"];
|
||||
_titles = @[];
|
||||
}
|
||||
return _titles;
|
||||
}
|
||||
@@ -123,39 +324,39 @@
|
||||
return _nobleListView;
|
||||
}
|
||||
|
||||
///请求贵族中心数据
|
||||
- (void)requestNobleTagList {
|
||||
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||
NSString * ticket = [AccountInfoStorage instance].getTicket;
|
||||
[Api nobleCenterLevelList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
// if (code == 200) {
|
||||
// NSArray <ActivityInfoModel *>* array = [ActivityInfoModel modelsWithArray:data.data];
|
||||
// if (array.count <= 0) {
|
||||
// [self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.height.mas_equalTo(0);
|
||||
// }];
|
||||
// }
|
||||
// if (array.count <=0) return;
|
||||
// self.activityList = array;
|
||||
// NSMutableArray * picList = [NSMutableArray array];
|
||||
// [array enumerateObjectsUsingBlock:^(ActivityInfoModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||
// if (obj.bannerPic.length > 0) {
|
||||
// [picList addObject:obj.bannerPic];
|
||||
// }
|
||||
// }];
|
||||
// self.cycleScrollView.imageURLStringsGroup = picList;
|
||||
// if (array.count > 1) {
|
||||
// [self.cycleScrollView setAutoScroll:YES];
|
||||
// self.cycleScrollView.autoScrollTimeInterval = 3;
|
||||
// } else {
|
||||
// [self.cycleScrollView setAutoScroll:NO];
|
||||
// }
|
||||
// } else {
|
||||
// [self.cycleScrollView mas_updateConstraints:^(MASConstraintMaker *make) {
|
||||
// make.height.mas_equalTo(0);
|
||||
// }];
|
||||
// }
|
||||
} ticket:ticket uid:uid];
|
||||
- (UIImageView *)headBGImgeView {
|
||||
if (!_headBGImgeView) {
|
||||
_headBGImgeView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"nobleCenter_head_bg"]];
|
||||
_headBGImgeView.contentMode = UIViewContentModeScaleAspectFill;
|
||||
}
|
||||
return _headBGImgeView;
|
||||
}
|
||||
|
||||
- (XPNobleCenterNavView *)navView {
|
||||
if (!_navView) {
|
||||
_navView = [[XPNobleCenterNavView alloc] init];
|
||||
_navView.delegate = self;
|
||||
}
|
||||
return _navView;
|
||||
}
|
||||
|
||||
- (UIButton *)openNobleButton {
|
||||
if (!_openNobleButton) {
|
||||
_openNobleButton = [[UIButton alloc] init];
|
||||
[_openNobleButton setImage:[UIImage imageNamed:@"noble_open_btn"] forState:UIControlStateNormal];
|
||||
[_openNobleButton addTarget:self action:@selector(onOpenNobleButtonClick:) forControlEvents:UIControlEventTouchUpInside];
|
||||
_openNobleButton.hidden = YES;
|
||||
}
|
||||
return _openNobleButton;
|
||||
}
|
||||
|
||||
- (XPNobleCenterMyNobleView *)myNobleView {
|
||||
if (!_myNobleView) {
|
||||
_myNobleView = [[XPNobleCenterMyNobleView alloc] init];
|
||||
_myNobleView.hidden = YES;
|
||||
_myNobleView.backgroundColor = [UIColor blueColor];
|
||||
}
|
||||
return _myNobleView;
|
||||
}
|
||||
|
||||
@end
|
||||
|