diff --git a/YuMi.xcodeproj/project.pbxproj b/YuMi.xcodeproj/project.pbxproj index 5ea3120b..9d5ac53e 100644 --- a/YuMi.xcodeproj/project.pbxproj +++ b/YuMi.xcodeproj/project.pbxproj @@ -232,6 +232,7 @@ 236B2E592AA18E13003967A8 /* XPMIneGameCollectionViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 236B2E552AA18E12003967A8 /* XPMIneGameCollectionViewCell.m */; }; 236B2E5A2AA18E13003967A8 /* XPMineGameTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 236B2E572AA18E12003967A8 /* XPMineGameTableViewCell.m */; }; 236B2E5D2AA19169003967A8 /* HomeLittleGameRoomModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 236B2E5C2AA19169003967A8 /* HomeLittleGameRoomModel.m */; }; + 236BA4982BB6AFED00C7C73A /* PINoblePrivilegeEmptyCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 236BA4972BB6AFED00C7C73A /* PINoblePrivilegeEmptyCell.m */; }; 237B94BC2A984DA7007853E3 /* XPTrumpetPresenter.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94AE2A984DA7007853E3 /* XPTrumpetPresenter.m */; }; 237B94BD2A984DA7007853E3 /* XPNobleTrumpetModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B32A984DA7007853E3 /* XPNobleTrumpetModel.m */; }; 237B94BE2A984DA7007853E3 /* XPRoomTrumpetViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 237B94B72A984DA7007853E3 /* XPRoomTrumpetViewController.m */; }; @@ -363,6 +364,7 @@ 23D8DEF22AC5633300644637 /* PIIAPRegulate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23D8DEF12AC5633300644637 /* PIIAPRegulate.swift */; }; 23E45C052AC2B0A200D88BCA /* SessionDiscoverNewTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E45C042AC2B0A200D88BCA /* SessionDiscoverNewTableViewCell.m */; }; 23E56B3C2B03564B00C8DAC9 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 23E56B3B2B03564B00C8DAC9 /* CoreTelephony.framework */; }; + 23E7FE9C2BB6CD42008F6800 /* XPNobleCenterWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E7FE9B2BB6CD42008F6800 /* XPNobleCenterWindow.m */; }; 23E9E9972A80C3A100B792F2 /* XPMineGuildPersonalBillRecordVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9E9942A80C39F00B792F2 /* XPMineGuildPersonalBillRecordVC.m */; }; 23E9E9982A80C3A100B792F2 /* XPMineGuildPersonalBillStatisVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9E9962A80C3A100B792F2 /* XPMineGuildPersonalBillStatisVC.m */; }; 23E9E99B2A80C40000B792F2 /* XPMineGuildPersonalBillRecordHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23E9E9992A80C3FF00B792F2 /* XPMineGuildPersonalBillRecordHeadView.m */; }; @@ -408,6 +410,13 @@ 23E9EB332A85E97C00B792F2 /* pi_login_new_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = 23E9EB322A85E97B00B792F2 /* pi_login_new_logo.png */; }; 23EE96F22B9FF6BE00475D69 /* pi_crazy_zoo.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23EE96F12B9FF6BE00475D69 /* pi_crazy_zoo.svga */; }; 23EE970A2BA2D39C00475D69 /* PIWebViewSavePhotoView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23EE97092BA2D39C00475D69 /* PIWebViewSavePhotoView.m */; }; + 23F9636A2BB6919D00F440A6 /* PINobleRebateModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23F963692BB6919D00F440A6 /* PINobleRebateModel.m */; }; + 23FE47D52BB3C64600F09D23 /* PINobleCenterTitleCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FE47D42BB3C64600F09D23 /* PINobleCenterTitleCell.m */; }; + 23FE47D82BB3CEAF00F09D23 /* PINobleCenterTitleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FE47D72BB3CEAF00F09D23 /* PINobleCenterTitleView.m */; }; + 23FE47DB2BB4171C00F09D23 /* PINobleCenterListView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FE47DA2BB4171C00F09D23 /* PINobleCenterListView.m */; }; + 23FE47E12BB41CF200F09D23 /* PINobleCenterListReusableView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FE47E02BB41CF200F09D23 /* PINobleCenterListReusableView.m */; }; + 23FE47E42BB41EBF00F09D23 /* PINobleCenterListCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FE47E32BB41EBF00F09D23 /* PINobleCenterListCell.m */; }; + 23FE47E72BB4378700F09D23 /* PINobleCenterListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FE47E62BB4378700F09D23 /* PINobleCenterListModel.m */; }; 23FF255B2AB956D50064E904 /* pi_home_new_pk.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */; }; 23FF25622ABAE6310064E904 /* pi_room_game_fine_love.svga in Resources */ = {isa = PBXBuildFile; fileRef = 23FF25612ABAE6310064E904 /* pi_room_game_fine_love.svga */; }; 23FF25652ABC3B3C0064E904 /* XPHomeGameView.m in Sources */ = {isa = PBXBuildFile; fileRef = 23FF25642ABC3B3B0064E904 /* XPHomeGameView.m */; }; @@ -1932,6 +1941,8 @@ 236B2E582AA18E12003967A8 /* XPMIneGameCollectionViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMIneGameCollectionViewCell.h; sourceTree = ""; }; 236B2E5B2AA19168003967A8 /* HomeLittleGameRoomModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeLittleGameRoomModel.h; sourceTree = ""; }; 236B2E5C2AA19169003967A8 /* HomeLittleGameRoomModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeLittleGameRoomModel.m; sourceTree = ""; }; + 236BA4962BB6AFED00C7C73A /* PINoblePrivilegeEmptyCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINoblePrivilegeEmptyCell.h; sourceTree = ""; }; + 236BA4972BB6AFED00C7C73A /* PINoblePrivilegeEmptyCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINoblePrivilegeEmptyCell.m; sourceTree = ""; }; 237B94AD2A984DA7007853E3 /* XPTrumpetPresenter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPTrumpetPresenter.h; sourceTree = ""; }; 237B94AE2A984DA7007853E3 /* XPTrumpetPresenter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPTrumpetPresenter.m; sourceTree = ""; }; 237B94B02A984DA7007853E3 /* XPRoomTrumpetProtocol.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPRoomTrumpetProtocol.h; sourceTree = ""; }; @@ -2187,6 +2198,8 @@ 23E45C032AC2B0A200D88BCA /* SessionDiscoverNewTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionDiscoverNewTableViewCell.h; sourceTree = ""; }; 23E45C042AC2B0A200D88BCA /* SessionDiscoverNewTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionDiscoverNewTableViewCell.m; sourceTree = ""; }; 23E56B3B2B03564B00C8DAC9 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; }; + 23E7FE9A2BB6CD42008F6800 /* XPNobleCenterWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = XPNobleCenterWindow.h; sourceTree = ""; }; + 23E7FE9B2BB6CD42008F6800 /* XPNobleCenterWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = XPNobleCenterWindow.m; sourceTree = ""; }; 23E9E9932A80C39E00B792F2 /* XPMineGuildPersonalBillStatisVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineGuildPersonalBillStatisVC.h; sourceTree = ""; }; 23E9E9942A80C39F00B792F2 /* XPMineGuildPersonalBillRecordVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = XPMineGuildPersonalBillRecordVC.m; sourceTree = ""; }; 23E9E9952A80C3A000B792F2 /* XPMineGuildPersonalBillRecordVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPMineGuildPersonalBillRecordVC.h; sourceTree = ""; }; @@ -2271,6 +2284,20 @@ 23EE96F12B9FF6BE00475D69 /* pi_crazy_zoo.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_crazy_zoo.svga; sourceTree = ""; }; 23EE97082BA2D39C00475D69 /* PIWebViewSavePhotoView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIWebViewSavePhotoView.h; sourceTree = ""; }; 23EE97092BA2D39C00475D69 /* PIWebViewSavePhotoView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIWebViewSavePhotoView.m; sourceTree = ""; }; + 23F963682BB6919D00F440A6 /* PINobleRebateModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINobleRebateModel.h; sourceTree = ""; }; + 23F963692BB6919D00F440A6 /* PINobleRebateModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINobleRebateModel.m; sourceTree = ""; }; + 23FE47D32BB3C64600F09D23 /* PINobleCenterTitleCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINobleCenterTitleCell.h; sourceTree = ""; }; + 23FE47D42BB3C64600F09D23 /* PINobleCenterTitleCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINobleCenterTitleCell.m; sourceTree = ""; }; + 23FE47D62BB3CEAF00F09D23 /* PINobleCenterTitleView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINobleCenterTitleView.h; sourceTree = ""; }; + 23FE47D72BB3CEAF00F09D23 /* PINobleCenterTitleView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINobleCenterTitleView.m; sourceTree = ""; }; + 23FE47D92BB4171C00F09D23 /* PINobleCenterListView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINobleCenterListView.h; sourceTree = ""; }; + 23FE47DA2BB4171C00F09D23 /* PINobleCenterListView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINobleCenterListView.m; sourceTree = ""; }; + 23FE47DF2BB41CF200F09D23 /* PINobleCenterListReusableView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINobleCenterListReusableView.h; sourceTree = ""; }; + 23FE47E02BB41CF200F09D23 /* PINobleCenterListReusableView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINobleCenterListReusableView.m; sourceTree = ""; }; + 23FE47E22BB41EBF00F09D23 /* PINobleCenterListCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINobleCenterListCell.h; sourceTree = ""; }; + 23FE47E32BB41EBF00F09D23 /* PINobleCenterListCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINobleCenterListCell.m; sourceTree = ""; }; + 23FE47E52BB4378700F09D23 /* PINobleCenterListModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PINobleCenterListModel.h; sourceTree = ""; }; + 23FE47E62BB4378700F09D23 /* PINobleCenterListModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PINobleCenterListModel.m; sourceTree = ""; }; 23FF255A2AB956D50064E904 /* pi_home_new_pk.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_home_new_pk.svga; sourceTree = ""; }; 23FF25612ABAE6310064E904 /* pi_room_game_fine_love.svga */ = {isa = PBXFileReference; lastKnownFileType = file; path = pi_room_game_fine_love.svga; sourceTree = ""; }; 23FF25632ABC3B3B0064E904 /* XPHomeGameView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XPHomeGameView.h; sourceTree = ""; }; @@ -5209,6 +5236,8 @@ children = ( 2331C1382A5EB71000E1D940 /* NobleAuthInfo.h */, 2331C13D2A5EB71000E1D940 /* NobleAuthInfo.m */, + 23F963682BB6919D00F440A6 /* PINobleRebateModel.h */, + 23F963692BB6919D00F440A6 /* PINobleRebateModel.m */, 2331C13E2A5EB71000E1D940 /* NobleCenterModel.h */, 2331C13A2A5EB71000E1D940 /* NobleCenterModel.m */, 2331C13B2A5EB71000E1D940 /* NobleInfo.h */, @@ -5217,6 +5246,8 @@ 2331C13C2A5EB71000E1D940 /* NobleLevelUpModel.m */, 2331C13F2A5EB71000E1D940 /* NobleRechargeModel.h */, 2331C1392A5EB71000E1D940 /* NobleRechargeModel.m */, + 23FE47E52BB4378700F09D23 /* PINobleCenterListModel.h */, + 23FE47E62BB4378700F09D23 /* PINobleCenterListModel.m */, ); path = Model; sourceTree = ""; @@ -5258,6 +5289,8 @@ 2331C1592A5EB71000E1D940 /* XPNoblePrivilegeCell.m */, 2331C14B2A5EB71000E1D940 /* XPNoblePrivilegeContentCell.h */, 2331C1562A5EB71000E1D940 /* XPNoblePrivilegeContentCell.m */, + 236BA4962BB6AFED00C7C73A /* PINoblePrivilegeEmptyCell.h */, + 236BA4972BB6AFED00C7C73A /* PINoblePrivilegeEmptyCell.m */, 2331C1472A5EB71000E1D940 /* XPNobleSettingNavView.h */, 2331C1522A5EB71000E1D940 /* XPNobleSettingNavView.m */, 2331C14E2A5EB71000E1D940 /* XPNobleUpgradeLevelView.h */, @@ -5266,6 +5299,18 @@ 2331C17D2A5ECCF600E1D940 /* XPNobleCenterPayView.m */, 2331C17F2A5ECD3800E1D940 /* XPNobleCenterPayCell.h */, 2331C1802A5ECD3800E1D940 /* XPNobleCenterPayCell.m */, + 23FE47D32BB3C64600F09D23 /* PINobleCenterTitleCell.h */, + 23FE47D42BB3C64600F09D23 /* PINobleCenterTitleCell.m */, + 23FE47D62BB3CEAF00F09D23 /* PINobleCenterTitleView.h */, + 23FE47D72BB3CEAF00F09D23 /* PINobleCenterTitleView.m */, + 23FE47D92BB4171C00F09D23 /* PINobleCenterListView.h */, + 23FE47DA2BB4171C00F09D23 /* PINobleCenterListView.m */, + 23FE47DF2BB41CF200F09D23 /* PINobleCenterListReusableView.h */, + 23FE47E02BB41CF200F09D23 /* PINobleCenterListReusableView.m */, + 23FE47E22BB41EBF00F09D23 /* PINobleCenterListCell.h */, + 23FE47E32BB41EBF00F09D23 /* PINobleCenterListCell.m */, + 23E7FE9A2BB6CD42008F6800 /* XPNobleCenterWindow.h */, + 23E7FE9B2BB6CD42008F6800 /* XPNobleCenterWindow.m */, ); path = SubViews; sourceTree = ""; @@ -10993,6 +11038,7 @@ 9B7D80502753AA9D003DAC0C /* UITableView+NIMScrollToBottom.m in Sources */, E8AFF7E3298CA1E500FBDE32 /* SessionSayHelloCountModel.m in Sources */, E8998D7A2859784200C68558 /* XPSVGAPlayer.m in Sources */, + 23FE47D82BB3CEAF00F09D23 /* PINobleCenterTitleView.m in Sources */, 9BD9A18427A0F128004186FE /* XPMineVisitorItemModel.m in Sources */, E852D73E28631C18001465ED /* XPMonentsCommentTableViewCell.m in Sources */, 23CEFC4E2AFB8FC100576D89 /* BSNSDictionary.m in Sources */, @@ -11187,6 +11233,7 @@ E87DF4BF2A42C8C1009C1185 /* HomeTagModel.m in Sources */, 23FF25652ABC3B3C0064E904 /* XPHomeGameView.m in Sources */, E88863D3278ED4C0004BCFAB /* Timestamp.m in Sources */, + 23E7FE9C2BB6CD42008F6800 /* XPNobleCenterWindow.m in Sources */, E8A3540A28FEC0510014A784 /* XPWishGiftListView.m in Sources */, 238B37BF2AC55A2C00BFC9D5 /* XPTreasureFairyStoreResultView.m in Sources */, E88863CF278EC393004BCFAB /* XPAcrossRoomPKPrizeView.m in Sources */, @@ -11369,6 +11416,7 @@ 235A45232B04BEB6009753F5 /* PIBaseModel.m in Sources */, E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */, 9B86D87A2817DD8400494FCD /* XPRoomEnterHideTipView.m in Sources */, + 23FE47E12BB41CF200F09D23 /* PINobleCenterListReusableView.m in Sources */, E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */, E85E7B122A4EB0D200B6D00A /* GuildIncomeRecordModel.m in Sources */, E81C27A026EEF83D0031E639 /* YUMIHtmlUrl.m in Sources */, @@ -11480,6 +11528,7 @@ E8B825CD26EA18C8009E8E9F /* DJDKMIMOMColor.m in Sources */, E8751E5F28A62A970056EF44 /* XPSailingPresenter.m in Sources */, E84A2E962A5280F900D6AF8A /* XPExchangeDiamondsView.m in Sources */, + 23F9636A2BB6919D00F440A6 /* PINobleRebateModel.m in Sources */, E8DAC5AC2858305A00012CFD /* XPRoomMessageBubbleView.m in Sources */, 1427218929A75F6F00C7C423 /* HTTPDataResponse.m in Sources */, E8B9843028AB90200022D026 /* XPMoentsTopicListView.m in Sources */, @@ -11532,6 +11581,7 @@ 9B335B492925D8A00048A116 /* XPAnchorPKSelectTypeController.m in Sources */, E8098CAE282E07C00090B9F0 /* XPMonentsEmptyTableViewCell.m in Sources */, E85E7B4F2A4EB0D300B6D00A /* XPMineExchangeAuthorityVC.m in Sources */, + 23FE47DB2BB4171C00F09D23 /* PINobleCenterListView.m in Sources */, E84A2E932A527EC800D6AF8A /* XPIncomeRecordPresent.m in Sources */, 236B2E432AA07D06003967A8 /* NSString+RW.m in Sources */, E85E7B172A4EB0D200B6D00A /* ClanMemberDetailInfoModel.m in Sources */, @@ -11540,6 +11590,7 @@ E8D34D5A28082357009C4835 /* UserGiftWallInfoModel.m in Sources */, E82107842987E35300DE7040 /* MessageMonentsAutoModel.m in Sources */, 189DD52E26DE255300AB55B1 /* AppDelegate.m in Sources */, + 23FE47E42BB41EBF00F09D23 /* PINobleCenterListCell.m in Sources */, E83DB4842746661800D8CBD1 /* XPRoomGiftBroadcastView.m in Sources */, E8778AF82988F4E200CF139B /* XPSessionSayHelloHeaderView.m in Sources */, E84150C527747E0900A7F548 /* FirstRechargeRewardModel.m in Sources */, @@ -11743,6 +11794,7 @@ 23D321D52ADD0F05006B259C /* Api+PhotoAlbum.m in Sources */, 23E9EA842A84B6FD00B792F2 /* XPMineUserInfoTagModel.m in Sources */, E8998D852859B4FA00C68558 /* XPMineUserInfoGiftView.m in Sources */, + 23FE47E72BB4378700F09D23 /* PINobleCenterListModel.m in Sources */, 186A536B26FC6F2E00D67B2C /* XPShareItemCell.m in Sources */, 237B94C02A984DA7007853E3 /* Api+RoomTrumpet.m in Sources */, 23E45C052AC2B0A200D88BCA /* SessionDiscoverNewTableViewCell.m in Sources */, @@ -11957,6 +12009,7 @@ 2305F3382AD9194B00AD403C /* PIRoomMessageUnlockPhotoAlbumView.m in Sources */, E874B88827215D39003954B9 /* MicroStateModel.m in Sources */, 23E9EABB2A84CCBE00B792F2 /* XPMineDataSkillDataCollectionViewCell.m in Sources */, + 23FE47D52BB3C64600F09D23 /* PINobleCenterTitleCell.m in Sources */, E877A7F427842EF800EFACED /* XPRoomDatingVipUpMicView.m in Sources */, E896EF9F2771AE7B00AD2CC1 /* XPMineAttentionViewController.m in Sources */, E89D60C1271D64B9001F8895 /* RoomInfoModel.m in Sources */, @@ -12013,6 +12066,7 @@ E80EC80E28ACD84000D133C5 /* QKeyboardBaseManager.m in Sources */, 23E9EA792A8385CC00B792F2 /* XPTreasureFairyGiftView.m in Sources */, 149839C7299E0B9F00F82CBF /* XPMomentListCollectionViewCell.m in Sources */, + 236BA4982BB6AFED00C7C73A /* PINoblePrivilegeEmptyCell.m in Sources */, E88C729C2828F37D0047FB2B /* XPRoomMusicLibraryEmptyTableViewCell.m in Sources */, E85E7B0A2A4EB0D200B6D00A /* XPGuildManagerPerPresenter.m in Sources */, 9B85F3562806DD8A006EDF51 /* XPAnchorPKFinishView.m in Sources */, diff --git a/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/Contents.json new file mode 100644 index 00000000..877b0893 --- /dev/null +++ b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_noble_center_tag_diamond@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_noble_center_tag_diamond@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/mine_noble_center_tag_diamond@2x.png b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/mine_noble_center_tag_diamond@2x.png new file mode 100644 index 00000000..381335c2 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/mine_noble_center_tag_diamond@2x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/mine_noble_center_tag_diamond@3x.png b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/mine_noble_center_tag_diamond@3x.png new file mode 100644 index 00000000..fcc95515 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_diamond.imageset/mine_noble_center_tag_diamond@3x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/Contents.json new file mode 100644 index 00000000..4239bddb --- /dev/null +++ b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "mine_noble_center_tag_title_bg@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "mine_noble_center_tag_title_bg@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/mine_noble_center_tag_title_bg@2x.png b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/mine_noble_center_tag_title_bg@2x.png new file mode 100644 index 00000000..6323b4d9 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/mine_noble_center_tag_title_bg@2x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/mine_noble_center_tag_title_bg@3x.png b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/mine_noble_center_tag_title_bg@3x.png new file mode 100644 index 00000000..ab893e93 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/mine_noble_center_tag_title_bg.imageset/mine_noble_center_tag_title_bg@3x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/Contents.json index 9ed35e2e..c19f4f71 100644 --- a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/Contents.json +++ b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/Contents.json @@ -1,16 +1,15 @@ { "images" : [ { + "filename" : "noble_privilege_list_bg.png", "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" } diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg.png new file mode 100644 index 00000000..dd2a23b0 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@2x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@2x.png deleted file mode 100644 index a7a3c914..00000000 Binary files a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@2x.png and /dev/null differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@3x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@3x.png deleted file mode 100644 index 8397b490..00000000 Binary files a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_bg.imageset/noble_privilege_list_bg@3x.png and /dev/null differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/Contents.json new file mode 100644 index 00000000..2dca5e6e --- /dev/null +++ b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "noble_privilege_list_left_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "noble_privilege_list_left_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/noble_privilege_list_left_icon@2x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/noble_privilege_list_left_icon@2x.png new file mode 100644 index 00000000..aa7cb3eb Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/noble_privilege_list_left_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/noble_privilege_list_left_icon@3x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/noble_privilege_list_left_icon@3x.png new file mode 100644 index 00000000..19c92832 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_left_icon.imageset/noble_privilege_list_left_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/Contents.json new file mode 100644 index 00000000..c4815317 --- /dev/null +++ b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "noble_privilege_list_noble_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "noble_privilege_list_noble_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/noble_privilege_list_noble_icon@2x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/noble_privilege_list_noble_icon@2x.png new file mode 100644 index 00000000..82aa91df Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/noble_privilege_list_noble_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/noble_privilege_list_noble_icon@3x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/noble_privilege_list_noble_icon@3x.png new file mode 100644 index 00000000..109eab48 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_noble_icon.imageset/noble_privilege_list_noble_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/Contents.json new file mode 100644 index 00000000..2f4f615f --- /dev/null +++ b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "noble_privilege_list_rebate_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "noble_privilege_list_rebate_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/noble_privilege_list_rebate_icon@2x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/noble_privilege_list_rebate_icon@2x.png new file mode 100644 index 00000000..53f69639 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/noble_privilege_list_rebate_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/noble_privilege_list_rebate_icon@3x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/noble_privilege_list_rebate_icon@3x.png new file mode 100644 index 00000000..2da2859f Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rebate_icon.imageset/noble_privilege_list_rebate_icon@3x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/Contents.json b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/Contents.json new file mode 100644 index 00000000..cb56a35c --- /dev/null +++ b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/Contents.json @@ -0,0 +1,22 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "noble_privilege_list_rigth_icon@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "noble_privilege_list_rigth_icon@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/noble_privilege_list_rigth_icon@2x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/noble_privilege_list_rigth_icon@2x.png new file mode 100644 index 00000000..586f8bf4 Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/noble_privilege_list_rigth_icon@2x.png differ diff --git a/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/noble_privilege_list_rigth_icon@3x.png b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/noble_privilege_list_rigth_icon@3x.png new file mode 100644 index 00000000..341b110e Binary files /dev/null and b/YuMi/Assets.xcassets/jm/Noble/noble_privilege_list_rigth_icon.imageset/noble_privilege_list_rigth_icon@3x.png differ diff --git a/YuMi/Modules/YMMessage/View/FindNew/View/Cell/XPSessionFindNewEmptyTableViewCell.m b/YuMi/Modules/YMMessage/View/FindNew/View/Cell/XPSessionFindNewEmptyTableViewCell.m index ad00b5bf..7ff6f7f6 100644 --- a/YuMi/Modules/YMMessage/View/FindNew/View/Cell/XPSessionFindNewEmptyTableViewCell.m +++ b/YuMi/Modules/YMMessage/View/FindNew/View/Cell/XPSessionFindNewEmptyTableViewCell.m @@ -20,52 +20,53 @@ @implementation XPSessionFindNewEmptyTableViewCell - (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier { - if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { - [self initSubViews]; - [self initSubViewConstraints]; - } - return self; + if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) { + [self initSubViews]; + [self initSubViewConstraints]; + } + return self; } #pragma mark - Private Method - (void)initSubViews { - self.backgroundColor = [UIColor clearColor]; - self.selectionStyle = UITableViewCellSelectionStyleNone; - [self.contentView addSubview:self.emptyImageView]; - [self.contentView addSubview:self.titleLabel]; + self.backgroundColor = [UIColor clearColor]; + 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(250); - 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); - }]; + [self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.contentView); + make.top.mas_equalTo(self.contentView).offset(250); + 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; + 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 = YMLocalizedString(@"XPSessionFindNewEmptyTableViewCell0"); - _titleLabel.font = [UIFont systemFontOfSize:16]; - _titleLabel.textAlignment = NSTextAlignmentCenter; - _titleLabel.textColor = [DJDKMIMOMColor secondTextColor]; - } - return _titleLabel; -}@end + if (!_titleLabel) { + _titleLabel = [[UILabel alloc] init]; + _titleLabel.text = YMLocalizedString(@"XPSessionFindNewEmptyTableViewCell0"); + _titleLabel.font = [UIFont systemFontOfSize:16]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textColor = [DJDKMIMOMColor secondTextColor]; + } + return _titleLabel; +} +@end diff --git a/YuMi/Modules/YMMine/Model/Recharge/RechargeListModel.h b/YuMi/Modules/YMMine/Model/Recharge/RechargeListModel.h index c289bd9a..20a65185 100644 --- a/YuMi/Modules/YMMine/Model/Recharge/RechargeListModel.h +++ b/YuMi/Modules/YMMine/Model/Recharge/RechargeListModel.h @@ -20,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN //充值banner位数据 @property(nonatomic,copy) NSString *bannerUrl; @property(nonatomic,copy) NSString *linkUrl; + @end diff --git a/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.h b/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.h index b01800df..0c3dffa2 100644 --- a/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.h +++ b/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.h @@ -14,9 +14,10 @@ NS_ASSUME_NONNULL_BEGIN /// 贵族中心等级列表 /// @param completion 完成 + (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion; - +///领取返利钻石 ++ (void)getNobleCenterDiamond:(HttpRequestHelperCompletion)completion returnProfitRecordId:(NSString *)returnProfitRecordId; ///获取开通贵族产品列表 -+ (void)getChargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelType; ++ (void)getChargeList:(HttpRequestHelperCompletion)completion type:(NSString *)type; /// 苹果下单 /// @param completion 完成 @@ -45,7 +46,7 @@ NS_ASSUME_NONNULL_BEGIN /// 使用钻石开通贵族 /// @param complection 完成回调 /// @param roomUid 房主的uid -+(void)openWithDiamond:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid; ++(void)openWithDiamond:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid vipLevel:(NSString *)vipLevel; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.m b/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.m index adeabccd..54e0152c 100644 --- a/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.m +++ b/YuMi/Modules/YMMine/View/Noble/Api/Api+NobleCenter.m @@ -14,10 +14,13 @@ + (void)nobleCenterLevelList:(HttpRequestHelperCompletion)completion { [self makeRequest:@"vip/getVipPageInfo" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil]; } - +///领取返利钻石 ++ (void)getNobleCenterDiamond:(HttpRequestHelperCompletion)completion returnProfitRecordId:(NSString *)returnProfitRecordId{ + [self makeRequest:@"vip/returnProfit/receive" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, returnProfitRecordId,nil]; +} ///获取开通贵族产品列表 -+ (void)getChargeList:(HttpRequestHelperCompletion)completion channelType:(NSString *)channelType { - [self makeRequest:@"chargeprod/listV2" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, channelType, nil]; ++ (void)getChargeList:(HttpRequestHelperCompletion)completion type:(NSString *)type { + [self makeRequest:@"chargeprod/getVipList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, type, nil]; } /// 苹果下单 @@ -56,11 +59,14 @@ /// 使用钻石开通贵族 /// @param complection 完成回调 /// @param roomUid 房主的uid -+(void)openWithDiamond:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid { ++(void)openWithDiamond:(HttpRequestHelperCompletion)complection roomUid:(NSString *)roomUid vipLevel:(NSString *)vipLevel{ NSMutableDictionary * dic = [NSMutableDictionary dictionary]; if (roomUid.length > 0) { [dic setValue:roomUid forKey:@"roomUid"]; } + if (vipLevel.length > 0){ + [dic setValue:vipLevel forKey:@"vipLevel"]; + } [HttpRequestHelper request:@"vip/openWithDiamond" method:HttpRequestHelperMethodPOST params:dic completion:complection]; } @end diff --git a/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h b/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h index 7510c6d3..0eb843d0 100644 --- a/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h +++ b/YuMi/Modules/YMMine/View/Noble/Model/NobleAuthInfo.h @@ -31,6 +31,7 @@ NS_ASSUME_NONNULL_BEGIN ///status @property (nonatomic, assign) NSInteger status; + @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.h b/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.h index 3f80a2bf..0823c582 100644 --- a/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.h +++ b/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.h @@ -6,7 +6,7 @@ // #import - +#import "PINobleRebateModel.h" NS_ASSUME_NONNULL_BEGIN @interface NobleInfo : PIBaseModel @@ -29,7 +29,10 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, copy) NSString *vipLogo; ///贵族名称 @property (nonatomic, copy) NSString *vipName; +///返钻 +@property(nonatomic,copy) NSArray *returnProfits; +@property(nonatomic,assign) BOOL isReturnProfit; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.m b/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.m index 780db54d..ea0df15c 100644 --- a/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.m +++ b/YuMi/Modules/YMMine/View/Noble/Model/NobleInfo.m @@ -9,4 +9,10 @@ @implementation NobleInfo ++ (NSDictionary *)objectClassInArray { + return @{ + @"returnProfits": [PINobleRebateModel class], + }; +} + @end diff --git a/YuMi/Modules/YMMine/View/Noble/Model/PINobleCenterListModel.h b/YuMi/Modules/YMMine/View/Noble/Model/PINobleCenterListModel.h new file mode 100644 index 00000000..c4836f25 --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/Model/PINobleCenterListModel.h @@ -0,0 +1,18 @@ +// +// PINobleCenterListModel.h +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PINobleCenterListModel : NSObject + + + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/Model/PINobleCenterListModel.m b/YuMi/Modules/YMMine/View/Noble/Model/PINobleCenterListModel.m new file mode 100644 index 00000000..1071d20d --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/Model/PINobleCenterListModel.m @@ -0,0 +1,12 @@ +// +// PINobleCenterListModel.m +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import "PINobleCenterListModel.h" + +@implementation PINobleCenterListModel + +@end diff --git a/YuMi/Modules/YMMine/View/Noble/Model/PINobleRebateModel.h b/YuMi/Modules/YMMine/View/Noble/Model/PINobleRebateModel.h new file mode 100644 index 00000000..0051146d --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/Model/PINobleRebateModel.h @@ -0,0 +1,23 @@ +// +// PINobleRebateModel.h +// YuMi +// +// Created by duoban on 2024/3/29. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PINobleRebateModel : NSObject +@property(nonatomic,copy) NSString *id; +@property(nonatomic,assign) BOOL isReceive; +@property(nonatomic,copy) NSString *profitAmount; +@property(nonatomic,copy) NSString *profitDate; +@property(nonatomic,assign) int seqNo; +@property(nonatomic,assign) int vipLevel; +@property(nonatomic,assign) BOOL isReach; +@property(nonatomic,copy) NSString *returnProfitRecordId; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/Model/PINobleRebateModel.m b/YuMi/Modules/YMMine/View/Noble/Model/PINobleRebateModel.m new file mode 100644 index 00000000..4819e68d --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/Model/PINobleRebateModel.m @@ -0,0 +1,12 @@ +// +// PINobleRebateModel.m +// YuMi +// +// Created by duoban on 2024/3/29. +// + +#import "PINobleRebateModel.h" + +@implementation PINobleRebateModel + +@end diff --git a/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h b/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h index 41ac7356..13230f9a 100644 --- a/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h +++ b/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.h @@ -13,12 +13,13 @@ NS_ASSUME_NONNULL_BEGIN /// 获取贵族中心数据 - (void)getNobleCenterInfo; - +/// 获取贵族中心数据 +- (void)getNobleCenterReturnDiamond:(NSString *)recordId; /// 获取用户信息 - (void)getUserInfo; ///获取贵族充值产品列表 -- (void)getNobleChargeProductListWithChannelType:(NSString *)channelType; +- (void)getNobleChargeProductListWithChannelType:(NSString *)type; /// 生成贵族充值的订单 /// @param chargeProdId 苹果服务器的充值 的id @@ -39,7 +40,7 @@ NS_ASSUME_NONNULL_BEGIN /// 使用钻石开通贵族 /// @param roomUid 房主的uid -- (void)openVipWithDiamondRoomUid:(NSString *)roomUid; +- (void)openVipWithDiamondRoomUid:(NSString *)roomUid vipLevel:(NSString *)vipLevel; //联系客服 -(void)getContactCustomerService; diff --git a/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.m b/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.m index 2a9bf62b..fe5aa081 100644 --- a/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.m +++ b/YuMi/Modules/YMMine/View/Noble/Presenter/XPNobleCenterPresenter.m @@ -30,7 +30,12 @@ [[self getView] getNobleCenterInfoSuccess:model]; }]]; } - +/// 获取贵族中心数据 +- (void)getNobleCenterReturnDiamond:(NSString *)recordId{ + [Api getNobleCenterDiamond:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + [[self getView]getNobleCenterDiamondSuccess:recordId]; + } showLoading:YES errorToast:YES] returnProfitRecordId:recordId]; +} // 获取用户信息 - (void)getUserInfo { NSString * uid = [[AccountInfoStorage instance] getUid]; @@ -43,11 +48,13 @@ } ///获取贵族充值产品列表 -- (void)getNobleChargeProductListWithChannelType:(NSString *)channelType { +- (void)getNobleChargeProductListWithChannelType:(NSString *)type { [Api getChargeList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { - NobleRechargeModel *model = [NobleRechargeModel modelWithDictionary:data.data]; - [[self getView] onGetNobleRechargeDataSuccess:model]; - }] channelType:channelType]; + NSArray *list = [RechargeListModel modelsWithArray:data.data]; + [[self getView] onGetNobleRechargeDataSuccess:list]; + }fail:^(NSInteger code, NSString * _Nullable msg) { + + }] type:type]; } /// 生成贵族充值的订单 @@ -101,12 +108,12 @@ /// 使用钻石开通贵族 /// @param roomUid 房主的uid -- (void)openVipWithDiamondRoomUid:(NSString *)roomUid { +- (void)openVipWithDiamondRoomUid:(NSString *)roomUid vipLevel:(NSString *)vipLevel{ [Api openWithDiamond:[self createHttpCompletion:^(BaseModel * _Nonnull data) { [[self getView] openVipWithDiamondSuccess]; } fail:^(NSInteger code, NSString * _Nullable msg) { - [[self getView] openVipWithDiamondFail]; - }showLoading:YES errorToast:YES] roomUid:roomUid]; + [[self getView] openVipWithDiamondFail:code]; + }showLoading:YES errorToast:YES] roomUid:roomUid vipLevel:vipLevel]; } //联系客服 -(void)getContactCustomerService{ diff --git a/YuMi/Modules/YMMine/View/Noble/Protocol/XPNobleCenterProtocol.h b/YuMi/Modules/YMMine/View/Noble/Protocol/XPNobleCenterProtocol.h index a078c009..2affe05e 100644 --- a/YuMi/Modules/YMMine/View/Noble/Protocol/XPNobleCenterProtocol.h +++ b/YuMi/Modules/YMMine/View/Noble/Protocol/XPNobleCenterProtocol.h @@ -12,12 +12,13 @@ @optional ///获取贵族信息成功 - (void)getNobleCenterInfoSuccess:(NobleCenterModel *)model; - +///获取贵族信息成功 +- (void)getNobleCenterDiamondSuccess:(NSString *)recordId; ///获取用户信息成功 - (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo; ///获取贵族充值信息成功 -- (void)onGetNobleRechargeDataSuccess:(NobleRechargeModel *)rechargeInfo; +- (void)onGetNobleRechargeDataSuccess:(NSArray *)list; ///请求充值id的状态成功 - (void)requestIAPRechargeOrderSuccess:(NSString *)orderId chargeProdId:(NSString *)chargeProdId uuid:(NSString *)uuid; @@ -38,7 +39,7 @@ ///钻石开通会员成功 -(void)openVipWithDiamondSuccess; ///钻石开通会员失败 --(void)openVipWithDiamondFail; +-(void)openVipWithDiamondFail:(NSInteger)code; //联系客服成功 -(void)getContactCustomerServiceSuccessWithUid:(NSString *)uid; @end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListCell.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListCell.h new file mode 100644 index 00000000..11fef19b --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListCell.h @@ -0,0 +1,20 @@ +// +// PINobleCenterListCell.h +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import +#import "PINobleRebateModel.h" +NS_ASSUME_NONNULL_BEGIN + +@interface PINobleCenterListCell : UICollectionViewCell +@property(nonatomic,copy) NSString *text; +@property(nonatomic,assign) NSInteger count; +@property(nonatomic,strong) NSIndexPath *path; +@property(nonatomic,strong) PINobleRebateModel *model; +@property(nonatomic,copy) NSString *vipName; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListCell.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListCell.m new file mode 100644 index 00000000..51da5219 --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListCell.m @@ -0,0 +1,236 @@ +// +// PINobleCenterListCell.m +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import "PINobleCenterListCell.h" +@interface PINobleCenterListCell() +@property(nonatomic,strong) UIView *topView; +@property(nonatomic,strong) UIView *leftView; +@property(nonatomic,strong) UIView *bottomView; +@property(nonatomic,strong) UIView *rightView; +@property(nonatomic,strong) UILabel *textVeiw; +@property(nonatomic,strong) UIButton *getBtn; +@property(nonatomic,strong) UILabel *tipView; +@property(nonatomic,strong) UILabel *getTipView; +@end +@implementation PINobleCenterListCell +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)setText:(NSString *)text{ + _text = text; + _textVeiw.text = _text; +} + + +-(void)setPath:(NSIndexPath *)path{ + _path = path; + self.topView.hidden = YES; + self.leftView.hidden = YES; + self.bottomView.hidden = YES; + self.rightView.hidden = YES; + self.textVeiw.hidden = NO; + self.getBtn.hidden = YES; + self.tipView.hidden = YES; + self.getTipView.hidden = YES; + if (_path.section == 0){ + _bottomView.hidden = YES; + }else if (_path.section == 1){ + _leftView.hidden = NO; + _bottomView.hidden = _path.row == _count; + }else if (_path.section == 2){ + _leftView.hidden = NO; + _bottomView.hidden = _path.row == _count; + + }else{ + _leftView.hidden = NO; + _bottomView.hidden = _path.row == _count; + + } + self.contentView.backgroundColor = _path.row == 0 ? UIColorRGBAlpha(0xFFAA36, 0.1) : [UIColor clearColor]; + + if (_path.row == 0){ + self.textVeiw.font = [UIFont systemFontOfSize:10 weight:UIFontWeightMedium]; + self.textVeiw.textColor = [UIColor whiteColor]; + }else{ + self.textVeiw.font = [UIFont systemFontOfSize:10 weight:UIFontWeightRegular]; + self.textVeiw.textColor = UIColorFromRGB(0xBC9E66); + } + + if (_path.section == 3 && _path.row > 0){ + self.textVeiw.hidden = YES; + } + CGFloat top = (_path.section == 0 && _path.row == 1) ? 12 : 0; + [self.textVeiw mas_updateConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(top); + + }]; + +} +-(void)setVipName:(NSString *)vipName{ + _vipName = vipName; + _textVeiw.text = _vipName; +} +- (void)setModel:(PINobleRebateModel *)model{ + _model = model; + if (_path.row == 0)return; + if (_path.section == 1){ + _textVeiw.text = [NSString stringWithFormat:YMLocalizedString(@"PINobleCenterListCell6"),_model.profitDate]; + }else if (_path.section == 2){ + _textVeiw.text = _model.profitAmount; + }else{ + if (_model.isReach == YES){ + _tipView.hidden = YES; + _getTipView.hidden = !_model.isReceive; + _getBtn.hidden = _model.isReceive; + }else{ + _tipView.hidden = NO; + } + } + + +} +- (void)dealloc +{ + [[NSNotificationCenter defaultCenter]removeObserver:self]; +} +-(void)installUI{ + self.backgroundColor = [UIColor clearColor]; + [self.contentView addSubview:self.topView]; + [self.contentView addSubview:self.leftView]; + [self.contentView addSubview:self.bottomView]; + [self.contentView addSubview:self.rightView]; + [self.contentView addSubview:self.textVeiw]; + [self.contentView addSubview:self.getBtn]; + [self.contentView addSubview:self.tipView]; + [self.contentView addSubview:self.getTipView]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(getNobleCenterGetDiamondSucces:) name:@"kNobleCenterGetDiamondSuccess" object:nil]; +} +-(void)getNobleCenterGetDiamondSucces:(NSNotification *)not{ + NSString *returnProfitRecordId = not.object; + if ([self.model.returnProfitRecordId isEqualToString:returnProfitRecordId] && _path.section == 3){ + self.model.isReach = YES; + self.getBtn.hidden = YES; + self.getTipView.hidden = NO; + } + +} +-(void)installConstraints{ + [self.topView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(1); + make.leading.trailing.top.equalTo(self.contentView); + }]; + [self.leftView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(1); + make.top.mas_equalTo(0); + make.leading.bottom.equalTo(self.contentView); + }]; + [self.bottomView mas_makeConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(1); + make.leading.trailing.bottom.equalTo(self.contentView); + }]; + [self.rightView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(1); + make.bottom.trailing.top.equalTo(self.contentView); + }]; + [self.textVeiw mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(0); + make.leading.trailing.bottom.equalTo(self.contentView); + }]; + [self.getBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(32); + make.height.mas_equalTo(13); + make.center.equalTo(self); + }]; + [self.tipView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(72)); + make.height.mas_equalTo(13); + make.center.equalTo(self); + }]; + [self.getTipView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(38); + make.height.mas_equalTo(13); + make.center.equalTo(self); + }]; +} +-(void)getDiamondAction{ + [[NSNotificationCenter defaultCenter]postNotificationName:@"kNobleCenterGetDiamond" object:self.model]; +} +#pragma mark - 懒加载 +- (UIView *)topView{ + if(!_topView){ + _topView = [UIView new]; + _topView.backgroundColor = UIColorRGBAlpha(0xFFAA36, 0.2); + } + return _topView; +} +- (UIView *)leftView{ + if(!_leftView){ + _leftView = [UIView new]; + _leftView.backgroundColor = UIColorRGBAlpha(0xFFAA36, 0.2); + } + return _leftView; +} +- (UIView *)bottomView{ + if(!_bottomView){ + _bottomView = [UIView new]; + _bottomView.backgroundColor = UIColorRGBAlpha(0xFFAA36, 0.2); + } + return _bottomView; +} +- (UIView *)rightView{ + if(!_rightView){ + _rightView = [UIView new]; + _rightView.backgroundColor = UIColorRGBAlpha(0xFFAA36, 0.2); + } + return _rightView; +} +- (UILabel *)textVeiw{ + if(!_textVeiw){ + _textVeiw = [UILabel new]; + _textVeiw.textAlignment = NSTextAlignmentCenter; + } + return _textVeiw; +} +- (UIButton *)getBtn{ + if(!_getBtn){ + _getBtn = [UIButton new]; + [_getBtn setTitle:YMLocalizedString(@"PINobleCenterListCell0") forState:UIControlStateNormal]; + _getBtn.backgroundColor = UIColorFromRGB(0xF6AD3F); + [_getBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + _getBtn.titleLabel.font = [UIFont systemFontOfSize:8 weight:UIFontWeightMedium]; + _getBtn.layer.cornerRadius = 6.5; + _getBtn.layer.masksToBounds = YES; + [_getBtn addTarget:self action:@selector(getDiamondAction) forControlEvents:UIControlEventTouchUpInside]; + } + return _getBtn; +} +- (UILabel *)tipView{ + if(!_tipView){ + _tipView = [UILabel labelInitWithText:YMLocalizedString(@"PINobleCenterListCell1") font:[UIFont systemFontOfSize:8 weight:UIFontWeightRegular] textColor:[UIColor whiteColor]]; + _tipView.backgroundColor = UIColorFromRGB(0x726041); + _tipView.textAlignment = NSTextAlignmentCenter; + _tipView.layer.cornerRadius = 6.5; + _tipView.layer.masksToBounds = YES; + } + return _tipView; +} +- (UILabel *)getTipView{ + if(!_getTipView){ + _getTipView = [UILabel labelInitWithText:YMLocalizedString(@"PINobleCenterListCell7") font:[UIFont systemFontOfSize:8 weight:UIFontWeightRegular] textColor:UIColorFromRGB(0xB3B3C3)]; + _getTipView.textAlignment = NSTextAlignmentCenter; + _getTipView.layer.cornerRadius = 6.5; + _getTipView.layer.masksToBounds = YES; + _getTipView.backgroundColor = [UIColor colorWithWhite:1 alpha:0.28]; + } + return _getTipView; +} +@end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListReusableView.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListReusableView.h new file mode 100644 index 00000000..f843fcbe --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListReusableView.h @@ -0,0 +1,17 @@ +// +// PINobleCenterListReusableView.h +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PINobleCenterListReusableView : UIView +@property(nonatomic,copy) NSString *headerText; +@property(nonatomic,copy) NSString *fooderText; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListReusableView.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListReusableView.m new file mode 100644 index 00000000..94ac06eb --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListReusableView.m @@ -0,0 +1,52 @@ +// +// PINobleCenterListReusableView.m +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import "PINobleCenterListReusableView.h" +@interface PINobleCenterListReusableView() +@property(nonatomic,strong) UILabel *contentView; +@end +@implementation PINobleCenterListReusableView +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self addSubview:self.contentView]; +} +-(void)installConstraints{ + [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.bottom.equalTo(self); + make.leading.trailing.equalTo(self).inset(12); + }]; +} +- (void)setHeaderText:(NSString *)headerText{ + _headerText = headerText; + NSMutableParagraphStyle *style = [NSMutableParagraphStyle new]; + style.lineSpacing = 3; + NSMutableAttributedString *att = [[NSMutableAttributedString alloc]initWithString:_headerText attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12 weight:UIFontWeightRegular],NSParagraphStyleAttributeName:style,NSForegroundColorAttributeName:UIColorFromRGB(0xFFE3AF)}]; + _contentView.attributedText = att; +} +-(void)setFooderText:(NSString *)fooderText{ + _fooderText = fooderText; + NSMutableParagraphStyle *style = [NSMutableParagraphStyle new]; + style.lineSpacing = 3; + NSMutableAttributedString *att = [[NSMutableAttributedString alloc]initWithString:_fooderText attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12 weight:UIFontWeightRegular],NSParagraphStyleAttributeName:style,NSForegroundColorAttributeName:UIColorFromRGB(0xFFE3AF)}]; + _contentView.attributedText = att; +} +#pragma mark - 懒加载 +- (UILabel *)contentView{ + if(!_contentView){ + _contentView = [UILabel labelInitWithText:@"" font:[UIFont systemFontOfSize:12 weight:UIFontWeightRegular] textColor:UIColorFromRGB(0xFFE3AF)]; + _contentView.numberOfLines = 0; + } + return _contentView; +} +@end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListView.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListView.h new file mode 100644 index 00000000..89a23cf9 --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListView.h @@ -0,0 +1,16 @@ +// +// PINobleCenterListView.h +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import +#import "NobleInfo.h" +NS_ASSUME_NONNULL_BEGIN + +@interface PINobleCenterListView : UIView +@property (nonatomic, strong) NobleInfo *vipInfo; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListView.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListView.m new file mode 100644 index 00000000..5c8d8c9b --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterListView.m @@ -0,0 +1,171 @@ +// +// PINobleCenterListView.m +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import "PINobleCenterListView.h" +#import "PINobleCenterListReusableView.h" +#import "PINobleCenterListCell.h" +#import "PINoblePrivilegeEmptyCell.h" +@interface PINobleCenterListView() +@property(nonatomic,strong) UICollectionView *pi_collectionView; +@property(nonatomic,strong) PINobleCenterListReusableView *headerView; +@property(nonatomic,strong) PINobleCenterListReusableView *fooderView; +@property(nonatomic,copy) NSArray *returnProfits; +@property(nonatomic,copy) NSArray *titleList; +@end +@implementation PINobleCenterListView + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self addSubview:self.headerView]; + [self addSubview:self.pi_collectionView]; + [self addSubview:self.fooderView]; +} +-(void)installConstraints{ + self.headerView.hidden = YES; + self.fooderView.hidden = YES; + [self.headerView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.equalTo(self).inset(10); + make.top.equalTo(self); + make.height.mas_equalTo(68); + }]; + [self.pi_collectionView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.headerView.mas_bottom).mas_offset(12); + make.width.mas_equalTo(kGetScaleWidth(347)); + make.centerX.equalTo(self); + make.height.mas_equalTo(kGetScaleWidth(300)); + }]; + [self.fooderView mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.equalTo(self).inset(10); + make.top.equalTo(self.pi_collectionView.mas_bottom).mas_offset(12); + make.height.mas_equalTo(68); + }]; +} +- (void)setVipInfo:(NobleInfo *)vipInfo{ + _vipInfo = vipInfo; + _returnProfits = _vipInfo.returnProfits; + if (_returnProfits.count > 0){ + CGFloat height = (_returnProfits.count + 1) * 24; + [self.pi_collectionView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(height); + }]; + } + self.headerView.hidden = _returnProfits.count == 0; + self.fooderView.hidden = _returnProfits.count == 0; + self.pi_collectionView.layer.borderWidth = _returnProfits.count == 0 ? 0 : 1; + [self.pi_collectionView reloadData]; + +} +#pragma mark - UICollectionViewDelegate,UICollectionViewDataSource,UICollectionViewDelegateFlowLayout +-(NSInteger)numberOfSectionsInCollectionView:(UICollectionView *)collectionView{ + if (self.returnProfits.count == 0){ + return 1; + } + return 4; +} +- (NSInteger)collectionView:(UICollectionView *)collectionView numberOfItemsInSection:(NSInteger)section{ + if (self.returnProfits.count == 0){ + return 1; + } + if (section == 0){ + return 2; + } + return self.returnProfits.count + 1; +} +-(__kindof UICollectionViewCell *)collectionView:(UICollectionView *)collectionView cellForItemAtIndexPath:(NSIndexPath *)indexPath{ + if (self.returnProfits.count == 0){ + PINoblePrivilegeEmptyCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PINoblePrivilegeEmptyCell class]) forIndexPath:indexPath]; + return cell; + } + PINobleCenterListCell *cell = [collectionView dequeueReusableCellWithReuseIdentifier:NSStringFromClass([PINobleCenterListCell class]) forIndexPath:indexPath]; + if (indexPath.row == 0){ + cell.text = self.titleList[indexPath.section]; + cell.path = indexPath; + }else{ + if (self.returnProfits.count > 0 && indexPath.section > 0){ + cell.count = self.returnProfits.count; + cell.path = indexPath; + cell.model = self.returnProfits[indexPath.row - 1]; + }else{ + cell.path = indexPath; + cell.vipName = self.vipInfo.vipName; + } + } + + + + return cell; +} +- (CGSize)collectionView:(UICollectionView *)collectionView layout:(UICollectionViewLayout*)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath *)indexPath{ + if (self.returnProfits.count == 0){ + return CGSizeMake(kGetScaleWidth(347), kGetScaleWidth(300)); + } + if (indexPath.section == 0){ + return indexPath.row == 0 ? CGSizeMake(kGetScaleWidth(70), 24): CGSizeMake(kGetScaleWidth(70), 24*3); + }else if (indexPath.section == 1){ + return indexPath.row == 0 ? CGSizeMake(kGetScaleWidth(78), 24) : CGSizeMake(kGetScaleWidth(78), 24); + }else if (indexPath.section == 2){ + return indexPath.row == 0 ? CGSizeMake(kGetScaleWidth(97), 24) : CGSizeMake(kGetScaleWidth(97), 24); + }else{ + return indexPath.row == 0 ? CGSizeMake(kGetScaleWidth(102), 24) : CGSizeMake(kGetScaleWidth(102), 24); + + } +} + + + +#pragma mark - 懒加载 + + +- (UICollectionView *)pi_collectionView{ + if(!_pi_collectionView){ + UICollectionViewFlowLayout *layout = [UICollectionViewFlowLayout new]; + layout.sectionInset = UIEdgeInsetsMake(0, 0, 0, 0); + layout.minimumLineSpacing = 0; + layout.minimumInteritemSpacing = 0; + layout.scrollDirection = UICollectionViewScrollDirectionHorizontal; + _pi_collectionView = [[UICollectionView alloc]initWithFrame:CGRectZero collectionViewLayout:layout]; + _pi_collectionView.backgroundColor = [UIColor clearColor]; + _pi_collectionView.layer.cornerRadius = 6; + _pi_collectionView.layer.masksToBounds = YES; + _pi_collectionView.layer.borderWidth = 0; + _pi_collectionView.layer.borderColor = UIColorRGBAlpha(0xFFAA36, 0.2).CGColor; + [_pi_collectionView registerClass:[PINobleCenterListCell class] forCellWithReuseIdentifier:NSStringFromClass([PINobleCenterListCell class])]; + [_pi_collectionView registerClass:[PINoblePrivilegeEmptyCell class] forCellWithReuseIdentifier:NSStringFromClass([PINoblePrivilegeEmptyCell class])]; + + _pi_collectionView.delegate = self; + _pi_collectionView.dataSource = self; + } + return _pi_collectionView; +} +- (PINobleCenterListReusableView *)headerView{ + if(!_headerView){ + _headerView = [[PINobleCenterListReusableView alloc]initWithFrame:CGRectZero]; + _headerView.headerText = YMLocalizedString(@"PINobleCenterListView0"); + } + return _headerView; +} +-(PINobleCenterListReusableView *)fooderView{ + if(!_fooderView){ + _fooderView = [[PINobleCenterListReusableView alloc]initWithFrame:CGRectZero]; + _fooderView.fooderText = YMLocalizedString(@"PINobleCenterListView1"); + } + return _fooderView; +} +- (NSArray *)titleList{ + if(!_titleList){ + _titleList = @[YMLocalizedString(@"PINobleCenterListCell2"),YMLocalizedString(@"PINobleCenterListCell3"),YMLocalizedString(@"PINobleCenterListCell4"),YMLocalizedString(@"PINobleCenterListCell5")]; + } + return _titleList; +} +@end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleCell.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleCell.h new file mode 100644 index 00000000..64f6851e --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleCell.h @@ -0,0 +1,17 @@ +// +// PINobleCenterTitleCell.h +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import +#import +#import "NobleInfo.h" +NS_ASSUME_NONNULL_BEGIN + +@interface PINobleCenterTitleCell : JXCategoryTitleCell +@property(nonatomic,strong) NobleInfo *info; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleCell.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleCell.m new file mode 100644 index 00000000..ad542b1e --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleCell.m @@ -0,0 +1,53 @@ +// +// PINobleCenterTitleCell.m +// YuMi +// +// Created by duoban on 2024/3/27. +// +#import "ThemeColor+NobleCenter.h" +#import "PINobleCenterTitleCell.h" +@interface PINobleCenterTitleCell() +@property(nonatomic,strong) UIImageView *bgImageView; + +@end +@implementation PINobleCenterTitleCell +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + [self.contentView addSubview:self.bgImageView]; + +} +- (void)reloadData:(JXCategoryBaseCellModel *)cellModel { + [super reloadData:cellModel]; + +} +- (void)setInfo:(NobleInfo *)info{ + _info = info; + _bgImageView.hidden = !self.info.isReturnProfit; +} +-(void)installConstraints{ + [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(41)); + make.height.mas_equalTo(kGetScaleWidth(16)); + make.top.mas_equalTo(0); + make.trailing.mas_equalTo(10); + }]; + +} + +#pragma mark - 懒加载 +- (UIImageView *)bgImageView{ + if(!_bgImageView){ + _bgImageView = [UIImageView new]; + _bgImageView.image = kImage(@"mine_noble_center_tag_title_bg"); + } + return _bgImageView; +} + +@end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.h new file mode 100644 index 00000000..8da45257 --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.h @@ -0,0 +1,19 @@ +// +// PINobleCenterTitleView.h +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import +#import +#import "NobleInfo.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface PINobleCenterTitleView : JXCategoryTitleView +///贵族信息列表 +@property (nonatomic, strong) NSArray *vipInfos; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.m new file mode 100644 index 00000000..0968171b --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINobleCenterTitleView.m @@ -0,0 +1,25 @@ +// +// PINobleCenterTitleView.m +// YuMi +// +// Created by duoban on 2024/3/27. +// + +#import "PINobleCenterTitleView.h" +#import "PINobleCenterTitleCell.h" +@implementation PINobleCenterTitleView + +- (Class)preferredCellClass{ + return PINobleCenterTitleCell.class; +} +- (void)setVipInfos:(NSArray *)vipInfos{ + _vipInfos = vipInfos; + for (int i = 0; i < _vipInfos.count; i++) { + PINobleCenterTitleCell *cell = [self.collectionView cellForItemAtIndexPath:[NSIndexPath indexPathForRow:i inSection:0]]; + NobleInfo *info = [self.vipInfos safeObjectAtIndex1:i]; + cell.info = info; + } +} + + +@end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINoblePrivilegeEmptyCell.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINoblePrivilegeEmptyCell.h new file mode 100644 index 00000000..e44adb4e --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINoblePrivilegeEmptyCell.h @@ -0,0 +1,16 @@ +// +// PINoblePrivilegeEmptyCell.h +// YuMi +// +// Created by duoban on 2024/3/29. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PINoblePrivilegeEmptyCell : UICollectionViewCell + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINoblePrivilegeEmptyCell.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINoblePrivilegeEmptyCell.m new file mode 100644 index 00000000..e7c3ca09 --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/PINoblePrivilegeEmptyCell.m @@ -0,0 +1,65 @@ +// +// PINoblePrivilegeEmptyCell.m +// YuMi +// +// Created by duoban on 2024/3/29. +// + +#import "PINoblePrivilegeEmptyCell.h" +@interface PINoblePrivilegeEmptyCell() +@property (nonatomic,strong) UIImageView *emptyImageView; +@property (nonatomic,strong) UILabel *titleLabel; +@end +@implementation PINoblePrivilegeEmptyCell +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} + +-(void)installUI{ + self.backgroundColor = [UIColor clearColor]; + [self.contentView addSubview:self.emptyImageView]; + [self.contentView addSubview:self.titleLabel]; +} +-(void)installConstraints{ + [self.emptyImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.contentView); + make.top.mas_equalTo(self.contentView).offset(0); + 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 - 懒加载 +- (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 = YMLocalizedString(@"PINoblePrivilegeEmptyCell0"); + _titleLabel.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium]; + _titleLabel.textAlignment = NSTextAlignmentCenter; + _titleLabel.textColor = [UIColor whiteColor]; + } + return _titleLabel; +} + + + +@end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.h index 986b5baa..45d408ab 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.h +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.h @@ -7,13 +7,23 @@ #import #import "NobleCenterModel.h" - +#import "RechargeListModel.h" NS_ASSUME_NONNULL_BEGIN +@protocol XPNobleCenterMyNobleViewDelegate + +-(void)payNobleCenterWithModel:(RechargeListModel *)rechargeModel vipInfo:(NobleInfo *)vipInfo ; + +@end + + @interface XPNobleCenterMyNobleView : UIView ///总数据 @property (nonatomic, strong) NobleCenterModel *model; +@property(nonatomic,strong) NobleInfo *vipInfo; +@property(nonatomic,strong) RechargeListModel *rechargeModel; +@property(nonatomic,weak) iddelegate; @end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.m index 2b4d013f..dcdcd446 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.m +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterMyNobleView.m @@ -39,6 +39,11 @@ @property (nonatomic, strong) UILabel *safeValueLabel; ///升级权力值 @property (nonatomic, strong) UILabel *upGradeValueLabel; +///开通贵族 +@property (nonatomic, strong) UILabel *openNobleButton; +/// +@property (nonatomic,strong) UIImageView *openNobleView; +@property (nonatomic,strong) UIImageView *openNobleIconView; @end @@ -67,6 +72,11 @@ [self addSubview:self.currentValueLabel]; [self addSubview:self.safeValueLabel]; [self addSubview:self.upGradeValueLabel]; + + [self addSubview:self.openNobleView]; + + [self.openNobleView addSubview:self.openNobleIconView]; + [self.openNobleView addSubview:self.openNobleButton]; } - (void)initSubViewConstraints { @@ -127,6 +137,25 @@ make.centerY.mas_equalTo(self.safeValueLabel); make.trailing.mas_equalTo(self.backProgressView); }]; + + + [self.openNobleView mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self); + make.bottom.mas_equalTo(-kSafeAreaBottomHeight - 5); + make.width.mas_equalTo(300); + make.height.mas_equalTo(44); + }]; + [self.openNobleButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_lessThanOrEqualTo(258); + make.centerX.equalTo(self.openNobleView); + make.top.bottom.equalTo(self.openNobleView); + }]; + [self.openNobleIconView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(20); + make.centerY.equalTo(self.openNobleView); + make.trailing.equalTo(self.openNobleButton.mas_leading).mas_offset(-2); + + }]; } #pragma mark - private @@ -149,6 +178,7 @@ if (info.vipLevel > model.currLevel && hadNextLevel) { hadNextLevel = NO; nextLevelName = info.vipName; + } } NSAttributedString *levelStr = [[NSAttributedString alloc] initWithString:levelName attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:12], NSForegroundColorAttributeName:[DJDKMIMOMColor hightNobleLightTextColor]}]; @@ -236,8 +266,22 @@ make.centerX.mas_equalTo(self.backProgressView.mas_leading).mas_offset(safeMargin); }]; self.upGradeValueLabel.hidden = model.isMaxLevel; + +} +- (void)setVipInfo:(NobleInfo *)vipInfo{ + _vipInfo = vipInfo; + if (_vipInfo.vipLevel > _model.currLevel){ + self.openNobleView.hidden = NO; + self.openNobleButton.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterMyNobleView11"),_rechargeModel.money.floatValue,_vipInfo.vipName]; + }else{ + self.openNobleView.hidden = YES; + } +} +-(void)onOpenNobleButtonClick{ + if (self.delegate && [self.delegate respondsToSelector:@selector(payNobleCenterWithModel:vipInfo:)]){ + [self.delegate payNobleCenterWithModel:self.rechargeModel vipInfo:self.vipInfo]; + } } - - (UIView *)topView { if (!_topView) { _topView = [[UIView alloc] init]; @@ -338,5 +382,36 @@ } return _timeDescButton; } +- (UIImageView *)openNobleView{ + if (!_openNobleView){ + _openNobleView = [UIImageView new]; + _openNobleView.image = kImage(@"noble_open_btn_bg"); + _openNobleView.userInteractionEnabled = YES; + _openNobleView.hidden = YES; + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(onOpenNobleButtonClick)]; + [_openNobleView addGestureRecognizer:tap]; + } + return _openNobleView; +} +- (UILabel *)openNobleButton { + if (!_openNobleButton) { + NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterViewController0"), @"2.99"]; + _openNobleButton = [UILabel new]; + _openNobleButton.text = title; + _openNobleButton.font = [UIFont systemFontOfSize:16 weight:UIFontWeightMedium]; + _openNobleButton.textColor = [DJDKMIMOMColor mainTextColor]; + _openNobleButton.numberOfLines = 0; + _openNobleButton.textAlignment = NSTextAlignmentCenter; + + } + return _openNobleButton; +} +-(UIImageView *)openNobleIconView{ + if (!_openNobleIconView){ + _openNobleIconView = [UIImageView new]; + _openNobleIconView.image = kImage(@"noble_open_btn"); + } + return _openNobleIconView; +} @end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.h index a33606c1..ccdb3641 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.h +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.h @@ -14,7 +14,7 @@ typedef enum : NSUInteger { @protocol XPNobleCenterPayViewDelegate --(void)payWithType:(NobleCenterPayType)type; +-(void)payWithType:(NobleCenterPayType)type vipLevel:(NSString *_Nullable)vipLevel; @end @@ -24,6 +24,8 @@ NS_ASSUME_NONNULL_BEGIN //钻石数量 @property(nonatomic, copy)NSString *diamonds; @property(nonatomic,weak) id delegate; +@property(nonatomic,copy) NSString *vipLevel; +@property(nonatomic, strong) NSNumber *money; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m index f358ceef..ce6c6dc7 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterPayView.m @@ -113,7 +113,7 @@ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ self.path = indexPath; self.type = indexPath.row == 0 ? NobleCenterPayType_diamond : NobleCenterPayType_Apple; - self.diamondNumView.text = indexPath.row == 0 ? @"2990" : @"$2.99"; + self.diamondNumView.text = indexPath.row == 0 ? [NSString stringWithFormat:@"%f",_money.floatValue * 1000] : _money.stringValue; self.diamondNumTitle.text = indexPath.row == 0 ? YMLocalizedString(@"XPNobleCenterPayView1"):@""; [self.tableView reloadData]; } @@ -126,8 +126,8 @@ } -(void)payBtnAction{ [self backAction]; - if(self.delegate && [self.delegate respondsToSelector:@selector(payWithType:)]){ - [self.delegate payWithType:self.type]; + if(self.delegate && [self.delegate respondsToSelector:@selector(payWithType:vipLevel:)]){ + [self.delegate payWithType:self.type vipLevel:self.vipLevel]; } } #pragma mark - 懒加载 diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterWindow.h b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterWindow.h new file mode 100644 index 00000000..fc108f4a --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterWindow.h @@ -0,0 +1,20 @@ +// +// XPNobleCenterWindow.h +// YuMi +// +// Created by duoban on 2024/3/29. +// + +#import + +typedef void(^ConfirmBlcok)(void); + + +NS_ASSUME_NONNULL_BEGIN + +@interface XPNobleCenterWindow : UIView +@property(nonatomic,copy) ConfirmBlcok confirmBlcok; +@property(nonatomic,copy) NSString *text; +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterWindow.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterWindow.m new file mode 100644 index 00000000..d8ebef8a --- /dev/null +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNobleCenterWindow.m @@ -0,0 +1,111 @@ +// +// XPNobleCenterWindow.m +// YuMi +// +// Created by duoban on 2024/3/29. +// + +#import "XPNobleCenterWindow.h" +@interface XPNobleCenterWindow() +@property(nonatomic,strong) UIView *bgView; +@property(nonatomic,strong) UILabel *pi_textView; +@property(nonatomic,strong) UIButton *cancelBtn; +@property(nonatomic,strong) UIButton *confirmBtn; +@end +@implementation XPNobleCenterWindow + +-(instancetype)initWithFrame:(CGRect)frame{ + self = [super initWithFrame:frame]; + if(self){ + [self installUI]; + [self installConstraints]; + } + return self; +} +-(void)installUI{ + self.backgroundColor = [UIColor colorWithWhite:0 alpha:0.4]; + [self addSubview:self.bgView]; + [self.bgView addSubview:self.pi_textView]; + [self.bgView addSubview:self.cancelBtn]; + [self.bgView addSubview:self.confirmBtn]; +} +-(void)installConstraints{ + [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) { + make.center.equalTo(self); + make.width.mas_equalTo(kGetScaleWidth(319)); + make.height.mas_equalTo(kGetScaleWidth(176)); + }]; + [self.pi_textView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(kGetScaleWidth(36)); + make.leading.trailing.equalTo(self.bgView).inset(kGetScaleWidth(60)); + + }]; + [self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(kGetScaleWidth(124)); + make.height.mas_equalTo(kGetScaleWidth(44)); + make.top.mas_equalTo(kGetScaleWidth(108)); + make.leading.mas_equalTo(kGetScaleWidth(28)); + }]; + [self.confirmBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.with.height.equalTo(self.cancelBtn); + make.trailing.mas_equalTo(-kGetScaleWidth(28)); + }]; +} +-(void)cancelBtnAction{ + [TTPopup dismiss]; +} +-(void)setText:(NSString *)text{ + _text = text; + _pi_textView.text = text; +} +-(void)confirmBtnAction{ + [TTPopup dismiss]; + if (self.confirmBlcok){ + self.confirmBlcok(); + } +} +#pragma mark - 懒加载 +- (UIView *)bgView{ + if(!_bgView){ + _bgView = [UIView new]; + _bgView.backgroundColor = [UIColor whiteColor]; + [_bgView setCornerWithLeftTopCorner:kGetScaleWidth(22) rightTopCorner:kGetScaleWidth(22) bottomLeftCorner:kGetScaleWidth(22) bottomRightCorner:kGetScaleWidth(22) size:CGSizeMake(kGetScaleWidth(319), kGetScaleWidth(176))]; + } + return _bgView; +} +- (UILabel *)pi_textView{ + if(!_pi_textView){ + _pi_textView = [UILabel labelInitWithText:@"" font:kFontRegular(14) textColor:UIColorFromRGB(0x1F1B4F)]; + _pi_textView.textAlignment = NSTextAlignmentCenter; + _pi_textView.numberOfLines = 0; + } + return _pi_textView; +} +- (UIButton *)cancelBtn{ + if(!_cancelBtn){ + _cancelBtn = [UIButton new]; + _cancelBtn.backgroundColor = UIColorFromRGB(0xE6E6F0); + [_cancelBtn setTitle:YMLocalizedString(@"XPMinePromptWindow2") forState:UIControlStateNormal]; + _cancelBtn.titleLabel.font = kFontMedium(16); + [_cancelBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [_cancelBtn addTarget:self action:@selector(cancelBtnAction) forControlEvents:UIControlEventTouchUpInside]; + _cancelBtn.layer.cornerRadius = kGetScaleWidth(44)/2; + _cancelBtn.layer.masksToBounds = YES; + } + return _cancelBtn; +} +- (UIButton *)confirmBtn{ + if(!_confirmBtn){ + _confirmBtn = [UIButton new]; + UIImage *image = [UIImage gradientColorImageFromColors:@[[DJDKMIMOMColor confirmButtonGradientStartColor],[DJDKMIMOMColor confirmButtonGradientMiddleColor],[DJDKMIMOMColor confirmButtonGradientEndColor]] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(kGetScaleWidth(124), kGetScaleWidth(44))]; + [_confirmBtn setBackgroundImage:image forState:UIControlStateNormal]; + [_confirmBtn setTitle:YMLocalizedString(@"XPNobleCenterWindow0") forState:UIControlStateNormal]; + _confirmBtn.titleLabel.font = kFontMedium(16); + [_confirmBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; + [_confirmBtn addTarget:self action:@selector(confirmBtnAction) forControlEvents:UIControlEventTouchUpInside]; + _confirmBtn.layer.cornerRadius = kGetScaleWidth(44)/2; + _confirmBtn.layer.masksToBounds = YES; + } + return _confirmBtn; +} +@end diff --git a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m index 0996bc27..a9b7f7e1 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m +++ b/YuMi/Modules/YMMine/View/Noble/View/SubViews/XPNoblePrivilegeContentCell.m @@ -15,15 +15,20 @@ ///View #import "XPNoblePrivilegeCell.h" #import "XPNobleAuthorityDescView.h" +#import "PINobleCenterListView.h" @interface XPNoblePrivilegeContentCell() @property (nonatomic, strong) UIImageView *bgImageView; +@property(nonatomic,strong) UIImageView *leftImageView; +@property(nonatomic,strong) UIImageView *rigthImageView; +@property(nonatomic,strong) UIButton *nobleBtn; +@property(nonatomic,strong) UIButton *rebateBtn; ///已有特权数量 @property (nonatomic, strong) UILabel *privilegeLabel; @property (nonatomic, strong) UICollectionView *collectionView; - +@property(nonatomic,strong) PINobleCenterListView *rebateView; @property (nonatomic, strong) NSMutableArray *dataArray; @end @@ -43,8 +48,14 @@ self.layer.masksToBounds = YES; self.backgroundColor = [UIColor clearColor]; [self.contentView addSubview:self.bgImageView]; + [self.contentView addSubview:self.leftImageView]; + [self.contentView addSubview:self.nobleBtn]; + [self.contentView addSubview:self.rebateBtn]; + [self.contentView addSubview:self.rigthImageView]; + [self.contentView addSubview:self.privilegeLabel]; [self.contentView addSubview:self.collectionView]; + [self.contentView addSubview:self.rebateView]; self.contentView.backgroundColor = [UIColor clearColor]; } @@ -52,6 +63,31 @@ [self.bgImageView mas_makeConstraints:^(MASConstraintMaker *make) { make.edges.mas_equalTo(0); }]; + + [self.nobleBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.equalTo(self.contentView.mas_centerX).offset(-4); + make.width.mas_equalTo(76); + make.height.mas_equalTo(26); + make.top.mas_equalTo(25); + }]; + [self.rebateBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.equalTo(self.contentView.mas_centerX).offset(4); + make.width.mas_equalTo(76); + make.height.mas_equalTo(26); + make.top.mas_equalTo(25); + }]; + [self.leftImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(97); + make.height.mas_equalTo(14); + make.trailing.equalTo(self.nobleBtn.mas_leading).mas_offset(-3); + make.centerY.equalTo(self. nobleBtn); + }]; + [self.rigthImageView mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.mas_equalTo(97); + make.height.mas_equalTo(14); + make.leading.equalTo(self.rebateBtn.mas_trailing).mas_offset(3); + make.centerY.equalTo(self. nobleBtn); + }]; [self.privilegeLabel mas_makeConstraints:^(MASConstraintMaker *make) { make.centerX.mas_equalTo(self); make.top.mas_equalTo(60); @@ -61,6 +97,10 @@ make.top.mas_equalTo(90); make.leading.trailing.bottom.mas_equalTo(0); }]; + [self.rebateView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.rebateBtn.mas_bottom).mas_offset(25); + make.leading.trailing.bottom.mas_equalTo(0); + }]; } #pragma mark - UICollectionViewDataSource @@ -97,6 +137,26 @@ - (void)setVipInfo:(NobleInfo *)vipInfo { _vipInfo = vipInfo; + self.rebateView.vipInfo = _vipInfo; +} +-(void)clickBtnAction:(UIButton *)sender{ + if (sender == self.nobleBtn){ + self.collectionView.hidden = NO; + self.rebateView.hidden = YES; + self.privilegeLabel.hidden = NO; + self.nobleBtn.selected = YES; + self.nobleBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; + self.rebateBtn.selected = NO; + self.rebateBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + return; + } + self.privilegeLabel.hidden = YES; + self.collectionView.hidden = YES; + self.rebateView.hidden = NO; + self.nobleBtn.selected = NO; + self.nobleBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + self.rebateBtn.selected = YES; + self.rebateBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; } - (UIImageView *)bgImageView { @@ -132,5 +192,52 @@ } return _collectionView; } - +- (UIImageView *)leftImageView{ + if(!_leftImageView){ + _leftImageView = [UIImageView new]; + _leftImageView.image = kImage(@"noble_privilege_list_left_icon"); + } + return _leftImageView; +} +- (UIImageView *)rigthImageView{ + if(!_rigthImageView){ + _rigthImageView = [UIImageView new]; + _rigthImageView.image = kImage(@"noble_privilege_list_rigth_icon"); + } + return _rigthImageView; +} +- (UIButton *)nobleBtn{ + if(!_nobleBtn){ + _nobleBtn = [UIButton new]; + [_nobleBtn setTitle:YMLocalizedString(@"XPNoblePrivilegeContentCell0") forState:UIControlStateNormal]; + [_nobleBtn setBackgroundImage:kImage(@"noble_privilege_list_noble_icon") forState:UIControlStateSelected]; + [_nobleBtn setBackgroundImage:kImage(@"noble_privilege_list_rebate_icon") forState:UIControlStateNormal]; + [_nobleBtn setTitleColor:UIColorFromRGB(0x333333) forState:UIControlStateSelected]; + [_nobleBtn setTitleColor:UIColorFromRGB(0x3B3224) forState:UIControlStateNormal]; + _nobleBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightMedium]; + _nobleBtn.selected = YES; + [_nobleBtn addTarget:self action:@selector(clickBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _nobleBtn; +} +- (UIButton *)rebateBtn{ + if(!_rebateBtn){ + _rebateBtn = [UIButton new]; + [_rebateBtn setTitle:YMLocalizedString(@"XPNoblePrivilegeContentCell1") forState:UIControlStateNormal]; + [_rebateBtn setBackgroundImage:kImage(@"noble_privilege_list_rebate_icon") forState:UIControlStateNormal]; + [_rebateBtn setBackgroundImage:kImage(@"noble_privilege_list_noble_icon") forState:UIControlStateSelected]; + [_rebateBtn setTitleColor:UIColorFromRGB(0x333333) forState:UIControlStateSelected]; + [_rebateBtn setTitleColor:UIColorFromRGB(0x3B3224) forState:UIControlStateNormal]; + _rebateBtn.titleLabel.font = [UIFont systemFontOfSize:14 weight:UIFontWeightRegular]; + [_rebateBtn addTarget:self action:@selector(clickBtnAction:) forControlEvents:UIControlEventTouchUpInside]; + } + return _rebateBtn; +} +- (PINobleCenterListView *)rebateView{ + if(!_rebateView){ + _rebateView = [[PINobleCenterListView alloc]initWithFrame:CGRectZero]; + _rebateView.hidden = YES; + } + return _rebateView; +} @end diff --git a/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterListViewController.m b/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterListViewController.m index 5e611fbd..f7af5f45 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterListViewController.m +++ b/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterListViewController.m @@ -73,7 +73,7 @@ CGFloat lineCount = (itemCount % 3 == 0) ? itemCount / 3 : (itemCount / 3 + 1); CGFloat itemHeight = 105; CGFloat bottomHeight = kSafeAreaBottomHeight + 44 + 5; - return 90 + lineCount * itemHeight + bottomHeight; + return 90 + lineCount * itemHeight + bottomHeight + 59; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { diff --git a/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m b/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m index b4bbfc5a..908075b2 100644 --- a/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m +++ b/YuMi/Modules/YMMine/View/Noble/View/XPNobleCenterViewController.m @@ -32,6 +32,8 @@ #import "XPNobleSettingViewController.h" #import "XPSkillCardPlayerManager.h" #import "SessionViewController.h" +#import "PINobleCenterTitleView.h" +#import "XPNobleCenterWindow.h" ///P #import "XPNobleCenterPresenter.h" #import "Api+Gift.h" @@ -46,11 +48,11 @@ #import "XPIAPRechargeViewController.h" #import "YuMi-swift.h" #import "ClientConfig.h" -@interface XPNobleCenterViewController () +@interface XPNobleCenterViewController () ///分页标题 @property (nonatomic, strong) NSArray *titles; ///分页控件 -@property (nonatomic, strong) JXCategoryTitleView *titleView; +@property (nonatomic, strong) PINobleCenterTitleView *titleView; ///分页lineView @property (nonatomic, strong) JXCategoryListContainerView *lineView; ///头饰 @@ -75,7 +77,9 @@ @property (nonatomic, assign) BOOL needUpdateUserInfo; ///充值----- -@property (nonatomic, strong) NobleRechargeModel *rechargeModel; +@property (nonatomic, strong) NSArray *rechargeList; +@property(nonatomic,strong) RechargeListModel *rechargeModel; +@property(nonatomic,strong) NobleInfo *vipInfo; ///订单编号 @property (nonatomic,copy) NSString *orderId; ///房间UID @@ -96,7 +100,7 @@ } - (void)dealloc { - + [[NSNotificationCenter defaultCenter]removeObserver:self]; } - (void)viewDidLoad { @@ -106,8 +110,12 @@ [self requestHttp]; [self initSubViews]; [self initSubViewConstraints]; + [[NSNotificationCenter defaultCenter]addObserver:self selector:@selector(getDiamondNot:) name:@"kNobleCenterGetDiamond" object:nil]; +} +-(void)getDiamondNot:(NSNotification *)not{ + PINobleRebateModel *model = not.object; + [self.presenter getNobleCenterReturnDiamond:model.returnProfitRecordId]; } - - (BOOL)isHiddenNavBar { return YES; } @@ -154,7 +162,7 @@ }]; [self.titleView mas_makeConstraints:^(MASConstraintMaker *make) { make.leading.trailing.mas_equalTo(self.view); - make.height.mas_equalTo(40); + make.height.mas_equalTo(50); make.top.mas_equalTo(self.navView.mas_bottom); }]; @@ -177,6 +185,7 @@ make.height.mas_equalTo(91+kSafeAreaBottomHeight); make.leading.bottom.trailing.mas_equalTo(0); }]; + [self.openNobleIconView mas_makeConstraints:^(MASConstraintMaker *make) { make.width.height.mas_equalTo(20); make.centerY.equalTo(self.openNobleView); @@ -192,24 +201,11 @@ } #pragma mark - XPNobleCenterPayViewDelegate -- (void)payWithType:(NobleCenterPayType)type{ +- (void)payWithType:(NobleCenterPayType)type vipLevel:(NSString * _Nullable)vipLevel{ if(type == NobleCenterPayType_diamond){ - if(self.infoModel.diamonds.integerValue < 2990){ - TTAlertConfig *config = [[TTAlertConfig alloc]init]; - config.message = YMLocalizedString(@"XPNobleCenterViewController3"); - config.actionStyle = TTAlertActionBothStyle; - [TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{ - - XPIAPRechargeViewController * webVC =[[XPIAPRechargeViewController alloc] init]; - webVC.type = @"4"; - [self.navigationController pushViewController:webVC animated:YES]; - } cancelHandler:^{ - - }]; - return; - } + NSString *roomUid = self.roomUid > 0 ? @(self.roomUid).stringValue : @(self.userInfo.uid).stringValue; - [self.presenter openVipWithDiamondRoomUid:roomUid]; + [self.presenter openVipWithDiamondRoomUid:roomUid vipLevel:vipLevel]; return; } @@ -224,31 +220,52 @@ return; } - if(self.rechargeModel.list.count == 0)return; + [XNDJTDDLoadingTool showOnlyView:kWindow]; - RechargeListModel *rechargeModel = [self.rechargeModel.list safeObjectAtIndex1:0]; - [self.presenter requestNobleIAPRechargeOrderWithChargeProdId:rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil]; + [self.presenter requestNobleIAPRechargeOrderWithChargeProdId:self.rechargeModel.chargeProdId roomUid:self.roomUid ? [NSString stringWithFormat:@"%zd", self.roomUid] : nil]; +} +#pragma mark - XPNobleCenterMyNobleViewDelegate +-(void)payNobleCenterWithModel:(RechargeListModel *)rechargeModel vipInfo:(NobleInfo *)vipInfo { + XPNobleCenterWindow *window = [[XPNobleCenterWindow alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; + [TTPopup popupView:window style:TTPopupStyleAlert]; + window.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterWindow1"),self.vipInfo.vipName,vipInfo.vipName]; + @kWeakify(self); + window.confirmBlcok = ^{ + @kStrongify(self); + XPNobleCenterPayView *payView = [[XPNobleCenterPayView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; + payView.money = self.rechargeModel.money; + payView.diamonds = self.infoModel.diamonds; + payView.vipLevel = @(vipInfo.vipLevel).stringValue; + self.rechargeModel = rechargeModel; + payView.delegate = self; + [self.view addSubview:payView]; + }; + } -(void)openVipWithDiamondSuccess{ [self requestHttp]; } --(void)openVipWithDiamondFail{ - +-(void)openVipWithDiamondFail:(NSInteger)code{ + if(code == 31005){ + TTAlertConfig *config = [[TTAlertConfig alloc]init]; + config.message = YMLocalizedString(@"XPNobleCenterViewController3"); + config.actionStyle = TTAlertActionBothStyle; + [TTPopup alertWithConfig:config showBorder:NO confirmHandler:^{ + + XPIAPRechargeViewController * webVC =[[XPIAPRechargeViewController alloc] init]; + webVC.type = @"4"; + [self.navigationController pushViewController:webVC animated:YES]; + } cancelHandler:^{ + + }]; + } } ///请求贵族中心数据 - (void)requestHttp { [self.presenter getUserInfo]; [self checkTranscationIds]; [self.presenter getNobleChargeProductListWithChannelType:@"9"]; - NSString * uid = [AccountInfoStorage instance].getUid; - NSString * ticket = [AccountInfoStorage instance].getTicket; - [Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { - if(code == 200){ - WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data]; - self.infoModel = model; - } - } uid:uid ticket:ticket]; - + [self getWalletInfo]; if([ClientConfig shareConfig].canOpen){ @@ -266,7 +283,16 @@ } } - +-(void)getWalletInfo{ + NSString * uid = [AccountInfoStorage instance].getUid; + NSString * ticket = [AccountInfoStorage instance].getTicket; + [Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if(code == 200){ + WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data]; + self.infoModel = model; + } + } uid:uid ticket:ticket]; +} ///批量验证 - (void)checkTranscationIds { NSString * uid = [AccountInfoStorage instance].getUid; @@ -280,6 +306,10 @@ } #pragma mark - XPNobleCenterProtocol +- (void)getNobleCenterDiamondSuccess:(NSString *)recordId{ + [[NSNotificationCenter defaultCenter]postNotificationName:@"kNobleCenterGetDiamondSuccess" object:recordId]; + [self getWalletInfo]; +} ///获取用户信息成功 - (void)onGetUserInfoSuccess:(UserInfoModel *)userInfo { self.userInfo = userInfo; @@ -291,33 +321,73 @@ self.model = model; __block NSMutableArray *names = [NSMutableArray array]; NSInteger defaultSelectIndex = 0; + for (int index = 0; index < model.vipInfos.count; index++) { NobleInfo *tagInfo = [model.vipInfos safeObjectAtIndex1:index]; [names addObject:tagInfo.vipName]; if (tagInfo.vipLevel == model.currLevel) { defaultSelectIndex = index; + self.vipInfo = tagInfo; } } + + for (RechargeListModel *rechargeModel in self.rechargeList) { + if (rechargeModel.prodDesc.integerValue == model.currLevel){ + self.rechargeModel = rechargeModel; + break; + } + } + self.titles = names.copy; self.titleView.titles = self.titles; self.openNobleView.hidden = self.userInfo.userVipInfoVO.vipLevel; self.myNobleView.hidden = !self.userInfo.userVipInfoVO.vipLevel; - if (self.userInfo.userVipInfoVO) { - self.myNobleView.model = model; + if (self.openNobleView.hidden == NO){ + self.openNobleButton.text = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterViewController0"),_rechargeModel.money.floatValue]; + if (self.model.vipInfos.count > 0){ + self.vipInfo = self.model.vipInfos.firstObject; + } + }else{ + if (self.userInfo.userVipInfoVO) { + self.myNobleView.rechargeModel = self.rechargeModel; + self.myNobleView.model = model; + self.myNobleView.vipInfo = self.vipInfo; + } + } + + + + if (self.vipInfo.vipLevel > self.model.currLevel){ + [self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(150+kSafeAreaBottomHeight); + }]; + }else{ + [self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(91+kSafeAreaBottomHeight); + }]; } self.titleView.defaultSelectedIndex = defaultSelectIndex; + + + [self.titleView reloadData]; [self.lineView reloadData]; self.navView.hideSettingBtn = self.model.currLevel < 9; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + self.titleView.vipInfos = model.vipInfos; + }); + + } ///获取贵族充值信息成功 -- (void)onGetNobleRechargeDataSuccess:(NobleRechargeModel *)rechargeInfo { - self.rechargeModel = rechargeInfo; - if (self.rechargeModel.list.count == 0)return; - RechargeListModel *rechargeModel = [self.rechargeModel.list safeObjectAtIndex1:0]; +- (void)onGetNobleRechargeDataSuccess:(NSArray *)list { + self.rechargeList = list; + if (self.rechargeList.count == 0)return; + RechargeListModel *rechargeModel = [self.rechargeList safeObjectAtIndex1:0]; NSString *title = [NSString stringWithFormat:YMLocalizedString(@"XPNobleCenterViewController0"), rechargeModel.money]; self.openNobleButton.text = title; + self.rechargeModel = rechargeModel; } ///请求充值id的状态成功 @@ -417,7 +487,7 @@ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ if (!self.userInfo.userVipInfoVO) { ///刷新一下用户的信息 - [self.presenter getUserInfo]; + [self requestHttp]; } }); } @@ -521,6 +591,24 @@ - (void)categoryView:(JXCategoryBaseView *)categoryView didSelectedItemAtIndex:(NSInteger)index { // 侧滑手势处理 self.navigationController.interactivePopGestureRecognizer.enabled = (index == 0); + NobleInfo *vipInfo = [self.model.vipInfos safeObjectAtIndex1:index]; + for (RechargeListModel *rechargeModel in self.rechargeList) { + if (rechargeModel.prodDesc.integerValue == vipInfo.vipLevel){ + self.rechargeModel = rechargeModel; + break; + } + } + self.myNobleView.rechargeModel = self.rechargeModel; + self.myNobleView.vipInfo = vipInfo; + if (vipInfo.vipLevel > self.model.currLevel){ + [self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(150+kSafeAreaBottomHeight); + }]; + }else{ + [self.myNobleView mas_updateConstraints:^(MASConstraintMaker *make) { + make.height.mas_equalTo(91+kSafeAreaBottomHeight); + }]; + } } #pragma mark -NIMSystemNotificationManagerDelegate @@ -535,7 +623,7 @@ return; } if ([dic[@"first"] intValue] == CustomMessageType_Noble_VIP && [dic[@"second"] intValue] == Custom_Message_Sub_Open_Noble_Success) { // 开通贵族成功 - [self.presenter getUserInfo]; + [self requestHttp]; } } } @@ -565,7 +653,9 @@ - (void)onOpenNobleButtonClick { XPNobleCenterPayView *payView = [[XPNobleCenterPayView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; + payView.money = self.rechargeModel.money; payView.diamonds = self.infoModel.diamonds; + payView.vipLevel = @(self.vipInfo.vipLevel).stringValue; payView.delegate = self; [self.view addSubview:payView]; @@ -573,9 +663,9 @@ } #pragma mark - Getters And Setters -- (JXCategoryTitleView *)titleView { +- (PINobleCenterTitleView *)titleView { if (!_titleView) { - _titleView = [[JXCategoryTitleView alloc] init]; + _titleView = [[PINobleCenterTitleView alloc] init]; _titleView.delegate = self; _titleView.titles = self.titles; _titleView.titleColor = [DJDKMIMOMColor normalNobleTextColor]; @@ -586,12 +676,14 @@ _titleView.contentScrollViewClickTransitionAnimationEnabled = NO; _titleView.defaultSelectedIndex = 0; _titleView.listContainer = self.lineView; + _titleView.cellWidth = 60; + _titleView.cellSpacing = 0; JXCategoryIndicatorLineView *lineView = [[JXCategoryIndicatorLineView alloc] init]; lineView.indicatorWidth = 26; lineView.indicatorHeight = 3; lineView.indicatorColor = UIColorFromRGB(0xFFD3A8); - lineView.verticalMargin = 0; + lineView.verticalMargin = 8; _titleView.indicators = @[lineView]; } return _titleView; @@ -672,6 +764,7 @@ if (!_myNobleView) { _myNobleView = [[XPNobleCenterMyNobleView alloc] init]; _myNobleView.hidden = YES; + _myNobleView.delegate = self; } return _myNobleView; } diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m index 4fcc1538..a7cbf2c0 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.m @@ -234,7 +234,15 @@ - (void)setNormalOriginArray:(NSArray *)normalOriginArray { _normalOriginArray = normalOriginArray; if(_normalOriginArray.count > 0 && self.lastSelectGift == nil){ - [self dealSelectGift:_normalOriginArray.firstObject]; + GiftInfoModel *giftModel = _normalOriginArray.firstObject; + [self dealSelectGift:giftModel]; + if (giftModel.giftType == GiftType_super){ + if (self.delegate && [self.delegate respondsToSelector:@selector(xPGiftInfoView:didClickItem:type:)]) { + [self.delegate xPGiftInfoView:self didClickItem:giftModel type:self.segmentType]; + } + } + + } self.datasource = [[NSMutableArray alloc]initWithArray:_normalOriginArray]; NSInteger currentPage = 0; diff --git a/YuMi/zh-Hans.lproj/Localizable.strings b/YuMi/zh-Hans.lproj/Localizable.strings index a43e150c..74d4cd82 100644 --- a/YuMi/zh-Hans.lproj/Localizable.strings +++ b/YuMi/zh-Hans.lproj/Localizable.strings @@ -2649,7 +2649,7 @@ "XPNobleSettingViewController1" = "隐身进房"; ///XPNobleCenterViewController.m -"XPNobleCenterViewController0" = "%@立即开通贵族特权"; +"XPNobleCenterViewController0" = "%.2f立即开通贵族特权"; "XPNobleCenterViewController1" = "购买失败"; "XPNobleCenterViewController2" = "出现未知错误,请重新尝试"; "XPNobleCenterViewController3" = "钻石余额不足,是否充值"; @@ -2665,10 +2665,12 @@ "XPNobleCenterMyNobleView8" = "保级%zd"; "XPNobleCenterMyNobleView9" = "升级%zd"; "XPNobleCenterMyNobleView10" = "当前%zd"; - +"XPNobleCenterMyNobleView11" = "%.2f 购买%@等级特权"; ///XPNobleCenterEmptyView.m "XPNobleCenterEmptyView0" = "即将上线敬请期待"; - +///XPNobleCenterWindow +"XPNobleCenterWindow0"="充值"; +"XPNobleCenterWindow1"="您当前是%@等级,确认购买更高%@等级"; ///XPNobleSettingNavView.m "XPNobleSettingNavView0" = "贵族设置"; @@ -2699,6 +2701,23 @@ "XPNobleCenterPayView1" = "钻石"; "XPNobleCenterPayView2" = "钻石支付"; "XPNobleCenterPayView3" = "确认支付"; +///XPNoblePrivilegeContentCell +"XPNoblePrivilegeContentCell0"="贵族特权"; +"XPNoblePrivilegeContentCell1"="返钻特权"; +//PINobleCenterListCell +"PINobleCenterListCell0"="领取"; +"PINobleCenterListCell1"="未达到领取标准"; +"PINobleCenterListCell2"="等级名称"; +"PINobleCenterListCell3"="返利日期"; +"PINobleCenterListCell4"="返利鑽石数量"; +"PINobleCenterListCell5"="操作"; +"PINobleCenterListCell6"="第%@天"; +"PINobleCenterListCell7"="已领取"; +///PINoblePrivilegeEmptyCell +"PINoblePrivilegeEmptyCell0"="当前等级不享有该特权~"; +//PINobleCenterListView +"PINobleCenterListView0"="用户直接购买骑士等级,除了直接享有等级对应的所有特权,还能获得额外返鑽。\n\n具体返利日期以及返利鑽石数量如下:"; +"PINobleCenterListView1"="注:\n返利鑽石需在贵族开通后30天内领取完毕,逾期失效\n领取后的返利鑽石可到【我的-收益记录-鑽石明细-收入记录】中查看。"; ///LoginForgetEditView.m "LoginForgetEditView0" = "获取验证码"; diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index f0c2cf0a..3cff963b 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -2643,7 +2643,7 @@ "XPNobleSettingViewController1" = "隱身進房"; ///XPNobleCenterViewController.m -"XPNobleCenterViewController0" = "%@立即開通貴族特權"; +"XPNobleCenterViewController0" = "%.2f立即開通貴族特權"; "XPNobleCenterViewController1" = "購買失敗"; "XPNobleCenterViewController2" = "出現未知錯誤,請重新嘗試"; "XPNobleCenterViewController3" = "鉆石余額不足,是否充值"; @@ -2659,10 +2659,12 @@ "XPNobleCenterMyNobleView8" = "保級%zd"; "XPNobleCenterMyNobleView9" = "升級%zd"; "XPNobleCenterMyNobleView10" = "當前%zd"; - +"XPNobleCenterMyNobleView11" = "%.2f 購買%@等級特權"; ///XPNobleCenterEmptyView.m "XPNobleCenterEmptyView0" = "即將上線敬請期待"; - +///XPNobleCenterWindow +"XPNobleCenterWindow0"="充值"; +"XPNobleCenterWindow1"="您當前是%@等級,確認購買更高%@等級"; ///XPNobleSettingNavView.m "XPNobleSettingNavView0" = "貴族設置"; @@ -2693,6 +2695,23 @@ "XPNobleCenterPayView1" = "鉆石"; "XPNobleCenterPayView2" = "鉆石支付"; "XPNobleCenterPayView3" = "確認支付"; +///XPNoblePrivilegeContentCell +"XPNoblePrivilegeContentCell0"="贵族特權"; +"XPNoblePrivilegeContentCell1"="返钻特權"; +//PINobleCenterListCell +"PINobleCenterListCell0"="領取"; +"PINobleCenterListCell1"="未達到領取標準"; +"PINobleCenterListCell2"="等級名稱"; +"PINobleCenterListCell3"="返利日期"; +"PINobleCenterListCell4"="返利鑽石數量"; +"PINobleCenterListCell5"="操作"; +"PINobleCenterListCell6"="第%@天"; +"PINobleCenterListCell7"="已領取"; +///PINoblePrivilegeEmptyCell +"PINoblePrivilegeEmptyCell0"="當前等級不享有該特權~"; +//PINobleCenterListView +"PINobleCenterListView0"="用戶直接購買騎士等級,除了直接享有等級對應的所有特權,還能獲得額外返鑽。\n\n具體返利日期以及返利鑽石數量如下:"; +"PINobleCenterListView1"="注:\n返利鑽石需在貴族開通後30天內領取完畢,逾期失效\n領取後的返利鑽石可到【我的-收益記錄-鑽石明細-收入記錄】中查看。"; ///LoginForgetEditView.m "LoginForgetEditView0" = "獲取驗證碼";