提交
This commit is contained in:
@@ -200,6 +200,7 @@
|
||||
NSDictionary *parm = notice.object;
|
||||
NSString *uid = [NSString stringWithFormat:@"%@",[parm objectForKey:@"user_id"]];
|
||||
BOOL isOnline = [[parm objectForKey:@"is_online"] boolValue];
|
||||
[QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithBool:!isOnline] forKey:uid];
|
||||
if ([uid isEqualToString:self.pitModel.user_id]) {
|
||||
if (isOnline) {
|
||||
self.offlineImageView.hidden = YES;
|
||||
@@ -208,6 +209,7 @@
|
||||
[self stopAudioAnimation];
|
||||
}
|
||||
}
|
||||
QXLOG(@"在线状态%@",QXGlobal.shareGlobal.offLineDict);
|
||||
}
|
||||
-(void)speakInfo:(NSNotification*)notice{
|
||||
id object = notice.object;
|
||||
@@ -219,6 +221,7 @@
|
||||
if ((info.uid == self.pitModel.user_id.longLongValue)) {
|
||||
if (info.volume > 0) {
|
||||
self.offlineImageView.hidden = YES;
|
||||
[QXGlobal.shareGlobal.offLineDict setObject:[NSNumber numberWithBool:NO] forKey:[NSString stringWithFormat:@"%ld",info.uid]];
|
||||
[self startAudioAnimation];
|
||||
}else{
|
||||
[self stopAudioAnimation];
|
||||
@@ -358,8 +361,14 @@
|
||||
}else{
|
||||
self.lockImageView.hidden = YES;
|
||||
}
|
||||
|
||||
if (pitModel.user_id.longValue > 0) {
|
||||
self.noUserImageView.hidden = YES;
|
||||
BOOL is_offline = [[[QXGlobal shareGlobal].offLineDict objectForKey:pitModel.user_id?pitModel.user_id:@"0"] boolValue];
|
||||
if (is_offline) {
|
||||
self.offlineImageView.hidden = NO;
|
||||
}else{
|
||||
self.offlineImageView.hidden = YES;
|
||||
}
|
||||
self.numberLabel.hidden = YES;
|
||||
self.headerView.hidden = NO;
|
||||
self.nameLabel.hidden = NO;
|
||||
|
||||
@@ -198,6 +198,7 @@
|
||||
//
|
||||
self.helpBtn = [[UIButton alloc] init];
|
||||
[self.helpBtn setImage:[UIImage imageNamed:@"room_auction_help"] forState:(UIControlStateNormal)];
|
||||
[self.helpBtn addTarget:self action:@selector(helpAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.bgView addSubview:self.helpBtn];
|
||||
[self.helpBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.top.mas_equalTo(5);
|
||||
@@ -1047,6 +1048,20 @@
|
||||
[self.rankView showInView:self.viewController.view];
|
||||
}
|
||||
|
||||
-(void)helpAction{
|
||||
NSString *Id = @"";
|
||||
if ([self.roomModel.room_info.label_id isEqualToString:@"1"]) {
|
||||
/// 真爱
|
||||
Id = @"23";
|
||||
}else{
|
||||
/// 亲密
|
||||
Id = @"22";
|
||||
}
|
||||
NSString *urlString = [NSString stringWithFormat:@"%@api/Page/page_show?id=%@",ServerUrl,Id];
|
||||
QXBaseWebViewController *vc = [[QXBaseWebViewController alloc] init];
|
||||
vc.urlStr = urlString;
|
||||
[self.viewController.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
-(void)changeAuctionWithType:(UIButton*)sender{
|
||||
NSString *type = @"";
|
||||
@@ -1075,6 +1090,7 @@
|
||||
}
|
||||
|
||||
-(void)auctionTypeDidChanged:(NSString *)type{
|
||||
self.roomModel.room_info.label_id = type;
|
||||
if ([type isEqualToString:@"2"]) {
|
||||
self.realLoveBtn.selected = NO;
|
||||
self.intimacyBtn.selected = YES;
|
||||
|
||||
@@ -881,6 +881,29 @@
|
||||
self.myPitNumber = toPitNumber;
|
||||
}
|
||||
}
|
||||
/// 循环麦位视图数组
|
||||
for (UIView *view in self.allSeatViewArray) {
|
||||
/// 如果当前视图的类型为麦位视图
|
||||
if ([view isKindOfClass:[QXRoomSeatContentView class]]) {
|
||||
QXRoomSeatContentView *seatView = (QXRoomSeatContentView*)view;
|
||||
/// 如果换麦的用户id等于视图上当前绑定的用户id
|
||||
if ([userInfo.user_id isEqualToString:seatView.pitModel.user_id]) {
|
||||
/// 如果视图的麦位号不是目标麦位号 (为了处理后端推送异常是产生多个同一个用户)
|
||||
if (seatView.pitModel.pit_number.intValue != toPitNumber) {
|
||||
/// 置空麦位用户
|
||||
QXRoomPitModel *model = seatView.pitModel;
|
||||
model.user_id = @"0";
|
||||
model.avatar = @"";
|
||||
model.dress = @"";
|
||||
model.sex = @"";
|
||||
model.nickname = @"";
|
||||
model.user_code = @"";
|
||||
model.charm = @"";
|
||||
seatView.pitModel = model;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
-(void)didClickUserHeaderWithPitModel:(QXRoomPitModel *)pitModel seatView:(QXRoomSeatContentView *)seatView{
|
||||
|
||||
@@ -1145,6 +1168,7 @@
|
||||
if ([model.room_id isExist]) {
|
||||
QXGlobal.shareGlobal.superRoomId = self.roomModel.room_info.room_id;
|
||||
if ([model.user1_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id] || [model.user2_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
[[QXGlobal shareGlobal] quitRoomWithRoomId:self.roomModel.room_info.room_id];
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:model.room_id isRejoin:NO navagationController:self.viewController.navigationController];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -187,7 +187,7 @@ static NSInteger maxSeat = 8;
|
||||
}
|
||||
}
|
||||
|
||||
-(void) didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
-(void)didUpDownSeatWithUser:(QXUserHomeModel *)user isUpSeat:(BOOL)isUpSeat pit_number:(NSInteger)pit_number{
|
||||
if (pit_number > 10) {
|
||||
return;
|
||||
}
|
||||
@@ -379,6 +379,29 @@ static NSInteger maxSeat = 8;
|
||||
if ([userInfo.user_id isEqualToString:QXGlobal.shareGlobal.loginModel.user_id]) {
|
||||
self.myPitNumber = toPitNumber;
|
||||
}
|
||||
/// 循环麦位视图数组
|
||||
for (UIView *view in self.seatArray) {
|
||||
/// 如果当前视图的类型为麦位视图
|
||||
if ([view isKindOfClass:[QXRoomSeatContentView class]]) {
|
||||
QXRoomSeatContentView *seatView = (QXRoomSeatContentView*)view;
|
||||
/// 如果换麦的用户id等于视图上当前绑定的用户id
|
||||
if ([userInfo.user_id isEqualToString:seatView.pitModel.user_id]) {
|
||||
/// 如果视图的麦位号不是目标麦位号 (为了处理后端推送异常是产生多个同一个用户)
|
||||
if (seatView.pitModel.pit_number.intValue != toPitNumber) {
|
||||
/// 置空麦位用户
|
||||
QXRoomPitModel *model = seatView.pitModel;
|
||||
model.user_id = @"0";
|
||||
model.avatar = @"";
|
||||
model.dress = @"";
|
||||
model.sex = @"";
|
||||
model.nickname = @"";
|
||||
model.user_code = @"";
|
||||
model.charm = @"";
|
||||
seatView.pitModel = model;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-(void)setSeatIsLock:(NSString *)isLock pitNumber:(NSString *)pitNumber{
|
||||
|
||||
Reference in New Issue
Block a user