新用户充值优惠弹窗

This commit is contained in:
chenguilong
2022-07-28 11:56:59 +08:00
parent 8209c58772
commit 8c7e93a84a
26 changed files with 554 additions and 0 deletions

View File

@@ -59,8 +59,10 @@
UIKIT_EXTERN NSString * const kRoomGiftEffectUpdateNotificationKey;
UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
UIKIT_EXTERN NSString * kNewUserRechargeKey;
NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//
NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//退
@interface XPRoomViewController ()<XPRoomProtocol, RoomHostDelegate, NIMChatroomManagerDelegate, NIMChatManagerDelegate, NIMConversationManagerDelegate, NIMLoginManagerDelegate, XPRoomSettingInputViewDelegate,XPRoomLittleGameContainerViewDelegate, AnchorRoomScrollViewDelegate>
///
@@ -1169,6 +1171,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[[XPRoomMiniManager shareManager] resetLocalMessage];
[[RtcManager instance] exitRoom];
[self.presenter reportUserOutRoom:roomUid];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
} cancelHandler:^{
@@ -1180,6 +1183,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[[XPRoomMiniManager shareManager] resetLocalMessage];
[[RtcManager instance] exitRoom];
[self.presenter reportUserOutRoom:roomUid];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
} else if(self.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
@@ -1203,6 +1207,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
[[XPRoomMiniManager shareManager] resetLocalMessage];
[[RtcManager instance] exitRoom];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
} cancelHandler:^{
@@ -1213,6 +1218,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
[[XPRoomMiniManager shareManager] resetLocalMessage];
[[RtcManager instance] exitRoom];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
}else if(self.roomInfo.type == RoomType_MiniGame) {
@@ -1227,6 +1233,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[[RtcManager instance] exitRoom];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
});
} cancelHandler:^{
@@ -1236,6 +1243,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[[RtcManager instance] exitRoom];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
}
} else {
@@ -1243,6 +1251,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[[XPRoomMiniManager shareManager] resetLocalMessage];
[[RtcManager instance] exitRoom];
[self.presenter reportUserOutRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.uid]];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
}
}
@@ -1264,6 +1273,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[self.view endEditing:YES];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
});
} cancelHandler:^{
@@ -1277,6 +1287,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
[self.view endEditing:YES];
[self.littleGameView handleSelfInExitEvent];
[self.littleGameView destroyMG];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
}
}else {
@@ -1286,6 +1297,7 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
NSDictionary * dic = @{@"roomInfo":self.roomInfo.model2dictionary, @"userInfo":self.userInfo.model2dictionary, @"microQueue":self.getMicroQueue};
[[NSNotificationCenter defaultCenter] postNotificationName:kRoomMiniNotificationKey object:nil userInfo:dic];
[self.view endEditing:YES];
[self handleFirstOutRoom];
[self dismissViewControllerAnimated:YES completion:nil];
}
}
@@ -1319,6 +1331,17 @@ NSString * const kHadShowAnchorRoomTipKey = @"kHadShowAnchorRoomTipKey";//是否
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {
return [self.stageView animationPointAtStageViewByUid:uid];
}
#pragma mark - 退
- (void)handleFirstOutRoom {
NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
// if (![defaults boolForKey:kHadQuitOtherRoomKey] && self.userInfo.uid != self.roomInfo.uid) {
// [defaults setBool:YES forKey:kHadQuitOtherRoomKey];
// [defaults synchronize];
[[NSNotificationCenter defaultCenter] postNotificationName:kNewUserRechargeKey object:nil];
// }
}
#pragma mark - XPRoomLittleGameContainerViewDelegate
- (void)hiddenSudGamePostionView {
[self.functionView hiddenSudGamePostionView];