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