From 40311a1d85a5730807888fc57f5539de3498cf5e Mon Sep 17 00:00:00 2001 From: AI Health Developer Date: Mon, 21 Apr 2025 13:52:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=201.0.26=20=E9=9C=80?= =?UTF-8?q?=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Podfile | 2 +- Users/edwinqqq/Documents/文稿 | 8 - YuMi.xcodeproj/project.pbxproj | 44 +-- YuMi/Appdelegate/AppDelegate+ThirdConfig.m | 11 +- ...fb2d5d12ef75635b53fe46-nx2IAX_fw480@3x.png | Bin 0 -> 14348 bytes .../bravo_speaker.imageset/Contents.json | 21 ++ ...fb2d5d12ef75635b53fe46-nx2IAX_fw480@3x.png | Bin 0 -> 14429 bytes .../bravo_speaker_ar.imageset/Contents.json | 21 ++ .../YMLogin/Presenter/LoginPresenter.m | 25 +- .../Session/Cell/AgentMessageTableViewCell.m | 39 ++- .../YMMessage/View/Session/Cell/MessageCell.m | 42 ++- .../Content/SesssionModel/AgentMessageModel.m | 7 - .../SesssionModel/MessageCPNotifyModel.m | 5 +- .../View/Session/SessionViewController.m | 21 +- .../Session/XPSessionMainViewController.m | 304 +++++++++++------- YuMi/Modules/YMMine/Api/Api+Mine.h | 2 +- YuMi/Modules/YMMine/Api/Api+Mine.m | 4 +- YuMi/Modules/YMMine/Model/RechargeUserModel.h | 2 +- .../Presenter/XPMineUserInfoPresenter.h | 2 +- .../Presenter/XPMineUserInfoPresenter.m | 8 +- .../YMMine/Protocol/XPMineUserInfoProtocol.h | 4 +- .../YMMine/View/CPListViewController.m | 2 +- .../Cell/Visitor/XPMineVisitorTableViewCell.m | 4 +- .../MineInfo/XPMineUserInfoViewController.m | 12 +- YuMi/Modules/YMMine/View/SubViews/CPCard.m | 10 +- .../MineInfo/XPMineUserInfoHeaderView.h | 21 +- .../MineInfo/XPMineUserInfoHeaderView.m | 170 +++++++--- .../YMNewHome/Model/HomePlayRoomModel.h | 2 +- .../Model/BravoGiftTabInfomationModel.h | 24 ++ .../Model/BravoGiftTabInfomationModel.m | 12 + YuMi/Modules/YMRoom/Model/RoomInfoModel.h | 3 - ...gFlagView.h => BravoGiftWinningFlagView.h} | 8 +- ...gFlagView.m => BravoGiftWinningFlagView.m} | 20 +- .../View/AnimationView/RoomAnimationView.m | 20 +- .../XPRoomFunctionContainerView.m | 6 +- ...GiftBannerView.h => BravoGiftBannerView.h} | 2 +- ...GiftBannerView.m => BravoGiftBannerView.m} | 18 +- .../CustomRoomBGContentViewController.m | 2 - .../View/MenuContainerView/MSRoomMenuGameVC.h | 1 + .../View/MenuContainerView/MSRoomMenuGameVC.m | 117 +++++-- .../MenuContainerView/MSRoomMenuGameView.h | 3 + .../MenuContainerView/MSRoomMenuGameView.m | 12 + .../Model/XPMessageInfoModel.h | 2 +- .../Tool/XPRoomMessageParser.h | 2 +- .../Tool/XPRoomMessageParser.m | 29 +- .../View/RoomGame/Model/MSRoomGameModel.h | 4 +- .../YMRoom/View/RoomGame/View/MSRoomGameVC.m | 51 ++- .../View/SubView/MSRoomGameHeadView.m | 1 - .../RoomGame/View/SubView/MSRoomGameMsgView.m | 4 +- .../RoomGame/View/SubView/MSRoomGameView.m | 134 ++++---- .../View/RoomPK/View/XPRoomPKPanelView.m | 1 - .../YMRoom/View/RoomSideMenu/RoomSideMenu.m | 6 + .../YMRoom/View/SendGiftView/Api/Api+Gift.h | 3 + .../YMRoom/View/SendGiftView/Api/Api+Gift.m | 4 + .../View/SendGiftView/GiftComboManager.m | 21 +- .../View/SendGiftView/Model/GiftInfoModel.h | 2 +- .../View/SendGiftView/Model/GiftInfoModel.m | 4 +- .../SendGiftView/Model/GiftReceiveInfoModel.h | 1 + .../SendGiftView/Presenter/XPGiftPresenter.h | 6 +- .../SendGiftView/Presenter/XPGiftPresenter.m | 38 +++ .../View/SendGiftView/View/GiftComboView.h | 2 +- .../View/SendGiftView/View/GiftComboView.m | 15 +- .../View/PIGiftBravoGiftBroadcastView.h | 18 ++ .../View/PIGiftBravoGiftBroadcastView.m | 240 ++++++++++++++ .../View/PIGiftInfoSegmentedView.m | 20 +- .../View/SendGiftView/View/XPGiftInfoView.h | 2 +- .../View/SendGiftView/View/XPSendGiftView.m | 48 ++- .../View/XPRoomSettingViewController.m | 6 +- .../YMTabbar/View/TabbarViewController.m | 1 + YuMi/Network/HttpRequestHelper.m | 134 ++++++++ YuMi/Structure/MVP/Model/UserVipInfoVo.h | 2 +- .../CardManager/XPSkillCardPlayerManager.h | 4 + .../CardManager/XPSkillCardPlayerManager.m | 21 +- YuMi/Tools/NSString/NSString+Utils.h | 2 + YuMi/Tools/NSString/NSString+Utils.m | 9 + YuMi/Tools/YMLine/PILineManager.swift | 66 ---- YuMi/ar.lproj/Localizable.strings | 32 +- YuMi/en.lproj/Localizable.strings | 21 +- YuMi/tr.lproj/Localizable.strings | 32 +- YuMi/zh-Hant.lproj/Localizable.strings | 32 +- 80 files changed, 1487 insertions(+), 574 deletions(-) delete mode 100644 Users/edwinqqq/Documents/文稿 create mode 100644 YuMi/Assets.xcassets/20.20.56/bravo_speaker.imageset/4cc1494e9e1f9153726ebc7fb2d5d12ef75635b53fe46-nx2IAX_fw480@3x.png create mode 100644 YuMi/Assets.xcassets/20.20.56/bravo_speaker.imageset/Contents.json create mode 100644 YuMi/Assets.xcassets/Language/ar/bravo_speaker_ar.imageset/4cc1494e9e1f9153726ebc7fb2d5d12ef75635b53fe46-nx2IAX_fw480@3x.png create mode 100644 YuMi/Assets.xcassets/Language/ar/bravo_speaker_ar.imageset/Contents.json create mode 100644 YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.h create mode 100644 YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.m rename YuMi/Modules/YMRoom/View/AnimationView/{BroveGiftWinningFlagView.h => BravoGiftWinningFlagView.h} (74%) rename YuMi/Modules/YMRoom/View/AnimationView/{BroveGiftWinningFlagView.m => BravoGiftWinningFlagView.m} (92%) rename YuMi/Modules/YMRoom/View/Common/{BroveGiftBannerView.h => BravoGiftBannerView.h} (88%) rename YuMi/Modules/YMRoom/View/Common/{BroveGiftBannerView.m => BravoGiftBannerView.m} (95%) create mode 100644 YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.h create mode 100644 YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.m delete mode 100644 YuMi/Tools/YMLine/PILineManager.swift diff --git a/Podfile b/Podfile index a19f383e..a64b5ddd 100644 --- a/Podfile +++ b/Podfile @@ -9,7 +9,7 @@ target 'YuMi' do pod 'FBSDKLoginKit' pod 'FBSDKCoreKit' pod 'FBSDKShareKit' - pod 'LineSDKSwift' +# pod 'LineSDKSwift' # 滑动标签栏 pod 'JXCategoryView' pod 'JXPagingView/Pager' diff --git a/Users/edwinqqq/Documents/文稿 b/Users/edwinqqq/Documents/文稿 deleted file mode 100644 index a67f5705..00000000 --- a/Users/edwinqqq/Documents/文稿 +++ /dev/null @@ -1,8 +0,0 @@ -// 使用UIViewPropertyAnimator优化动画 -- (void)startMatchGameSuccess { - // ... existing code ... - UIViewPropertyAnimator *animator = [[UIViewPropertyAnimator alloc] initWithDuration:0.3 curve:UIViewAnimationCurveEaseInOut animations:^{ - nav.view.alpha = 1.0; - }]; - [animator startAnimation]; -} \ No newline at end of file diff --git a/YuMi.xcodeproj/project.pbxproj b/YuMi.xcodeproj/project.pbxproj index 18a276ed..673d6479 100644 --- a/YuMi.xcodeproj/project.pbxproj +++ b/YuMi.xcodeproj/project.pbxproj @@ -204,7 +204,6 @@ 234489092AC3C5FF0070E5D5 /* SudMGP.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 234489072AC3C5DA0070E5D5 /* SudMGP.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 234D821E2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 234D821D2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m */; }; 234E50AF2BF7352C005CB6D5 /* NSTextAttachment+MSImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 234E50AE2BF7352C005CB6D5 /* NSTextAttachment+MSImage.m */; }; - 234F44E32B3EA4F900E2B532 /* PILineManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 234F44E22B3EA4F900E2B532 /* PILineManager.swift */; }; 235714892BECC38F004C81D6 /* MessageHeadlinesTextModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 235714882BECC38F004C81D6 /* MessageHeadlinesTextModel.m */; }; 235714982BEDF54E004C81D6 /* MsRoomMessageMainView.m in Sources */ = {isa = PBXBuildFile; fileRef = 235714972BEDF54E004C81D6 /* MsRoomMessageMainView.m */; }; 235A451A2B04A352009753F5 /* PIRoomActivityWebView.m in Sources */ = {isa = PBXBuildFile; fileRef = 235A45192B04A352009753F5 /* PIRoomActivityWebView.m */; }; @@ -547,13 +546,15 @@ 4CE746C32D9290430094E496 /* RoomBoomManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE746C22D9290430094E496 /* RoomBoomManager.m */; }; 4CE746C62D9297C30094E496 /* BravoGiftTipModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE746C52D9297C30094E496 /* BravoGiftTipModel.m */; }; 4CE746CA2D929D500094E496 /* BaseRoomBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE746C82D929D500094E496 /* BaseRoomBannerView.m */; }; - 4CE746D22D92A2660094E496 /* BroveGiftBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE746D12D92A2660094E496 /* BroveGiftBannerView.m */; }; - 4CE746D52D92C1080094E496 /* BroveGiftWinningFlagView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE746D42D92C1080094E496 /* BroveGiftWinningFlagView.m */; }; + 4CE746D22D92A2660094E496 /* BravoGiftBannerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE746D12D92A2660094E496 /* BravoGiftBannerView.m */; }; + 4CE746D52D92C1080094E496 /* BravoGiftWinningFlagView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CE746D42D92C1080094E496 /* BravoGiftWinningFlagView.m */; }; 4CEB9EA72D09643E00443480 /* UserRoomCardViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EA62D09643E00443480 /* UserRoomCardViewController.m */; }; 4CEB9EAA2D097E8400443480 /* MoliAvatar.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EA92D097E8400443480 /* MoliAvatar.m */; }; 4CEB9EAD2D09AA0400443480 /* SexAgeLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EAC2D09AA0400443480 /* SexAgeLabel.m */; }; 4CEB9EB02D0AF4FE00443480 /* TwentyMicStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EAF2D0AF4FE00443480 /* TwentyMicStageView.m */; }; 4CEB9EB32D0AFCE200443480 /* NineteenMicStageView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEB9EB22D0AFCE200443480 /* NineteenMicStageView.m */; }; + 4CFBE0CA2DAD085700A923AF /* BravoGiftTabInfomationModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFBE0C92DAD085700A923AF /* BravoGiftTabInfomationModel.m */; }; + 4CFBE0CD2DAD0FC400A923AF /* PIGiftBravoGiftBroadcastView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFBE0CC2DAD0FC400A923AF /* PIGiftBravoGiftBroadcastView.m */; }; 4CFFEFCD2D3A4E410035D016 /* AppOfficalManagerActionsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFFEFCC2D3A4E410035D016 /* AppOfficalManagerActionsViewController.m */; }; 4CFFEFD02D3A5E130035D016 /* Api+SuperAdmin.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CFFEFCF2D3A5E130035D016 /* Api+SuperAdmin.m */; }; 540EC1D02C89925F00F3BF0D /* GiftComboView.m in Sources */ = {isa = PBXBuildFile; fileRef = 540EC1CF2C89925F00F3BF0D /* GiftComboView.m */; }; @@ -2073,7 +2074,6 @@ 234D821D2AEC57CF0022EFEB /* YYTextAsyncLayer+PITextAsyncLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "YYTextAsyncLayer+PITextAsyncLayer.m"; path = "YuMi/Appdelegate/YYTextAsyncLayer+PITextAsyncLayer.m"; sourceTree = SOURCE_ROOT; }; 234E50AD2BF7352C005CB6D5 /* NSTextAttachment+MSImage.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSTextAttachment+MSImage.h"; sourceTree = ""; }; 234E50AE2BF7352C005CB6D5 /* NSTextAttachment+MSImage.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSTextAttachment+MSImage.m"; sourceTree = ""; }; - 234F44E22B3EA4F900E2B532 /* PILineManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PILineManager.swift; sourceTree = ""; }; 235714872BECC38F004C81D6 /* MessageHeadlinesTextModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MessageHeadlinesTextModel.h; sourceTree = ""; }; 235714882BECC38F004C81D6 /* MessageHeadlinesTextModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MessageHeadlinesTextModel.m; sourceTree = ""; }; 235714962BEDF54E004C81D6 /* MsRoomMessageMainView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MsRoomMessageMainView.h; sourceTree = ""; }; @@ -2723,10 +2723,10 @@ 4CE746C52D9297C30094E496 /* BravoGiftTipModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BravoGiftTipModel.m; sourceTree = ""; }; 4CE746C72D929D500094E496 /* BaseRoomBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BaseRoomBannerView.h; sourceTree = ""; }; 4CE746C82D929D500094E496 /* BaseRoomBannerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BaseRoomBannerView.m; sourceTree = ""; }; - 4CE746D02D92A2660094E496 /* BroveGiftBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BroveGiftBannerView.h; sourceTree = ""; }; - 4CE746D12D92A2660094E496 /* BroveGiftBannerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BroveGiftBannerView.m; sourceTree = ""; }; - 4CE746D32D92C1080094E496 /* BroveGiftWinningFlagView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BroveGiftWinningFlagView.h; sourceTree = ""; }; - 4CE746D42D92C1080094E496 /* BroveGiftWinningFlagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BroveGiftWinningFlagView.m; sourceTree = ""; }; + 4CE746D02D92A2660094E496 /* BravoGiftBannerView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BravoGiftBannerView.h; sourceTree = ""; }; + 4CE746D12D92A2660094E496 /* BravoGiftBannerView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BravoGiftBannerView.m; sourceTree = ""; }; + 4CE746D32D92C1080094E496 /* BravoGiftWinningFlagView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BravoGiftWinningFlagView.h; sourceTree = ""; }; + 4CE746D42D92C1080094E496 /* BravoGiftWinningFlagView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BravoGiftWinningFlagView.m; sourceTree = ""; }; 4CEB9EA52D09643E00443480 /* UserRoomCardViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = UserRoomCardViewController.h; sourceTree = ""; }; 4CEB9EA62D09643E00443480 /* UserRoomCardViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = UserRoomCardViewController.m; sourceTree = ""; }; 4CEB9EA82D097E8400443480 /* MoliAvatar.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MoliAvatar.h; sourceTree = ""; }; @@ -2737,6 +2737,10 @@ 4CEB9EAF2D0AF4FE00443480 /* TwentyMicStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TwentyMicStageView.m; sourceTree = ""; }; 4CEB9EB12D0AFCE200443480 /* NineteenMicStageView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NineteenMicStageView.h; sourceTree = ""; }; 4CEB9EB22D0AFCE200443480 /* NineteenMicStageView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = NineteenMicStageView.m; sourceTree = ""; }; + 4CFBE0C82DAD085700A923AF /* BravoGiftTabInfomationModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = BravoGiftTabInfomationModel.h; sourceTree = ""; }; + 4CFBE0C92DAD085700A923AF /* BravoGiftTabInfomationModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = BravoGiftTabInfomationModel.m; sourceTree = ""; }; + 4CFBE0CB2DAD0FC400A923AF /* PIGiftBravoGiftBroadcastView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PIGiftBravoGiftBroadcastView.h; sourceTree = ""; }; + 4CFBE0CC2DAD0FC400A923AF /* PIGiftBravoGiftBroadcastView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = PIGiftBravoGiftBroadcastView.m; sourceTree = ""; }; 4CFFEFCB2D3A4E410035D016 /* AppOfficalManagerActionsViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppOfficalManagerActionsViewController.h; sourceTree = ""; }; 4CFFEFCC2D3A4E410035D016 /* AppOfficalManagerActionsViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppOfficalManagerActionsViewController.m; sourceTree = ""; }; 4CFFEFCE2D3A5E130035D016 /* Api+SuperAdmin.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+SuperAdmin.h"; sourceTree = ""; }; @@ -6023,7 +6027,6 @@ 234F44E12B3EA4DC00E2B532 /* YMLine */ = { isa = PBXGroup; children = ( - 234F44E22B3EA4F900E2B532 /* PILineManager.swift */, ); path = YMLine; sourceTree = ""; @@ -6816,8 +6819,8 @@ 4CE746C92D929D500094E496 /* Common */ = { isa = PBXGroup; children = ( - 4CE746D02D92A2660094E496 /* BroveGiftBannerView.h */, - 4CE746D12D92A2660094E496 /* BroveGiftBannerView.m */, + 4CE746D02D92A2660094E496 /* BravoGiftBannerView.h */, + 4CE746D12D92A2660094E496 /* BravoGiftBannerView.m */, 4CE746C72D929D500094E496 /* BaseRoomBannerView.h */, 4CE746C82D929D500094E496 /* BaseRoomBannerView.m */, ); @@ -7732,6 +7735,8 @@ 4CA532B62D5B333200B8F59F /* RoomLuckyPackageInfoModel.m */, 4C75CEF92D6318FF009147A5 /* RoomEnterModel.h */, 4C75CEFA2D6318FF009147A5 /* RoomEnterModel.m */, + 4CFBE0C82DAD085700A923AF /* BravoGiftTabInfomationModel.h */, + 4CFBE0C92DAD085700A923AF /* BravoGiftTabInfomationModel.m */, ); path = Model; sourceTree = ""; @@ -8543,8 +8548,8 @@ 54E4D52F2C9048E1009E1FEA /* LuckyGiftWinningFlagView.m */, 54E4D5312C90658C009E1FEA /* LuckyGiftWinningBannerView.h */, 54E4D5322C90658C009E1FEA /* LuckyGiftWinningBannerView.m */, - 4CE746D32D92C1080094E496 /* BroveGiftWinningFlagView.h */, - 4CE746D42D92C1080094E496 /* BroveGiftWinningFlagView.m */, + 4CE746D32D92C1080094E496 /* BravoGiftWinningFlagView.h */, + 4CE746D42D92C1080094E496 /* BravoGiftWinningFlagView.m */, ); path = AnimationView; sourceTree = ""; @@ -9831,6 +9836,8 @@ 54F179092C8EDDF400CB5219 /* CountdownRingView.m */, 5468995B2C8AFE4C0049136A /* GiftComboFlagView.h */, 5468995C2C8AFE4C0049136A /* GiftComboFlagView.m */, + 4CFBE0CB2DAD0FC400A923AF /* PIGiftBravoGiftBroadcastView.h */, + 4CFBE0CC2DAD0FC400A923AF /* PIGiftBravoGiftBroadcastView.m */, ); path = View; sourceTree = ""; @@ -12000,6 +12007,7 @@ E80E09B32A42071D00CD2BE7 /* XPRoomStarKitchenBannerView.m in Sources */, E8B846C726FDB45000A777FE /* XPMineUserInfoAlbumProtocol.h in Sources */, 9B1EF3D527E8294B00554295 /* XPMineDressEmptyCollectionViewCell.m in Sources */, + 4CFBE0CD2DAD0FC400A923AF /* PIGiftBravoGiftBroadcastView.m in Sources */, E890BC07273CF1800007C46B /* XPGiftCountCollectionViewCell.m in Sources */, E88C72A02828FCD40047FB2B /* XPMusicLibraryPlayView.m in Sources */, E823E38E290BE8BD00EADD86 /* WishGiftInfoUpdateModel.m in Sources */, @@ -12348,6 +12356,7 @@ 23E9EAB22A84C9DE00B792F2 /* XPMineUserInfoTagViewCell.m in Sources */, 9B42869C28C1FD3D009034D2 /* XPOpenRedPacketCell.m in Sources */, 23D321D22ADD0EBC006B259C /* PIRoomPhotoAlbumItemPresenter.m in Sources */, + 4CFBE0CA2DAD085700A923AF /* BravoGiftTabInfomationModel.m in Sources */, 239D0FD22C046EAD002977CE /* MSTabbarRoomGameView.m in Sources */, 4C864A052D561E1D00191AE0 /* LuckyPackageLogicManager.m in Sources */, 9BFE992E288142FD009DA429 /* RoomClassifyModel.m in Sources */, @@ -12628,7 +12637,7 @@ E8DEC9A82764A68B0078CB70 /* Api+MoreMenu.m in Sources */, 9B86D87A2817DD8400494FCD /* XPRoomEnterHideTipView.m in Sources */, 23FE47E12BB41CF200F09D23 /* PINobleCenterListReusableView.m in Sources */, - 4CE746D52D92C1080094E496 /* BroveGiftWinningFlagView.m in Sources */, + 4CE746D52D92C1080094E496 /* BravoGiftWinningFlagView.m in Sources */, E8AC721026F43955007D6E91 /* UIImageConstant.m in Sources */, E85E7B122A4EB0D200B6D00A /* GuildIncomeRecordModel.m in Sources */, E81C27A026EEF83D0031E639 /* YUMIHtmlUrl.m in Sources */, @@ -12863,7 +12872,7 @@ E81366E726F0A49E0076364C /* NSString+Utils.m in Sources */, 23194DD22AD14BF000649F51 /* DDFileLogger.m in Sources */, E8EEB90126FC31B6007C6EBA /* XPMineUserInfoPresenter.m in Sources */, - 4CE746D22D92A2660094E496 /* BroveGiftBannerView.m in Sources */, + 4CE746D22D92A2660094E496 /* BravoGiftBannerView.m in Sources */, 4C864A022D55F4F600191AE0 /* LuckyPackagePresenter.m in Sources */, E81A65312834E53600F55894 /* XPMomentsLatestViewController.m in Sources */, 18F404BB2760982000A6C548 /* ChatLimitModel.m in Sources */, @@ -13156,7 +13165,6 @@ 238B37D62AC55A2C00BFC9D5 /* XPTreasureFairyTrialsView.m in Sources */, E82109AD26F1C8A000FC3319 /* CountDownHelper.m in Sources */, E878B8582835F0D300E22DCF /* MonentsInteractiveModel.m in Sources */, - 234F44E32B3EA4F900E2B532 /* PILineManager.swift in Sources */, E87DF4E42A42CAD2009C1185 /* XPHomeSearchNavView.m in Sources */, 9BD2ECCE288F829600F5CD9A /* XPMineFootPrintViewController.m in Sources */, 9B4E920028E57A620033419E /* XPGiftHeadTypeView.m in Sources */, @@ -13692,8 +13700,6 @@ "-framework", "\"JavaScriptCore\"", "-framework", - "\"LineSDK\"", - "-framework", "\"LocalAuthentication\"", "-framework", "\"MBProgressHUD\"", @@ -14027,8 +14033,6 @@ "-framework", "\"JavaScriptCore\"", "-framework", - "\"LineSDK\"", - "-framework", "\"LocalAuthentication\"", "-framework", "\"MBProgressHUD\"", diff --git a/YuMi/Appdelegate/AppDelegate+ThirdConfig.m b/YuMi/Appdelegate/AppDelegate+ThirdConfig.m index 8c3a2f17..c09c0a73 100644 --- a/YuMi/Appdelegate/AppDelegate+ThirdConfig.m +++ b/YuMi/Appdelegate/AppDelegate+ThirdConfig.m @@ -27,6 +27,7 @@ #import #import +#import #import "YuMi-swift.h" @@ -75,6 +76,7 @@ UIKIT_EXTERN NSString * adImageName; /** 崩溃收集 Bugly */ + - (void) configBugly { BuglyConfig *config = [[BuglyConfig alloc] init]; @@ -83,16 +85,15 @@ UIKIT_EXTERN NSString * adImageName; #ifdef DEBUG config.debugMode = NO;//YES; // debug 模式下,开启调试模式 config.channel = [YYUtility getAppSource]; -// config.blockMonitorEnable = YES; // 卡顿监控开关,默认关闭 - config.reportLogLevel = BuglyLogLevelSilent; // BuglyLogLevelVerbose; // 设置打印日志级别 + config.reportLogLevel = BuglyLogLevelWarn;// BuglyLogLevelSilent; // BuglyLogLevelVerbose; // 设置打印日志级别 [Bugly startWithAppId:@"c937fd00f7" config:config]; #else config.unexpectedTerminatingDetectionEnable = YES; // 非正常退出事件记录开关,默认关闭 config.debugMode = NO; // release 模式下,关闭调试模式 config.channel = [YYUtility getAppSource];; - config.blockMonitorEnable = NO; // 卡顿监控开关,默认关闭 + config.blockMonitorEnable = YES; // 卡顿监控开关,默认关闭 config.reportLogLevel = BuglyLogLevelWarn; // 设置自定义日志上报的级别,默认不上报自定义日志 - NSString *buylyKey = @"8627948559"; // isEnterprise == NO ? @"5334684d86" : @"d65df59a68"; + NSString *buylyKey = @"8627948559"; [Bugly startWithAppId:buylyKey config:config]; #endif } @@ -121,7 +122,7 @@ UIKIT_EXTERN NSString * adImageName; - (void)configShareSDK { - [PILineLoginManager registerLine]; +// [PILineLoginManager registerLine]; [ShareSDK registPlatforms:^(SSDKRegister *platformsRegister) { ///faceBook diff --git a/YuMi/Assets.xcassets/20.20.56/bravo_speaker.imageset/4cc1494e9e1f9153726ebc7fb2d5d12ef75635b53fe46-nx2IAX_fw480@3x.png b/YuMi/Assets.xcassets/20.20.56/bravo_speaker.imageset/4cc1494e9e1f9153726ebc7fb2d5d12ef75635b53fe46-nx2IAX_fw480@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..fb7199d640d73fc8d26997f0aadfb77b9d79762a GIT binary patch literal 14348 zcmV+nIP=Ge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{=*$Ny}#GsevFjcr{uIZ2lc_vY+m@4^vE*zbZYM)J?@aw&< z&UWs6AXA;{U2Qm}hG1tmdY0}$#i&V89og&&hYD#*S~J#Kto*FdrLJ{er{SK9i6XK#mDJ-8Ut^)qAXPnQKDoVu92YmT_+NK=JoBdbLL)m-LT4IUk?8N z3veYZ3c*&qa8tUV#fo$0%=@?`$+}xCr`JH_MZf`#O{|&f%b29Xq-rlz-MSI@-Cfl~^Jl@`&^xZf_JdIdw z6BLSAhi0P4Dy7<8^Ibi9$Htz*%`>l=cR>EJqYobEzZAIg(OrEnd?Tuse#ASr>$w+~ zAU?r3Pq;?fpzUqwc&fACP|+;=c#LzZAH1avN_s?kE&X^R>FB zx)>`*wypsRtxG2FK#pC7bF@rN1jT6P`tmccykl=m=)Jvr_F3od>xTbdeSYDoV^4>1^pI(3!h}N)h909w6H*dOwVHbQIaTLevErW@1pjihFa*}KCmnW^nr1h~6eDAH z=TI@a0pn&(N31;Ux|;Tr?L7a($rsGq?O$3>0W;<*~rzNtZ-rbZQ3 zJ*o<$XH8ocO;=u2{+Vm{>tCtbn~49H1(!~K{`u#t=8n#KpNWGak?4_SQ8ptnqWY&N j+ 0 ? userId : @""; - NSString * access_token = token.length > 0 ? token : @""; - NSString * unionid = userId.length > 0 ? userId : @""; - userInfo.openid = openid; - userInfo.access_token = access_token; - userInfo.unionid = unionid; - [AccountInfoStorage instance].thirdUserInfo = userInfo; - [self loginWithThirdPartWithType:ThirdLoginType_Line]; - } else if (loginStatus == LineLoginResultStatusCancelled) { - [XNDJTDDLoadingTool hideOnlyView:kWindow]; - [[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter0")]; - } else if (loginStatus == LineLoginResultStatusError) { - [XNDJTDDLoadingTool hideOnlyView:kWindow]; - [[self getView] showErrorToast:YMLocalizedString(@"LoginPresenter1")]; - } - }]; + } -(void)thirdLoginByFBWithPresentingViewController:(UIViewController *)presentingViewController { diff --git a/YuMi/Modules/YMMessage/View/Session/Cell/AgentMessageTableViewCell.m b/YuMi/Modules/YMMessage/View/Session/Cell/AgentMessageTableViewCell.m index de7ac104..3e6ca097 100644 --- a/YuMi/Modules/YMMessage/View/Session/Cell/AgentMessageTableViewCell.m +++ b/YuMi/Modules/YMMessage/View/Session/Cell/AgentMessageTableViewCell.m @@ -31,8 +31,7 @@ - (void)initSubViews { [super initSubViews]; - - self.backView.backgroundColor = [UIColor whiteColor]; + [self.backView addSubview:self.iconImageView]; [self.backView addSubview:self.titleLabel]; [self.backView addSubview:self.messageLabel]; @@ -114,6 +113,8 @@ endPoint:CGPointMake(0.5, 1) cornerRadius:8]; self.avatarStackView.hidden = YES; + self.agreeButton.enabled = YES; + self.rejectButton.enabled = YES; // 请求方不显示操作按钮 if (model.isSender) { @@ -129,6 +130,7 @@ self.titleLabel.text = YMLocalizedString(@"20.20.56_text_10"); self.agreeButton.enabled = NO; self.rejectButton.enabled = NO; + self.stackView.hidden = NO; [self.agreeButton addGradientBackgroundWithColors:@[ UIColorFromRGB(0xEBEBEB), UIColorFromRGB(0xEBEBEB), @@ -137,13 +139,21 @@ self.agreeButton.hidden = model.status!=1; self.rejectButton.hidden = model.status==1; } else if (model.isUserTaped == 2) { - self.agreeButton.hidden = model.status==1; - self.rejectButton.hidden = model.status!=1; + self.agreeButton.hidden = model.status==2; + self.rejectButton.hidden = model.status!=2; } + [self.messageLabel mas_remakeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.mas_equalTo(self.backView); + make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_equalTo(10); + make.bottom.mas_equalTo(self.backView).offset(-40); + }]; } else { + self.agreeButton.enabled = YES; + self.rejectButton.enabled = YES; switch (model.status) { case 0: case 2: + self.stackView.hidden = NO; self.titleLabel.text = YMLocalizedString(@"20.20.56_text_10"); if (model.isSender) { [self.messageLabel mas_remakeConstraints:^(MASConstraintMaker *make) { @@ -151,6 +161,12 @@ make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(10); make.bottom.mas_equalTo(self.backView).offset(-10); }]; + } else { + [self.messageLabel mas_remakeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.mas_equalTo(self.backView); + make.top.mas_equalTo(self.titleLabel.mas_bottom).mas_equalTo(10); + make.bottom.mas_equalTo(self.backView).offset(-40); + }]; } break; case 1: { @@ -162,6 +178,7 @@ } self.avatarStackView.hidden = NO; self.stackView.hidden = YES; + self.titleLabel.text = YMLocalizedString(@"20.20.56_text_10"); [self.messageLabel mas_remakeConstraints:^(MASConstraintMaker *make) { make.leading.trailing.mas_equalTo(self.backView); make.top.mas_equalTo(self.avatarStackView.mas_bottom).offset(10); @@ -178,6 +195,11 @@ } - (void)updateMessageContent:(MessageCPNotifyModel *)model { + if (model.status == 2) { + self.messageLabel.text = YMLocalizedString(@"20.20.56_text_20"); + return; + } + NSString *part_1 = model.status == 0 ? YMLocalizedString(@"20.20.56_text_13") : YMLocalizedString(@"20.20.56_text_14"); if (model.isUserTaped > 0) { part_1 = YMLocalizedString(@"20.20.56_text_13") ; @@ -248,9 +270,6 @@ #pragma mark - - (void)didTapAgree { - // TODO: 根据model来处理点击事件 - // TODO: 保存结果到本地(?) - // TODO: 如果是发起者,不显示按钮 if (self.customMessageDelegate && [self.customMessageDelegate respondsToSelector:@selector(didTapAccept:)]) { [self.customMessageDelegate didTapAccept:self.model.message]; } @@ -295,6 +314,7 @@ UIColorFromRGB(0xFCC074), ] startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(1, 0.5) cornerRadius:15]; [_agreeButton setTitle:YMLocalizedString(@"XPAnchorPKInviteView7") forState:UIControlStateNormal]; + [_agreeButton setTitle:YMLocalizedString(@"20.20.56_text_18") forState:UIControlStateDisabled]; [_agreeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [_agreeButton setTitleColor:UIColorFromRGB(0x7b7b7d) forState:UIControlStateDisabled]; _agreeButton.titleLabel.font = kFontMedium(14); @@ -309,6 +329,7 @@ _rejectButton.backgroundColor = UIColorFromRGB(0xEBEBEB); [_rejectButton setCornerRadius:15]; [_rejectButton setTitle:YMLocalizedString(@"XPAnchorPKInviteView6") forState:UIControlStateNormal]; + [_rejectButton setTitle:YMLocalizedString(@"20.20.56_text_19") forState:UIControlStateDisabled]; [_rejectButton setTitleColor:UIColorFromRGB(0x7b7b7d) forState:UIControlStateNormal]; _rejectButton.titleLabel.font = kFontMedium(14); [_rejectButton addTarget:self action:@selector(didTapReject) forControlEvents:UIControlEventTouchUpInside]; @@ -343,7 +364,7 @@ - (NetImageView *)avatarMe { if (!_avatarMe) { _avatarMe = [[NetImageView alloc] init]; - [_avatarMe setCornerRadius:55/2]; + [_avatarMe setAllCornerRadius:55/2 borderWidth:1 borderColor:UIColorFromRGB(0xffe046)]; } return _avatarMe; } @@ -351,7 +372,7 @@ - (NetImageView *)avatarOther { if (!_avatarOther) { _avatarOther = [[NetImageView alloc] init]; - [_avatarOther setCornerRadius:55/2]; + [_avatarOther setAllCornerRadius:55/2 borderWidth:1 borderColor:UIColorFromRGB(0xffe046)]; } return _avatarOther; } diff --git a/YuMi/Modules/YMMessage/View/Session/Cell/MessageCell.m b/YuMi/Modules/YMMessage/View/Session/Cell/MessageCell.m index c23e4861..74cff4ec 100644 --- a/YuMi/Modules/YMMessage/View/Session/Cell/MessageCell.m +++ b/YuMi/Modules/YMMessage/View/Session/Cell/MessageCell.m @@ -56,6 +56,8 @@ @property (nonatomic, strong) UIView * messageBackground; @property (nonatomic, strong) MASConstraint * messageBackgroundLeft; @property (nonatomic, strong) MASConstraint * messageBackgroundRight; +@property (nonatomic, strong) MASConstraint * messageBackgroundLeftAvatar; +@property (nonatomic, strong) MASConstraint * messageBackgroundRightAvatar; /** 消息内容实体 */ @@ -108,6 +110,8 @@ [self.messageBackground mas_makeConstraints:^(MASConstraintMaker *make) { self.messageBackgroundLeft = make.leading.mas_equalTo(self.leftAvatar.mas_trailing).offset(15); self.messageBackgroundRight = make.trailing.mas_equalTo(self.rightAvatar.mas_leading).offset(-15); + self.messageBackgroundLeftAvatar = make.leading.mas_equalTo(self.leftAvatar.mas_leading); + self.messageBackgroundRightAvatar = make.trailing.mas_equalTo(self.rightAvatar.mas_trailing); make.top.mas_equalTo(self).offset(20); }]; @@ -205,6 +209,8 @@ - (void)renderWithMessage:(MessageBaseModel *)model { NIMMessage * message = model.message; + NSString * classStr = [model cellContent:model]; + self.currentModel = model; self.currentMessage = message; NSString * avatarUrl = [[NIMSDK sharedSDK].userManager userInfo:message.from].userInfo.avatarUrl; @@ -213,14 +219,34 @@ avatarUrl = [[[XPSkillCardPlayerManager shareInstance] userInfoModel] avatar]; self.leftAvatar.hidden = YES; self.rightAvatar.hidden = NO; - [self.messageBackgroundLeft uninstall]; - [self.messageBackgroundRight install]; + + if ([classStr isEqualToString:@"AgentMessageTableViewCell"]) { + [self.messageBackgroundLeft uninstall]; + [self.messageBackgroundLeftAvatar install]; + [self.messageBackgroundRight install]; + [self.messageBackgroundRightAvatar uninstall]; + } else { + [self.messageBackgroundLeft uninstall]; + [self.messageBackgroundRight install]; + [self.messageBackgroundLeftAvatar uninstall]; + [self.messageBackgroundRightAvatar uninstall]; + } self.rightAvatar.imageUrl = avatarUrl; } else { self.leftAvatar.hidden = NO; self.rightAvatar.hidden = YES; - [self.messageBackgroundLeft install]; - [self.messageBackgroundRight uninstall]; + + if ([classStr isEqualToString:@"AgentMessageTableViewCell"]) { + [self.messageBackgroundLeft install]; + [self.messageBackgroundLeftAvatar uninstall]; + [self.messageBackgroundRight uninstall]; + [self.messageBackgroundRightAvatar install]; + } else { + [self.messageBackgroundLeft install]; + [self.messageBackgroundRight uninstall]; + [self.messageBackgroundLeftAvatar uninstall]; + [self.messageBackgroundRightAvatar uninstall]; + } self.leftAvatar.imageUrl = avatarUrl; } @@ -229,7 +255,6 @@ [self.messageContent removeFromSuperview]; } - NSString * classStr = [model cellContent:model]; if (classStr) { if (![self.messageContent isKindOfClass:NSClassFromString(classStr)]) { self.messageContent = [[NSClassFromString(classStr) alloc] init]; @@ -256,10 +281,12 @@ }]; } else { [self.messageContent mas_makeConstraints:^(MASConstraintMaker *make) { - make.leading.top.trailing.bottom.mas_equalTo(self.messageBackground); +// make.edges.mas_equalTo(self.messageBackground); + make.top.bottom.mas_equalTo(self.messageBackground); + make.size.mas_equalTo(self.messageBackground); }]; } - [self.messageContent.superview layoutIfNeeded]; + if (model.isHiddenAvatar) { self.leftAvatar.hidden= YES; self.rightAvatar.hidden = YES; @@ -270,6 +297,7 @@ }]; } [self.messageContent render:model]; + [self.messageContent.superview layoutIfNeeded]; } - (void)handleMessageFail:(MessageBaseModel *)model { diff --git a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/AgentMessageModel.m b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/AgentMessageModel.m index 459f9838..50ccd0d3 100644 --- a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/AgentMessageModel.m +++ b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/AgentMessageModel.m @@ -50,15 +50,8 @@ CGFloat titleHeight = 30; CGFloat contentHeight = textRect.size.height; -//#if DEBUG -// contentHeight = 150; -// self.layoutType = 2; -//#endif CGFloat buttonHeight = self.layoutType == 0 ? 0 : 40; self.height = titleHeight + contentHeight + buttonHeight + 20; - - // TODO: 補充富文本格式 | 補充 API call 邏輯 - } return self; } diff --git a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageCPNotifyModel.m b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageCPNotifyModel.m index b1de524b..ac3fe2f1 100644 --- a/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageCPNotifyModel.m +++ b/YuMi/Modules/YMMessage/View/Session/Content/SesssionModel/MessageCPNotifyModel.m @@ -12,8 +12,7 @@ - (instancetype)initWithMessage:(NIMMessage *)message { if (self = [super initWithMessage:message]) { - self.messageType = SessionMessageType_Custom; - +// self.messageType = SessionMessageType_Custom; NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; AttachmentModel *attach = (AttachmentModel *)obj.attachment; NSDictionary * dic = attach.data; @@ -25,7 +24,7 @@ self.uid = [[dic objectForKey:@"uid"] integerValue]; self.first = attach.first; self.second = attach.second; - self.isSender = [[[AccountInfoStorage instance] getUid] integerValue] == self.uid; + self.isSender = [[[AccountInfoStorage instance] getUid] integerValue] == self.uid || self.uid == 0; self.isUserTaped = [[dic objectForKey:@"user_action"] integerValue]; if (self.isSender) { diff --git a/YuMi/Modules/YMMessage/View/Session/SessionViewController.m b/YuMi/Modules/YMMessage/View/Session/SessionViewController.m index d3db346d..c103450a 100644 --- a/YuMi/Modules/YMMessage/View/Session/SessionViewController.m +++ b/YuMi/Modules/YMMessage/View/Session/SessionViewController.m @@ -156,8 +156,10 @@ - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; - [self.presenter getFansLike:self.session.sessionId]; - [self.presenter getUserInfoWithUid:self.session.sessionId]; + if (![[[ClientConfig shareConfig].configInfo officialAccountUids] containsObject:self.session.sessionId]) { + [self.presenter getFansLike:self.session.sessionId]; + [self.presenter getUserInfoWithUid:self.session.sessionId]; + } } - (void)initHeaderAndFooterRrfresh { @@ -220,8 +222,6 @@ } [self.sessionTableView reloadData]; [self.sessionTableView nim_scrollToBottom:YES]; - -// [self updateCPMessageAccept:firstmessage]; }]; } } @@ -849,6 +849,19 @@ if (![session isEqual:self.session] ) { return; } + + // 不处理点击拒绝的显示 +// NIMCustomObject *obj = (NIMCustomObject *)message.messageObject; +// AttachmentModel *attachment = (AttachmentModel *)obj.attachment; +// if (attachment.second == Custom_Message_Sub_CP_message_result) { +// NSDictionary *data = attachment.data; +// NSNumber *status = [data objectForKey:@"status"]; +// if (status && status.integerValue == 2) { +// [[NIMSDK sharedSDK].conversationManager deleteMessage:message]; +// return; +// } +// } + for (NIMMessage *message in messages) { [self addTimeMessage:message]; if (message.isDeleted) { diff --git a/YuMi/Modules/YMMessage/View/Session/XPSessionMainViewController.m b/YuMi/Modules/YMMessage/View/Session/XPSessionMainViewController.m index a0850d7b..0af94413 100644 --- a/YuMi/Modules/YMMessage/View/Session/XPSessionMainViewController.m +++ b/YuMi/Modules/YMMessage/View/Session/XPSessionMainViewController.m @@ -19,11 +19,15 @@ #import "MessagePresenter.h" #import "MessageProtocol.h" -@interface XPSessionMainViewController () -@property (nonatomic, strong) JXCategoryTitleView *titleView; -@property (nonatomic, strong) JXCategoryIndicatorImageView *lineView; -@property (nonatomic, strong) JXPagerView *pagingView; +@interface XPSessionMainViewController () + @property (nonatomic, strong) NSArray *titles; +@property (nonatomic, strong) UIPageViewController *pageViewController; +@property (nonatomic, strong) NSArray *viewControllers; +@property (nonatomic, assign) NSInteger currentIndex; +@property (nonatomic, strong) UIStackView *buttonStackView; +@property (nonatomic, strong) NSMutableArray *segmentButtons; +@property (nonatomic, strong) UIScrollView *scrollView; // 添加 scrollView 属性 @property (nonatomic,strong) SessionListViewController *sessionListVC; ///好友 @@ -56,23 +60,6 @@ } #pragma mark - Private Method - -- (void)setupTopTheme { - __block UIImageView *theme = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, KScreenWidth, kGetScaleWidth(140))]; - theme.image = [[ClientConfig shareConfig] navigationAreaBG]; - theme.contentMode = UIViewContentModeScaleAspectFill; - [self.view addSubview:theme]; - - [[NSNotificationCenter defaultCenter] addObserverForName:[ClientConfig shareConfig].reloadNavigationAreaImageKey - object:nil - queue:[NSOperationQueue mainQueue] - usingBlock:^(NSNotification * _Nonnull notification) { - if ([notification.object isKindOfClass:[UIImage class]]) { - theme.image = (UIImage *)notification.object; - } - }]; -} - - (void)initSubViews { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(getTabBarItemBadge:) @@ -81,17 +68,27 @@ self.view.backgroundColor = [[ClientConfig shareConfig] bgColor]; -// self.headView = [UIView new]; - [self.view addSubview:self.pagingView]; + // 初始化分页控制器 + self.pageViewController = [[UIPageViewController alloc] initWithTransitionStyle:UIPageViewControllerTransitionStyleScroll + navigationOrientation:UIPageViewControllerNavigationOrientationHorizontal + options:nil]; + self.pageViewController.dataSource = self; + self.pageViewController.delegate = self; + [self addChildViewController:self.pageViewController]; + [self.view addSubview:self.pageViewController.view]; + [self.pageViewController didMoveToParentViewController:self]; + + // 初始化顶部按钮 + [self setupTopButtons]; + + // 设置初始页面 + self.viewControllers = @[self.sessionListVC, self.friendVC, self.attentionVC, self.fansVC]; + [self.pageViewController setViewControllers:@[self.viewControllers[0]] + direction:UIPageViewControllerNavigationDirectionForward + animated:NO + completion:nil]; } - (void)initSubViewConstraints { - - [self.pagingView mas_makeConstraints:^(MASConstraintMaker *make) { - make.leading.trailing.equalTo(self.view); - make.bottom.mas_equalTo(-1); - make.top.equalTo(self.view);//.mas_offset(-50); - }]; - UIView *lineView = [UIView new]; lineView.backgroundColor = UIColorFromRGB(0xF5F6FA); [self.view addSubview:lineView]; @@ -99,7 +96,140 @@ make.bottom.leading.trailing.equalTo(self.view); make.height.mas_equalTo(1); }]; + + // 设置页面控制器约束 + [self.pageViewController.view mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.equalTo(self.buttonStackView.mas_bottom).offset(10); + make.left.right.bottom.equalTo(self.view); + }]; } + +- (void)setupTopButtons { + self.segmentButtons = [NSMutableArray array]; + self.buttonStackView = [[UIStackView alloc] init]; + self.buttonStackView.axis = UILayoutConstraintAxisHorizontal; + self.buttonStackView.spacing = (isMSZH() || isMSZH()) ? 16 : 4; + self.buttonStackView.distribution = UIStackViewDistributionFill;//UIStackViewDistributionFillEqually; + self.buttonStackView.semanticContentAttribute = isMSRTL() ? UISemanticContentAttributeForceRightToLeft : UISemanticContentAttributeForceLeftToRight; + + + if (isMSZH() || isMSRTL()) { + [self.view addSubview:self.buttonStackView]; + // 设置stackView约束 + [self.buttonStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo([UIApplication sharedApplication].keyWindow.safeAreaInsets.top); + make.leading.mas_equalTo(12); + }]; + } else { + // 创建滚动视图 + self.scrollView = [[UIScrollView alloc] init]; + self.scrollView.showsHorizontalScrollIndicator = NO; + self.scrollView.showsVerticalScrollIndicator = NO; + self.scrollView.bounces = NO; + [self.view addSubview:self.scrollView]; + // 设置scrollView约束 + [self.scrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo([UIApplication sharedApplication].keyWindow.safeAreaInsets.top); + make.height.mas_equalTo(44); // 设置一个固定高度 + make.leading.mas_equalTo(12); + make.trailing.mas_equalTo(-40); + }]; + [self.scrollView addSubview:self.buttonStackView]; + // 设置stackView约束 + [self.buttonStackView mas_makeConstraints:^(MASConstraintMaker *make) { + make.edges.equalTo(self.scrollView); + make.height.equalTo(self.scrollView); + }]; + } + + for (NSInteger i = 0; i < self.titles.count; i++) { + UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom]; + [button setTitle:self.titles[i] forState:UIControlStateNormal]; + [button setTitleColor:UIColorFromRGB(0x313131) forState:UIControlStateNormal]; + [button setTitleColor:UIColorFromRGB(0x313131) forState:UIControlStateSelected]; + button.titleLabel.font = kFontRegular(16); + button.tag = i; + [button addTarget:self action:@selector(segmentButtonTapped:) forControlEvents:UIControlEventTouchUpInside]; + [self.segmentButtons addObject:button]; + [self.buttonStackView addArrangedSubview:button]; + } + + // 设置初始选中状态 + [self updateSegmentButtonSelection:0]; + + // 设置清除按钮 + [self.view addSubview:self.allCleanBtn]; + [self.allCleanBtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.width.height.mas_equalTo(30); + make.centerY.mas_equalTo(self.buttonStackView); + make.trailing.mas_equalTo(-8); + }]; +} + +- (void)segmentButtonTapped:(UIButton *)sender { + NSInteger index = sender.tag; + if (index == self.currentIndex) return; + + UIViewController *targetVC = self.viewControllers[index]; + UIPageViewControllerNavigationDirection direction = index > self.currentIndex ? UIPageViewControllerNavigationDirectionForward : UIPageViewControllerNavigationDirectionReverse; + + [self.pageViewController setViewControllers:@[targetVC] + direction:direction + animated:YES + completion:nil]; + + [self updateSegmentButtonSelection:index]; +} + +- (void)updateSegmentButtonSelection:(NSInteger)index { + self.currentIndex = index; + [self.segmentButtons enumerateObjectsUsingBlock:^(UIButton *button, NSUInteger idx, BOOL *stop) { + button.selected = (idx == index); + button.titleLabel.font = button.selected ? kFontSemibold(20) : kFontRegular(16); + }]; + // 获取选中按钮 + UIButton *selectedButton = self.segmentButtons[index]; + CGRect buttonFrame = selectedButton.frame; + CGFloat scrollViewWidth = self.scrollView.bounds.size.width; + CGFloat currentOffset = self.scrollView.contentOffset.x; + + // 计算按钮的可见区域 + CGFloat buttonLeftEdge = buttonFrame.origin.x; + CGFloat buttonRightEdge = buttonFrame.origin.x + buttonFrame.size.width; + CGFloat visibleLeftEdge = currentOffset; + CGFloat visibleRightEdge = currentOffset + scrollViewWidth; + + // 只有当按钮不完全可见时才滚动 +// if (buttonLeftEdge < visibleLeftEdge) { +// // 如果按钮被左边遮挡,滚动到让按钮左对齐 +// [self.scrollView setContentOffset:CGPointMake(buttonLeftEdge, 0) animated:YES]; +// } else if (buttonRightEdge > visibleRightEdge) { +// // 如果按钮被右边遮挡,滚动最小距离使按钮完全可见 +// CGFloat newOffset = buttonRightEdge - scrollViewWidth; +// [self.scrollView setContentOffset:CGPointMake(newOffset, 0) animated:YES]; +// } + + + if (isMSRTL()) { + // RTL 布局时的滚动逻辑 + if (buttonRightEdge > visibleRightEdge) { + // 如果按钮被右边遮挡,滚动到让按钮右对齐 + [self.scrollView setContentOffset:CGPointMake(buttonRightEdge - scrollViewWidth, 0) animated:YES]; + } else if (buttonLeftEdge < visibleLeftEdge) { + // 如果按钮被左边遮挡,滚动最小距离使按钮完全可见 + [self.scrollView setContentOffset:CGPointMake(buttonLeftEdge, 0) animated:YES]; + } + } else { + // LTR 布局时的滚动逻辑(保持原来的逻辑) + if (buttonLeftEdge < visibleLeftEdge) { + [self.scrollView setContentOffset:CGPointMake(buttonLeftEdge, 0) animated:YES]; + } else if (buttonRightEdge > visibleRightEdge) { + CGFloat newOffset = buttonRightEdge - scrollViewWidth; + [self.scrollView setContentOffset:CGPointMake(newOffset, 0) animated:YES]; + } + } +} + #pragma mark - SessionListViewController通知 -(void)getTabBarItemBadge:(NSNotification *)not{ NSInteger badgeValue = [not.userInfo[@"BadgeValue"] integerValue]; @@ -110,46 +240,6 @@ } } -#pragma mark - JXCategoryViewDelegate -- (NSUInteger)tableHeaderViewHeightInPagerView:(JXPagerView *)pagerView { - return 44+[UIApplication sharedApplication].keyWindow.safeAreaInsets.top - 45; -} - -- (UIView *)tableHeaderViewInPagerView:(JXPagerView *)pagerView { - return [UIView new]; -} - -- (NSUInteger)heightForPinSectionHeaderInPagerView:(JXPagerView *)pagerView { - return 45; -} - -- (UIView *)viewForPinSectionHeaderInPagerView:(JXPagerView *)pagerView { - return self.titleView; -} - -- (NSInteger)numberOfListsInPagerView:(JXPagerView *)pagerView { - return self.titles.count; -} - -- (id)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index { - UIViewController *viewController; - switch (index) { - case 0: - return self.sessionListVC; - break; - case 1: - return self.friendVC; - break; - case 2: - return self.attentionVC; - break; - default: - return self.fansVC; - break; - } -// return (id )viewController; -} - - (NSArray *)titles { if (!_titles) { _titles = @[YMLocalizedString(@"XPSessionMainViewController0"), @@ -170,53 +260,35 @@ return time; } +#pragma mark - UIPageViewControllerDataSource + +- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController { + NSInteger index = [self.viewControllers indexOfObject:viewController]; + if (index == 0 || index == NSNotFound) { + return nil; + } + return self.viewControllers[index - 1]; +} + +- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController { + NSInteger index = [self.viewControllers indexOfObject:viewController]; + if (index == self.viewControllers.count - 1 || index == NSNotFound) { + return nil; + } + return self.viewControllers[index + 1]; +} + +#pragma mark - UIPageViewControllerDelegate + +- (void)pageViewController:(UIPageViewController *)pageViewController didFinishAnimating:(BOOL)finished previousViewControllers:(NSArray *)previousViewControllers transitionCompleted:(BOOL)completed { + if (completed) { + UIViewController *currentVC = pageViewController.viewControllers.firstObject; + NSInteger index = [self.viewControllers indexOfObject:currentVC]; + [self updateSegmentButtonSelection:index]; + } +} + #pragma mark -懒加载 -- (JXCategoryTitleView *)titleView { - if (!_titleView) { - _titleView = [[JXCategoryTitleView alloc] init]; - _titleView.delegate = self; - _titleView.backgroundColor = [UIColor clearColor]; - _titleView.titleColor = UIColorFromRGB(0x313131); - _titleView.titleSelectedColor = UIColorFromRGB(0x313131); - _titleView.titleFont = kFontRegular(16); - _titleView.titleSelectedFont = kFontBold(20); - _titleView.titleLabelAnchorPointStyle = JXCategoryTitleLabelAnchorPointStyleBottom; - _titleView.contentScrollViewClickTransitionAnimationEnabled = NO; - _titleView.defaultSelectedIndex = 0; - _titleView.averageCellSpacingEnabled = NO; - _titleView.contentEdgeInsetLeft = 16; - _titleView.contentEdgeInsetRight = 120; - _titleView.titles = self.titles; - _titleView.cellSpacing = 20; - if (isMSEN() || isMSTR()) { - _titleView.customWidth = KScreenWidth - 40; - } - _titleView.listContainer = (id)self.pagingView.listContainerView; - - [_titleView addSubview:self.allCleanBtn]; - [self.allCleanBtn mas_makeConstraints:^(MASConstraintMaker *make) { - make.width.height.mas_equalTo(30); - make.centerY.mas_equalTo(_titleView); - make.trailing.mas_equalTo(-8); - }]; - } - return _titleView; -} - -- (JXPagerView *)pagingView { - if (!_pagingView) { - _pagingView = [[JXPagerView alloc] initWithDelegate:self listContainerType:0]; - _pagingView.backgroundColor = [UIColor clearColor]; - _pagingView.listContainerView.backgroundColor = [UIColor clearColor]; - _pagingView.mainTableView.backgroundColor = [UIColor clearColor]; - _pagingView.listContainerView.listCellBackgroundColor = UIColor.clearColor; - _pagingView.pinSectionHeaderVerticalOffset = 57; - _pagingView.isListHorizontalScrollEnabled = NO; - _pagingView.mainTableView.gestureDelegate = self; - } - return _pagingView; -} - - (XPMineAttentionViewController *)attentionVC { if (!_attentionVC) { _attentionVC = [[XPMineAttentionViewController alloc] init]; diff --git a/YuMi/Modules/YMMine/Api/Api+Mine.h b/YuMi/Modules/YMMine/Api/Api+Mine.h index d202919b..cfb3dbfd 100644 --- a/YuMi/Modules/YMMine/Api/Api+Mine.h +++ b/YuMi/Modules/YMMine/Api/Api+Mine.h @@ -373,7 +373,7 @@ NS_ASSUME_NONNULL_BEGIN + (void)userCpNameChangeAudit:(HttpRequestHelperCompletion)completion recordId:(NSInteger)recordId status:(NSInteger)status; -+ (void)userCpNameTypeTopList:(HttpRequestHelperCompletion)completion; ++ (void)userCpNameTypeTopList:(HttpRequestHelperCompletion)completion uid:(NSInteger)uid; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/Api/Api+Mine.m b/YuMi/Modules/YMMine/Api/Api+Mine.m index dd964aae..b7b15db1 100644 --- a/YuMi/Modules/YMMine/Api/Api+Mine.m +++ b/YuMi/Modules/YMMine/Api/Api+Mine.m @@ -496,8 +496,8 @@ __FUNCTION__, @(recordId), @(status), nil]; } -+ (void)userCpNameTypeTopList:(HttpRequestHelperCompletion)completion { - [self makeRequest:@"user/cp/nameTypeTopList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil]; ++ (void)userCpNameTypeTopList:(HttpRequestHelperCompletion)completion uid:(NSInteger)uid { + [self makeRequest:@"user/cp/nameTypeTopList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, @(uid), nil]; } @end diff --git a/YuMi/Modules/YMMine/Model/RechargeUserModel.h b/YuMi/Modules/YMMine/Model/RechargeUserModel.h index 740baaaa..4afbba17 100644 --- a/YuMi/Modules/YMMine/Model/RechargeUserModel.h +++ b/YuMi/Modules/YMMine/Model/RechargeUserModel.h @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic, copy) NSString *id; @property(nonatomic, assign) NSInteger uid; -@property(nonatomic, assign) NSInteger manageUid; // TODO, 有非 0 值,则表示用户为自代理,要在对应的 UI 隐藏自代理入口 +@property(nonatomic, assign) NSInteger manageUid; // 有非 0 值,则表示用户为自代理,要在对应的 UI 隐藏自代理入口 @property(nonatomic, assign) NSInteger starLevel; @property(nonatomic, assign) BOOL hasCharge; @property(nonatomic, copy) NSString *erbanNo; diff --git a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.h b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.h index 6e2dc53a..8e0a61d4 100644 --- a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.h +++ b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.h @@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN success:(void(^)(void))finishHim failure:(void(^)(NSError *error))failure; -- (void)cpTypeList; +- (void)cpTypeList:(NSInteger)uid; - (void)requestRelationship:(NSInteger)uid otherUid:(NSInteger)otherUid type:(NSInteger)type diff --git a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.m b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.m index 326e0fd7..6a768ebd 100644 --- a/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.m +++ b/YuMi/Modules/YMMine/Presenter/XPMineUserInfoPresenter.m @@ -127,12 +127,14 @@ } showLoading:YES errorToast:YES] uid:@(uid) hours:@(hours) blockReason:reason]; } -- (void)cpTypeList { +- (void)cpTypeList:(NSInteger)uid { [Api userCpNameTypeTopList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { - + if ([[self getView] respondsToSelector:@selector(getCPListSuccess:)]) { + [[self getView] getCPListSuccess:[RelationUserVO modelsWithArray:data.data]]; + } } fail:^(NSInteger code, NSString * _Nullable msg) { - } showLoading:NO errorToast:NO]]; + } showLoading:NO errorToast:NO] uid:uid]; } - (void)requestRelationship:(NSInteger)uid diff --git a/YuMi/Modules/YMMine/Protocol/XPMineUserInfoProtocol.h b/YuMi/Modules/YMMine/Protocol/XPMineUserInfoProtocol.h index da59d79d..c7da5a46 100644 --- a/YuMi/Modules/YMMine/Protocol/XPMineUserInfoProtocol.h +++ b/YuMi/Modules/YMMine/Protocol/XPMineUserInfoProtocol.h @@ -8,7 +8,7 @@ #import NS_ASSUME_NONNULL_BEGIN -@class UserInfoModel,XPSoundCardModel,XPMineUserInfoTagModel; +@class UserInfoModel,XPSoundCardModel,XPMineUserInfoTagModel, RelationUserVO; @protocol XPMineUserInfoProtocol @optional ///获取用户信息成功 @@ -39,6 +39,8 @@ NS_ASSUME_NONNULL_BEGIN -(void)getTagListSuccess:(XPMineUserInfoTagModel *)model; ///保存个人标签成功 -(void)saveTagListSuccess; + +-(void)getCPListSuccess:(NSArray *)array; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMMine/View/CPListViewController.m b/YuMi/Modules/YMMine/View/CPListViewController.m index 4d0706a5..2dd77120 100644 --- a/YuMi/Modules/YMMine/View/CPListViewController.m +++ b/YuMi/Modules/YMMine/View/CPListViewController.m @@ -200,7 +200,7 @@ otherUid:vo.cpUid type:relationshipType success:^{ - + [XNDJTDDLoadingTool showSuccessWithMessage:YMLocalizedString(@"20.20.56_text_11")]; } failure:^(NSError * _Nonnull error) { }]; diff --git a/YuMi/Modules/YMMine/View/Cell/Visitor/XPMineVisitorTableViewCell.m b/YuMi/Modules/YMMine/View/Cell/Visitor/XPMineVisitorTableViewCell.m index 95fbd075..5e320962 100644 --- a/YuMi/Modules/YMMine/View/Cell/Visitor/XPMineVisitorTableViewCell.m +++ b/YuMi/Modules/YMMine/View/Cell/Visitor/XPMineVisitorTableViewCell.m @@ -143,9 +143,7 @@ self.memberIdLabel.text = [NSString stringWithFormat:@"ID:%zd", item.erbanNo]; self.timeLabel.text = [NSString stringWithFormat:YMLocalizedString(@"20.20.51_text_28"), item.visitTimeDesc]; [self.genderImageView setImage:item.gender == GenderType_Male ? kImage(@"common_male") : kImage(@"common_female")]; -#if DEBUG - item.regionIcon = @""; -#endif + self.regionImageView.imageUrl = item.regionIcon; self.regionImageView.hidden = [NSString isEmpty:item.regionIcon]; diff --git a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m index 7ffae81d..b3915fb6 100644 --- a/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m +++ b/YuMi/Modules/YMMine/View/MineInfo/XPMineUserInfoViewController.m @@ -381,7 +381,6 @@ HWDMP4PlayDelegate> self.userMomentVC.dynamicInfo = userInfo.dynamicInfo; self.headView.roomUid = userInfo.roomUid; - self.headView.relationUser = userInfo.relationUserVO; self.headView.nameplateList = userInfo.userNameplateList; @@ -389,7 +388,7 @@ HWDMP4PlayDelegate> self.userInfo.relationUserVO = userInfo.relationUserVO; - self.headerHeight = [XPMineUserInfoHeaderView headerHeight:userInfo]; + self.headerHeight = [XPMineUserInfoHeaderView headerHeight:userInfo cps:0]; [self.pagingView reloadData]; ///上传访问记录 @@ -412,7 +411,14 @@ HWDMP4PlayDelegate> } [self playCPAnimation]; - [self.presenter cpTypeList]; + [self.presenter cpTypeList:userInfo.uid]; +} + +- (void)getCPListSuccess:(NSArray *)array { + self.headView.cpUsers = array; + self.headerHeight = [XPMineUserInfoHeaderView headerHeight:self.giftVC.userInfo + cps:array.count]; + [self.pagingView reloadData]; } - (void)getAttentionStateSuccess:(BOOL)status { diff --git a/YuMi/Modules/YMMine/View/SubViews/CPCard.m b/YuMi/Modules/YMMine/View/SubViews/CPCard.m index 06e7fe36..c1ae8094 100644 --- a/YuMi/Modules/YMMine/View/SubViews/CPCard.m +++ b/YuMi/Modules/YMMine/View/SubViews/CPCard.m @@ -169,8 +169,9 @@ self.bottomLabel.hidden = ![relationUser isEmptyRelation]; self.bottomImageView.hidden = [relationUser isEmptyRelation]; - self.avatarView.imageUrl = relationUser.avatar; + self.avatarView.imageUrl = [NSString isEmpty:relationUser.avatar] ? self.usersAvatar : relationUser.avatar; self.avatarView_cp.imageUrl = relationUser.cpAvatar; + self.avatarView_cp.hidden = [NSString isEmpty:relationUser.cpAvatar]; self.topLabel.text = [NSString stringWithFormat:@"%ld days", (long)relationUser.cpDay]; NSString *imagePath = [NSString stringWithFormat:@"cp_relationship_lv_%ld", self.relationUser.cpLevel]; @@ -216,16 +217,21 @@ - (void)updateCPBG { NSString *baseName = self.isListItem ? @"cp_relationship_bg" : @"cp_bg"; switch (self.relationUser.relationNameType) { + case CP_TYPE_CP: + self.progressView.progressTintColor = UIColorFromRGB(0xff7330); + break; case CP_TYPE_BRO: + self.progressView.progressTintColor = UIColorFromRGB(0x2e65ff); baseName = [baseName stringByAppendingString:@"_bro"]; break; case CP_TYPE_SISTER: + self.progressView.progressTintColor = UIColorFromRGB(0xf369b5); baseName = [baseName stringByAppendingString:@"_sister"]; break; case CP_TYPE_FRIEND: + self.progressView.progressTintColor = UIColorFromRGB(0xa353ff); baseName = [baseName stringByAppendingString:@"_friends"]; break; - case CP_TYPE_CP: default: break; } diff --git a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.h b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.h index fe49dfdd..0ed1fb43 100644 --- a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.h +++ b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.h @@ -15,15 +15,15 @@ NS_ASSUME_NONNULL_BEGIN ///去房间 - (void)xPMineUserInfoHeaderView:(XPMineUserInfoHeaderView *)view didClickGoToRoom:(NSString *)roomUid; -@optional -///播放声音,播放或关闭 -- (void)xPMineUserInfoHeaderView:(XPMineUserInfoHeaderView *)view didClickPlaySound:(BOOL)isPlay; -///去录音VC -//- (void)didClickGoToPlaySound; -///去标签页 -- (void)xPMineUserInfoHeaderView:(XPMineUserInfoHeaderView *)view didClickGotoEditView:(NSMutableArray *)itemList; -///去标签vc -- (void)xPMineUserInfoHeaderView:(XPMineUserInfoHeaderView *)view didClickGotoEditVC:(NSMutableArray *)itemList; +//@optional +/////播放声音,播放或关闭 +//- (void)xPMineUserInfoHeaderView:(XPMineUserInfoHeaderView *)view didClickPlaySound:(BOOL)isPlay; +/////去录音VC +////- (void)didClickGoToPlaySound; +/////去标签页 +//- (void)xPMineUserInfoHeaderView:(XPMineUserInfoHeaderView *)view didClickGotoEditView:(NSMutableArray *)itemList; +/////去标签vc +//- (void)xPMineUserInfoHeaderView:(XPMineUserInfoHeaderView *)view didClickGotoEditVC:(NSMutableArray *)itemList; @end @interface XPMineUserInfoHeaderView : UIView @@ -35,10 +35,11 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,copy) NSString *roomUid; @property (nonatomic, strong) RelationUserVO *relationUser; +@property (nonatomic, copy) NSArray *cpUsers; @property (nonatomic, copy) NSArray *nameplateList; -+ (CGFloat)headerHeight:(UserInfoModel *)model; ++ (CGFloat)headerHeight:(UserInfoModel *)model cps:(NSInteger)cps; @end diff --git a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m index 04523a94..2f8a828c 100644 --- a/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m +++ b/YuMi/Modules/YMMine/View/SubViews/MineInfo/XPMineUserInfoHeaderView.m @@ -28,7 +28,6 @@ #import "CPCard.h" #import "XPBeautIDView.h" #import "CPListViewController.h" -#import "XPMineUserInfoHeaderTagView.h" ///Model #import "UserInfoModel.h" @@ -83,7 +82,6 @@ @interface XPMineUserInfoHeaderView ()< SDCycleScrollViewDelegate, SDPhotoBrowserDelegate, -XPMineUserInfoHeaderTagViewDelegate, UICollectionViewDataSource, UICollectionViewDelegateFlowLayout, HWDMP4PlayDelegate> @@ -161,7 +159,10 @@ HWDMP4PlayDelegate> @property (nonatomic, strong) UILabel *fansNum; @property (nonatomic, strong) UILabel *followersNum; -@property (nonatomic, strong) CPCard *cpCard; +@property (nonatomic, strong) CPCard *cpCard_1; +@property (nonatomic, strong) CPCard *cpCard_2; +@property (nonatomic, strong) CPCard *cpCard_3; +@property (nonatomic, strong) CPCard *cpCard_4; @property (nonatomic, strong) UIButton *cpListButton; @property (nonatomic, strong) UICollectionView *nameplateCollectionView; @@ -213,7 +214,7 @@ HWDMP4PlayDelegate> return namePlateHeight; } -+ (CGFloat)headerHeight:(UserInfoModel *)model { ++ (CGFloat)headerHeight:(UserInfoModel *)model cps:(NSInteger)cps { CGFloat height = 0; NSInteger numberOfLines = 1; CGFloat lineHeight = 0; @@ -238,8 +239,14 @@ HWDMP4PlayDelegate> } // topAlbum + cp + name plate area + line contents + others - height = kGetScaleWidth(195) + 160 + [self namePlateHeight:model.userNameplateList] + (lineHeight * numberOfLines) + kGetScaleWidth(220); - + height = kGetScaleWidth(195) + 160 + [self namePlateHeight:model.userNameplateList] + (lineHeight * numberOfLines) + kGetScaleWidth(80); + if (cps == 0) { + cps = 1; + } + if (cps > 0) { + height = height + kGetScaleWidth(135) * cps + 10 * cps; + } + return height; } @@ -277,8 +284,6 @@ HWDMP4PlayDelegate> [self setupNameArea]; -// [self setupIDArea]; - [self setupNameplateArea]; [self setupLocateArea]; @@ -427,35 +432,35 @@ HWDMP4PlayDelegate> _stack = [[UIStackView alloc] init]; self.stack.axis = UILayoutConstraintAxisHorizontal; self.stack.distribution = UIStackViewDistributionFill; - self.stack.alignment = UIStackViewAlignmentCenter; + self.stack.alignment = UIStackViewAlignmentLeading; self.stack.spacing = 4; - if (self.userInfo.guildNameplateIcon.length > 0) { - scrollView.translatesAutoresizingMaskIntoConstraints = NO; - [self.userInfoView addSubview:scrollView]; - [scrollView mas_makeConstraints:^(MASConstraintMaker *make) { - make.leading.mas_equalTo(kGetScaleWidth(15)); - make.trailing.mas_equalTo(kGetScaleWidth(-15)); - make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(5); - make.height.mas_equalTo(24); - }]; - [scrollView addSubview:self.stack]; - [self.stack mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.equalTo(scrollView); // 内容视图的边缘与滚动视图一致 - make.height.equalTo(scrollView); // 高度与滚动视图一致,确保仅水平滚动 - }]; - - if (isMSRTL()) { - _idEmptyView = [[UIView alloc] init]; - } - } else { +// if (self.userInfo.guildNameplateIcon.length > 0) { +// scrollView.translatesAutoresizingMaskIntoConstraints = NO; +// [self.userInfoView addSubview:scrollView]; +// [scrollView mas_makeConstraints:^(MASConstraintMaker *make) { +// make.leading.mas_equalTo(kGetScaleWidth(15)); +// make.trailing.mas_equalTo(kGetScaleWidth(-15)); +// make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(5); +// make.height.mas_equalTo(24); +// }]; +// [scrollView addSubview:self.stack]; +// [self.stack mas_makeConstraints:^(MASConstraintMaker *make) { +// make.edges.equalTo(scrollView); // 内容视图的边缘与滚动视图一致 +// make.height.equalTo(scrollView); // 高度与滚动视图一致,确保仅水平滚动 +// }]; +// +//// if (isMSRTL()) { +//// _idEmptyView = [[UIView alloc] init]; +//// } +// } else { [self.userInfoView addSubview:self.stack]; [self.stack mas_makeConstraints:^(MASConstraintMaker *make) { make.leading.mas_equalTo(kGetScaleWidth(15)); make.top.mas_equalTo(self.nickStackView.mas_bottom).offset(5); make.height.mas_equalTo(24); }]; - } +// } [self.stack addArrangedSubview:self.beautIDView]; [self.stack addArrangedSubview:self.idLabel]; @@ -607,13 +612,34 @@ HWDMP4PlayDelegate> make.width.height.mas_equalTo(22); }]; self.cpListButton = cpListButton; - - [self.userInfoView addSubview:self.cpCard]; - [self.cpCard mas_makeConstraints:^(MASConstraintMaker *make) { + + [self.userInfoView addSubview:self.cpCard_1]; + [self.cpCard_1 mas_makeConstraints:^(MASConstraintMaker *make) { make.top.mas_equalTo(titleLabel.mas_bottom).offset(3); make.width.mas_equalTo(self.userInfoView); make.height.mas_equalTo(kGetScaleWidth(135)); }]; + + [self.userInfoView addSubview:self.cpCard_2]; + [self.cpCard_2 mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.cpCard_1.mas_bottom).offset(12); + make.width.mas_equalTo(self.userInfoView); + make.height.mas_equalTo(kGetScaleWidth(135)); + }]; + + [self.userInfoView addSubview:self.cpCard_3]; + [self.cpCard_3 mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.cpCard_2.mas_bottom).offset(12); + make.width.mas_equalTo(self.userInfoView); + make.height.mas_equalTo(kGetScaleWidth(135)); + }]; + + [self.userInfoView addSubview:self.cpCard_4]; + [self.cpCard_4 mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.cpCard_3.mas_bottom).offset(12); + make.width.mas_equalTo(self.userInfoView); + make.height.mas_equalTo(kGetScaleWidth(135)); + }]; } #pragma mark - UICollectionView Delegate & DataSource @@ -666,12 +692,6 @@ HWDMP4PlayDelegate> pasteboard. string = [NSString stringWithFormat:@"%ld", (long)_userInfo.erbanNo]; } -#pragma mark - XPMineUserInfoHeaderTagView -- (void)didClickGotoEditVC{ - if(self.delegate && [self.delegate respondsToSelector:@selector(xPMineUserInfoHeaderView:didClickGotoEditVC:)]){ - [self.delegate xPMineUserInfoHeaderView:self didClickGotoEditVC:@[].mutableCopy]; - } -} #pragma mark - Event Response -(void)clickAvatarAction{ SDPhotoBrowser *browser = [[SDPhotoBrowser alloc]init]; @@ -867,6 +887,38 @@ HWDMP4PlayDelegate> } } +- (void)setCpUsers:(NSArray *)cpUsers { + _cpUsers = cpUsers; + RelationUserVO *vo_1 = [cpUsers xpSafeObjectAtIndex:0]; + self.cpCard_1.usersAvatar = self.userInfo.avatar; + if (vo_1) { + [self.cpCard_1 updateForUserPage:vo_1]; + } else { + [self.cpCard_1 updateForUserPage:self.relationUser]; + } + + RelationUserVO *vo_2 = [cpUsers xpSafeObjectAtIndex:1]; + self.cpCard_2.usersAvatar = self.userInfo.avatar; + [self.cpCard_2 setHidden:!vo_2]; + if (vo_2) { + [self.cpCard_2 updateForUserPage:vo_2]; + } + + RelationUserVO *vo_3 = [cpUsers xpSafeObjectAtIndex:2]; + self.cpCard_3.usersAvatar = self.userInfo.avatar; + [self.cpCard_3 setHidden:!vo_3]; + if (vo_3) { + [self.cpCard_3 updateForUserPage:vo_3]; + } + + RelationUserVO *vo_4 = [cpUsers xpSafeObjectAtIndex:3]; + self.cpCard_4.usersAvatar = self.userInfo.avatar; + [self.cpCard_4 setHidden:!vo_4]; + if (vo_4) { + [self.cpCard_4 updateForUserPage:vo_4]; + } +} + - (void)setRelationUser:(RelationUserVO *)relationUser { _relationUser = relationUser; BOOL hideCPAvatarContent = NO; @@ -887,9 +939,6 @@ HWDMP4PlayDelegate> self.cpAvatarFlag.hidden = hideCPAvatarContent; self.headWearSvgaImageView_cp.hidden = hideCPAvatarContent; - self.cpCard.isListItem = NO; - self.cpCard.usersAvatar = self.userInfo.avatar; - [self.cpCard updateForUserPage:relationUser]; self.avatarView_cp.imageUrl = relationUser.cpAvatar; NSString *imagePath = [NSString stringWithFormat:@"cp_avatar_flag_lv_%ld", relationUser.cpLevel]; @@ -1247,8 +1296,6 @@ HWDMP4PlayDelegate> return _agentPlateImageView; } - - - (UIImageView *)newUserImageView { if (!_newUserImageView) { _newUserImageView = [[UIImageView alloc] init]; @@ -1293,6 +1340,7 @@ HWDMP4PlayDelegate> } return _avatarPhoto; } + -(NetImageView *)avatarView{ if (!_avatarView){ NetImageConfig * config = [[NetImageConfig alloc] init]; @@ -1437,11 +1485,39 @@ HWDMP4PlayDelegate> return _headWearSvgaImageView_cp; } -- (CPCard *)cpCard { - if (!_cpCard) { - _cpCard = [[CPCard alloc] init]; +- (CPCard *)cpCard_1 { + if (!_cpCard_1) { + _cpCard_1 = [[CPCard alloc] init]; + _cpCard_1.isListItem = NO; } - return _cpCard; + return _cpCard_1; +} + +- (CPCard *)cpCard_2 { + if (!_cpCard_2) { + _cpCard_2 = [[CPCard alloc] init]; + _cpCard_2.isListItem = NO; + _cpCard_2.hidden = YES; + } + return _cpCard_2; +} + +- (CPCard *)cpCard_3 { + if (!_cpCard_3) { + _cpCard_3 = [[CPCard alloc] init]; + _cpCard_3.isListItem = NO; + _cpCard_3.hidden = YES; + } + return _cpCard_3; +} + +- (CPCard *)cpCard_4 { + if (!_cpCard_4) { + _cpCard_4 = [[CPCard alloc] init]; + _cpCard_4.isListItem = NO; + _cpCard_4.hidden = YES; + } + return _cpCard_4; } - (UIImageView *)cpAvatarHeart { diff --git a/YuMi/Modules/YMNewHome/Model/HomePlayRoomModel.h b/YuMi/Modules/YMNewHome/Model/HomePlayRoomModel.h index 7cd11efd..669c757c 100644 --- a/YuMi/Modules/YMNewHome/Model/HomePlayRoomModel.h +++ b/YuMi/Modules/YMNewHome/Model/HomePlayRoomModel.h @@ -89,7 +89,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic,copy) NSString *uid; @property(nonatomic,copy) NSString *erbanNo; - +@property (nonatomic, copy) NSNumber *aiLevel; // > 0 为机器人 @end diff --git a/YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.h b/YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.h new file mode 100644 index 00000000..78a793e1 --- /dev/null +++ b/YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.h @@ -0,0 +1,24 @@ +// +// BravoGiftTabInfomationModel.h +// YuMi +// +// Created by P on 2025/4/14. +// + +#import "PIBaseModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface BravoGiftTabInfomationModel : PIBaseModel + +@property (nonatomic, copy) NSString *avatar; +@property (nonatomic, assign) NSInteger coin; +@property (nonatomic, assign) NSInteger erbainNo; +@property (nonatomic, assign) NSInteger giftId; +@property (nonatomic, copy) NSString *giftName; +@property (nonatomic, copy) NSString *nick; +@property (nonatomic, assign) NSInteger uid; + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.m b/YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.m new file mode 100644 index 00000000..38fad9a3 --- /dev/null +++ b/YuMi/Modules/YMRoom/Model/BravoGiftTabInfomationModel.m @@ -0,0 +1,12 @@ +// +// BravoGiftTabInfomationModel.m +// YuMi +// +// Created by P on 2025/4/14. +// + +#import "BravoGiftTabInfomationModel.h" + +@implementation BravoGiftTabInfomationModel + +@end diff --git a/YuMi/Modules/YMRoom/Model/RoomInfoModel.h b/YuMi/Modules/YMRoom/Model/RoomInfoModel.h index d25efa74..f2e9d4fb 100644 --- a/YuMi/Modules/YMRoom/Model/RoomInfoModel.h +++ b/YuMi/Modules/YMRoom/Model/RoomInfoModel.h @@ -92,11 +92,8 @@ typedef NS_ENUM(NSInteger, RoomDatingStateChangeType) { @property (nonatomic , assign) NSInteger recomSeq; @property (nonatomic , assign) BOOL redEnvelopeOpen; @property (nonatomic , assign) NSInteger roomId; -@property (nonatomic , copy) NSString * meetingName; @property (nonatomic , assign) BOOL valid; -@property (nonatomic , assign) NSInteger openTime; @property (nonatomic , copy) NSString * tagPict; -@property (nonatomic , assign) BOOL isPureMode; @property (nonatomic , assign) NSInteger count; @property (nonatomic , assign) BOOL showGiftValue; @property (nonatomic , copy) NSString * avatar; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/BroveGiftWinningFlagView.h b/YuMi/Modules/YMRoom/View/AnimationView/BravoGiftWinningFlagView.h similarity index 74% rename from YuMi/Modules/YMRoom/View/AnimationView/BroveGiftWinningFlagView.h rename to YuMi/Modules/YMRoom/View/AnimationView/BravoGiftWinningFlagView.h index 669ebc78..cbfaa381 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/BroveGiftWinningFlagView.h +++ b/YuMi/Modules/YMRoom/View/AnimationView/BravoGiftWinningFlagView.h @@ -1,5 +1,5 @@ // -// BroveGiftWinningFlagView.h +// BravoGiftWinningFlagView.h // YuMi // // Created by P on 2025/3/25. @@ -9,7 +9,7 @@ @class AttachmentModel; NS_ASSUME_NONNULL_BEGIN -@interface BroveGiftWinningFlagViewModel : PIBaseModel +@interface BravoGiftWinningFlagViewModel : PIBaseModel @property (nonatomic, assign) NSInteger uid; @property (nonatomic, copy) NSArray *receiverUidList; @@ -21,9 +21,9 @@ NS_ASSUME_NONNULL_BEGIN @end -@interface BroveGiftWinningFlagView : UIView +@interface BravoGiftWinningFlagView : UIView -+ (BroveGiftWinningFlagViewModel *)display:(UIView *)superView ++ (BravoGiftWinningFlagViewModel *)display:(UIView *)superView with:(AttachmentModel *)attachment roomID:(NSInteger)roomID uID:(NSString *)UID; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/BroveGiftWinningFlagView.m b/YuMi/Modules/YMRoom/View/AnimationView/BravoGiftWinningFlagView.m similarity index 92% rename from YuMi/Modules/YMRoom/View/AnimationView/BroveGiftWinningFlagView.m rename to YuMi/Modules/YMRoom/View/AnimationView/BravoGiftWinningFlagView.m index 630c5fcd..2ec781df 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/BroveGiftWinningFlagView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/BravoGiftWinningFlagView.m @@ -1,24 +1,24 @@ // -// BroveGiftWinningFlagView.m +// BravoGiftWinningFlagView.m // YuMi // // Created by P on 2025/3/25. // -#import "BroveGiftWinningFlagView.h" +#import "BravoGiftWinningFlagView.h" #import "MoliMoneyLabel.h" #import "AttachmentModel.h" //{"data":"{\"uid\":3224,\"receiverUidList\":[3224],\"roomUid\":3184,\"tip\":{\"times\":\"0.70\",\"coins\":\"700.0\",\"level\":1},\"receiverProfit\":\"50.00\",\"roomId\":6076861580}","first":106,"second":1065} -@implementation BroveGiftWinningFlagViewModel +@implementation BravoGiftWinningFlagViewModel @end -@interface BroveGiftWinningFlagView () +@interface BravoGiftWinningFlagView () -@property (nonatomic, strong) BroveGiftWinningFlagViewModel *model; +@property (nonatomic, strong) BravoGiftWinningFlagViewModel *model; @property (nonatomic, strong) UIImageView *backgroundImageView; //@property (nonatomic, strong) MoliMoneyLabel *moneyLabel; @property (nonatomic, strong) UILabel *moneyLabel_2; @@ -26,15 +26,15 @@ @end -@implementation BroveGiftWinningFlagView +@implementation BravoGiftWinningFlagView -+ (BroveGiftWinningFlagViewModel *)display:(UIView *)superView with:(AttachmentModel *)attachment roomID:(NSInteger)roomID uID:(NSString *)UID { - BroveGiftWinningFlagViewModel *model = [BroveGiftWinningFlagViewModel modelWithJSON:attachment.data]; ++ (BravoGiftWinningFlagViewModel *)display:(UIView *)superView with:(AttachmentModel *)attachment roomID:(NSInteger)roomID uID:(NSString *)UID { + BravoGiftWinningFlagViewModel *model = [BravoGiftWinningFlagViewModel modelWithJSON:attachment.data]; if (model.roomId != roomID || model.uid != UID.integerValue || model.tip == nil) { return model; } - BroveGiftWinningFlagView *flagView = [[BroveGiftWinningFlagView alloc] init]; + BravoGiftWinningFlagView *flagView = [[BravoGiftWinningFlagView alloc] init]; flagView.model = model; flagView.alpha = 0; flagView.frame = CGRectMake(0, 0, kGetScaleWidth(274), kGetScaleWidth(216)); @@ -106,7 +106,7 @@ }]; } -- (void)setModel:(BroveGiftWinningFlagViewModel *)model { +- (void)setModel:(BravoGiftWinningFlagViewModel *)model { NSNumber *level = [model.tip objectForKey:@"level"]; NSString *times = [model.tip objectForKey:@"times"]; NSNumber *coins = [model.tip objectForKey:@"coins"]; diff --git a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m index 75208387..f15ea206 100644 --- a/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m +++ b/YuMi/Modules/YMRoom/View/AnimationView/RoomAnimationView.m @@ -45,9 +45,9 @@ #import "LuckyGiftWinningBannerView.h" #import "RoomHighValueGiftBannerAnimation.h" #import "LuckyPackageBannerView.h" -#import "BroveGiftBannerView.h" +#import "BravoGiftBannerView.h" #import "XCCurrentVCStackManager.h" -#import "BroveGiftWinningFlagView.h" +#import "BravoGiftWinningFlagView.h" #import "RoomEnterModel.h" // Old Methods @@ -572,7 +572,7 @@ XPRoomGraffitiGiftAnimationViewDelegate self.isRoomBannerV2Displaying = YES; @kWeakify(self); RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo; - [BroveGiftBannerView display:self.bannerContainer + [BravoGiftBannerView display:self.bannerContainer inRoomUid:roomInfo.uid with:obj complete:^{ @@ -673,17 +673,18 @@ XPRoomGraffitiGiftAnimationViewDelegate uID:[AccountInfoStorage instance].getUid]; } -- (void)receiveBroveGiftWinning:(AttachmentModel *)attachment { +- (void)receiveBravoGiftWinning:(AttachmentModel *)attachment { RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo; - BroveGiftWinningFlagViewModel *flagModel = [BroveGiftWinningFlagView display:self.topContainer + BravoGiftWinningFlagViewModel *flagModel = [BravoGiftWinningFlagView display:self.topContainer with:attachment roomID:roomInfo.roomId uID:[AccountInfoStorage instance].getUid]; - // 数据同步到 combo - [[NSNotificationCenter defaultCenter] postNotificationName:@"receiveLuckGiftWinning" object:[NSString stringByRemovingRedundantZeros:@(flagModel.receiverProfit).stringValue]]; if (flagModel.roomId != roomInfo.roomId || flagModel.uid != [AccountInfoStorage instance].getUid.integerValue) { return; } + // 数据同步到 combo + [[NSNotificationCenter defaultCenter] postNotificationName:@"receiveLuckGiftWinning" object:[NSString stringByRemovingRedundantZeros:@(flagModel.receiverProfit).stringValue]]; + if (!self.hostDelegate.getRoomInfo.hasAnimationEffect) { return; } @@ -977,7 +978,8 @@ XPRoomGraffitiGiftAnimationViewDelegate attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend || attachment.second == Custom_Message_Sub_Gift_LuckySend) { NSString * giftId = [NSString stringWithFormat:@"%ld", receiveInfo.luckyGiftList.giftList.firstObject.giftId]; - giftInfo = [[XPGiftStorage shareStorage] findGiftInfo:giftId inRoom:@(receiveInfo.roomUid).stringValue]; + NSString *roomUid = receiveInfo.roomUid == 0 ? receiveInfo.uid : @(receiveInfo.roomUid).stringValue; + giftInfo = [[XPGiftStorage shareStorage] findGiftInfo:giftId inRoom:roomUid]; } if (giftInfo == nil) { @@ -1718,7 +1720,7 @@ XPRoomGraffitiGiftAnimationViewDelegate [self handleBroveGiftBanner:attachment]; break; case Custom_Message_Sub_Super_Gift_UI_Rffect: - [self receiveBroveGiftWinning:attachment]; + [self receiveBravoGiftWinning:attachment]; default: break; } diff --git a/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m b/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m index a34ed727..284e5b5c 100644 --- a/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m +++ b/YuMi/Modules/YMRoom/View/BaseUIContainerView/XPRoomFunctionContainerView.m @@ -794,7 +794,7 @@ [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { if (error == nil) { NIMChatroomMember * member = [members firstObject]; - if (member.type == NIMTeamMemberTypeOwner) { + if (member.type == NIMChatroomMemberTypeCreator) { XPAnchorPKInviteView * inviteView = [[XPAnchorPKInviteView alloc] init]; inviteView.roomUid = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.uid]; inviteView.dataDic = attachment.data; @@ -813,7 +813,7 @@ [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { if (error == nil) { NIMChatroomMember * member = [members firstObject]; - if (member.type == NIMTeamMemberTypeOwner) { + if (member.type == NIMChatroomMemberTypeCreator) { AcrossRoomPKPanelModel * acrossPKPanelInfo = [AcrossRoomPKPanelModel modelWithJSON:attachment.data]; if (attachment.data[@"amicStatus"] != nil){ acrossPKPanelInfo.aMicStatus = [attachment.data[@"amicStatus"] intValue]; @@ -833,7 +833,7 @@ [[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray * _Nullable members) { if (error == nil) { NIMChatroomMember * member = [members firstObject]; - if (member.type == NIMTeamMemberTypeOwner) { + if (member.type == NIMChatroomMemberTypeCreator) { XPAcrossRoomPKInviteResultView * inviteResutView = [[XPAcrossRoomPKInviteResultView alloc] init]; inviteResutView.is_XP_Accept = NO; [self addSubview:inviteResutView]; diff --git a/YuMi/Modules/YMRoom/View/Common/BroveGiftBannerView.h b/YuMi/Modules/YMRoom/View/Common/BravoGiftBannerView.h similarity index 88% rename from YuMi/Modules/YMRoom/View/Common/BroveGiftBannerView.h rename to YuMi/Modules/YMRoom/View/Common/BravoGiftBannerView.h index d9ba2b0b..6e5b0596 100644 --- a/YuMi/Modules/YMRoom/View/Common/BroveGiftBannerView.h +++ b/YuMi/Modules/YMRoom/View/Common/BravoGiftBannerView.h @@ -4,7 +4,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface BroveGiftBannerView : UIView +@interface BravoGiftBannerView : UIView + (void)display:(UIView *)superView diff --git a/YuMi/Modules/YMRoom/View/Common/BroveGiftBannerView.m b/YuMi/Modules/YMRoom/View/Common/BravoGiftBannerView.m similarity index 95% rename from YuMi/Modules/YMRoom/View/Common/BroveGiftBannerView.m rename to YuMi/Modules/YMRoom/View/Common/BravoGiftBannerView.m index 0524c4c1..93f0a45b 100644 --- a/YuMi/Modules/YMRoom/View/Common/BroveGiftBannerView.m +++ b/YuMi/Modules/YMRoom/View/Common/BravoGiftBannerView.m @@ -1,4 +1,4 @@ -#import "BroveGiftBannerView.h" +#import "BravoGiftBannerView.h" #import "UserInfoModel.h" #import "AttachmentModel.h" #import @@ -8,7 +8,7 @@ //{"data":"{\"times\":\"1.65\",\"sender\":{\"avatar\":\"https://image.pekolive.com/14a8039a-df7f-4a4b-a6b9-99c6d3f9918e.gif\",\"erbanNo\":6228657,\"gender\":1,\"nick\":\"Molistar\",\"uid\":3224},\"coins\":\"1650.0\",\"giftPic\":\"https://image.pekolive.com/1000.png\",\"giftNameMap\":{\"ar\":\"lucky1000\",\"en\":\"lucky1000\",\"zh\":\"lucky1000\",\"tr\":\"lucky1000\"},\"roomUid\":3224}","first":106,"second":1066} -@interface BroveGiftBannerViewModel : PIBaseModel +@interface BravoGiftBannerViewModel : PIBaseModel @property (nonatomic, assign, readonly) CGFloat times; @property (nonatomic, assign, readonly) CGFloat coins; @@ -19,13 +19,13 @@ @end -@implementation BroveGiftBannerViewModel +@implementation BravoGiftBannerViewModel @end -@interface BroveGiftBannerView () -@property (nonatomic, strong) BroveGiftBannerViewModel *model; +@interface BravoGiftBannerView () +@property (nonatomic, strong) BravoGiftBannerViewModel *model; @property (nonatomic, strong) NetImageView *sendAvatarImageView; @property (nonatomic, strong) NetImageView *giftImageView; @property (nonatomic, strong) UILabel *goldNumLabel; @@ -37,16 +37,16 @@ @property (nonatomic, copy) void(^exitCurrentRoom)(void); @end -@implementation BroveGiftBannerView +@implementation BravoGiftBannerView + (void)display:(UIView *)superView inRoomUid:(NSInteger)roomUid with:(AttachmentModel *)attachment complete:(void (^)(void))complete exitCurrentRoom:(void(^)(void))exit { - BroveGiftBannerViewModel *model = [BroveGiftBannerViewModel modelWithDictionary:attachment.data]; + BravoGiftBannerViewModel *model = [BravoGiftBannerViewModel modelWithDictionary:attachment.data]; CGRect frame = CGRectMake(KScreenWidth, 0, KScreenWidth, kGetScaleWidth(90)); - BroveGiftBannerView *banner = [[BroveGiftBannerView alloc] initWithFrame:frame]; + BravoGiftBannerView *banner = [[BravoGiftBannerView alloc] initWithFrame:frame]; banner.model = model; banner.completeDisplay = complete; banner.exitCurrentRoom = exit; @@ -78,7 +78,7 @@ exitCurrentRoom:(void(^)(void))exit { }]; } -- (void)setModel:(BroveGiftBannerViewModel *)model { +- (void)setModel:(BravoGiftBannerViewModel *)model { self.sendAvatarImageView.imageUrl = model.sender.avatar; self.giftImageView.imageUrl = model.giftPic; self.goldNumLabel.text = [NSString stringByRemovingRedundantZeros:@(model.coins).stringValue]; diff --git a/YuMi/Modules/YMRoom/View/Custom Background/CustomRoomBGContentViewController.m b/YuMi/Modules/YMRoom/View/Custom Background/CustomRoomBGContentViewController.m index 4f38cfd8..8903199f 100644 --- a/YuMi/Modules/YMRoom/View/Custom Background/CustomRoomBGContentViewController.m +++ b/YuMi/Modules/YMRoom/View/Custom Background/CustomRoomBGContentViewController.m @@ -464,7 +464,6 @@ @kWeakify(self); [self.presenter uploadRoomBG:self.roomUID photo:self.customSelectedImage complete:^{ @kStrongify(self); - // TODO: 跳转到 custom tab [self hideHUD]; [self didTapCancelPreview]; self.jumpToTab = 3; @@ -489,7 +488,6 @@ @kWeakify(self); [self.presenter deleteRoomBG:self.roomUID itemID:@(model.id).stringValue complete:^{ @kStrongify(self); - //TODO: 跳轉到 custom [self setupData]; } failure:^{ }]; } diff --git a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.h b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.h index e6c9aa53..a1a40c67 100644 --- a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.h +++ b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.h @@ -18,6 +18,7 @@ typedef NS_ENUM(NSInteger, MSRoomMenuType) { @interface MSRoomMenuGameVC : MvpViewController +@property (nonatomic, copy) void(^updatePlayListAndGameList)(NSArray *playList, NSArray *gameList); - (instancetype)initWithDelegate:(id)delegate roomMenuType:(MSRoomMenuType)type; //- (instancetype)initWithDelegate:(id)delegate; @end diff --git a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.m b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.m index d13bd7ca..d48d4671 100644 --- a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.m +++ b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameVC.m @@ -25,12 +25,15 @@ #import "Api+LittleGame.h" #import "Api+RoomSetting.h" #import "UserInfoModel.h" +#import @interface MSRoomMenuGameVC () @property(nonatomic,strong) MSRoomMenuGameView *gameView; @property(nonatomic, assign) MSRoomMenuType type; ///host 代理 @property (nonatomic,weak) idhostDelegate; + +@property (nonatomic, assign) CGPoint startTouchPoint; @end @implementation MSRoomMenuGameVC @@ -59,11 +62,56 @@ - (BOOL)isHiddenNavBar { return YES; } + - (void)viewDidLoad { [super viewDidLoad]; [self installUI]; [self installConstraints]; [self loadMenuData]; + [self addTargetViewSwipeDownGesture]; +} + +- (void)addTargetViewSwipeDownGesture { + // 创建下滑手势识别器 + UIPanGestureRecognizer *pan = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handlePan:)]; + + // 将手势添加到目标视图 + [self.gameView addGestureRecognizer:pan]; +} + +- (void)handlePan:(UIPanGestureRecognizer *)gesture { + // 获取触摸点 + CGPoint touchPoint = [gesture locationInView:self.gameView]; + switch (gesture.state) { + case UIGestureRecognizerStateBegan: + // 记录起始触摸点 + self.startTouchPoint = touchPoint; + break; + case UIGestureRecognizerStateChanged: { + // 计算滑动距离 + CGFloat distance = touchPoint.y - self.startTouchPoint.y; + + // 判断滑动方向是否向下 + if (distance > 0) { + // 判断滑动距离是否超过阈值 + if (distance >= 150.0) { + [self handleSwipeDown]; + } + } + } + break; + case UIGestureRecognizerStateEnded: + // 重置起始触摸点 + self.startTouchPoint = CGPointZero; + break; + default: + break; + } +} + +- (void)handleSwipeDown { + // 处理下滑手势 + [self dismissViewControllerAnimated:YES completion:nil]; } - (void)loadMenuData { @@ -72,28 +120,67 @@ [self updateGamePlayList:@[]]; break; case MSRoomMenuTypeGame: - case MSRoomMenuTypeLittleGame: + case MSRoomMenuTypeLittleGame:{ [self getGameData]; [self getLittleGameList]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self updateGameModels]; + }); + } break; default: break; } } +- (void)updateGameModels { + RACSubject* playRAC = [RACSubject subject]; + RACSubject* littleGameRAC = [RACSubject subject]; + + @kWeakify(self); + [[RACSignal combineLatest:@[playRAC, + littleGameRAC] + reduce:^id(NSArray *playModels, + NSArray *littleGameModels){ + @kStrongify(self); + [self.gameView updateDataSource:playModels gameList:littleGameModels]; + if (self.updatePlayListAndGameList) { + self.updatePlayListAndGameList(playModels, littleGameModels); + } + return nil; + }] subscribeError:^(NSError * _Nullable error) { + [XNDJTDDLoadingTool showErrorWithMessage:error.domain]; + }]; + + RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo; + NSString * roomId = [NSString stringWithFormat:@"%ld", roomInfo.uid]; + [Api getPlayList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSArray * array = [ActivityInfoModel modelsWithArray:data.data]; + [playRAC sendNext:array]; + [playRAC sendCompleted]; + } else { + [playRAC sendError:[NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]]; + } + } roomId:roomId]; + + NSString *roomUid = [NSString stringWithFormat:@"%ld", + self.hostDelegate.getRoomInfo.uid]; + [Api getLittleGameList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + if (code == 200) { + NSArray * array = [LittleGameInfoModel modelsWithArray:data.data]; + [littleGameRAC sendNext:array]; + [littleGameRAC sendCompleted]; + } else { + [littleGameRAC sendError:[NSError errorWithDomain:[NSString isEmpty:msg] ? @"" : msg code:code userInfo:nil]]; + } + } roomUid:roomUid]; +} + -(void)getGameData{ NSMutableArray *resourceList = [self.hostDelegate getPlayList]; if(resourceList.count > 0){ self.gameView.playList = resourceList; - } else { - NSString * roomId = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.roomId]; - @kWeakify(self); - [Api getPlayList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { - if (code == 200) { - @kStrongify(self); - self.gameView.playList = [[ActivityInfoModel modelsWithArray:data.data] mutableCopy]; - } - } roomId:roomId]; } } @@ -128,16 +215,6 @@ NSMutableArray *resourceList = [self.hostDelegate getLittleGameList]; if(resourceList.count > 0){ self.gameView.littleGameList = resourceList; - } else { - @kWeakify(self); - [Api getLittleGameList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { - if (code == 200) { - @kStrongify(self); - NSArray * array = [LittleGameInfoModel modelsWithArray:data.data]; - self.gameView.littleGameList = array.mutableCopy; - } - } - roomUid:@""]; } } diff --git a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.h b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.h index fe82dcf1..085b3fcd 100644 --- a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.h +++ b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.h @@ -23,6 +23,9 @@ NS_ASSUME_NONNULL_BEGIN @property(nonatomic,strong) NSMutableArray *littleGameList; @property (nonatomic, strong) NSMutableArray *dataSource; @property(nonatomic,weak) iddelegate; + +- (void)updateDataSource:(NSArray *)playList gameList:(NSArray *)littleGameList; + @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m index 2eab2c96..ba8b1ac3 100644 --- a/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m +++ b/YuMi/Modules/YMRoom/View/MenuContainerView/MSRoomMenuGameView.m @@ -84,6 +84,18 @@ static const NSInteger kItemsPerRow = 5; }); } +- (void)updateDataSource:(NSArray *)playList gameList:(NSArray *)littleGameList { + _playList = playList.mutableCopy; + _littleGameList = littleGameList.mutableCopy; + self.dataSource = [NSMutableArray array]; + [self.dataSource addObjectsFromArray:playList]; + [self.dataSource addObjectsFromArray:littleGameList]; + [self updateViewHeightWithItemCount:self.dataSource.count]; + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + [self.collectionView reloadData]; + }); +} + - (void)updateViewHeightWithItemCount:(NSInteger)count { if (count == 0) { return; diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/Model/XPMessageInfoModel.h b/YuMi/Modules/YMRoom/View/MessageContainerView/Model/XPMessageInfoModel.h index 5519235c..30b28788 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/Model/XPMessageInfoModel.h +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/Model/XPMessageInfoModel.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN @interface XPMessageInfoModel : PIBaseModel - +@property(nonatomic,assign) BOOL isChatHall; @property(nonatomic,assign) BOOL isBoom; @property(nonatomic,strong) PIRoomPhotoAlbumItemModel *albumModel; @property(nonatomic,copy) NSString *vipIcon; diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.h b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.h index a20bac8b..ef3de88e 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.h +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.h @@ -15,7 +15,7 @@ NS_ASSUME_NONNULL_BEGIN - (XPMessageInfoModel*)parseMessageAttribute:(NIMMessage *)message; - (NSString *)parseMessageBubble:(NIMMessage *)message; - +- (XPMessageInfoModel*)parseMessageAttributeForChatHall:(NIMMessage *)message; - (XPMessageInfoModel*)parseBroadcastMessageAttribute:(NIMBroadcastMessage *)message; ///房间的代理 diff --git a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m index 50c95c1d..a3d5ae72 100644 --- a/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m +++ b/YuMi/Modules/YMRoom/View/MessageContainerView/Tool/XPRoomMessageParser.m @@ -59,6 +59,29 @@ @implementation XPRoomMessageParser +- (XPMessageInfoModel*)parseMessageAttributeForChatHall:(NIMMessage *)message{ + NIMMessageType messageType = message.messageType; + XPMessageInfoModel * messageInfo = [[XPMessageInfoModel alloc] init]; + messageInfo.isChatHall = YES; + switch (messageType) { + case NIMMessageTypeText: + { + XPMessageInfoModel *model = [self makeChatAttribute:message messageInfo:messageInfo]; + return model != nil ? model : [XPMessageInfoModel new]; + break; + } + + case NIMMessageTypeCustom: + { + XPMessageInfoModel *model = [self makeCustomAttribute:message messageInfo:messageInfo]; + return model != nil ? model : [XPMessageInfoModel new]; + break; + } + default: + return [XPMessageInfoModel new]; + } +} + - (XPMessageInfoModel*)parseBroadcastMessageAttribute:(NIMBroadcastMessage *)message { if (message.content) { NSDictionary *msgDictionary = [message.content toJSONObject]; @@ -1313,7 +1336,8 @@ GiftReceiveInfoModel *info = [GiftReceiveInfoModel modelWithJSON:attachment.data]; GiftInfoModel *giftInfo = info.gift == nil ? info.giftInfo : info.gift; if (giftInfo == nil) { - giftInfo = [[XPGiftStorage shareStorage] findGiftInfo:info.giftId inRoom:@(info.roomUid).stringValue]; + NSString *roomUid = info.roomUid == 0 ? info.uid : @(info.roomUid).stringValue; + giftInfo = [[XPGiftStorage shareStorage] findGiftInfo:info.giftId inRoom:roomUid]; } ///官方新用户 @@ -1378,8 +1402,9 @@ [attribute appendAttributedString:[self createSapceAttribute:2]]; [info.luckyGiftList.giftList enumerateObjectsUsingBlock:^(GiftListsInfo * _Nonnull giftListInfo, NSUInteger idx, BOOL * _Nonnull stop) { + NSString *roomUid = info.roomUid == 0 ? info.uid : @(info.roomUid).stringValue; GiftInfoModel *luckGiftInfo = [[XPGiftStorage shareStorage] findGiftInfo:[NSString stringWithFormat:@"%ld", giftListInfo.giftId] - inRoom:@(info.roomUid).stringValue]; + inRoom:roomUid]; // 价值 [attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser104") color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]]; [attribute appendAttributedString:[self createSapceAttribute:2]]; diff --git a/YuMi/Modules/YMRoom/View/RoomGame/Model/MSRoomGameModel.h b/YuMi/Modules/YMRoom/View/RoomGame/Model/MSRoomGameModel.h index c86d3132..8339e05f 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/Model/MSRoomGameModel.h +++ b/YuMi/Modules/YMRoom/View/RoomGame/Model/MSRoomGameModel.h @@ -37,6 +37,8 @@ typedef enum : NSUInteger { @property(nonatomic,strong) HomePlayMicUserModel *micUser; @property(nonatomic,assign) int posState; @property(nonatomic,assign) int position; + + @end @interface MSRoomGameInfoModel : PIBaseModel @@ -50,8 +52,6 @@ typedef enum : NSUInteger { @property(nonatomic,assign) MSRoomGameInfoModelType matchStatus; @property(nonatomic,copy) NSString *matchRoundId; - - @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/MSRoomGameVC.m b/YuMi/Modules/YMRoom/View/RoomGame/View/MSRoomGameVC.m index 35f3daf5..2024291f 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/MSRoomGameVC.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/MSRoomGameVC.m @@ -31,6 +31,7 @@ @property(nonatomic,strong) MSRoomGameView *roomGameView; @property(nonatomic,strong) WalletInfoModel *coinModel; @property(nonatomic,assign) BOOL isShowResults; +@property (nonatomic, strong) MSRoomGameModel *roomGameModel; @end @implementation MSRoomGameVC @@ -130,7 +131,8 @@ obj.avatar = self.headView.rivalModel.avatar; obj.nick = self.headView.rivalModel.nick; } - obj.winNum = obj.rank == 1 ? self.chooseGameModel.scores.firstObject : self.chooseGameModel.scores.lastObject; + obj.winNum = obj.rank == 1 ? self.roomGameModel.data.scores.firstObject : self.roomGameModel.data.scores.lastObject; +// obj.winNum = obj.rank == 1 ? self.chooseGameModel.scores.firstObject : self.chooseGameModel.scores.lastObject; } victoryView.delegate = self; victoryView.resultsList = list; @@ -154,7 +156,8 @@ } -(void)getRoomGameDetailsSuccessWithModel:(MSRoomGameModel *)model{ - if(model == nil && self.isShowResults == NO){ + if(model == nil && + self.isShowResults == NO){ [self quitGameActionWhenClose:YES]; return; } @@ -162,18 +165,33 @@ self.headView.userInfo = self.userinfo; self.roomId = model.roomId; [self enterNIMRoomWithRoomId:self.roomId]; -#if DEBUG - self.roomGameView.gameModel = model; - if(self.roomGameView.superview == nil){ - [self.bgImageView addSubview:self.roomGameView]; - [self.roomGameView mas_makeConstraints:^(MASConstraintMaker *make) { - make.edges.equalTo(self.bgImageView); - }]; - [self.roomGameView onRoomEntered]; - } - return; -#endif - if(model.data.matchStatus == MSRoomGameInfoModelMatchSuccessfully && model.data.roundStatus == 0){ +//#if DEBUG +// if(![self.roomId isEqualToString:model.roomId]){ +// [self.presenter exitNIMRoom:self.roomId]; +// self.roomId = model.roomId; +// [self enterNIMRoomWithRoomId:self.roomId]; +// } +// self.headView.roomGameModel = model; +// self.roomGameView.gameModel = model; +// if(self.roomGameView.superview == nil){ +// [self.bgImageView addSubview:self.roomGameView]; +// [self.roomGameView mas_makeConstraints:^(MASConstraintMaker *make) { +// make.edges.equalTo(self.bgImageView); +// }]; +// [self.roomGameView onRoomEntered]; +// } +//// self.roomGameView.gameModel = model; +//// if(self.roomGameView.superview == nil){ +//// [self.bgImageView addSubview:self.roomGameView]; +//// [self.roomGameView mas_makeConstraints:^(MASConstraintMaker *make) { +//// make.edges.equalTo(self.bgImageView); +//// }]; +//// [self.roomGameView onRoomEntered]; +//// } +// return; +//#endif + if(model.data.matchStatus == MSRoomGameInfoModelMatchSuccessfully && + model.data.roundStatus == 0){ self.roomGameView.gameModel = model; if(self.roomGameView.superview == nil){ [self.bgImageView addSubview:self.roomGameView]; @@ -274,6 +292,7 @@ #pragma mark - NIMChatManagerDelegate - (void)onRecvMessages:(NSArray *)messages { for (NIMMessage * message in messages) { + NSLog(@" --- Game Message Raw Attach Content: %@, %@, %ld", @(message.senderClientType), message.rawAttachContent, (long)message.messageType); // 非房间内消息不处理 if (message.session.sessionType != NIMSessionTypeChatroom) { continue; @@ -307,6 +326,7 @@ AttachmentModel * attachment = (AttachmentModel *)obj.attachment; if(attachment.first == CustomMessageType_Chat_Room_Game && attachment.second == Custom_Message_Sub_Room_Game_Match_Success){ MSRoomGameModel *model = [MSRoomGameModel modelWithJSON:attachment.data]; + self.roomGameModel = model; if(![self.roomId isEqualToString:model.roomId]){ [self.presenter exitNIMRoom:self.roomId]; self.roomId = model.roomId; @@ -322,9 +342,6 @@ [self.roomGameView onRoomEntered]; } }if(attachment.first == CustomMessageType_Chat_Room_Game && attachment.second == Custom_Message_Sub_Room_Game_Match_Fail){ -#if DEBUG - return; -#endif MSRoomGameQuitGameView *quitGameView = [[MSRoomGameQuitGameView alloc]initWithFrame:CGRectMake(0, 0, KScreenWidth, KScreenHeight)]; quitGameView.delegate = self; quitGameView.isNormalFail = YES; diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m index 21b10dc3..f535dbc1 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameHeadView.m @@ -133,7 +133,6 @@ _roomGameModel = roomGameModel; if(_roomGameModel == nil){ - return; } NSString *uid = [[AccountInfoStorage instance]getUid]; diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m index 43c46723..62cec8ff 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameMsgView.m @@ -108,11 +108,12 @@ dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ NSIndexPath *ip = [NSIndexPath indexPathForRow:self.datasource.count-1 inSection:0]; //取最后一行数据 [self.messageTableView scrollToRowAtIndexPath:ip atScrollPosition:UITableViewScrollPositionBottom animated:animated]; //滚动到最后一行 - }); + }); } } -(void)addRoomMessage:(NIMMessage *)msg{ + [self.datasource addObject:[self.messageParser parseMessageAttributeForChatHall:msg]]; [self.messageTableView reloadData]; [self scrollToBottom:YES]; } @@ -214,6 +215,7 @@ isHaveSave = YES; } if(isHaveSave == NO)return; + [self.datasource addObject:[self.messageParser parseMessageAttributeForChatHall:item]]; } - (void)handleNIMTextMessage:(NIMMessage *)message { [self addRoomMessage:message]; diff --git a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m index 81191689..0e58080a 100644 --- a/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m +++ b/YuMi/Modules/YMRoom/View/RoomGame/View/SubView/MSRoomGameView.m @@ -56,7 +56,9 @@ } - (void)initLittleGame { + @kWeakify(self); [Api getSudGameCode:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { + @kStrongify(self); if (code == 200) { NSString * gameCode = data.data[@"code"]; self.code = gameCode; @@ -68,13 +70,13 @@ } - (void)gameSetUp { - // NSLog(@"小游戏的版本号是:%@", [SudMGP getVersion]); + // nslog(@"小游戏的版本号是:%@", [SudMGP getVersion]); BOOL isTestEnv = NO; -//#ifdef DEBUG -// isTestEnv = YES; -//#else -// isTestEnv = NO; -//#endif +#ifdef DEBUG + isTestEnv = YES; +#else + isTestEnv = NO; +#endif if(isEnterprise == NO){ [[SudMGP getCfg]setBackgroundMode:NO]; } @@ -88,7 +90,7 @@ } NSString * userId = [AccountInfoStorage instance].getUid; NSString * roomId = self.gameModel.roomId; - NSLog(@"用户ID:%@,房间ID:%@, 游戏ID:%lld, code:%@", userId, roomId, self.currentmgId, self.code); + // nslog(@"用户ID:%@,房间ID:%@, 游戏ID:%lld, code:%@", userId, roomId, self.currentmgId, self.code); NSString *language = [NSBundle getLanguageText]; if ([language hasPrefix:@"zh"]) { @@ -103,7 +105,7 @@ self.fsmAPP2MG = [SudMGP loadMG:userId roomId:roomId code:self.code mgId:self.currentmgId language:language fsmMG:self rootView:self]; } else { /// 初始化失败, 可根据业务重试 - NSLog(@"ISudFSMMG:initGameSDKWithAppID:初始化sdk失败 :%@",retMsg); + // nslog(@"ISudFSMMG:initGameSDKWithAppID:初始化sdk失败 :%@",retMsg); } }]; } @@ -155,7 +157,7 @@ * 游戏日志 */ -(void)onGameLog:(NSString*)dataJson { - NSLog(@"ISudFSMMG:onGameLog:%@", dataJson); + // nslog(@"ISudFSMMG:onGameLog:%@", dataJson); NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; NSString * msg_string = [dic objectForKey:@"msg"]; if (!msg_string) { @@ -167,16 +169,16 @@ * 游戏开始 */ -(void)onGameStarted { - // NSLog(@"ISudFSMMG:onGameStarted:游戏开始"); - [self notifySelfInState:YES seatIndex:-1];///加入房间 - [self handleSelfReadyEvent];///准备游戏 + // nslog(@"ISudFSMMG:onGameStarted:游戏开始"); + [self notifySelfInState:YES seatIndex:-1];///加入房间 + [self handleSelfReadyEvent];///准备游戏 } /** * 游戏销毁 */ -(void)onGameDestroyed { - // NSLog(@"ISudFSMMG:onGameDestroyed:游戏开始"); + // nslog(@"ISudFSMMG:onGameDestroyed:游戏销毁"); } /** @@ -184,14 +186,14 @@ * @param dataJson {"code":"value"} */ -(void)onExpireCode:(id)handle dataJson:(NSString*)dataJson { - // NSLog(@"ISudFSMMG:onExpireCode:Code过期"); + // nslog(@"ISudFSMMG:onExpireCode:Code过期"); // 请求业务服务器刷新令牌 [Api getSudGameCode:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) { if (code == 200) { NSString * gameCode = data.data[@"code"]; self.code = gameCode; [self.fsmAPP2MG updateCode:gameCode listener:^(int retCode, const NSString *retMsg, const NSString *dataJson) { - // NSLog(@"ISudFSMMG:updateGameCode retCode=%@ retMsg=%@ dataJson=%@", @(retCode), retMsg, dataJson); + // nslog(@"ISudFSMMG:updateGameCode retCode=%@ retMsg=%@ dataJson=%@", @(retCode), retMsg, dataJson); }]; // 回调结果 NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@(0), @"ret_code", @"return form APP onExpireCode", @"ret_msg", nil]; @@ -239,35 +241,45 @@ dict[@"ret_msg"] = @"return form APP onGetGameCfg"; // 将 JSON 字符串转换为 NSData - NSData *jsonData = [self.gameModel.data.configJson dataUsingEncoding:NSUTF8StringEncoding]; + NSData *jsonData = [configJson dataUsingEncoding:NSUTF8StringEncoding]; // 解析 JSON 数据为字典 NSError *error; - NSDictionary *dictionary = [NSJSONSerialization JSONObjectWithData:jsonData - options:NSJSONReadingMutableContainers - error:&error]; + NSMutableDictionary *dictionary = [[NSJSONSerialization JSONObjectWithData:jsonData + options:NSJSONReadingMutableContainers + error:&error] mutableCopy]; // 检查是否解析成功 if (error) { - NSLog(@"JSON 解析失败: %@", error.localizedDescription); + // nslog(@"JSON 解析失败: %@", error.localizedDescription); } else { - NSLog(@"解析后的字典: %@", dictionary); + // nslog(@"解析后的字典: %@", dictionary); + // 禁止模式选择 + NSMutableDictionary *ui = [[NSMutableDictionary alloc] initWithDictionary:dictionary[@"ui"]]; + [ui setObject: @{@"hide" : @(YES)} + forKey:@"lobby_game_setting"]; + [dictionary setObject:ui forKey:@"ui"]; + // nslog(@"更新后的字典: %@", dictionary); } - dict[@"ui"] = @{ - @"join_btn" : @{@"custom": @(YES), @"hide": @(YES)},//加入游戏 - @"start_btn" : @{@"custom": @(YES), @"hide": @(YES)},//开始游戏 - @"ready_btn" : @{@"custom": @(YES), @"hide": @(YES)},//准备游戏 - @"lobby_players" : @{@"custom": @(YES), @"hide": @(YES)},//游戏中坑位点击 - @"level" : @{@"custom": @(YES), @"hide" : @(YES)},//段位信息 - @"cancel_join" : @{@"custom": @(YES), @"hide" : @(YES)},//退出游戏 - }; +// dict[@"ui"] = @{ +// @"join_btn" : @{@"custom": @(YES), @"hide": @(YES)},//加入游戏 +// @"start_btn" : @{@"custom": @(YES), @"hide": @(YES)},//开始游戏 +// @"ready_btn" : @{@"custom": @(YES), @"hide": @(YES)},//准备游戏 +// @"lobby_players" : @{@"custom": @(NO), @"hide": @(NO)},//游戏中坑位点击 +// @"level" : @{@"custom": @(YES), @"hide" : @(YES)},//段位信息 +// @"cancel_join" : @{@"custom": @(YES), @"hide" : @(YES)},//退出游戏 +// @"dt_custom_hide_lobby_settings" : @{@"custom":@(YES), @"hide" : @(YES)} +// }; // dict[@"ui"] = dictionary; NSString *dataJsonRet = @""; - NSData *dataJsonData = [NSJSONSerialization dataWithJSONObject:dict options:NSJSONWritingPrettyPrinted error:nil]; + NSData *dataJsonData = [NSJSONSerialization dataWithJSONObject:dictionary.copy options:NSJSONWritingPrettyPrinted error:nil]; if (dataJsonData != nil) { dataJsonRet = [[NSString alloc]initWithData:dataJsonData encoding:NSUTF8StringEncoding]; } + if ([NSString isEmpty:dataJsonRet]) { + dataJsonRet = configJson; + } [handle success:dataJsonRet]; } @@ -278,8 +290,12 @@ * @param dataJson 回调json */ -(void)onGameStateChange:(id) handle state:(NSString*) state dataJson:(NSString*) dataJson { - - if([state isEqualToString:MG_COMMON_GAME_SETTLE]){ + // nslog(@"onGameStateChange 回调: %@ \n%@", state, dataJson); + if ([state isEqualToString:MG_COMMON_SELF_CLICK_READY_BTN]) { +// [self addAI]; + } else if ([state isEqualToString:@"mg_common_game_add_ai_players"]) { + // nslog(@" ????????????????????????????????????????????? "); + } else if([state isEqualToString:MG_COMMON_GAME_SETTLE]){ NSDictionary *data = @{@"value0":self.gameModel.data.matchRoundId ?: @""}; NSDictionary *dic = [NSDictionary dictionaryWithObjectsAndKeys:[data mj_JSONString] , @"reportGameInfoExtras",@"value0" , @"reportGameInfoKey" ,nil]; [self notifyStateChange:MG_COMMON_GAME_SETTLE dataJson:[SudCommon dictionaryToJson:dic]]; @@ -292,7 +308,7 @@ [self.delegate getGameRsultsWithList:list]; } }else if ([state isEqualToString:MG_COMMON_PUBLIC_MESSAGE]) { - // NSLog(@"ISudFSMMG:onGameStateChange:游戏->APP:公屏消息"); + // nslog(@"ISudFSMMG:onGameStateChange:游戏->APP:公屏消息"); } else if ([state isEqualToString:MG_COMMON_KEY_WORD_TO_HIT]) { }else if ([state isEqualToString:MG_COMMON_SELF_CLICK_JOIN_BTN]) {//加入游戏按钮点击 @@ -302,9 +318,9 @@ seatIndex = [[dic objectForKey:@"seatIndex"] intValue]; } if (seatIndex == -1) { - // NSLog(@"来自加入按钮%d",seatIndex); + // nslog(@"来自加入按钮%d",seatIndex); }else { - // NSLog(@"来自麦位+入%d",seatIndex); + // nslog(@"来自麦位+入%d",seatIndex); } [self notifySelfInState:YES seatIndex:-1]; } else if([state isEqualToString:MG_COMMON_SELF_CLICK_START_BTN]) {//开始游戏按钮点击 @@ -314,7 +330,7 @@ [self handleSelfInExitEvent]; } else { /// 其他状态 - // NSLog(@"ISudFSMMG:onGameStateChange:游戏->APP:state:%@",MG_COMMON_PUBLIC_MESSAGE); + // nslog(@"ISudFSMMG:onGameStateChange:游戏->APP:state:%@",MG_COMMON_PUBLIC_MESSAGE); } } @@ -326,7 +342,7 @@ * @param dataJson 回调JSON */ -(void)onPlayerStateChange:(nullable id) handle userId:(NSString*) userId state:(NSString*) state dataJson:(NSString*) dataJson { - // NSLog(@"ISudFSMMG:onPlayerStateChange:游戏->APP:游戏玩家状态变化:userId: %@ --state: %@ --dataJson: %@", userId, state, dataJson); + // nslog(@"ISudFSMMG:onPlayerStateChange:游戏->APP:游戏玩家状态变化:userId: %@ --state: %@ --dataJson: %@", userId, state, dataJson); /// 状态解析 NSString *dataStr = @""; if ([state isEqualToString:MG_COMMON_PLAYER_IN]) { @@ -347,7 +363,6 @@ } else if ([state isEqualToString:MG_COMMON_PLAYER_CAPTAIN]) { dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView2"); [self handleState_MG_COMMON_PLAYER_CAPTAIN_WithUserId:userId dataJson:dataJson]; - } else if ([state isEqualToString:MG_COMMON_PLAYER_PLAYING]) { dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView3"); [self handleState_MG_COMMON_PLAYER_PLAYING_WithUserId:userId dataJson:dataJson]; @@ -367,9 +382,9 @@ dataStr = YMLocalizedString(@"XPRoomLittleGameContainerView8"); [self handleState_MG_DG_SCORE_WithUserId:userId dataJson:dataJson]; }else { - // NSLog(@"ISudFSMMG:onPlayerStateChange:未做解析状态:%@", MG_DG_SCORE); + // nslog(@"ISudFSMMG:onPlayerStateChange:未做解析状态:%@", MG_DG_SCORE); } - // NSLog(@"ISudFSMMG:onPlayerStateChange:dataStr:%@", dataStr); + // nslog(@"ISudFSMMG:onPlayerStateChange:dataStr:%@", dataStr); /// 回调 NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:@(0), @"ret_code", @"return form APP onPlayerStateChange", @"ret_msg", nil]; [handle success:[SudCommon dictionaryToJson:dict]]; @@ -377,8 +392,7 @@ /// 退出游戏 - (void)handleSelfInExitEvent { - - + /// 下游戏麦 [self notifyIsPlayingState:false]; [self nofityPlayerPlaying:NO]; @@ -392,9 +406,7 @@ /// 准备游戏 - (void)handleSelfReadyEvent { [self notifySetReady:true]; -#if DEBUG [self addAI]; -#endif } /// 取消准备 @@ -408,11 +420,22 @@ } - (void)addAI { - [self.fsmAPP2MG notifyStateChange:@"app_common_game_add_ai_players" - dataJson:@"{ \"aiPlayers\": [ { \"userId\": \"123456\", \"avatar\": \"https://img.toto.im/mw600/66b3de17ly1i09jnywvp7j20go06wt9g.jpg\", \"name\": \"煎蛋\", \"gender\": \"female\", \"level\":3, } ], \"isReady\": 1 }" - listener:^(int retCode, const NSString * _Nonnull retMsg, const NSString * _Nonnull dataJson) { - - }]; + for (MSRoomGameMicModel *micModel in self.gameModel.roomMics) { + HomePlayMicUserModel *aiUser = micModel.micUser; + if (aiUser && ![aiUser.uid isEqualToString:[[AccountInfoStorage instance] getUid]] && aiUser.aiLevel) { + [self notifyStateChange:@"app_common_game_add_ai_players" + dataJson:[SudCommon dictionaryToJson:@{ + @"aiPlayers":@[@{ + @"userId": aiUser.uid, + @"avatar": aiUser.avatar, + @"name": aiUser.nick, + @"gender": aiUser.gender == GenderType_Male ? @"male" : @"female", + @"level": aiUser.aiLevel, + }], + @"isReady":@"1", + }]]; + } + } } #pragma mark =======APP->游戏状态处理======= @@ -420,8 +443,9 @@ /// @param state 状态名称 /// @param dataJson 需传递的json - (void)notifyStateChange:(NSString *) state dataJson:(NSString*) dataJson { + // nslog(@"ISudFSMMG: START notifyStateChange:state=%@ \ndataJson=%@", state, dataJson); [self.fsmAPP2MG notifyStateChange:state dataJson:dataJson listener:^(int retCode, const NSString *retMsg, const NSString *dataJson) { - NSLog(@"ISudFSMMG:notifyStateChange:retCode=%@ retMsg=%@ dataJson=%@", @(retCode), retMsg, dataJson); + // nslog(@"ISudFSMMG:notifyStateChange:retCode=%@ retMsg=%@ dataJson=%@", @(retCode), retMsg, dataJson); if (retCode == 0 && [state isEqualToString:APP_COMMON_SELF_PLAYING]) {//开始游戏 //上报游戏开始 @@ -582,11 +606,11 @@ } - (void)handleState_MG_DG_SELECTING_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { - // NSLog(@"handleState_MG_DG_SELECTING_WithUserId%@",dataJson); + // nslog(@"handleState_MG_DG_SELECTING_WithUserId%@",dataJson); } - (void)handleState_MG_DG_PAINTING_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { - // NSLog(@"handleState_MG_DG_PAINTING_WithUserId%@",dataJson); + // nslog(@"handleState_MG_DG_PAINTING_WithUserId%@",dataJson); /// 设置麦位状态为作画中 NSDictionary * dic = [SudCommon turnStringToDictionary:dataJson]; bool isPainting = NO; @@ -597,18 +621,18 @@ - (void)handleState_MG_DG_ERRORANSWER_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { /// 错误答案 - // NSLog(@"handleState_MG_DG_ERRORANSWER_WithUserId%@",dataJson); + // nslog(@"handleState_MG_DG_ERRORANSWER_WithUserId%@",dataJson); } - (void)handleState_MG_DG_TOTALSCORE_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { /// 总积分 - // NSLog(@"handleState_MG_DG_TOTALSCORE_WithUserId%@",dataJson); + // nslog(@"handleState_MG_DG_TOTALSCORE_WithUserId%@",dataJson); } - (void)handleState_MG_DG_SCORE_WithUserId:(NSString *)userId dataJson:(NSString *)dataJson { /// 本次积分 - // NSLog(@"handleState_MG_DG_SCORE_WithUserId%@",dataJson); + // nslog(@"handleState_MG_DG_SCORE_WithUserId%@",dataJson); } /// 销毁MG diff --git a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKPanelView.m b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKPanelView.m index 5f1603e4..879d2d04 100644 --- a/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKPanelView.m +++ b/YuMi/Modules/YMRoom/View/RoomPK/View/XPRoomPKPanelView.m @@ -1024,7 +1024,6 @@ groupType:(GroupType)groupType didChooseUserInfos:(NSArray *)userInfos { [TTPopup dismiss]; - // TODO: 应该对比队伍内容后, if (groupType == GroupType_Red) { self.redChooseArray = userInfos; } else { diff --git a/YuMi/Modules/YMRoom/View/RoomSideMenu/RoomSideMenu.m b/YuMi/Modules/YMRoom/View/RoomSideMenu/RoomSideMenu.m index aa02ed7d..b7eb77eb 100644 --- a/YuMi/Modules/YMRoom/View/RoomSideMenu/RoomSideMenu.m +++ b/YuMi/Modules/YMRoom/View/RoomSideMenu/RoomSideMenu.m @@ -520,6 +520,12 @@ static CGFloat const kNormalHeight = 160.0f; MSRoomMenuGameVC *vc = [[MSRoomMenuGameVC alloc] initWithDelegate:self.hostDelegate roomMenuType:MSRoomMenuTypeGame]; vc.modalPresentationStyle = UIModalPresentationOverFullScreen; [self.hostDelegate.getCurrentNav presentViewController:vc animated:YES completion:nil]; + @kWeakify(self); + [vc setUpdatePlayListAndGameList:^(NSArray * _Nonnull playList, NSArray * _Nonnull gameList) { + @kStrongify(self); + self.playList = playList.mutableCopy; + self.littleGameList = gameList.mutableCopy; + }]; } - (void)didTapConfigEntranceButton { diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.h b/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.h index 3c5bbfc1..4e1fe753 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.h +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.h @@ -91,6 +91,9 @@ NS_ASSUME_NONNULL_BEGIN /// 拉取房间资源 + (void)requestRoomResource:(HttpRequestHelperCompletion)complection; + +/// Bravo礼物tab滚屏内容 ++ (void)bravoGetBannerList:(HttpRequestHelperCompletion)completion; @end NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.m b/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.m index 764124ba..a362bd7f 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Api/Api+Gift.m @@ -114,4 +114,8 @@ [HttpRequestHelper request:fang method:HttpRequestHelperMethodGET params:params completion:completion]; } ++ (void)bravoGetBannerList:(HttpRequestHelperCompletion)completion{ + [self makeRequest:@"bravo/getBannerList" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__, nil]; +} + @end diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/GiftComboManager.m b/YuMi/Modules/YMRoom/View/SendGiftView/GiftComboManager.m index 38b28002..2825cee5 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/GiftComboManager.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/GiftComboManager.m @@ -8,6 +8,8 @@ #import "GiftComboManager.h" +#import + #import "Api+Gift.h" #import "UserInfoModel.h" @@ -72,8 +74,6 @@ return sharedInstance; } - - //// 添加 GiftReceiveInfoModel 和 metadata 到队列 - (void)addGiftComboWithInfo:(GiftReceiveInfoModel *)info andMetadata:(NSDictionary *)metadata { if (info && metadata) { @@ -470,7 +470,24 @@ self.actionCallback(ComboAction_Error); } [self forceRemove]; + + NSMutableDictionary *logDic = [dic mutableCopy]; + [logDic setObject:@(self.combo) forKey:@"combo_count"]; + [logDic setObject:[NSThread callStackSymbols] forKey:@"call stack symbols"]; + BLYLog(BuglyLogLevelWarn, @"%@", [logDic toJSONString]); + [Bugly reportError:[NSError errorWithDomain:[NSString stringWithFormat:@"combo 发送礼物异常-%@", + @(code)] + code:[AccountInfoStorage instance].getUid.integerValue + userInfo:logDic]]; } +// TODO: 聚合到 skill card manager +// [Bugly reportExceptionWithCategory:263059 +// name:[NSString stringWithFormat:@"combo 发送礼物异常-%@", +// @(code)] +// reason:msg +// callStack:[NSThread callStackSymbols] +// extraInfo:logDic +// terminateApp:NO]; } targetUids:allUIDs giftNum:self.giftNumPerTimes diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.h b/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.h index 33365bb9..195cfb75 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.h +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.h @@ -27,7 +27,7 @@ typedef NS_ENUM(NSUInteger, GiftType) { GiftType_Lucky24 = 18, //幸运24 GiftType_CP = 19, // CP GiftType_Custom = 20, // 定制 - GiftType_Brove = 21, // 超级礼物 + GiftType_Bravo = 21, // 超级礼物 }; //礼物类型 diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.m b/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.m index c7a097f0..109346de 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftInfoModel.m @@ -57,8 +57,8 @@ MJCodingImplementation return GiftType_Custom; } else if ([self.key isEqualToString:@"cpGift"]) { return GiftType_CP; - } else if ([self.key isEqualToString:@"broveGift"]) { - return GiftType_Brove; + } else if ([self.key isEqualToString:@"bravoGift"]) { + return GiftType_Bravo; } return GiftType_Game; diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftReceiveInfoModel.h b/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftReceiveInfoModel.h index 9dfd92d6..fdc78844 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftReceiveInfoModel.h +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Model/GiftReceiveInfoModel.h @@ -37,6 +37,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) NSInteger giftNum; @property (nonatomic, assign) NSInteger prizeLevel; @property (nonatomic, assign) NSInteger giftId; +@property (nonatomic, assign) NSInteger goldPrice; @end diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.h b/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.h index b0d92ca0..d71120e5 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.h +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.h @@ -1,5 +1,5 @@ // -// YMGiftPresenter.h +// XPGiftPresenter.h // YUMI // // Created by YUMI on 2021/11/9. @@ -7,6 +7,8 @@ #import "BaseMvpPresenter.h" #import "GiftInfoModel.h" +#import "BravoGiftTabInfomationModel.h" + NS_ASSUME_NONNULL_BEGIN @interface XPGiftPresenter : BaseMvpPresenter @@ -49,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN ///星座礼物 - (void)getTwelveStarLastRankFirst:(NSString *)roomUid; - +- (void)bravoGetBannerList:(void(^)(NSArray *array))success failure:(void(^)(NSError *error))failure; @end diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.m b/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.m index c53107e0..2a3ca978 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/Presenter/XPGiftPresenter.m @@ -19,6 +19,7 @@ #import "GiftTwelveStarFirstModel.h" ///P #import "XPGiftProtocol.h" +#import @interface XPGiftPresenter () /// @@ -124,6 +125,30 @@ }fail:^(NSInteger code, NSString * _Nullable msg) { @kStrongify(self); [[self getView] sendGiftFailWithCode:code msg:msg]; + + NSMutableDictionary *logDic = [@{ + @"targetUids":targetUids, + @"giftNum":giftNum, + @"sendType":@(sendType), + @"giftSource":@(giftSource), + @"giftId":giftId, + @"roomSendType":@(roomSendType), + @"roomUid":roomUid, + @"msg":msg, + @"call stack symbols":[NSThread callStackSymbols] + } mutableCopy]; + BLYLog(BuglyLogLevelWarn, @"%@", [logDic toJSONString]); + [Bugly reportError:[NSError errorWithDomain:[NSString stringWithFormat:@"面版 发送礼物异常-%@", + @(code)] + code:[AccountInfoStorage instance].getUid.integerValue + userInfo:logDic]]; +// [Bugly reportExceptionWithCategory:263059 +// name:[NSString stringWithFormat:@"combo 发送礼物异常-%@", +// @(code)] +// reason:msg +// callStack:[NSThread callStackSymbols] +// extraInfo:logDic +// terminateApp:NO]; }] targetUids:targetUids giftNum:giftNum sendType:giftSendTypeStr giftId:giftId giftSource:giftSourceStr giftType:giftTypeStr roomUid:roomUid msg:msg uid:uid]; } @@ -149,4 +174,17 @@ }] roomUid:roomUid]; } +- (void)bravoGetBannerList:(void(^)(NSArray *array))success failure:(void(^)(NSError *error))failure { + [Api bravoGetBannerList:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + if (success) { +// NSArray + success([BravoGiftTabInfomationModel modelsWithArray:data.data]); + } + } fail:^(NSInteger code, NSString * _Nullable msg) { + if (failure) { + failure([NSError errorWithDomain:msg code:code userInfo:nil]); + } + } showLoading:NO errorToast:NO] ]; +} + @end diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.h b/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.h index f690dd04..4c8ae400 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.h +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.h @@ -13,7 +13,7 @@ NS_ASSUME_NONNULL_BEGIN @interface GiftComboView : UIView - (void)setupCurrentGold:(double)gold; -- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isBrove:(BOOL)isBrove; +- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isBravo:(BOOL)isBrove; - (void)updateCount; - (void)stopTimer; - (void)endCombo; diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.m index 2f560cfe..03ace1f9 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/GiftComboView.m @@ -108,7 +108,7 @@ - (void)handleStringNotification:(NSString *)coin { if (![NSString isEmpty:coin]) { - [self updateCurrentGold:coin.doubleValue giftPrice:0 isFromWinning:YES isBrove:YES]; + [self updateCurrentGold:coin.doubleValue giftPrice:0 isFromWinning:YES isBravo:YES]; } } @@ -116,7 +116,7 @@ double coin = [[dic objectForKey:@"CurrentGold"] doubleValue]; double price = [[dic objectForKey:@"Price"] doubleValue]; BOOL isFromWinning = [[dic objectForKey:@"isFromWinning"] boolValue]; - [self updateCurrentGold:coin giftPrice:price isFromWinning:isFromWinning isBrove:YES]; + [self updateCurrentGold:coin giftPrice:price isFromWinning:isFromWinning isBravo:YES]; } - (void)updateCount { @@ -137,13 +137,7 @@ } - (void)endCombo { -// [[NSNotificationCenter defaultCenter] removeObserver:self]; -// [self.countdownRingView stopCountdown]; -// [self.countdownRingView removeFromSuperview]; -// self.countdownRingView = nil; -// [self.playImageView stopAnimation]; -// [self.playImageView clear]; -// self.playImageView.delegate = nil; + } - (void)setupUI { @@ -253,7 +247,6 @@ #pragma mark - - (void)setupCurrentGold:(double)gold { - NSLog(@" --- --- --- 更新总数:%f", gold); self.comboGoldNum = gold; self.comboGoldLabel.text = @(gold).stringValue; @@ -282,7 +275,7 @@ } } -- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isBrove:(BOOL)isBrove { +- (void)updateCurrentGold:(double)gold giftPrice:(double)price isFromWinning:(BOOL)isFromWinning isBravo:(BOOL)isBrove { NSString *goldString = isFromWinning ? [NSString stringWithFormat:@"+ %@", @(gold)] : @(-price).stringValue; if (isFromWinning) { // if (!isBrove) { diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.h b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.h new file mode 100644 index 00000000..bb73cf0a --- /dev/null +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.h @@ -0,0 +1,18 @@ +// +// PIGiftBravoGiftBroadcastView.h +// YuMi +// +// Created by P on 2025/4/14. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface PIGiftBravoGiftBroadcastView : UIView + +- (void)endloop; + +@end + +NS_ASSUME_NONNULL_END diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.m new file mode 100644 index 00000000..36bc895d --- /dev/null +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftBravoGiftBroadcastView.m @@ -0,0 +1,240 @@ +// +// PIGiftBravoGiftBroadcastView.m +// YuMi +// +// Created by P on 2025/4/14. +// + +#import "PIGiftBravoGiftBroadcastView.h" +#import "XPSkillCardPlayerManager.h" +#import "BravoGiftTabInfomationModel.h" +@interface PIGiftBravoGiftBroadcastView() + +@property (nonatomic, strong) UIImageView *speaker; +@property (nonatomic, strong) MarqueeLabel *label; +@property (nonatomic, strong) UIView *container; +@property (nonatomic, copy) NSArray * source; +@property (nonatomic, strong) NSMutableArray *labels; +@property (nonatomic, assign) NSInteger index; +@property (nonatomic, assign) NSInteger loopStatus; // -1: 頁面回收,0:未啟動,1:啟動中 +@property (nonatomic, strong) NSMutableArray *imageLoaders; +@property (nonatomic, strong) UIButton *tipsButton; + +@end + +@implementation PIGiftBravoGiftBroadcastView + +- (void)dealloc { + +} + +- (instancetype)initWithFrame:(CGRect)frame { + if (self = [super initWithFrame:frame]) { + self.source = [[XPSkillCardPlayerManager shareInstance] loadBravoGiftTabInfomation]; + [self setupUI]; + } + return self; +} + +- (void)setupUI { + [self addSubview:self.container]; + [self.container mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.trailing.mas_equalTo(self).inset(10); + make.bottom.mas_equalTo(self).offset(-4); + make.height.mas_equalTo(34); + }]; + + [self addSubview:self.tipsButton]; + [self.tipsButton mas_makeConstraints:^(MASConstraintMaker *make) { + make.trailing.mas_equalTo(-10); + make.bottom.mas_equalTo(self.container.mas_top).offset(-9); + make.height.mas_equalTo(24); + make.width.mas_greaterThanOrEqualTo(60); + }]; + + [self addSubview:self.speaker]; + [self.speaker mas_makeConstraints:^(MASConstraintMaker *make) { + make.leading.bottom.mas_equalTo(self); + make.size.mas_equalTo(CGSizeMake(29, 29)); + }]; + + self.labels = [[NSMutableArray alloc] init]; + self.imageLoaders = [[NSMutableArray alloc] init]; + @kWeakify(self); + [self.source enumerateObjectsUsingBlock:^(BravoGiftTabInfomationModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { + @kStrongify(self); + NetImageView *avatar = [[NetImageView alloc] init]; + [avatar loadImageWithUrl:obj.avatar completion:^(UIImage * _Nullable image, NSURL * _Nonnull url) { + NSTextAttachment *avatarAttachment = [[NSTextAttachment alloc] init]; + avatarAttachment.image = [image roundedImageWithCornerRadius:12*3 size:CGSizeMake(24*3, 24*3)]; + avatarAttachment.bounds = CGRectMake(0, -5, 24, 24); + NSTextAttachment *coinAttachment = [[NSTextAttachment alloc] init]; + coinAttachment.image = kImage(@"moli_money_icon"); + coinAttachment.bounds = CGRectMake(0, -3, 18, 18); + NSAttributedString *avatarString = [NSAttributedString attributedStringWithAttachment:avatarAttachment]; + NSAttributedString *coinString = [NSAttributedString attributedStringWithAttachment:coinAttachment]; + NSString *giftName = obj.giftName; + NSString *coin = @(obj.coin).stringValue; + NSString *oringinalString = [NSString stringWithFormat:@" %@ %@ %@ %@ %@ ", + [NSString trimString:obj.nick lengthLimit:4], + YMLocalizedString(@"Combo_7"), + giftName, YMLocalizedString(@"Combo_4"), coin]; + + NSMutableAttributedString *string = [[NSMutableAttributedString alloc] init]; + [string appendAttributedString:[[NSAttributedString alloc] initWithString:oringinalString attributes:@{ + NSFontAttributeName: kFontRegular(13), + NSForegroundColorAttributeName: [UIColor whiteColor] + }]]; + + // 找到 giftName 和 coin 在字符串中的位置 + NSRange giftNameRange = [oringinalString rangeOfString:giftName]; + NSRange coinRange = [oringinalString rangeOfString:coin]; + + // 创建黄色文本的属性 + NSDictionary *yellowAttributes_name = @{ + NSFontAttributeName: kFontRegular(13), + NSForegroundColorAttributeName: UIColorFromRGB(0xffec6f) + }; + NSDictionary *yellowAttributes_coin = @{ + NSFontAttributeName: kFontSemibold(16), + NSForegroundColorAttributeName: UIColorFromRGB(0xffec6f) + }; + // 创建包含黄色文本的可变字符串 + NSMutableAttributedString *yellowGiftName = [[NSMutableAttributedString alloc] initWithString:giftName attributes:yellowAttributes_name]; + NSMutableAttributedString *yellowCoin = [[NSMutableAttributedString alloc] initWithString:coin attributes:yellowAttributes_coin]; + + // 替换原始字符串中的 giftName 和 coin 为黄色文本 + [string replaceCharactersInRange:giftNameRange withAttributedString:yellowGiftName]; + [string replaceCharactersInRange:coinRange withAttributedString:yellowCoin]; + + [string insertAttributedString:avatarString atIndex:0]; + [string appendAttributedString:coinString]; + + UILabel *label = [[UILabel alloc] init]; + label.attributedText = string.copy; + [self.labels addObject:label]; + if (self.loopStatus>-1) { + [self startLoop]; + } + }]; + [self.imageLoaders addObject:avatar]; + }]; +} + +- (void)startLoop { + if (self.loopStatus > 0 || self.labels.count == 0) { + return; + } + self.loopStatus = 1; + + // 获取当前索引的标签 + UILabel *label = [self.labels xpSafeObjectAtIndex:self.index]; + if (label) { + // 设置标签的初始位置(屏幕右侧) + label.frame = CGRectMake(KScreenWidth, 2, KScreenWidth - 25 - 42, 26); + // 将标签添加到容器视图 + [self.container addSubview:label]; + + // 动画:标签从屏幕右侧移动到左侧 + [UIView animateWithDuration:0.5 animations:^{ + label.frame = CGRectMake(25, 2, KScreenWidth - 25 - 42, 26); + } completion:^(BOOL finished) { + // 延迟动画:标签从左侧移出屏幕 + [UIView animateWithDuration:0.5 delay:2 options:UIViewAnimationOptionCurveEaseIn animations:^{ + label.frame = CGRectMake(-KScreenWidth, 2, KScreenWidth - 25 - 42, 26); + } completion:^(BOOL finished) { + // 移除标签 + [label removeFromSuperview]; + // 索引递增 + self.index += 1; + + // 检查是否到达最后一个标签 + if (self.index >= self.labels.count) { + // 重置索引为0 + self.index = 0; + } + + // 设置循环标志为NO + self.loopStatus = 0; + // 递归调用startLoop继续循环 + [self startLoop]; + }]; + }]; + } +} + +- (void)endloop { + self.loopStatus = -1; + + // 取消所有动画 + [self.container.layer removeAllAnimations]; + + // 清理图片加载器 + [self.imageLoaders removeAllObjects]; + + // 清理标签 + for (UILabel *label in self.labels) { + [label removeFromSuperview]; + } + [self.labels removeAllObjects]; +} + +- (void)didTapTips { + TTAlertConfig *config = [[TTAlertConfig alloc] init]; + config.title = YMLocalizedString(@"20.20.56_text_15"); + config.message = YMLocalizedString(@"20.20.56_text_16"); + config.actionStyle = 0; + [TTPopup alertWithConfig:config + confirmHandler:^{} + cancelHandler:^{}]; +} + +#pragma mark - +- (UIImageView *)speaker { + if (!_speaker) { + _speaker = [[UIImageView alloc] initWithImage:isMSRTL() ? kImage(@"bravo_speaker_ar") : kImage(@"bravo_speaker")]; + } + return _speaker; +} + +- (UIView *)container { + if (!_container) { + + NSArray *colors; + if (isMSRTL()) { + colors = @[ + [UIColor colorWithWhite:0 alpha:0], + [UIColor colorWithWhite:0 alpha:0.9]]; + } else { + colors = @[ + [UIColor colorWithWhite:0 alpha:0.9], + [UIColor colorWithWhite:0 alpha:0]]; + } + _container = [[UIView alloc] init]; + [_container addGradientBackgroundWithColors:colors startPoint:CGPointMake(0, 0.5) endPoint:CGPointMake(0.95, 0.5) cornerRadius:17]; + + } + return _container; +} + +- (UIButton *)tipsButton { + if (!_tipsButton) { + _tipsButton = [UIButton buttonWithType:UIButtonTypeCustom]; + [_tipsButton setBackgroundColor:[UIColor colorWithWhite:0 alpha:0.5]]; + [_tipsButton setCornerRadius:12]; + [_tipsButton addTarget:self action:@selector(didTapTips) forControlEvents:UIControlEventTouchUpInside]; + NSTextAttachment *attachment = [[NSTextAttachment alloc] init]; + attachment.image = kImage(@"question_mark"); + attachment.bounds = CGRectMake(0, -4, 18, 18); + NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithAttributedString:[NSAttributedString attributedStringWithAttachment:attachment]]; + [string appendAttributedString:[[NSAttributedString alloc] initWithString:YMLocalizedString(@"20.20.56_text_17") attributes:@{ + NSFontAttributeName: kFontRegular(12), + NSForegroundColorAttributeName: [UIColor whiteColor] + }]]; + [_tipsButton setAttributedTitle:string forState:UIControlStateNormal]; + + } + return _tipsButton; +} + +@end diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m index 7233196f..7ab34fbc 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/PIGiftInfoSegmentedView.m @@ -54,7 +54,7 @@ /// 定制 @property (nonatomic,strong)XPGiftInfoView *customVC; -@property (nonatomic,strong)XPGiftInfoView *broveVC; +@property (nonatomic,strong)XPGiftInfoView *bravoVC; @property (nonatomic, strong) UIActivityIndicatorView *loadingView; @@ -213,8 +213,8 @@ return self.customVC; } break; - case GiftType_Brove: { - return self.broveVC; + case GiftType_Bravo: { + return self.bravoVC; } break; default: @@ -245,7 +245,7 @@ return i; } else if (tabGiftType == GiftType_Custom && self.segmentType == GiftSegmentType_Custom) { return i; - } else if (tabGiftType == GiftType_Brove && self.segmentType == GiftSegmentType_Brove) { + } else if (tabGiftType == GiftType_Bravo && self.segmentType == GiftSegmentType_Bravo) { return i; } } @@ -549,13 +549,13 @@ } return _cpVC; } --(XPGiftInfoView *)broveVC{ - if(!_broveVC){ - _broveVC = [[XPGiftInfoView alloc]init]; - _broveVC.delegate = self; - _broveVC.segmentType = GiftSegmentType_Brove; +-(XPGiftInfoView *)bravoVC{ + if(!_bravoVC){ + _bravoVC = [[XPGiftInfoView alloc]init]; + _bravoVC.delegate = self; + _bravoVC.segmentType = GiftSegmentType_Bravo; } - return _broveVC; + return _bravoVC; } -(XPGiftInfoView *)customVC{ if(!_customVC){ diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.h b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.h index ce14ea93..c6645fd2 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.h +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPGiftInfoView.h @@ -25,7 +25,7 @@ typedef NS_ENUM(NSInteger, GiftSegmentType) { GiftSegmentType_Country,///国家礼物 GiftSegmentType_CP,///cp礼物 GiftSegmentType_Custom,///cp礼物 - GiftSegmentType_Brove,///超级礼物 + GiftSegmentType_Bravo,///超级礼物 }; diff --git a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m index 96f7b846..4151e719 100644 --- a/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m +++ b/YuMi/Modules/YMRoom/View/SendGiftView/View/XPSendGiftView.m @@ -39,6 +39,7 @@ #import "XPGiftLuckyGiftBroadcastView.h" #import "XPGiftTwelveStarBroadcastView.h" #import "VIPCenterViewController.h" +#import "PIGiftBravoGiftBroadcastView.h" ///P #import "XPGiftProtocol.h" ///VC @@ -68,6 +69,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; ///星座礼物广播 @property (nonatomic, strong) XPGiftTwelveStarBroadcastView *constellationBanner; +@property (nonatomic, strong) PIGiftBravoGiftBroadcastView *bravoGiftView; ///超级礼物 @property(nonatomic,strong) PIGiftSuperGiftBroadcastView *superGiftView; ///礼物类型(普通/互动) @@ -120,6 +122,10 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; [[NSNotificationCenter defaultCenter] removeObserver:self]; [[GiftComboManager sharedManager] registerActions:nil]; + + if (_bravoGiftView) { + [self.bravoGiftView endloop]; + } } - (instancetype)initWithType:(SendGiftType)type uid:(NSString * __nullable)uid{ @@ -593,7 +599,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; if (giftInfo.giftType != GiftType_Game && giftInfo.giftType != GiftType_super && giftInfo.giftType != GiftType_Lucky24 && - giftInfo.giftType != GiftType_Brove) { + giftInfo.giftType != GiftType_Bravo) { [[GiftComboManager sharedManager] enableToCombo:NO]; return; } @@ -619,8 +625,6 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; GiftInfoModel *giftInfo = self.giftInfoView.lastSelectGift; if (self.usingplaceType == SendGiftType_Room) { if (uids.count > 0) { - - [self readyForCombo:giftCount gift:giftInfo]; @@ -745,6 +749,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; - (void)xPGiftHeadTypeViewDidClickGift:(XPGiftHeadTypeView *)view { [self.luckyBroadcastView removeFromSuperview]; [self.superGiftView removeFromSuperview]; + [self.bravoGiftView removeFromSuperview]; // [self.giftInfoView giftHeadTypeHadChange:1]; if (!self.graffitiView.hidden) {//清空涂鸦礼物 [self.graffitiView clearData]; @@ -759,6 +764,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; - (void)xPGiftHeadTypeViewDidClickInteraction:(XPGiftHeadTypeView *)view { [self.luckyBroadcastView removeFromSuperview]; [self.superGiftView removeFromSuperview]; + [self.bravoGiftView removeFromSuperview]; // [self.giftInfoView giftHeadTypeHadChange:2]; } @@ -771,9 +777,21 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; self.giftBarView.drawGiftCount = 10; [self.superGiftView removeFromSuperview]; [self.luckyBroadcastView removeFromSuperview]; - [self.constellationBanner removeFromSuperview]; + [self.bravoGiftView removeFromSuperview]; + [self.constellationBanner removeFromSuperview]; switch (type) { + case GiftSegmentType_Bravo: { + if (!self.bravoGiftView.superview) { + [self.view addSubview:self.bravoGiftView]; + [self.bravoGiftView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self.contentView.mas_top); + make.leading.trailing.mas_equalTo(0); + make.height.mas_equalTo(kGetScaleWidth(80)); + }]; + } + } + break; case GiftSegmentType_Lucky: { if (!self.luckyBroadcastView.superview) { [self.view addSubview:self.luckyBroadcastView]; @@ -826,7 +844,21 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; ///点击了某个item - (void)pIGiftInfoSegmentedView:(PIGiftInfoSegmentedView *)view didClickItem:(GiftInfoModel *)info type:(GiftSegmentType)type{ switch (type) { + case GiftSegmentType_Bravo: + [self.constellationBanner removeFromSuperview]; + [self.superGiftView removeFromSuperview]; + [self.luckyBroadcastView removeFromSuperview]; + if (!self.bravoGiftView.superview) { + [self.view addSubview:self.bravoGiftView]; + [self.bravoGiftView mas_makeConstraints:^(MASConstraintMaker *make) { + make.bottom.mas_equalTo(self.contentView.mas_top); + make.leading.trailing.mas_equalTo(0); + make.height.mas_equalTo(kGetScaleWidth(80)); + }]; + } + break; case GiftSegmentType_Lucky:{ + [self.bravoGiftView removeFromSuperview]; [self.constellationBanner removeFromSuperview]; [self.superGiftView removeFromSuperview]; if (!self.luckyBroadcastView.superview) { @@ -840,6 +872,7 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; } break; case GiftSegmentType_SuperLucky: { + [self.bravoGiftView removeFromSuperview]; [self.constellationBanner removeFromSuperview]; [self.luckyBroadcastView removeFromSuperview]; self.superGiftView.giftModel = info; @@ -1210,4 +1243,11 @@ UIKIT_EXTERN NSString * kShowFirstRechargeView; } return _superGiftView; } + +- (PIGiftBravoGiftBroadcastView *)bravoGiftView { + if (!_bravoGiftView) { + _bravoGiftView = [[PIGiftBravoGiftBroadcastView alloc] initWithFrame:CGRectZero]; + } + return _bravoGiftView; +} @end diff --git a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m index d92f73d9..f7343622 100644 --- a/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m +++ b/YuMi/Modules/YMRoom/View/Setting/View/XPRoomSettingViewController.m @@ -338,9 +338,9 @@ XPRoomSettingItemModel * itemModel = [[self.datasource xpSafeObjectAtIndex:index } - (void)didClickCancel:(RoomSettingInputType)type { - if (type == RoomSettingItemType_Pwd) { - // TODO: 狀態復位 - } +// if (type == RoomSettingItemType_Pwd) { +// // TODO: 狀態復位 +// } } #pragma mark - XPRoomSettingTableViewCellDelegate diff --git a/YuMi/Modules/YMTabbar/View/TabbarViewController.m b/YuMi/Modules/YMTabbar/View/TabbarViewController.m index 02a92013..7bace4a4 100644 --- a/YuMi/Modules/YMTabbar/View/TabbarViewController.m +++ b/YuMi/Modules/YMTabbar/View/TabbarViewController.m @@ -361,6 +361,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey; } self.userInfo = userInfo; [[XPSkillCardPlayerManager shareInstance] setUserInfoModel:userInfo]; + [[XPSkillCardPlayerManager shareInstance] requestBravoGiftTabInfomation]; [[RoomBoomManager sharedManager] saveUserInfo:userInfo]; [self getRoomGameInfo]; [AccountInfoStorage instance].name = self.userInfo.nick; diff --git a/YuMi/Network/HttpRequestHelper.m b/YuMi/Network/HttpRequestHelper.m index c94cd363..61064402 100644 --- a/YuMi/Network/HttpRequestHelper.m +++ b/YuMi/Network/HttpRequestHelper.m @@ -109,10 +109,144 @@ }]; } +//+ (void)POST:(NSString *)method +// params:(NSDictionary *)params +// success:(void (^)(BaseModel *data))success +// failure:(void (^)(NSInteger resCode, NSString *message))failure +//{ +// if ([self checkNetworkStatusWithFailure:^{ +// failure(-1, YMLocalizedString(@"HttpRequestHelper0")); +// }]) { +// return; +// } +// +// [self configHeaders]; +// AFHTTPSessionManager *manager = [HttpRequestHelper requestManager]; +// params = [MSParamsDecode msDecodeParams:[params mutableCopy]]; +// params = [self configBaseParmars:params]; +// +//#ifdef DEBUG +// NSLog(@"\nmethod:\n%@\nparameter:\n%@\n 超時:%@", +// method, +// params, +// @(manager.session.configuration.timeoutIntervalForRequest)); +//#else +//#endif +// +// // 将 NSDictionary 转换为 JSON +// NSError *jsonError; +// NSData *jsonData = [NSJSONSerialization dataWithJSONObject:params options:0 error:&jsonError]; +// if (jsonError) { +// NSLog(@"Error serializing JSON: %@", jsonError); +// if (failure) { +// failure(jsonError.code, @"Error creating JSON data"); +// } +// return; +// } +// +// // Gzip 压缩数据 +// NSData *gzipData = [jsonData gzippedData]; +// +// // 创建请求 +// NSString *urlString = [[NSURL URLWithString:method relativeToURL:manager.baseURL] absoluteString]; +// NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:urlString]]; +// [request setHTTPMethod:@"POST"]; +// +// // 设置请求头 (合并 manager 的通用头和特定头) +// [manager.requestSerializer.HTTPRequestHeaders enumerateKeysAndObjectsUsingBlock:^(id field, id value, BOOL * __unused stop) { +// [request setValue:value forHTTPHeaderField:field]; +// }]; +// [request setValue:@"application/json" forHTTPHeaderField:@"Content-Type"]; +// [request setValue:@"gzip" forHTTPHeaderField:@"Content-Encoding"]; +// [request setValue:[NSString stringWithFormat:@"%lu", (unsigned long)gzipData.length] forHTTPHeaderField:@"Content-Length"]; // AFNetworking 通常会自动处理 Content-Length,但手动设置以确保 +// +// // !!! 添加认证头 !!! +// if ([[AccountInfoStorage instance] getUid].length > 0) { +// [request setValue:[[AccountInfoStorage instance] getUid] forHTTPHeaderField:@"pub_uid"]; +// } else { +// [request setValue:nil forHTTPHeaderField:@"pub_uid"]; +// } +// if ([[AccountInfoStorage instance] getTicket].length > 0) { +// [request setValue:[[AccountInfoStorage instance] getTicket] forHTTPHeaderField:@"pub_ticket"]; +// }else { +// [request setValue:nil forHTTPHeaderField:@"pub_ticket"]; +// } +// // !!! 添加其他在 configHeaders 中设置的头 !!! +// [request setValue:[NSBundle uploadLanguageText] forHTTPHeaderField:@"Accept-Language"]; +// [request setValue:PI_App_Version forHTTPHeaderField:@"App-Version"]; +// +// // 设置请求体 +// [request setHTTPBody:gzipData]; +// +// // 设置超时 +// request.timeoutInterval = manager.requestSerializer.timeoutInterval; +// +// @kWeakify(self); +// NSURLSessionDataTask *dataTask = [manager dataTaskWithRequest:request +// uploadProgress:nil +// downloadProgress:nil +// completionHandler:^(NSURLResponse * _Nonnull response, id _Nullable responseObject, NSError * _Nullable error) { +// if (error) { +//#ifdef DEBUG +// NSLog(@"%@ - \n%@\n", method, error); +//#else +//#endif +// @kStrongify(self); +// [self handleNetError:error method:method failure:failure]; +// } else { +// BaseModel *baseModel = [BaseModel modelWithDictionary:responseObject]; +//#ifdef DEBUG +// NSLog(@"%@ - \n%@\n", method, [baseModel toJSONString]); +//#else +//#endif +// success(baseModel); +// } +// }]; +// +// [dataTask resume]; +//} + + (void)POST:(NSString *)method params:(NSDictionary *)params success:(void (^)(BaseModel *data))success failure:(void (^)(NSInteger resCode, NSString *message))failure +{ + if ([AFNetworkReachabilityManager sharedManager].networkReachabilityStatus == 0) { + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.01 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + failure(-1, YMLocalizedString(@"HttpRequestHelper0")); + }); + return; + } + + [self configHeaders]; + AFHTTPSessionManager *manager = [HttpRequestHelper requestManager]; + params = [MSParamsDecode msDecodeParams:[params mutableCopy] ]; + + + params = [self configBaseParmars:params]; + +#ifdef DEBUG + NSLog(@"\nmethod:\n%@\nparameter:\n%@", method, params); +#else +#endif + + [manager POST:method parameters:params headers:nil progress:nil success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) { + BaseModel *baseModel = [BaseModel modelWithDictionary:responseObject]; +#ifdef DEBUG + NSLog(@"\n%@", [baseModel toJSONString]); +#else +#endif + + success(baseModel); + } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) { + [self handleNetError:error method:method failure:failure]; + }]; +} + ++ (void)__POST:(NSString *)method + params:(NSDictionary *)params + success:(void (^)(BaseModel *data))success + failure:(void (^)(NSInteger resCode, NSString *message))failure { if ([self checkNetworkStatusWithFailure:^{ failure(-1, YMLocalizedString(@"HttpRequestHelper0")); diff --git a/YuMi/Structure/MVP/Model/UserVipInfoVo.h b/YuMi/Structure/MVP/Model/UserVipInfoVo.h index 5ce3c0ce..db5bf7f5 100644 --- a/YuMi/Structure/MVP/Model/UserVipInfoVo.h +++ b/YuMi/Structure/MVP/Model/UserVipInfoVo.h @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN @property (nonatomic, assign) BOOL preventTrace; /// 是否防关注 @property (nonatomic, assign) BOOL preventFollow; - +/// 查看访客 @property(nonatomic, assign) BOOL visitHide; /// 是否無痕瀏覽 @property(nonatomic, assign) BOOL visitListView; diff --git a/YuMi/Tools/CardManager/XPSkillCardPlayerManager.h b/YuMi/Tools/CardManager/XPSkillCardPlayerManager.h index 202c8d93..97aed321 100644 --- a/YuMi/Tools/CardManager/XPSkillCardPlayerManager.h +++ b/YuMi/Tools/CardManager/XPSkillCardPlayerManager.h @@ -8,6 +8,7 @@ #import #import #import "UserInfoModel.h" +@class BravoGiftTabInfomationModel; typedef enum : NSUInteger { MICState_None = 0, @@ -46,6 +47,9 @@ typedef enum : NSUInteger { + (instancetype)shareInstance; +- (void)requestBravoGiftTabInfomation; +- (NSArray *)loadBravoGiftTabInfomation; + /** 播放一次音频 diff --git a/YuMi/Tools/CardManager/XPSkillCardPlayerManager.m b/YuMi/Tools/CardManager/XPSkillCardPlayerManager.m index 3585964d..424d3311 100644 --- a/YuMi/Tools/CardManager/XPSkillCardPlayerManager.m +++ b/YuMi/Tools/CardManager/XPSkillCardPlayerManager.m @@ -8,6 +8,7 @@ #import "XPSkillCardPlayerManager.h" #import "XPRoomMiniManager.h" #import "RtcManager.h" +#import "XPGiftPresenter.h" @interface XPSkillCardPlayerManager() @@ -23,6 +24,9 @@ ///播放完成回调 @property (nonatomic, copy) void (^playerCompletionBlock)(void); +@property (nonatomic, + copy) NSArray *bravoGiftInfomations; + @end @implementation XPSkillCardPlayerManager @@ -40,6 +44,21 @@ return sharedInstance; } +- (void)requestBravoGiftTabInfomation { + @kWeakify(self); + XPGiftPresenter *presenter = [[XPGiftPresenter alloc] init]; + [presenter bravoGetBannerList:^(NSArray * _Nonnull array) { + @kStrongify(self); + self.bravoGiftInfomations = array; + } failure:^(NSError * _Nonnull error) { + + }]; +} + +- (NSArray *)loadBravoGiftTabInfomation { + return self.bravoGiftInfomations; +} + - (void)setMicState:(MICState)micState { _micState = micState; } @@ -83,8 +102,6 @@ [self.player prepareToPlay]; [self.player play]; self.playerCompletionBlock = completionBlock; - - } /** diff --git a/YuMi/Tools/NSString/NSString+Utils.h b/YuMi/Tools/NSString/NSString+Utils.h index b0416bea..e24dd862 100644 --- a/YuMi/Tools/NSString/NSString+Utils.h +++ b/YuMi/Tools/NSString/NSString+Utils.h @@ -51,6 +51,8 @@ NS_ASSUME_NONNULL_BEGIN + (NSString *)stringByRemovingRedundantZeros:(NSString *)string; ++ (NSString *)trimString:(NSString *)input lengthLimit:(NSInteger)limit; + @end diff --git a/YuMi/Tools/NSString/NSString+Utils.m b/YuMi/Tools/NSString/NSString+Utils.m index 875e3506..ffe9d190 100644 --- a/YuMi/Tools/NSString/NSString+Utils.m +++ b/YuMi/Tools/NSString/NSString+Utils.m @@ -507,4 +507,13 @@ // } //} ++ (NSString *)trimString:(NSString *)input lengthLimit:(NSInteger)limit { + if (input.length <= limit) { + return input; + } else { + NSString *trimmedString = [input substringToIndex:limit]; + return [trimmedString stringByAppendingString:@"..."]; + } +} + @end diff --git a/YuMi/Tools/YMLine/PILineManager.swift b/YuMi/Tools/YMLine/PILineManager.swift deleted file mode 100644 index faaccf4d..00000000 --- a/YuMi/Tools/YMLine/PILineManager.swift +++ /dev/null @@ -1,66 +0,0 @@ -// -// YMLineManager.swift -// YuMi -// -// Created by duoban on 2023/12/29. -// - -import Foundation -import LineSDK - -@objc public enum LineLoginResultStatus: NSInteger { - case error - case cancelled - case success -} - -public class PILineLoginManager: NSObject { - private static var manager: PILineLoginManager? - @objc public class func getSharedInstance() -> PILineLoginManager { - guard let instance = manager else { - manager = PILineLoginManager() - return manager! - } - return instance - } - - @objc public class func registerLine() { - LoginManager.shared.setup(channelID: "1657475529", universalLinkURL: nil) - } - - @objc public class func applicationOpenurl(_ app: UIApplication, - open url: URL?) -> Bool { - return LoginManager.shared.application(app, open: url) - } - - @objc public class func application( - _ application: UIApplication, - continueWithUserActivity: NSUserActivity, - restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool { - return LoginManager.shared.application(application, open: continueWithUserActivity.webpageURL) - } - - @objc public func loginLine(fromController: UIViewController, completeWithError: @escaping (_ loginStatus: LineLoginResultStatus, _ token: String?, _ userId:String?, _ email: String? , _ error: Error?) -> Void) { - var param = LoginManager.Parameters.init() - param.allowRecreatingLoginProcess = true - LoginManager.shared.login(permissions: [.openID, .profile], in: fromController, parameters: param) { (result) in - switch result { - case .success(let loginResult): - if let _ = loginResult.accessToken.IDTokenRaw { - completeWithError(.success, loginResult.accessToken.value, loginResult.userProfile?.userID ?? "", nil, nil) - } else { - completeWithError(.success, "","", nil, nil) - } - case .failure(let error): - print(error) - completeWithError(.cancelled, "","", nil, nil) - } - } - - } - - @objc public class func destroyLine() { - PILineLoginManager.manager = nil - } - -} diff --git a/YuMi/ar.lproj/Localizable.strings b/YuMi/ar.lproj/Localizable.strings index f411b609..acf4f99e 100644 --- a/YuMi/ar.lproj/Localizable.strings +++ b/YuMi/ar.lproj/Localizable.strings @@ -4149,17 +4149,23 @@ ineHeadView12" = "الحمل"; "20.20.51_text_28" = "عرض الوقت:%@"; "20.20.51_text_29" = "يجب أن يكون عدد الماس مضاعفات 1000"; -"20.20.56_text_1" = "当前匹配人数不足,匹配失败。是否重新匹配"; -"20.20.56_text_2" = "匹配失败,您消耗的金币已经退回你的钱包"; -"20.20.56_text_3" = "Change Relationship"; -"20.20.56_text_4" = "Select the Relationship you want to change"; -"20.20.56_text_5" = "After confirming the change, the original CP value and CP level will remain unchanged. Each relationship can only be changed once within 30 days"; +"20.20.56_text_1" = "عدد المباريات الحالي غير كافٍ، فشلت المباراة. إعادة المباراة مرة أخرى؟"; +"20.20.56_text_2" = "فشلت المطابقة، تم إرجاع العملات التي استهلكتها إلى محفظتك"; +"20.20.56_text_3" = "تغيير العلاقة"; +"20.20.56_text_4" = "اختر العلاقة التي تريد تغييرها"; +"20.20.56_text_5" = "بعد تأكيد التغيير، ستبقى قيمة سي بي الأصلية ومستواها كما هي. لا يمكن تغيير أي علاقة إلا مرة واحدة خلال 30 يومًا"; "20.20.56_text_6" = "CP"; -"20.20.56_text_7" = "Brother"; -"20.20.56_text_8" = "Sister"; -"20.20.56_text_9" = "Parner"; -"20.20.56_text_10" = "Application for Relationship Change"; -"20.20.56_text_11" = "您已经提交更换申请,请耐心等待。"; -"20.20.56_text_12" = "你需要30天才能更换状态。"; -"20.20.56_text_13" = "The other invites you to change the relationship to %@"; -"20.20.56_text_14" = "Your relationship has been changed to %@"; +"20.20.56_text_7" = "الأخ"; +"20.20.56_text_8" = "الأخت"; +"20.20.56_text_9" = "الشريك"; +"20.20.56_text_10" = "طلب تغيير العلاقة"; +"20.20.56_text_11" = "لقد قدمت طلب تغيير العلاقة، يرجى التحلي بالصبر."; +"20.20.56_text_12" = "تحتاج إلى 30 يوماً لتغيير علاقتك."; +"20.20.56_text_13" = "يدعوك الطرف الآخر لتغيير العلاقة إلى %@"; +"20.20.56_text_14" = "تم تغيير علاقتكم إلى %@"; +"20.20.56_text_15" = "نصائح للدخل"; +"20.20.56_text_16" = "استلم برافو، ستحصل على ٢٪ من دخل الكونزات\nسيتم توزيع العملات مباشرةً على محفظة عملاتك\nملاحظة: هذا الدخل غير مشمول في دخلك من الماس"; +"20.20.56_text_17" = "دخل"; +"20.20.56_text_18" = "مقبول"; +"20.20.56_text_19" = "مرفوض"; +"20.20.56_text_20" = "والآخر يرفض دعوتك لتغيير العلاقات."; diff --git a/YuMi/en.lproj/Localizable.strings b/YuMi/en.lproj/Localizable.strings index 4cc4b14d..fa0ea7c4 100644 --- a/YuMi/en.lproj/Localizable.strings +++ b/YuMi/en.lproj/Localizable.strings @@ -1036,7 +1036,8 @@ "XPMineVerifIdentityViewController8" = "Please enter the verification code you received"; "XPMineCollectRoomListViewController0" = "Unfavorited successfully"; -"XPMineCollectRoomListViewController1" = "Favorited rooms"; +"XPMineCollectRoomListViewController1" = "Favorite Rooms"; +"XPMineCollectRoomListViewController1" = "Favorite Rooms"; "XPMineCollectRoomListViewController2" = "Please select a room"; "XPMineCollectRoomListViewController3" = "Please select a room"; "XPMineCollectRoomListViewController4" = "Select All"; @@ -2878,7 +2879,7 @@ "XPMineTheGuildCell0" = "Agnecy · Room"; "XPMineTheGuildCell1" = "Join Agency"; "XPMineTheGuildCell2" = "Join VIP"; -"XPMineTheGuildCell3" = "My agent"; +"XPMineTheGuildCell3" = "My agency"; ///XPMineGiveDiamondVC "XPMineGiveDiamondVC0" = "Coins Gifting"; @@ -3926,15 +3927,15 @@ "20.20.51_text_21" = "Dynamic Avatar"; "20.20.51_text_22" = "It costs %@ coins to upload a dynamic avatar. "; "20.20.51_text_23" = "Friends"; -"20.20.51_text_24" = "Visitor"; +"20.20.51_text_24" = "Visitors"; "20.20.51_text_25" = "Be VIP%@ to view visitors!"; "20.20.51_text_26" = "Be VIP%@"; "20.20.51_text_27" = "1 Each time you upload a dynamic avatar, the system will deduct %@ coins from your account. Please make sure that your account balance is sufficient.\n2 Review process: After the upload is completed, the system will automatically enter the review process. During this period, please do not upload a new avatar again to avoid affecting the review progress.\n3 Review results: \nReview passed: Your new dynamic avatar will take effect immediately and be displayed to other users.\nReview failed: The system will automatically refund the %@ coins you spent after the review is completed. At the same time, you will receive a system notification.\n4 Irreversible operation: Please note that once the dynamic avatar is reviewed and takes effect, you will not be able to restore it to the previous avatar.\n"; "20.20.51_text_28" = "View Time: %@"; "20.20.51_text_29" = "Number of diamonds needs to be multiples of 1000"; -"20.20.56_text_1" = "当前匹配人数不足,匹配失败。是否重新匹配"; -"20.20.56_text_2" = "匹配失败,您消耗的金币已经退回你的钱包"; +"20.20.56_text_1" = "The current number of matches is not enough, the match failed. Re-match again?"; +"20.20.56_text_2" = "Match failed, the coins you consumed has been returned to your wallet"; "20.20.56_text_3" = "Change Relationship"; "20.20.56_text_4" = "Select the Relationship you want to change"; "20.20.56_text_5" = "After confirming the change, the original CP value and CP level will remain unchanged. Each relationship can only be changed once within 30 days"; @@ -3943,7 +3944,13 @@ "20.20.56_text_8" = "Sister"; "20.20.56_text_9" = "Parner"; "20.20.56_text_10" = "Application for Relationship Change"; -"20.20.56_text_11" = "您已经提交更换申请,请耐心等待。"; -"20.20.56_text_12" = "你需要30天才能更换状态。"; +"20.20.56_text_11" = "You have submitted a relationship change request, please be patient."; +"20.20.56_text_12" = "You need 30 days to change your relationship."; "20.20.56_text_13" = "The other invites you to change the relationship to %@"; "20.20.56_text_14" = "Your relationship has been changed to %@"; +"20.20.56_text_15" = "Income Tips"; +"20.20.56_text_16" = "Receive Bravo, you will get 2% of the coin income./nThe coins will be directly distributed to your coin wallet./nNote: This income is not included in diamond turnover."; +"20.20.56_text_17" = "Income"; +"20.20.56_text_18" = "Accepted"; +"20.20.56_text_19" = "Rejected"; +"20.20.56_text_20" = "The other rejects your invitation to change relationships."; diff --git a/YuMi/tr.lproj/Localizable.strings b/YuMi/tr.lproj/Localizable.strings index 0045db5f..4c3a947a 100644 --- a/YuMi/tr.lproj/Localizable.strings +++ b/YuMi/tr.lproj/Localizable.strings @@ -3727,17 +3727,23 @@ "20.20.51_text_28" = "Görüntüleme Süresi: %@"; "20.20.51_text_29" = "Elmas sayısının 1000 katları olması gerekir"; -"20.20.56_text_1" = "当前匹配人数不足,匹配失败。是否重新匹配"; -"20.20.56_text_2" = "匹配失败,您消耗的金币已经退回你的钱包"; -"20.20.56_text_3" = "Change Relationship"; -"20.20.56_text_4" = "Select the Relationship you want to change"; -"20.20.56_text_5" = "After confirming the change, the original CP value and CP level will remain unchanged. Each relationship can only be changed once within 30 days"; +"20.20.56_text_1" = "Mevcut eşleşme sayısı yeterli değil, eşleşme başarısız oldu. Tekrar eşleşelim mi?"; +"20.20.56_text_2" = "Eşleşme başarısız oldu, harcadığınız jetonlar cüzdanınıza iade edildi"; +"20.20.56_text_3" = "İlişkiyi Değiştir"; +"20.20.56_text_4" = "Değiştirmek istediğiniz İlişkiyi seçin"; +"20.20.56_text_5" = "Değişikliği onayladıktan sonra, orijinal CP değeri ve CP seviyesi değişmeden kalacaktır. Her ilişki 30 gün içinde yalnızca bir kez değiştirilebilir"; "20.20.56_text_6" = "CP"; -"20.20.56_text_7" = "Brother"; -"20.20.56_text_8" = "Sister"; -"20.20.56_text_9" = "Parner"; -"20.20.56_text_10" = "Application for Relationship Change"; -"20.20.56_text_11" = "您已经提交更换申请,请耐心等待。"; -"20.20.56_text_12" = "你需要30天才能更换状态。"; -"20.20.56_text_13" = "The other invites you to change the relationship to %@"; -"20.20.56_text_14" = "Your relationship has been changed to %@"; +"20.20.56_text_7" = "Kardeş"; +"20.20.56_text_8" = "Kız Kardeş"; +"20.20.56_text_9" = "Partner"; +"20.20.56_text_10" = "İlişki Değişikliği Başvurusu"; +"20.20.56_text_11" = "Bir ilişki değişikliği talebinde bulundunuz, lütfen sabırlı olun."; +"20.20.56_text_12" = "İlişkinizi değiştirmek için 30 güne ihtiyacınız var."; +"20.20.56_text_13" = "Diğeri, ilişkiyi %@ olarak değiştirmenizi ister"; +"20.20.56_text_14" = "İlişkiniz %@ olarak değiştirildi"; +"20.20.56_text_15" = "Gelir İpuçları"; +"20.20.56_text_16" = "Bravo alın, jeton gelirinin %2'sini alacaksınız.\nJetonlar doğrudan jeton cüzdanınıza dağıtılacak.\nNot: Bu gelir elmas cirosuna dahil değildir."; +"20.20.56_text_17" = "Gelir"; +"20.20.56_text_18" = "Kabul Edildi"; +"20.20.56_text_19" = "Reddedildi"; +"20.20.56_text_20" = "Diğeri sizin ilişkileri değiştirme davetinizi reddeder."; diff --git a/YuMi/zh-Hant.lproj/Localizable.strings b/YuMi/zh-Hant.lproj/Localizable.strings index 453fdae8..d8700dc3 100644 --- a/YuMi/zh-Hant.lproj/Localizable.strings +++ b/YuMi/zh-Hant.lproj/Localizable.strings @@ -3599,17 +3599,23 @@ "20.20.51_text_28" = "访客時間:%@"; "20.20.51_text_29" = "鑽石數量需要是1000的倍數"; -"20.20.56_text_1" = "当前匹配人数不足,匹配失败。是否重新匹配"; -"20.20.56_text_2" = "匹配失败,您消耗的金币已经退回你的钱包"; -"20.20.56_text_3" = "Change Relationship"; -"20.20.56_text_4" = "Select the Relationship you want to change"; -"20.20.56_text_5" = "After confirming the change, the original CP value and CP level will remain unchanged. Each relationship can only be changed once within 30 days"; +"20.20.56_text_1" = "目前的匹配次數不足,匹配失敗。再次匹配?"; +"20.20.56_text_2" = "匹配失敗,您消耗的硬幣已返回您的錢包"; +"20.20.56_text_3" = "改變關係"; +"20.20.56_text_4" = "選擇要變更的關係"; +"20.20.56_text_5" = "確認變更後,原CP值及CP等級維持不變。每個關係30天內只能更改一次"; "20.20.56_text_6" = "CP"; -"20.20.56_text_7" = "Brother"; -"20.20.56_text_8" = "Sister"; -"20.20.56_text_9" = "Parner"; -"20.20.56_text_10" = "Application for Relationship Change"; -"20.20.56_text_11" = "您已经提交更换申请,请耐心等待。"; -"20.20.56_text_12" = "你需要30天才能更换状态。"; -"20.20.56_text_13" = "The other invites you to change the relationship to %@"; -"20.20.56_text_14" = "Your relationship has been changed to %@"; +"20.20.56_text_7" = "兄弟"; +"20.20.56_text_8" = "姊姊"; +"20.20.56_text_9" = "合夥人"; +"20.20.56_text_10" = "關係變更申請"; +"20.20.56_text_11" = "您已提交變更關係的請求,請耐心等候。"; +"20.20.56_text_12" = "您需要 30 天才能變更關係。"; +"20.20.56_text_13" = "另一方邀請您將關係更改為 %@"; +"20.20.56_text_14" = "您的關係已變更為 %@"; +"20.20.56_text_15" = "收益提示"; +"20.20.56_text_16" = "收到Bravo,您將獲得2%的金幣收入。\n金幣將直接分發到您的硬幣錢包中。\n注意:此收入不包含在鑽石流水中。"; +"20.20.56_text_17" = "收益"; +"20.20.56_text_18" = "已接受"; +"20.20.56_text_19" = "已拒絕"; +"20.20.56_text_20" = "拒绝改变关系的邀请。";