bug修复
This commit is contained in:
@@ -201,7 +201,9 @@
|
|||||||
self.circuseeBtn.backgroundColor = bgBtnColor;
|
self.circuseeBtn.backgroundColor = bgBtnColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
-(void)showRoomVC{
|
||||||
|
[self didClickEnterRoom];
|
||||||
|
}
|
||||||
#pragma mark - Getters And Setters
|
#pragma mark - Getters And Setters
|
||||||
- (void)setBroadcastModel:(GiftReceiveInfoModel *)broadcastModel {
|
- (void)setBroadcastModel:(GiftReceiveInfoModel *)broadcastModel {
|
||||||
_broadcastModel = broadcastModel;
|
_broadcastModel = broadcastModel;
|
||||||
@@ -241,7 +243,8 @@
|
|||||||
_senderAvatarView.layer.cornerRadius = kGetScaleWidth(44)/2;
|
_senderAvatarView.layer.cornerRadius = kGetScaleWidth(44)/2;
|
||||||
_senderAvatarView.layer.masksToBounds = YES;
|
_senderAvatarView.layer.masksToBounds = YES;
|
||||||
_senderAvatarView.userInteractionEnabled = YES;
|
_senderAvatarView.userInteractionEnabled = YES;
|
||||||
|
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(showRoomVC)];
|
||||||
|
[_senderAvatarView addGestureRecognizer:tap];
|
||||||
}
|
}
|
||||||
return _senderAvatarView;
|
return _senderAvatarView;
|
||||||
}
|
}
|
||||||
|
@@ -30,6 +30,7 @@
|
|||||||
@property(nonatomic,strong) UIButton *pi_backBtn;
|
@property(nonatomic,strong) UIButton *pi_backBtn;
|
||||||
///背景
|
///背景
|
||||||
@property(nonatomic,strong) UIView *bgView;
|
@property(nonatomic,strong) UIView *bgView;
|
||||||
|
///隐藏键盘
|
||||||
@property(nonatomic,strong) UIButton *hiddenViewBnt;
|
@property(nonatomic,strong) UIButton *hiddenViewBnt;
|
||||||
///背景图片
|
///背景图片
|
||||||
@property(nonatomic,strong) UIImageView *topImageView;
|
@property(nonatomic,strong) UIImageView *topImageView;
|
||||||
@@ -43,6 +44,10 @@
|
|||||||
@property(nonatomic,strong) UIImageView *diamondIconView;
|
@property(nonatomic,strong) UIImageView *diamondIconView;
|
||||||
//加号
|
//加号
|
||||||
@property(nonatomic,strong) UIImageView *addIconView;
|
@property(nonatomic,strong) UIImageView *addIconView;
|
||||||
|
///大厅红包
|
||||||
|
@property(nonatomic,strong) PIRoomSendRedPacketItemVC *roomRedVC;
|
||||||
|
///全服红包
|
||||||
|
@property(nonatomic,strong) PIRoomSendRedPacketItemVC *entireServerVC;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@implementation PIRoomSendRedPacketVC
|
@implementation PIRoomSendRedPacketVC
|
||||||
@@ -65,12 +70,9 @@
|
|||||||
///获取用户钱包信息成功
|
///获取用户钱包信息成功
|
||||||
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo {
|
- (void)getUserWalletInfo:(WalletInfoModel *)balanceInfo {
|
||||||
self.diamondNumTextView.text = balanceInfo.diamonds;
|
self.diamondNumTextView.text = balanceInfo.diamonds;
|
||||||
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1.0 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
|
self.roomRedVC.walletModel = balanceInfo;
|
||||||
for (int i = 0; i < self.titles.count; i++) {
|
self.entireServerVC.walletModel = balanceInfo;
|
||||||
PIRoomSendRedPacketItemVC<JXPagerViewListViewDelegate> * list = (PIRoomSendRedPacketItemVC<JXPagerViewListViewDelegate> *)[self.contentView.validListDict objectForKey:[NSNumber numberWithInteger:i]];
|
|
||||||
list.walletModel = balanceInfo;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -179,13 +181,14 @@
|
|||||||
|
|
||||||
- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
|
- (id<JXPagerViewListViewDelegate>)pagerView:(JXPagerView *)pagerView initListAtIndex:(NSInteger)index {
|
||||||
|
|
||||||
PIRoomSendRedPacketItemVC<JXPagerViewListViewDelegate> * list = (PIRoomSendRedPacketItemVC<JXPagerViewListViewDelegate> *)[self.contentView.validListDict objectForKey:[NSNumber numberWithInteger:index]];
|
RoomInfoModel *roomInfo = self.hostDelegate.getRoomInfo;
|
||||||
if (list) {
|
if(roomInfo.redEnvelopeType == 1){
|
||||||
return list;
|
return self.roomRedVC;
|
||||||
} else {
|
}else if(roomInfo.redEnvelopeType == 2){
|
||||||
PIRoomSendRedPacketItemVC *vc = [[PIRoomSendRedPacketItemVC alloc]initWithDelegate:self.hostDelegate type:index];
|
return self.entireServerVC;
|
||||||
|
}else{
|
||||||
|
return index == 0 ? self.roomRedVC : self.entireServerVC;
|
||||||
|
|
||||||
return vc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -355,4 +358,16 @@
|
|||||||
}
|
}
|
||||||
return _hiddenViewBnt;
|
return _hiddenViewBnt;
|
||||||
}
|
}
|
||||||
|
- (PIRoomSendRedPacketItemVC *)roomRedVC{
|
||||||
|
if(!_roomRedVC){
|
||||||
|
_roomRedVC = [[PIRoomSendRedPacketItemVC alloc]initWithDelegate:self.hostDelegate type:0];
|
||||||
|
}
|
||||||
|
return _roomRedVC;
|
||||||
|
}
|
||||||
|
- (PIRoomSendRedPacketItemVC *)entireServerVC{
|
||||||
|
if(!_entireServerVC){
|
||||||
|
_entireServerVC = [[PIRoomSendRedPacketItemVC alloc]initWithDelegate:self.hostDelegate type:1];
|
||||||
|
}
|
||||||
|
return _entireServerVC;
|
||||||
|
}
|
||||||
@end
|
@end
|
||||||
|
@@ -211,11 +211,11 @@
|
|||||||
}
|
}
|
||||||
NSInteger time = [self getTimeDifferenceWithTimestamp:_receiveModel.timestamp / 1000 beginTime:_receiveModel.beginTime / 1000];
|
NSInteger time = [self getTimeDifferenceWithTimestamp:_receiveModel.timestamp / 1000 beginTime:_receiveModel.beginTime / 1000];
|
||||||
if(time > 0){
|
if(time > 0){
|
||||||
|
self.isCountDownEnd = NO;
|
||||||
|
[self.countDownHelper openCountdownWithTime:(int)time];
|
||||||
if(_receiveModel.finish == 1){
|
if(_receiveModel.finish == 1){
|
||||||
self.countDownView.hidden = NO;
|
self.countDownView.hidden = NO;
|
||||||
self.countDownTitleView.hidden = NO;
|
self.countDownTitleView.hidden = NO;
|
||||||
self.isCountDownEnd = NO;
|
|
||||||
[self.countDownHelper openCountdownWithTime:(int)time];
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
self.robView.hidden = NO;
|
self.robView.hidden = NO;
|
||||||
@@ -244,11 +244,13 @@
|
|||||||
|
|
||||||
NSInteger time = [self getTimeDifferenceWithTimestamp:_receiveModel.timestamp / 1000 beginTime:_receiveModel.beginTime / 1000];
|
NSInteger time = [self getTimeDifferenceWithTimestamp:_receiveModel.timestamp / 1000 beginTime:_receiveModel.beginTime / 1000];
|
||||||
if(time > 0){
|
if(time > 0){
|
||||||
|
self.isCountDownEnd = NO;
|
||||||
|
[self.countDownHelper openCountdownWithTime:(int)time];
|
||||||
if(_receiveModel.finish == 1){
|
if(_receiveModel.finish == 1){
|
||||||
self.countDownView.hidden = NO;
|
self.countDownView.hidden = NO;
|
||||||
self.countDownTitleView.hidden = NO;
|
self.countDownTitleView.hidden = NO;
|
||||||
self.isCountDownEnd = NO;
|
|
||||||
[self.countDownHelper openCountdownWithTime:(int)time];
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
self.robView.hidden = NO;
|
self.robView.hidden = NO;
|
||||||
@@ -277,10 +279,11 @@
|
|||||||
|
|
||||||
NSInteger time = [self getTimeDifferenceWithTimestamp:_receiveModel.timestamp / 1000 beginTime:_receiveModel.beginTime / 1000];
|
NSInteger time = [self getTimeDifferenceWithTimestamp:_receiveModel.timestamp / 1000 beginTime:_receiveModel.beginTime / 1000];
|
||||||
if(time > 0){
|
if(time > 0){
|
||||||
|
[self.countDownHelper openCountdownWithTime:(int)time];
|
||||||
|
self.isCountDownEnd = NO;
|
||||||
if(_receiveModel.finish == 1){
|
if(_receiveModel.finish == 1){
|
||||||
self.countDownView.hidden = NO;
|
self.countDownView.hidden = NO;
|
||||||
self.countDownTitleView.hidden = NO;
|
self.countDownTitleView.hidden = NO;
|
||||||
[self.countDownHelper openCountdownWithTime:(int)time];
|
|
||||||
}else{
|
}else{
|
||||||
|
|
||||||
self.robView.hidden = NO;
|
self.robView.hidden = NO;
|
||||||
@@ -315,13 +318,13 @@
|
|||||||
}else if(self.receiveModel.kind == RedPacketConditionsType_Followd){
|
}else if(self.receiveModel.kind == RedPacketConditionsType_Followd){
|
||||||
if(self.isCountDownEnd == NO && self.receiveModel.finish == 0){
|
if(self.isCountDownEnd == NO && self.receiveModel.finish == 0){
|
||||||
[self removeFromSuperview];
|
[self removeFromSuperview];
|
||||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPReceiveRedPacketView18")];
|
[[NSNotificationCenter defaultCenter]postNotificationName:@"kOpenRedPacketNotification" object:nil userInfo:@{@"type":@(RedPacketConditionsType_Followd),@"uid":self.receiveModel.userId ?: @"",@"roomUid":self.receiveModel.roomUId ?: @""}];
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}else if(self.isCountDownEnd == YES && self.receiveModel.finish == 0){
|
}else if(self.isCountDownEnd == YES && self.receiveModel.finish == 0){
|
||||||
|
|
||||||
[self removeFromSuperview];
|
[self removeFromSuperview];
|
||||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kOpenRedPacketNotification" object:nil userInfo:@{@"type":@(RedPacketConditionsType_Followd),@"uid":self.receiveModel.userId ?: @"",@"roomUid":self.receiveModel.roomUId ?: @""}];
|
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPReceiveRedPacketView18")];
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}else if(self.isCountDownEnd == NO && self.receiveModel.finish == 1){
|
}else if(self.isCountDownEnd == NO && self.receiveModel.finish == 1){
|
||||||
return;
|
return;
|
||||||
@@ -330,13 +333,13 @@
|
|||||||
}else if(self.receiveModel.kind == RedPacketConditionsType_Share){
|
}else if(self.receiveModel.kind == RedPacketConditionsType_Share){
|
||||||
if(self.isCountDownEnd == NO && self.receiveModel.finish == 0){
|
if(self.isCountDownEnd == NO && self.receiveModel.finish == 0){
|
||||||
[self removeFromSuperview];
|
[self removeFromSuperview];
|
||||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPReceiveRedPacketView18")];
|
|
||||||
return;
|
|
||||||
}else if(self.isCountDownEnd == YES && self.receiveModel.finish == 0){
|
|
||||||
|
|
||||||
[self removeFromSuperview];
|
|
||||||
|
|
||||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kOpenRedPacketNotification" object:nil userInfo:@{@"type":@(RedPacketConditionsType_Share),@"uid":self.receiveModel.userId ?: @"",@"roomUid":self.receiveModel.roomUId ?: @""}];
|
[[NSNotificationCenter defaultCenter]postNotificationName:@"kOpenRedPacketNotification" object:nil userInfo:@{@"type":@(RedPacketConditionsType_Share),@"uid":self.receiveModel.userId ?: @"",@"roomUid":self.receiveModel.roomUId ?: @""}];
|
||||||
|
return;
|
||||||
|
}else if(self.isCountDownEnd == YES && self.receiveModel.finish == 0){
|
||||||
|
[self removeFromSuperview];
|
||||||
|
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPReceiveRedPacketView18")];
|
||||||
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}else if(self.isCountDownEnd == NO && self.receiveModel.finish == 1){
|
}else if(self.isCountDownEnd == NO && self.receiveModel.finish == 1){
|
||||||
@@ -345,13 +348,13 @@
|
|||||||
}else if(self.receiveModel.kind == RedPacketConditionsType_Scrolling){
|
}else if(self.receiveModel.kind == RedPacketConditionsType_Scrolling){
|
||||||
if(self.isCountDownEnd == NO && self.receiveModel.finish == 0){
|
if(self.isCountDownEnd == NO && self.receiveModel.finish == 0){
|
||||||
[self removeFromSuperview];
|
[self removeFromSuperview];
|
||||||
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPReceiveRedPacketView18")];
|
[[NSNotificationCenter defaultCenter]postNotificationName:@"kOpenRedPacketNotification" object:nil userInfo:@{@"type":@(RedPacketConditionsType_Scrolling),@"uid":self.receiveModel.userId ?: @"",@"roomUid":self.receiveModel.roomUId ?: @"",@"scrolling":self.receiveModel.message ?: @""}];
|
||||||
return;
|
return;
|
||||||
}else if(self.isCountDownEnd == YES && self.receiveModel.finish == 0){
|
}else if(self.isCountDownEnd == YES && self.receiveModel.finish == 0){
|
||||||
|
|
||||||
|
|
||||||
[self removeFromSuperview];
|
[self removeFromSuperview];
|
||||||
[[NSNotificationCenter defaultCenter]postNotificationName:@"kOpenRedPacketNotification" object:nil userInfo:@{@"type":@(RedPacketConditionsType_Scrolling),@"uid":self.receiveModel.userId ?: @"",@"roomUid":self.receiveModel.roomUId ?: @"",@"scrolling":self.receiveModel.message ?: @""}];
|
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPReceiveRedPacketView18")];
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}else if(self.isCountDownEnd == NO && self.receiveModel.finish == 1){
|
}else if(self.isCountDownEnd == NO && self.receiveModel.finish == 1){
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user