From e17c7fd160e21aed5eaa41363132e0d9fead1b48 Mon Sep 17 00:00:00 2001 From: linyudan <1031378945@qq.com> Date: Tue, 21 Nov 2023 10:39:59 -0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E6=B6=88=E6=81=AF=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E4=BD=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../yinmeng-ios.xcodeproj/project.pbxproj | 86 ++++++++++++++++--- .../MewSessionListTableViewCell.h} | 2 +- .../MewSessionListTableViewCell.m} | 14 +-- .../MewSessionListViewController.h} | 2 +- .../MewSessionListViewController.m} | 12 +-- .../Mew/Room/View/MewRoomViewController.m | 20 ++++- .../View/RoomStageView/MewSocialStageView.h | 2 + .../View/RoomStageView/MewSocialStageView.m | 4 + .../Main/Tabbar/View/TabbarViewController.m | 4 +- .../ModuleKit/SendGiftView/Api/Api+Gift.h | 37 ++++++++ .../ModuleKit/SendGiftView/Api/Api+Gift.m | 35 ++++++++ .../SendGiftView/Model/GiftInfoModel.h | 30 +++++++ .../SendGiftView/Model/GiftInfoModel.m | 12 +++ .../SendGiftView/Model/GiftReceiveInfoModel.h | 50 +++++++++++ .../SendGiftView/Model/GiftReceiveInfoModel.m | 12 +++ .../YinMeng/Room/Presenter/YMRoomPresenter.h | 6 ++ .../YinMeng/Room/Presenter/YMRoomPresenter.m | 31 +++++++ .../YinMeng/Room/Protocol/YMRoomProtocol.h | 7 +- 18 files changed, 328 insertions(+), 38 deletions(-) rename yinmeng-ios/yinmeng-ios/Main/{YinMeng/Message/View/SessionList/SessionListTableViewCell.h => Mew/Message/View/SessionList/MewSessionListTableViewCell.h} (84%) rename yinmeng-ios/yinmeng-ios/Main/{YinMeng/Message/View/SessionList/SessionListTableViewCell.m => Mew/Message/View/SessionList/MewSessionListTableViewCell.m} (95%) rename yinmeng-ios/yinmeng-ios/Main/{YinMeng/Message/View/SessionList/SessionListViewController.h => Mew/Message/View/SessionList/MewSessionListViewController.h} (74%) rename yinmeng-ios/yinmeng-ios/Main/{YinMeng/Message/View/SessionList/SessionListViewController.m => Mew/Message/View/SessionList/MewSessionListViewController.m} (95%) create mode 100644 yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.h create mode 100644 yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.m create mode 100644 yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.h create mode 100644 yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.m create mode 100644 yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.h create mode 100644 yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.m diff --git a/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj b/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj index bb1a7c8..02db979 100644 --- a/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj +++ b/yinmeng-ios/yinmeng-ios.xcodeproj/project.pbxproj @@ -87,8 +87,8 @@ 8C9C842D2B0C697A00A601BC /* NIMBadgeView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C832D2B0C697A00A601BC /* NIMBadgeView.m */; }; 8C9C842E2B0C697A00A601BC /* UITableView+NIMScrollToBottom.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83302B0C697A00A601BC /* UITableView+NIMScrollToBottom.m */; }; 8C9C842F2B0C697A00A601BC /* UIView+NIM.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83322B0C697A00A601BC /* UIView+NIM.m */; }; - 8C9C84302B0C697A00A601BC /* SessionListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83342B0C697A00A601BC /* SessionListTableViewCell.m */; }; - 8C9C84312B0C697A00A601BC /* SessionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83352B0C697A00A601BC /* SessionListViewController.m */; }; + 8C9C84302B0C697A00A601BC /* MewSessionListTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */; }; + 8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C83352B0C697A00A601BC /* MewSessionListViewController.m */; }; 8C9C84322B0C697A00A601BC /* SessionMessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C833A2B0C697A00A601BC /* SessionMessageCell.m */; }; 8C9C84332B0C697A00A601BC /* SessionViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C833B2B0C697A00A601BC /* SessionViewController.m */; }; 8C9C84342B0C697A00A601BC /* MessageContentImage.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C833D2B0C697A00A601BC /* MessageContentImage.m */; }; @@ -164,6 +164,9 @@ 8C9C847A2B0C697A00A601BC /* MewLoginViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84162B0C697A00A601BC /* MewLoginViewController.m */; }; 8C9C847D2B0C6A6400A601BC /* TXFFmpeg.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C847C2B0C6A6400A601BC /* TXFFmpeg.xcframework */; }; 8C9C847F2B0C6A6A00A601BC /* TXSoundTouch.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8C9C847E2B0C6A6A00A601BC /* TXSoundTouch.xcframework */; }; + 8C9C84842B0D25EF00A601BC /* GiftInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84832B0D25EF00A601BC /* GiftInfoModel.m */; }; + 8C9C84892B0D286F00A601BC /* Api+Gift.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C84882B0D286F00A601BC /* Api+Gift.m */; }; + 8C9C848C2B0D2B8500A601BC /* GiftReceiveInfoModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 8C9C848B2B0D2B8500A601BC /* GiftReceiveInfoModel.m */; }; FFDAAB800AD6BB4653B4427F /* Pods_yinmeng_ios.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1797344FB85F47F60D0CC2A0 /* Pods_yinmeng_ios.framework */; }; /* End PBXBuildFile section */ @@ -340,10 +343,10 @@ 8C9C83302B0C697A00A601BC /* UITableView+NIMScrollToBottom.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UITableView+NIMScrollToBottom.m"; sourceTree = ""; }; 8C9C83312B0C697A00A601BC /* NIMBadgeView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NIMBadgeView.h; sourceTree = ""; }; 8C9C83322B0C697A00A601BC /* UIView+NIM.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+NIM.m"; sourceTree = ""; }; - 8C9C83342B0C697A00A601BC /* SessionListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionListTableViewCell.m; sourceTree = ""; }; - 8C9C83352B0C697A00A601BC /* SessionListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionListViewController.m; sourceTree = ""; }; - 8C9C83362B0C697A00A601BC /* SessionListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionListTableViewCell.h; sourceTree = ""; }; - 8C9C83372B0C697A00A601BC /* SessionListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionListViewController.h; sourceTree = ""; }; + 8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewSessionListTableViewCell.m; sourceTree = ""; }; + 8C9C83352B0C697A00A601BC /* MewSessionListViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewSessionListViewController.m; sourceTree = ""; }; + 8C9C83362B0C697A00A601BC /* MewSessionListTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewSessionListTableViewCell.h; sourceTree = ""; }; + 8C9C83372B0C697A00A601BC /* MewSessionListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MewSessionListViewController.h; sourceTree = ""; }; 8C9C83392B0C697A00A601BC /* SessionNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SessionNavView.h; sourceTree = ""; }; 8C9C833A2B0C697A00A601BC /* SessionMessageCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionMessageCell.m; sourceTree = ""; }; 8C9C833B2B0C697A00A601BC /* SessionViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SessionViewController.m; sourceTree = ""; }; @@ -506,6 +509,12 @@ 8C9C84162B0C697A00A601BC /* MewLoginViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MewLoginViewController.m; sourceTree = ""; }; 8C9C847C2B0C6A6400A601BC /* TXFFmpeg.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXFFmpeg.xcframework; path = Pods/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC/TXFFmpeg.xcframework; sourceTree = ""; }; 8C9C847E2B0C6A6A00A601BC /* TXSoundTouch.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = TXSoundTouch.xcframework; path = Pods/TXLiteAVSDK_TRTC/TXLiteAVSDK_TRTC/TXSoundTouch.xcframework; sourceTree = ""; }; + 8C9C84822B0D25EF00A601BC /* GiftInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftInfoModel.h; sourceTree = ""; }; + 8C9C84832B0D25EF00A601BC /* GiftInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftInfoModel.m; sourceTree = ""; }; + 8C9C84872B0D286F00A601BC /* Api+Gift.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Api+Gift.h"; sourceTree = ""; }; + 8C9C84882B0D286F00A601BC /* Api+Gift.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "Api+Gift.m"; sourceTree = ""; }; + 8C9C848A2B0D2B8500A601BC /* GiftReceiveInfoModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GiftReceiveInfoModel.h; sourceTree = ""; }; + 8C9C848B2B0D2B8500A601BC /* GiftReceiveInfoModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = GiftReceiveInfoModel.m; sourceTree = ""; }; A22C3BCB2715A2E8FDECEA30 /* Pods-yinmeng-ios.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.release.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.release.xcconfig"; sourceTree = ""; }; E9E8A33E3FDD457C53D1E6D7 /* Pods-yinmeng-ios.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-yinmeng-ios.debug.xcconfig"; path = "Target Support Files/Pods-yinmeng-ios/Pods-yinmeng-ios.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -962,6 +971,7 @@ 8C9C82E02B0C697A00A601BC /* YinMeng */ = { isa = PBXGroup; children = ( + 8C9C84802B0D25C700A601BC /* ModuleKit */, 8C9C82E12B0C697A00A601BC /* Home */, 8C9C82EE2B0C697A00A601BC /* Room */, 8C9C83222B0C697A00A601BC /* Message */, @@ -1219,7 +1229,6 @@ isa = PBXGroup; children = ( 8C9C832C2B0C697A00A601BC /* NIMViews */, - 8C9C83332B0C697A00A601BC /* SessionList */, 8C9C83382B0C697A00A601BC /* Session */, ); path = View; @@ -1241,10 +1250,10 @@ 8C9C83332B0C697A00A601BC /* SessionList */ = { isa = PBXGroup; children = ( - 8C9C83342B0C697A00A601BC /* SessionListTableViewCell.m */, - 8C9C83352B0C697A00A601BC /* SessionListViewController.m */, - 8C9C83362B0C697A00A601BC /* SessionListTableViewCell.h */, - 8C9C83372B0C697A00A601BC /* SessionListViewController.h */, + 8C9C83342B0C697A00A601BC /* MewSessionListTableViewCell.m */, + 8C9C83352B0C697A00A601BC /* MewSessionListViewController.m */, + 8C9C83362B0C697A00A601BC /* MewSessionListTableViewCell.h */, + 8C9C83372B0C697A00A601BC /* MewSessionListViewController.h */, ); path = SessionList; sourceTree = ""; @@ -1758,10 +1767,10 @@ isa = PBXGroup; children = ( 8C9C83E92B0C697A00A601BC /* RoomStageView */, - 8C9C83EF2B0C697A00A601BC /* MewRoomViewController.h */, 8C9C83F02B0C697A00A601BC /* RoomRightView */, 8C9C83F32B0C697A00A601BC /* RoomHeaderView */, 8C9C83F62B0C697A00A601BC /* RoomMessageView */, + 8C9C83EF2B0C697A00A601BC /* MewRoomViewController.h */, 8C9C83F92B0C697A00A601BC /* MewRoomViewController.m */, ); path = View; @@ -1845,6 +1854,7 @@ 8C9C84032B0C697A00A601BC /* Message */ = { isa = PBXGroup; children = ( + 8C9C848D2B0D30A800A601BC /* View */, ); path = Message; sourceTree = ""; @@ -1908,6 +1918,51 @@ path = Sources; sourceTree = ""; }; + 8C9C84802B0D25C700A601BC /* ModuleKit */ = { + isa = PBXGroup; + children = ( + 8C9C84812B0D25D700A601BC /* SendGiftView */, + ); + path = ModuleKit; + sourceTree = ""; + }; + 8C9C84812B0D25D700A601BC /* SendGiftView */ = { + isa = PBXGroup; + children = ( + 8C9C84862B0D286000A601BC /* Api */, + 8C9C84852B0D284000A601BC /* Model */, + ); + path = SendGiftView; + sourceTree = ""; + }; + 8C9C84852B0D284000A601BC /* Model */ = { + isa = PBXGroup; + children = ( + 8C9C84822B0D25EF00A601BC /* GiftInfoModel.h */, + 8C9C84832B0D25EF00A601BC /* GiftInfoModel.m */, + 8C9C848A2B0D2B8500A601BC /* GiftReceiveInfoModel.h */, + 8C9C848B2B0D2B8500A601BC /* GiftReceiveInfoModel.m */, + ); + path = Model; + sourceTree = ""; + }; + 8C9C84862B0D286000A601BC /* Api */ = { + isa = PBXGroup; + children = ( + 8C9C84872B0D286F00A601BC /* Api+Gift.h */, + 8C9C84882B0D286F00A601BC /* Api+Gift.m */, + ); + path = Api; + sourceTree = ""; + }; + 8C9C848D2B0D30A800A601BC /* View */ = { + isa = PBXGroup; + children = ( + 8C9C83332B0C697A00A601BC /* SessionList */, + ); + path = View; + sourceTree = ""; + }; B603F71B608343F0E1A79C4B /* Frameworks */ = { isa = PBXGroup; children = ( @@ -2062,8 +2117,9 @@ 8C9C82A92B0C695600A601BC /* BaseNavigationController.m in Sources */, 8C9C82BC2B0C695600A601BC /* UserInfoModel.m in Sources */, 8C9C84602B0C697A00A601BC /* MewVoiceGuideView.m in Sources */, - 8C9C84312B0C697A00A601BC /* SessionListViewController.m in Sources */, + 8C9C84312B0C697A00A601BC /* MewSessionListViewController.m in Sources */, 8C9C82AB2B0C695600A601BC /* NetImageConfig.m in Sources */, + 8C9C84892B0D286F00A601BC /* Api+Gift.m in Sources */, 8C9C843A2B0C697A00A601BC /* BaseRtcImpl.m in Sources */, 8C9C84672B0C697A00A601BC /* MewHeaderView.m in Sources */, 8C9C84662B0C697A00A601BC /* MewUserIntroductionView.m in Sources */, @@ -2093,7 +2149,7 @@ 8C9C84722B0C697A00A601BC /* MewPartyListCollectionViewCell.m in Sources */, 8C9C846F2B0C697A00A601BC /* MewRoomMessageTableCell.m in Sources */, 8C9C84282B0C697A00A601BC /* YMRoomMessageParser.m in Sources */, - 8C9C84302B0C697A00A601BC /* SessionListTableViewCell.m in Sources */, + 8C9C84302B0C697A00A601BC /* MewSessionListTableViewCell.m in Sources */, 8C9C84652B0C697A00A601BC /* MewShowVoiceView.m in Sources */, 8C9C846D2B0C697A00A601BC /* MewRoomRightView.m in Sources */, 8C9C84582B0C697A00A601BC /* MainPresenter.m in Sources */, @@ -2152,6 +2208,7 @@ 8C9C844C2B0C697A00A601BC /* CustomAttachmentDecoder.m in Sources */, 8C9C845E2B0C697A00A601BC /* AudioPlayerManager.m in Sources */, 8C9C84352B0C697A00A601BC /* MessageContentUnSupportView.m in Sources */, + 8C9C848C2B0D2B8500A601BC /* GiftReceiveInfoModel.m in Sources */, 8C9C84572B0C697A00A601BC /* Api+Login.m in Sources */, 8C9C82CB2B0C695600A601BC /* TimeIntervalUtils.m in Sources */, 8C9C84192B0C697A00A601BC /* HomeRecommendRoomModel.m in Sources */, @@ -2174,6 +2231,7 @@ 8C9C84472B0C697A00A601BC /* MewMineCollectionTableViewCell.m in Sources */, 8C9C844E2B0C697A00A601BC /* LoginPresenter.m in Sources */, 8C9C84642B0C697A00A601BC /* MewRightFollowVoiceView.m in Sources */, + 8C9C84842B0D25EF00A601BC /* GiftInfoModel.m in Sources */, 8C9C84742B0C697A00A601BC /* MewRechargeViewController.m in Sources */, 8C9C84272B0C697A00A601BC /* YMNetImageYYLabel.m in Sources */, 8C9C842A2B0C697A00A601BC /* Api+Room.m in Sources */, diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListTableViewCell.h b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListTableViewCell.h similarity index 84% rename from yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListTableViewCell.h rename to yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListTableViewCell.h index 95fbea8..0cccf23 100644 --- a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListTableViewCell.h +++ b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListTableViewCell.h @@ -10,7 +10,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SessionListTableViewCell : UITableViewCell +@interface MewSessionListTableViewCell : UITableViewCell @property(nonatomic,strong) NIMRecentSession *session; - (void)renderWithSession:(NIMRecentSession*)recent; diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListTableViewCell.m b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListTableViewCell.m similarity index 95% rename from yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListTableViewCell.m rename to yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListTableViewCell.m index 8ee48c9..5963ea9 100644 --- a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListTableViewCell.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListTableViewCell.m @@ -5,7 +5,7 @@ // Created by 触海 on 2023/11/9. // -#import "SessionListTableViewCell.h" +#import "MewSessionListTableViewCell.h" /// Third #import #import @@ -19,7 +19,7 @@ #import "TimeIntervalUtils.h" #import "UIView+NIM.h" -@interface SessionListTableViewCell() +@interface MewSessionListTableViewCell() /// 内容 @property (nonatomic, strong) UIView *containerView; @@ -37,7 +37,7 @@ //@property (nonatomic,strong) UIView *divider; @end -@implementation SessionListTableViewCell +@implementation MewSessionListTableViewCell #pragma mark - Public Method - (void)renderWithSession:(NIMRecentSession *)recent { @@ -213,13 +213,5 @@ return _badgeView; } -//- (UIView *)divider { -// if (!_divider) { -// _divider = [[UIView alloc]init]; -// _divider.backgroundColor = UIColor.blackColor; -// _divider.hidden = YES; -// } -// return _divider; -//} @end diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListViewController.h b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListViewController.h similarity index 74% rename from yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListViewController.h rename to yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListViewController.h index d338a3f..84beddb 100644 --- a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListViewController.h +++ b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListViewController.h @@ -9,7 +9,7 @@ NS_ASSUME_NONNULL_BEGIN -@interface SessionListViewController : BaseViewController +@interface MewSessionListViewController : BaseViewController @end diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListViewController.m b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListViewController.m similarity index 95% rename from yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListViewController.m rename to yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListViewController.m index 8bed4eb..948a714 100644 --- a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Message/View/SessionList/SessionListViewController.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mew/Message/View/SessionList/MewSessionListViewController.m @@ -5,16 +5,16 @@ // Created by 触海 on 2023/11/9. // -#import "SessionListViewController.h" +#import "MewSessionListViewController.h" /// Third #import /// View -#import "SessionListTableViewCell.h" +#import "MewSessionListTableViewCell.h" /// Tool #import "YMMacro.h" #import "ClientConfig.h" -@interface SessionListViewController () /// HeaderView @@ -33,7 +33,7 @@ @end -@implementation SessionListViewController +@implementation MewSessionListViewController - (void)dealloc { @@ -179,7 +179,7 @@ } - (nonnull UITableViewCell *)tableView:(nonnull UITableView *)tableView cellForRowAtIndexPath:(nonnull NSIndexPath *)indexPath { - SessionListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([SessionListTableViewCell class])]; + MewSessionListTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([MewSessionListTableViewCell class])]; return cell; @@ -305,7 +305,7 @@ _sessionListView.dataSource = self; _sessionListView.showsVerticalScrollIndicator = NO; _sessionListView.rowHeight = 80; - [_sessionListView registerClass:[SessionListTableViewCell class] forCellReuseIdentifier:NSStringFromClass([SessionListTableViewCell class])]; + [_sessionListView registerClass:[MewSessionListTableViewCell class] forCellReuseIdentifier:NSStringFromClass([MewSessionListTableViewCell class])]; } return _sessionListView; diff --git a/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/MewRoomViewController.m b/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/MewRoomViewController.m index a5f614b..cdc360b 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/MewRoomViewController.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/MewRoomViewController.m @@ -20,6 +20,7 @@ #import "YMMessageInfoModel.h" #import "AttachmentModel.h" #import "MicroQueueModel.h" +#import "GiftInfoModel.h" ///Tool #import "AccountInfoStorage.h" #import "YMHUDTool.h" @@ -485,6 +486,16 @@ } } +/// 送礼物成功 +- (void)sendGiftSuccess:(GiftReceiveInfoModel *)receiveInfo originDic:(NSDictionary *)originDic uidCount:(NSInteger)uidCount { + +} + +/// 送礼物失败 +- (void)sendGiftFailWithCode:(NSInteger)code msg:(NSString *)msg { + +} + #pragma mark - MewRoomHeaderViewDelegate (header事件回调) - (void)didSelectMewRoomHeaderViewTarget:(NSInteger)target { if (target == 0) { @@ -509,8 +520,7 @@ [self randomEmoji]; } else { // 礼物 - - + [self sendRoomGift]; } } @@ -554,7 +564,13 @@ /// 礼物 - (void)sendRoomGift { + MewSocialStageView *mewStageView = (MewSocialStageView *)self.stageView; + if (mewStageView.selectUid.length == 0 || [mewStageView.selectUid isEqualToString:@""]) { + [self showErrorToast:@"请至少选择一个人"]; + return; + } + [self.presenter sendGift:mewStageView.selectUid roomUid:self.roomUid]; } #pragma mark - Init diff --git a/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.h b/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.h index 63a1573..923312c 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.h +++ b/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.h @@ -11,6 +11,8 @@ NS_ASSUME_NONNULL_BEGIN @interface MewSocialStageView : StageView +@property (nonatomic, strong, readonly) NSString *selectUid; + @end NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.m b/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.m index 3783782..0166e1f 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.m +++ b/yinmeng-ios/yinmeng-ios/Main/Mew/Room/View/RoomStageView/MewSocialStageView.m @@ -33,7 +33,10 @@ #define secondRowTop (firstRowTop + mcHeight + marginV2) @interface MewSocialStageView() +// 是否选中了坑位上的用户 @property (nonatomic, assign) BOOL isSelectMicUser; +// 选中坑位上用户的id +@property (nonatomic, strong) NSString *selectUid; @end @@ -94,6 +97,7 @@ MicroQueueModel* micModel = [[self getMicroQueue] objectForKey:[self indexToPosition:index]]; if (micModel.userInfo && micModel.userInfo.uid > 0) { + self.selectUid = [NSString stringWithFormat:@"%ld",micModel.userInfo.uid]; //麦上有人 UIView *selectMicroView = [self findMicroViewByIndex:index]; UIColor *color = self.isSelectMicUser ? [ThemeColor colorWithHexString:@"#9552FF"] : UIColor.clearColor; diff --git a/yinmeng-ios/yinmeng-ios/Main/Tabbar/View/TabbarViewController.m b/yinmeng-ios/yinmeng-ios/Main/Tabbar/View/TabbarViewController.m index 3c0c88f..1fe9c85 100644 --- a/yinmeng-ios/yinmeng-ios/Main/Tabbar/View/TabbarViewController.m +++ b/yinmeng-ios/yinmeng-ios/Main/Tabbar/View/TabbarViewController.m @@ -24,7 +24,7 @@ #import "MewLoginViewController.h" #import "LoginFullInfoViewController.h" #import "MewPartyViewController.h" -#import "SessionListViewController.h" +#import "MewSessionListViewController.h" #import "MewHomeViewController.h" //#import "loginb" ///Present @@ -74,7 +74,7 @@ // NSArray *tabLabel = @[@"首页",@"派对", @"消息"]; MewHomeViewController * home = [[MewHomeViewController alloc] init]; MewPartyViewController * party = [[MewPartyViewController alloc]init]; - SessionListViewController * me = [[SessionListViewController alloc]init]; + MewSessionListViewController * me = [[MewSessionListViewController alloc]init]; [self createTabBarItem:home title:@"" image:normalImageNames[0] selectedImage:selectImageNames[0]]; [self createTabBarItem:party title:@"" image:normalImageNames[1] selectedImage:selectImageNames[1]]; diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.h b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.h new file mode 100644 index 0000000..ceece8a --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.h @@ -0,0 +1,37 @@ +// +// Api+Gift.h +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import "Api.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface Api (Gift) + +/// 送礼物的接口 +/// @param complection 完成 +/// @param targetUids 送给谁的 +/// @param giftNum 送的个数 +/// @param sendType 送的类型 +/// @param giftId 礼物的id +/// @param giftSource 礼物的来源 +/// @param giftType 礼物的类型 +/// @param roomUid 房间的ID +/// @param msg 喊话的 +/// @param uid 用户的id ++ (void)requestSendGift:(HttpRequestHelperCompletion)complection + targetUids:(NSString *)targetUids + giftNum:(NSString *)giftNum + sendType:(NSString *)sendType + giftId:(NSString *)giftId + giftSource:(NSString *)giftSource + giftType:(NSString *)giftType + roomUid:(NSString *)roomUid + msg:(NSString *)msg + uid:(NSString *)uid; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.m b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.m new file mode 100644 index 0000000..d46d03f --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Api/Api+Gift.m @@ -0,0 +1,35 @@ +// +// Api+Gift.m +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import "Api+Gift.h" + +@implementation Api (Gift) +/// 送礼物的接口 +/// @param complection 完成 +/// @param targetUids 送给谁的 +/// @param giftNum 送的个数 +/// @param sendType 送的类型 +/// @param giftId 礼物的id +/// @param giftSource 礼物的来源 +/// @param giftType 礼物的类型 +/// @param roomUid 房间的ID +/// @param msg 喊话的 +/// @param uid 用户的id ++ (void)requestSendGift:(HttpRequestHelperCompletion)complection + targetUids:(NSString *)targetUids + giftNum:(NSString *)giftNum + sendType:(NSString *)sendType + giftId:(NSString *)giftId + giftSource:(NSString *)giftSource + giftType:(NSString *)giftType + roomUid:(NSString *)roomUid + msg:(NSString *)msg + uid:(NSString *)uid { + NSString *method = @"gift/sendV4"; + [self makeRequest:method method:HttpRequestHelperMethodPOST completion:complection, __FUNCTION__, targetUids, giftNum, sendType, giftId, giftSource, giftType, roomUid, msg, uid, nil]; +} +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.h b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.h new file mode 100644 index 0000000..dbadfe5 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.h @@ -0,0 +1,30 @@ +// +// GiftInfoModel.h +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +typedef NS_ENUM(NSUInteger, GiftSendType) { + GiftSendType_Room = 1,//给主播直接刷礼物 + GiftSendType_Chat = 2, //私聊送个人礼物 + GiftSendType_OnMic = 3, //房间内给坑位上的人送礼物 +}; + +@interface GiftInfoModel : NSObject +///礼物id +@property (nonatomic, assign)NSInteger giftId; +///礼物名字 +@property (nonatomic, strong)NSString *giftName; +///价格 +@property (nonatomic, assign)double goldPrice; +///礼物url +@property (nonatomic, copy)NSString *giftUrl; +//@property (nonatomic, assign) GiftType giftType;//礼物类型 +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.m b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.m new file mode 100644 index 0000000..4f18873 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftInfoModel.m @@ -0,0 +1,12 @@ +// +// GiftInfoModel.m +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import "GiftInfoModel.h" + +@implementation GiftInfoModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.h b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.h new file mode 100644 index 0000000..d7ae755 --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.h @@ -0,0 +1,50 @@ +// +// GiftReceiveInfoModel.h +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import "NSObject+MJExtension.h" +#import "GiftInfoModel.h" + +NS_ASSUME_NONNULL_BEGIN + +@interface GiftReceiveInfoModel : NSObject +///目标的uid +@property(nonatomic,copy)NSString * targetUid; +///目标的头像 +@property (nonatomic,copy) NSString *targetAvatar; +///目标的昵称 +@property (nonatomic,copy) NSString *targetNick; +@property (nonatomic,strong) NSArray *targetUids; +///礼物信息 +@property (nonatomic,strong) GiftInfoModel *gift; +///礼物信息 +@property (nonatomic,strong) GiftInfoModel *giftInfo; +///送礼物的人uid +@property(nonatomic, assign)NSString * uid; +///礼物的id +@property (nonatomic,copy) NSString *giftId; +///送礼物的人 +@property(nonatomic, strong)NSString *nick; +///送礼物的人的头像 +@property(nonatomic, strong)NSString *avatar; +///送礼物的个数 +@property (assign, nonatomic) NSInteger giftNum; +///礼物名字 +@property (nonatomic,strong)NSString *giftName; +///动效url +@property (copy,nonatomic) NSString *vggUrl; +///vap动效url +@property (nonatomic, copy) NSString *viewUrl; + + +// 这里先写死string +///礼物来源 +@property (nonatomic,assign) NSString* sourceType; +///房间送礼物的类型 +@property (nonatomic,assign) NSString* roomSendGiftType; +@end + +NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.m b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.m new file mode 100644 index 0000000..316a9ec --- /dev/null +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/ModuleKit/SendGiftView/Model/GiftReceiveInfoModel.m @@ -0,0 +1,12 @@ +// +// GiftReceiveInfoModel.m +// yinmeng-ios +// +// Created by 触海 on 2023/11/21. +// + +#import "GiftReceiveInfoModel.h" + +@implementation GiftReceiveInfoModel + +@end diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.h b/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.h index ac158b8..d48c18d 100644 --- a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.h +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.h @@ -51,6 +51,12 @@ NS_ASSUME_NONNULL_BEGIN /// @param roomUid 房间uid - (void)reportUserOutRoom:(NSString *)roomUid; +/// Mew 送礼物 +/// @param targetUids 送礼物的人 +/// @param roomUid 房主的uid +- (void)sendGift:(NSString *)targetUids + roomUid:(NSString *)roomUid; + @end NS_ASSUME_NONNULL_END diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.m b/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.m index 0ec2281..cd71ddc 100644 --- a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.m +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Presenter/YMRoomPresenter.m @@ -8,11 +8,13 @@ #import "YMRoomPresenter.h" ///Api #import "Api+Room.h" +#import "Api+Gift.h" ///Model #import "UserInfoModel.h" #import "RoomInfoModel.h" #import "AccountInfoStorage.h" #import "YMMessageRemoteExtModel.h" +#import "GiftReceiveInfoModel.h" ///P #import "YMRoomProtocol.h" ///Third @@ -154,4 +156,33 @@ } uid:[[AccountInfoStorage instance] getUid] roomUid:roomUid ticket:[[AccountInfoStorage instance] getTicket]]; } +/// Mew 送礼物 房间内给麦位上的某个用户送普通的薯片礼物,默认写死 +/// @param targetUids 送礼物的人 +/// @param roomUid 房主的uid +- (void)sendGift:(NSString *)targetUids + roomUid:(NSString *)roomUid { + NSString *uid = [AccountInfoStorage instance].getUid; + NSString *giftNum = @"1"; + // 房间内给麦位上的人送礼物 + NSString *sendType = @"3"; + // 薯片的giftid + NSString * giftId = @"2"; + // 普通礼物 + NSString *giftSource = @"1"; + // 礼物类型 + NSString *giftType = @""; + // 送一个人 + NSString *roomSendType = @"3"; + + [Api requestSendGift:[self createHttpCompletion:^(BaseModel * _Nonnull data) { + GiftReceiveInfoModel *receive = [GiftReceiveInfoModel modelWithJSON:data.data]; + receive.sourceType = giftSource; + receive.roomSendGiftType = roomSendType; + + [[self getView] sendGiftSuccess:receive originDic:data.data uidCount:1]; + } fail:^(NSInteger code, NSString * _Nullable msg) { + [[self getView] sendGiftFailWithCode:code msg:msg]; + }] targetUids:targetUids giftNum:giftNum sendType:sendType giftId:giftId giftSource:giftSource giftType:giftType roomUid:roomUid msg:@"" uid:uid]; +} + @end diff --git a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Protocol/YMRoomProtocol.h b/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Protocol/YMRoomProtocol.h index ac6047f..832339e 100644 --- a/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Protocol/YMRoomProtocol.h +++ b/yinmeng-ios/yinmeng-ios/Main/YinMeng/Room/Protocol/YMRoomProtocol.h @@ -6,7 +6,7 @@ // #import -@class RoomInfoModel, NIMChatroom; +@class RoomInfoModel, NIMChatroom, GiftReceiveInfoModel; NS_ASSUME_NONNULL_BEGIN @@ -22,6 +22,11 @@ NS_ASSUME_NONNULL_BEGIN ///获取当前房间的信息,个播房 //- (void)getCurrentRoomInfoSuccess:(RoomInfoModel *_Nullable)roomInfo; + +/// Mew 送礼物成功。房间内给麦位上的某个用户送普通的薯片礼物,默认写死 +- (void)sendGiftSuccess:(GiftReceiveInfoModel *)receiveInfo originDic:(NSDictionary *)originDic uidCount:(NSInteger)uidCount; +///送礼物失败 +- (void)sendGiftFailWithCode:(NSInteger)code msg:(NSString *)msg; @end NS_ASSUME_NONNULL_END