房间PK终于完工了
This commit is contained in:
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_normal_member_enter.imageset/Contents.json
vendored
Normal file
22
xplan-ios/Assets.xcassets/Room/RoomPK/room_pk_normal_member_enter.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
{
|
||||||
|
"images" : [
|
||||||
|
{
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "1x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_pk_normal_member_enter@2x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename" : "room_pk_normal_member_enter@3x.png",
|
||||||
|
"idiom" : "universal",
|
||||||
|
"scale" : "3x"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"info" : {
|
||||||
|
"author" : "xcode",
|
||||||
|
"version" : 1
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
After Width: | Height: | Size: 6.9 KiB |
@@ -40,7 +40,7 @@ typedef NS_ENUM(NSInteger, DressUpLabelType) {
|
|||||||
typedef NS_ENUM(NSInteger, GroupType) {
|
typedef NS_ENUM(NSInteger, GroupType) {
|
||||||
GroupType_default = 0,//默认
|
GroupType_default = 0,//默认
|
||||||
GroupType_Blue = 1,//蓝队 男神
|
GroupType_Blue = 1,//蓝队 男神
|
||||||
GroupTyp_Red = 2, //红队 女神
|
GroupType_Red = 2, //红队 女神
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef NS_ENUM(NSInteger, UserEnterRoomFromType) {
|
typedef NS_ENUM(NSInteger, UserEnterRoomFromType) {
|
||||||
|
@@ -238,7 +238,12 @@
|
|||||||
[self dealRoomInfoChangeActivity];
|
[self dealRoomInfoChangeActivity];
|
||||||
[self configCandyTree];
|
[self configCandyTree];
|
||||||
self.firstRechargeImageView.hidden = !userInfo.isFirstCharge;
|
self.firstRechargeImageView.hidden = !userInfo.isFirstCharge;
|
||||||
if (roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
if (roomInfo.roomModeType == RoomModeType_Open_Blind || roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
|
if (roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
|
self.joinDatingView.image = [UIImage imageNamed:@"room_pk_normal_member_enter"];
|
||||||
|
} else {
|
||||||
|
self.joinDatingView.image = [UIImage imageNamed:@"room_mode_dating_enter"];
|
||||||
|
}
|
||||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||||
request.roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
request.roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||||
request.userIds = @[[AccountInfoStorage instance].getUid];
|
request.userIds = @[[AccountInfoStorage instance].getUid];
|
||||||
@@ -281,7 +286,7 @@
|
|||||||
switch (content.eventType) {
|
switch (content.eventType) {
|
||||||
case NIMChatroomEventTypeAddManager:
|
case NIMChatroomEventTypeAddManager:
|
||||||
{
|
{
|
||||||
if (self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
|
if (self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind || self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
for (NIMChatroomNotificationMember * member in content.targets) {
|
for (NIMChatroomNotificationMember * member in content.targets) {
|
||||||
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
self.joinDatingView.hidden = YES;
|
self.joinDatingView.hidden = YES;
|
||||||
@@ -293,7 +298,7 @@
|
|||||||
break;
|
break;
|
||||||
case NIMChatroomEventTypeRemoveManager:
|
case NIMChatroomEventTypeRemoveManager:
|
||||||
{
|
{
|
||||||
if (self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
|
if (self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind || self.hostDelegate.getRoomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
for (NIMChatroomNotificationMember * member in content.targets) {
|
for (NIMChatroomNotificationMember * member in content.targets) {
|
||||||
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
self.joinDatingView.hidden = NO;
|
self.joinDatingView.hidden = NO;
|
||||||
@@ -367,7 +372,7 @@
|
|||||||
info.roomTitle = roomInfo.title;
|
info.roomTitle = roomInfo.title;
|
||||||
info.micQueue = [self.hostDelegate getMicroQueue];
|
info.micQueue = [self.hostDelegate getMicroQueue];
|
||||||
info.isManager = (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager);
|
info.isManager = (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager);
|
||||||
info.type = ArrangeMicType_Dating;
|
info.type = roomInfo.roomModeType == RoomModeType_Open_Blind ? ArrangeMicType_Dating : roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? ArrangeMicType_Room_PK : ArrangeMicType_Normal;
|
||||||
XPArrangeMicViewController * arrangeMicVC = [[XPArrangeMicViewController alloc] initWithInfo:info];
|
XPArrangeMicViewController * arrangeMicVC = [[XPArrangeMicViewController alloc] initWithInfo:info];
|
||||||
[self.hostDelegate.getCurrentNav presentViewController:arrangeMicVC animated:YES completion:nil];
|
[self.hostDelegate.getCurrentNav presentViewController:arrangeMicVC animated:YES completion:nil];
|
||||||
}];
|
}];
|
||||||
|
@@ -32,6 +32,33 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// @param groupType 类型
|
/// @param groupType 类型
|
||||||
+ (void)cancelArrangeMic:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid groupType:(NSString *)groupType;
|
+ (void)cancelArrangeMic:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid groupType:(NSString *)groupType;
|
||||||
|
|
||||||
|
/// 房间内PK的用户列表
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param operUid 操作者的uid
|
||||||
|
/// @param page 当前的页数
|
||||||
|
/// @param pageSize 一页多少个
|
||||||
|
+ (void)getRoomPKUserList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid page:(NSString *)page pageSize:(NSString *)pageSize;
|
||||||
|
|
||||||
|
/// 获取当前房间PK的长度
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
+ (void)getRoomPKSize:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid;
|
||||||
|
|
||||||
|
/// 申请房间内PK排麦
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param operUid 操作者的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
+ (void)applyRoomPKArrangeMic:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid groupType:(NSString *)groupType;
|
||||||
|
|
||||||
|
/// 取消房间内PK排麦
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param operUid 操作者的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
+ (void)cancelRoomPKArrangeMic:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid groupType:(NSString *)groupType;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -39,4 +39,33 @@
|
|||||||
[self makeRequest:@"room/queue" method:HttpRequestHelperMethodDELETE completion:completion, __FUNCTION__, roomUid, operUid, groupType, nil];
|
[self makeRequest:@"room/queue" method:HttpRequestHelperMethodDELETE completion:completion, __FUNCTION__, roomUid, operUid, groupType, nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// 房间内PK的用户列表
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param operUid 操作者的uid
|
||||||
|
/// @param page 当前的页数
|
||||||
|
/// @param pageSize 一页多少个
|
||||||
|
+ (void)getRoomPKUserList:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid page:(NSString *)page pageSize:(NSString *)pageSize {
|
||||||
|
[self makeRequest:@"room/pk/queue/list" method:HttpRequestHelperMethodGET completion:completion, __FUNCTION__,roomUid, operUid, page, pageSize, nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 申请房间内PK排麦
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param operUid 操作者的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
+ (void)applyRoomPKArrangeMic:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid groupType:(NSString *)groupType {
|
||||||
|
[self makeRequest:@"room/pk/join" method:HttpRequestHelperMethodPOST completion:completion, __FUNCTION__, roomUid, operUid, groupType, nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 取消房间内PK排麦
|
||||||
|
/// @param completion 完成
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param operUid 操作者的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
+ (void)cancelRoomPKArrangeMic:(HttpRequestHelperCompletion)completion roomUid:(NSString *)roomUid operUid:(NSString *)operUid groupType:(NSString *)groupType {
|
||||||
|
[self makeRequest:@"room/pk/join" method:HttpRequestHelperMethodDELETE completion:completion, __FUNCTION__, roomUid, operUid, groupType, nil];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -15,6 +15,8 @@ typedef NS_ENUM(NSInteger, ArrangeMicType) {
|
|||||||
ArrangeMicType_Normal = 0,
|
ArrangeMicType_Normal = 0,
|
||||||
///相亲模式的排麦
|
///相亲模式的排麦
|
||||||
ArrangeMicType_Dating,
|
ArrangeMicType_Dating,
|
||||||
|
///相亲模式的排麦
|
||||||
|
ArrangeMicType_Room_PK,
|
||||||
};
|
};
|
||||||
|
|
||||||
@interface XPArrangeMicInfoModel : NSObject
|
@interface XPArrangeMicInfoModel : NSObject
|
||||||
|
@@ -27,6 +27,23 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
/// @param roomUid 房主的uid
|
/// @param roomUid 房主的uid
|
||||||
/// @param groupType 类型
|
/// @param groupType 类型
|
||||||
- (void)cancelRoomArrangeMic:(NSString *)roomUid groupType:(GroupType)groupType;
|
- (void)cancelRoomArrangeMic:(NSString *)roomUid groupType:(GroupType)groupType;
|
||||||
|
|
||||||
|
/// 获取房间PK用户的列表
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param page 当前的页数
|
||||||
|
/// @param pageSize 一页多少个
|
||||||
|
/// @param state 上啦 1还是下拉0
|
||||||
|
- (void)getRoomPKMemberList:(NSString *)roomUid page:(int)page pageSize:(int)pageSize state:(int)state;
|
||||||
|
|
||||||
|
/// 申请房间内PK排麦
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
- (void)applyRoomPKArrangeMic:(NSString *)roomUid groupType:(GroupType)groupType;
|
||||||
|
|
||||||
|
/// 取消申请房间内排麦
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
- (void)cancelRoomPKArrangeMic:(NSString *)roomUid groupType:(GroupType)groupType;
|
||||||
@end
|
@end
|
||||||
|
|
||||||
NS_ASSUME_NONNULL_END
|
NS_ASSUME_NONNULL_END
|
||||||
|
@@ -26,6 +26,8 @@
|
|||||||
[Api getRoomArrangeMicList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
[Api getRoomArrangeMicList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
ArrangeMicModel * model = [ArrangeMicModel modelWithDictionary:data.data];
|
ArrangeMicModel * model = [ArrangeMicModel modelWithDictionary:data.data];
|
||||||
[[self getView] getRoomArrangeMicListSuccess:model state:state];
|
[[self getView] getRoomArrangeMicListSuccess:model state:state];
|
||||||
|
} fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||||
|
[[self getView] getRoomArrangeMicListFail:msg state:state];
|
||||||
} showLoading:YES] roomUid:roomUid operUid:uid page:pageStr pageSize:pageSizeStr];
|
} showLoading:YES] roomUid:roomUid operUid:uid page:pageStr pageSize:pageSizeStr];
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -51,4 +53,43 @@
|
|||||||
} showLoading:YES] roomUid:roomUid operUid:uid groupType:groupTypeStr];
|
} showLoading:YES] roomUid:roomUid operUid:uid groupType:groupTypeStr];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// 获取房间PK用户的列表
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param page 当前的页数
|
||||||
|
/// @param pageSize 一页多少个
|
||||||
|
/// @param state 上啦 1还是下拉0
|
||||||
|
- (void)getRoomPKMemberList:(NSString *)roomUid page:(int)page pageSize:(int)pageSize state:(int)state {
|
||||||
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
|
NSString * pageStr = [NSString stringWithFormat:@"%d", page];
|
||||||
|
NSString * pageSizeStr = [NSString stringWithFormat:@"%d", pageSize];
|
||||||
|
[Api getRoomPKUserList:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
|
ArrangeMicModel * model = [ArrangeMicModel modelWithDictionary:data.data];
|
||||||
|
[[self getView] getRoomPKMemberListSuccess:model state:state];
|
||||||
|
}fail:^(NSInteger code, NSString * _Nullable msg) {
|
||||||
|
[[self getView] getRoomPKMemberListFail:msg state:state];
|
||||||
|
} showLoading:YES] roomUid:roomUid operUid:uid page:pageStr pageSize:pageSizeStr];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 申请房间内PK排麦
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
- (void)applyRoomPKArrangeMic:(NSString *)roomUid groupType:(GroupType)groupType {
|
||||||
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
|
NSString * groupTypeStr = [NSString stringWithFormat:@"%ld", groupType];
|
||||||
|
[Api applyRoomPKArrangeMic:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
|
[[self getView] applyArrangeMicSuccess];
|
||||||
|
} showLoading:YES] roomUid:roomUid operUid:uid groupType:groupTypeStr];
|
||||||
|
}
|
||||||
|
|
||||||
|
/// 取消申请房间内排麦
|
||||||
|
/// @param roomUid 房主的uid
|
||||||
|
/// @param groupType 类型
|
||||||
|
- (void)cancelRoomPKArrangeMic:(NSString *)roomUid groupType:(GroupType)groupType {
|
||||||
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
|
NSString * groupTypeStr = [NSString stringWithFormat:@"%ld", groupType];
|
||||||
|
[Api cancelRoomPKArrangeMic:[self createHttpCompletion:^(BaseModel * _Nonnull data) {
|
||||||
|
[[self getView] cancelArrangeMicSuccess];
|
||||||
|
} showLoading:YES] roomUid:roomUid operUid:uid groupType:groupTypeStr];
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
@@ -12,10 +12,16 @@ NS_ASSUME_NONNULL_BEGIN
|
|||||||
@protocol XPArrangeMicProtocol <NSObject>
|
@protocol XPArrangeMicProtocol <NSObject>
|
||||||
///获取排麦列表
|
///获取排麦列表
|
||||||
- (void)getRoomArrangeMicListSuccess:(ArrangeMicModel *)listModel state:(int)state;
|
- (void)getRoomArrangeMicListSuccess:(ArrangeMicModel *)listModel state:(int)state;
|
||||||
|
///获取排麦列表
|
||||||
|
- (void)getRoomArrangeMicListFail:(NSString *)msg state:(int)state;
|
||||||
///申请排麦成功
|
///申请排麦成功
|
||||||
- (void)applyArrangeMicSuccess;
|
- (void)applyArrangeMicSuccess;
|
||||||
///取消排麦成功
|
///取消排麦成功
|
||||||
- (void)cancelArrangeMicSuccess;
|
- (void)cancelArrangeMicSuccess;
|
||||||
|
///获取当前pk房间列表成功
|
||||||
|
- (void)getRoomPKMemberListSuccess:(ArrangeMicModel *)listModel state:(int)state;
|
||||||
|
///获取当前房间PK列表失败
|
||||||
|
- (void)getRoomPKMemberListFail:(NSString *)msg state:(int)state;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
@@ -101,6 +101,12 @@
|
|||||||
[self.arrangeMicButton setTitle:title forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitle:title forState:UIControlStateNormal];
|
||||||
[self.arrangeMicButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
[self.arrangeMicButton setBackgroundColor:color];
|
[self.arrangeMicButton setBackgroundColor:color];
|
||||||
|
}if (_userInfo.arrangeMicType == ArrangeMicType_Room_PK) {
|
||||||
|
NSString * title = _userInfo.groupType == GroupType_Blue ? @"抱上蓝队" : @"抱上红队";
|
||||||
|
UIColor * color = _userInfo.groupType == GroupType_Blue ? UIColorFromRGB(0x518EFF) : UIColorFromRGB(0xFF6B77);
|
||||||
|
[self.arrangeMicButton setTitle:title forState:UIControlStateNormal];
|
||||||
|
[self.arrangeMicButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
[self.arrangeMicButton setBackgroundColor:color];
|
||||||
} else {
|
} else {
|
||||||
[self.arrangeMicButton setTitle:@"抱上麦" forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitle:@"抱上麦" forState:UIControlStateNormal];
|
||||||
[self.arrangeMicButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitleColor:[ThemeColor confirmButtonTextColor] forState:UIControlStateNormal];
|
||||||
@@ -113,6 +119,12 @@
|
|||||||
[self.arrangeMicButton setTitle:title forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitle:title forState:UIControlStateNormal];
|
||||||
[self.arrangeMicButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
[self.arrangeMicButton setBackgroundColor:color];
|
[self.arrangeMicButton setBackgroundColor:color];
|
||||||
|
} else if(_userInfo.arrangeMicType == ArrangeMicType_Room_PK) {
|
||||||
|
NSString * title = _userInfo.groupType == GroupType_Blue ? @"已选蓝队" : @"已选红队";
|
||||||
|
UIColor * color = _userInfo.groupType == GroupType_Blue ? UIColorFromRGB(0x518EFF) : UIColorFromRGB(0xFF6B77);
|
||||||
|
[self.arrangeMicButton setTitle:title forState:UIControlStateNormal];
|
||||||
|
[self.arrangeMicButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
|
||||||
|
[self.arrangeMicButton setBackgroundColor:color];
|
||||||
} else {
|
} else {
|
||||||
[self.arrangeMicButton setTitle:@"排麦中" forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitle:@"排麦中" forState:UIControlStateNormal];
|
||||||
[self.arrangeMicButton setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateNormal];
|
[self.arrangeMicButton setTitleColor:[ThemeColor disableButtonTextColor] forState:UIControlStateNormal];
|
||||||
|
@@ -110,7 +110,12 @@
|
|||||||
#pragma mark - 刷新的fangfa
|
#pragma mark - 刷新的fangfa
|
||||||
- (void)headerRefresh {
|
- (void)headerRefresh {
|
||||||
self.page = 1;
|
self.page = 1;
|
||||||
[self.presenter getRoomArrangeMicList:self.userInfo.roomUid page:self.page pageSize:20 state:0];
|
if (self.userInfo.type == ArrangeMicType_Room_PK) {
|
||||||
|
[self.presenter getRoomPKMemberList:self.userInfo.roomUid page:self.page pageSize:20 state:0];
|
||||||
|
} else {
|
||||||
|
[self.presenter getRoomArrangeMicList:self.userInfo.roomUid page:self.page pageSize:20 state:0];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)footerRefresh {
|
- (void)footerRefresh {
|
||||||
@@ -119,7 +124,11 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
self.page++;
|
self.page++;
|
||||||
[self.presenter getRoomArrangeMicList:self.userInfo.roomUid page:self.page pageSize:20 state:1];
|
if (self.userInfo.type == ArrangeMicType_Room_PK) {
|
||||||
|
[self.presenter getRoomPKMemberList:self.userInfo.roomUid page:self.page pageSize:20 state:1];
|
||||||
|
} else {
|
||||||
|
[self.presenter getRoomArrangeMicList:self.userInfo.roomUid page:self.page pageSize:20 state:1];;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -135,6 +144,12 @@
|
|||||||
self.femaleButton.hidden = self.userInfo.isManager;
|
self.femaleButton.hidden = self.userInfo.isManager;
|
||||||
self.maleButton.hidden = self.userInfo.isManager;
|
self.maleButton.hidden = self.userInfo.isManager;
|
||||||
self.applyButton.hidden = !self.userInfo.isManager;
|
self.applyButton.hidden = !self.userInfo.isManager;
|
||||||
|
} else if(self.userInfo.type == ArrangeMicType_Room_PK) {
|
||||||
|
self.femaleButton.hidden = self.userInfo.isManager;
|
||||||
|
self.maleButton.hidden = self.userInfo.isManager;
|
||||||
|
self.applyButton.hidden = !self.userInfo.isManager;
|
||||||
|
[self.maleButton setTitle:@"报名蓝队" forState:UIControlStateNormal];
|
||||||
|
[self.femaleButton setTitle:@"报名红队" forState:UIControlStateNormal];
|
||||||
} else {
|
} else {
|
||||||
self.femaleButton.hidden = YES;
|
self.femaleButton.hidden = YES;
|
||||||
self.maleButton.hidden = YES;
|
self.maleButton.hidden = YES;
|
||||||
@@ -254,7 +269,7 @@
|
|||||||
return [obj1 compare:obj2]; //升序
|
return [obj1 compare:obj2]; //升序
|
||||||
}];
|
}];
|
||||||
if (result.count > 0) {
|
if (result.count > 0) {
|
||||||
if (groupType == GroupTyp_Red) {
|
if (groupType == GroupType_Red) {
|
||||||
for (NSString *key in result) {
|
for (NSString *key in result) {
|
||||||
MicroQueueModel *microQueue = [self.micQueue objectForKey:key];
|
MicroQueueModel *microQueue = [self.micQueue objectForKey:key];
|
||||||
UserInfoModel *userInfo = microQueue.userInfo;
|
UserInfoModel *userInfo = microQueue.userInfo;
|
||||||
@@ -323,10 +338,13 @@
|
|||||||
AttachmentModel * attachment = obj.attachment;
|
AttachmentModel * attachment = obj.attachment;
|
||||||
if (attachment.first == CustomMessageType_Arrange_Mic) {
|
if (attachment.first == CustomMessageType_Arrange_Mic) {
|
||||||
switch (attachment.second) {
|
switch (attachment.second) {
|
||||||
|
case Custom_Message_Sub_Room_PK_Empty:
|
||||||
|
case Custom_Message_Sub_Room_PK_Non_Empty:
|
||||||
case Custom_Message_Sub_Arrange_Mic_Non_Empty:
|
case Custom_Message_Sub_Arrange_Mic_Non_Empty:
|
||||||
case Custom_Message_Sub_Arrange_Mic_Empty:
|
case Custom_Message_Sub_Arrange_Mic_Empty:
|
||||||
[self headerRefresh];
|
[self headerRefresh];
|
||||||
break;
|
break;
|
||||||
|
case Custom_Message_Sub_Room_PK_Mode_Close:
|
||||||
case Custom_Message_Sub_Arrange_Mic_Mode_Close:
|
case Custom_Message_Sub_Arrange_Mic_Mode_Close:
|
||||||
[self dismissViewControllerAnimated:YES completion:nil];
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
break;
|
break;
|
||||||
@@ -447,6 +465,14 @@
|
|||||||
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)getRoomArrangeMicListFail:(NSString *)msg state:(int)state {
|
||||||
|
if (state == 0) {
|
||||||
|
[self.tableView.mj_header endRefreshing];
|
||||||
|
} else {
|
||||||
|
[self.tableView.mj_header endRefreshing];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void)applyArrangeMicSuccess {
|
- (void)applyArrangeMicSuccess {
|
||||||
[self headerRefresh];
|
[self headerRefresh];
|
||||||
}
|
}
|
||||||
@@ -454,6 +480,50 @@
|
|||||||
- (void)cancelArrangeMicSuccess {
|
- (void)cancelArrangeMicSuccess {
|
||||||
[self headerRefresh];
|
[self headerRefresh];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void)getRoomPKMemberListFail:(NSString *)msg state:(int)state {
|
||||||
|
if (state == 0) {
|
||||||
|
[self.tableView.mj_header endRefreshing];
|
||||||
|
} else {
|
||||||
|
[self.tableView.mj_header endRefreshing];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)getRoomPKMemberListSuccess:(ArrangeMicModel *)listModel state:(int)state {
|
||||||
|
self.arrangeMicInfo = listModel;
|
||||||
|
if (state == 0) {
|
||||||
|
[self.datasource removeAllObjects];
|
||||||
|
[self.tableView.mj_header endRefreshing];
|
||||||
|
} else {
|
||||||
|
[self.tableView.mj_footer endRefreshing];
|
||||||
|
}
|
||||||
|
if (listModel.queue.count > 0) {
|
||||||
|
self.hasNoMoreData = NO;
|
||||||
|
[self.datasource addObjectsFromArray:listModel.queue];
|
||||||
|
} else {
|
||||||
|
self.hasNoMoreData = YES;
|
||||||
|
[self.tableView.mj_footer endRefreshingWithNoMoreData];
|
||||||
|
}
|
||||||
|
[self.tableView reloadData];
|
||||||
|
|
||||||
|
if (self.userInfo.isManager) {
|
||||||
|
self.applyButton.hidden = listModel.queue.count > 0;
|
||||||
|
} else {
|
||||||
|
if (listModel.myPos.intValue > 0) {
|
||||||
|
self.applyButton.hidden = NO;
|
||||||
|
self.maleButton.hidden = YES;
|
||||||
|
self.femaleButton.hidden = YES;
|
||||||
|
[self.applyButton setTitle:@"取消报名" forState:UIControlStateNormal];
|
||||||
|
} else {
|
||||||
|
self.femaleButton.hidden = NO;
|
||||||
|
self.maleButton.hidden = NO;
|
||||||
|
self.applyButton.hidden = YES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
self.titleLabel.attributedText = [self createArrangeMicNavTitleWith:listModel.count];
|
||||||
|
self.titleLabel.textAlignment = NSTextAlignmentCenter;
|
||||||
|
}
|
||||||
|
|
||||||
#pragma mark - XCShareViewDelegate
|
#pragma mark - XCShareViewDelegate
|
||||||
- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message {
|
- (void)shareView:(XPShareView *)shareView shareFail:(NSString *)message {
|
||||||
[TTPopup dismiss];
|
[TTPopup dismiss];
|
||||||
@@ -572,6 +642,15 @@
|
|||||||
}
|
}
|
||||||
}];
|
}];
|
||||||
[self.presenter cancelRoomArrangeMic:self.userInfo.roomUid groupType:grouptype];
|
[self.presenter cancelRoomArrangeMic:self.userInfo.roomUid groupType:grouptype];
|
||||||
|
} else if(self.userInfo.type == ArrangeMicType_Room_PK) {
|
||||||
|
__block GroupType grouptype = GroupType_default;
|
||||||
|
[self.arrangeMicInfo.queue enumerateObjectsUsingBlock:^(ArrangeMicUserModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||||
|
if (obj.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
|
grouptype = obj.groupType;
|
||||||
|
*stop = YES;
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
[self.presenter cancelRoomPKArrangeMic:self.userInfo.roomUid groupType:grouptype];
|
||||||
} else {
|
} else {
|
||||||
[self.presenter cancelRoomArrangeMic:self.userInfo.roomUid groupType:0];
|
[self.presenter cancelRoomArrangeMic:self.userInfo.roomUid groupType:0];
|
||||||
}
|
}
|
||||||
@@ -581,7 +660,11 @@
|
|||||||
if ([self isOnMicro:[AccountInfoStorage instance].getUid]) {
|
if ([self isOnMicro:[AccountInfoStorage instance].getUid]) {
|
||||||
[self showErrorToast:@"已经在麦上不需要报名啦"];
|
[self showErrorToast:@"已经在麦上不需要报名啦"];
|
||||||
} else {
|
} else {
|
||||||
|
if (self.userInfo.type== ArrangeMicType_Room_PK) {
|
||||||
|
[self.presenter applyRoomPKArrangeMic:self.userInfo.roomUid groupType:0];
|
||||||
|
} else {
|
||||||
[self.presenter applyRoomArrangeMic:self.userInfo.roomUid groupType:0];
|
[self.presenter applyRoomArrangeMic:self.userInfo.roomUid groupType:0];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -595,7 +678,12 @@
|
|||||||
if ([self isOnMicro:[AccountInfoStorage instance].getUid]) {
|
if ([self isOnMicro:[AccountInfoStorage instance].getUid]) {
|
||||||
[self showErrorToast:@"已经在麦上不需要报名啦"];
|
[self showErrorToast:@"已经在麦上不需要报名啦"];
|
||||||
} else {
|
} else {
|
||||||
[self.presenter applyRoomArrangeMic:self.userInfo.roomUid groupType:GroupType_Blue];
|
if (self.userInfo.type == ArrangeMicType_Room_PK) {
|
||||||
|
[self.presenter applyRoomPKArrangeMic:self.userInfo.roomUid groupType:GroupType_Blue];
|
||||||
|
} else {
|
||||||
|
[self.presenter applyRoomArrangeMic:self.userInfo.roomUid groupType:GroupType_Blue];
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -603,7 +691,11 @@
|
|||||||
if ([self isOnMicro:[AccountInfoStorage instance].getUid]) {
|
if ([self isOnMicro:[AccountInfoStorage instance].getUid]) {
|
||||||
[self showErrorToast:@"已经在麦上不需要报名啦"];
|
[self showErrorToast:@"已经在麦上不需要报名啦"];
|
||||||
} else {
|
} else {
|
||||||
[self.presenter applyRoomArrangeMic:self.userInfo.roomUid groupType:GroupTyp_Red];
|
if (self.userInfo.type == ArrangeMicType_Room_PK) {
|
||||||
|
[self.presenter applyRoomPKArrangeMic:self.userInfo.roomUid groupType:GroupType_Red];
|
||||||
|
} else{
|
||||||
|
[self.presenter applyRoomArrangeMic:self.userInfo.roomUid groupType:GroupType_Red];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -140,7 +140,7 @@
|
|||||||
info.roomTitle = roomInfo.title;
|
info.roomTitle = roomInfo.title;
|
||||||
info.micQueue = [self.delegate getMicroQueue];
|
info.micQueue = [self.delegate getMicroQueue];
|
||||||
info.isManager = (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager);
|
info.isManager = (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager);
|
||||||
info.type = roomInfo.roomModeType == RoomModeType_Open_Blind ? ArrangeMicType_Dating : ArrangeMicType_Normal;
|
info.type = roomInfo.roomModeType == RoomModeType_Open_Blind ? ArrangeMicType_Dating : roomInfo.roomModeType == RoomModeType_Open_PK_Mode ? ArrangeMicType_Room_PK : ArrangeMicType_Normal;
|
||||||
XPArrangeMicViewController * arrangeMicVC = [[XPArrangeMicViewController alloc] initWithInfo:info];
|
XPArrangeMicViewController * arrangeMicVC = [[XPArrangeMicViewController alloc] initWithInfo:info];
|
||||||
[self.delegate.getCurrentNav presentViewController:arrangeMicVC animated:YES completion:nil];
|
[self.delegate.getCurrentNav presentViewController:arrangeMicVC animated:YES completion:nil];
|
||||||
}];
|
}];
|
||||||
@@ -281,14 +281,14 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
self.arrangeMicButton.hidden = roomInfo.roomModeType != RoomModeType_Open_Micro_Mode;
|
self.arrangeMicButton.hidden = roomInfo.roomModeType != RoomModeType_Open_Micro_Mode;
|
||||||
if (roomInfo.roomModeType == RoomModeType_Open_Blind) {
|
if (roomInfo.roomModeType == RoomModeType_Open_Blind || roomInfo.roomModeType == RoomModeType_Open_PK_Mode || roomInfo.roomModeType == RoomModeType_Open_Micro_Mode) {
|
||||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||||
request.roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
request.roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||||
request.userIds = @[[AccountInfoStorage instance].getUid];
|
request.userIds = @[[AccountInfoStorage instance].getUid];
|
||||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||||
if (error == nil) {
|
if (error == nil) {
|
||||||
NIMChatroomMember * member = members.firstObject;
|
NIMChatroomMember * member = members.firstObject;
|
||||||
if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) {
|
if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
||||||
self.arrangeMicButton.hidden = NO;
|
self.arrangeMicButton.hidden = NO;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -302,8 +302,8 @@
|
|||||||
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
|
||||||
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
|
||||||
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
|
||||||
if (attachment.first == CustomMessageType_Arrange_Mic) {
|
if (attachment.first == CustomMessageType_Arrange_Mic || attachment.first == CustomMessageType_Room_PK) {
|
||||||
if (attachment.second == Custom_Message_Sub_Arrange_Mic_Non_Empty || attachment.second == Custom_Message_Sub_Arrange_Mic_Empty) {
|
if (attachment.second == Custom_Message_Sub_Arrange_Mic_Non_Empty || attachment.second == Custom_Message_Sub_Arrange_Mic_Empty || attachment.second == Custom_Message_Sub_Room_PK_Empty || attachment.second == Custom_Message_Sub_Room_PK_Non_Empty) {
|
||||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||||
request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];
|
request.roomId = [NSString stringWithFormat:@"%ld", self.delegate.getRoomInfo.roomId];
|
||||||
request.userIds = @[[AccountInfoStorage instance].getUid];
|
request.userIds = @[[AccountInfoStorage instance].getUid];
|
||||||
@@ -313,7 +313,7 @@
|
|||||||
member = members.firstObject;
|
member = members.firstObject;
|
||||||
}
|
}
|
||||||
if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
if (member.type == NIMChatroomMemberTypeCreator || member.type == NIMChatroomMemberTypeManager) {
|
||||||
self.arrangeMicButton.selected = attachment.second == Custom_Message_Sub_Arrange_Mic_Non_Empty;
|
self.arrangeMicButton.selected = (attachment.second == Custom_Message_Sub_Arrange_Mic_Non_Empty || attachment.second == Custom_Message_Sub_Room_PK_Non_Empty);
|
||||||
};
|
};
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
@@ -327,7 +327,7 @@
|
|||||||
switch (content.eventType) {
|
switch (content.eventType) {
|
||||||
case NIMChatroomEventTypeAddManager:
|
case NIMChatroomEventTypeAddManager:
|
||||||
{
|
{
|
||||||
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
|
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind || self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
for (NIMChatroomNotificationMember * member in content.targets) {
|
for (NIMChatroomNotificationMember * member in content.targets) {
|
||||||
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
self.arrangeMicButton.hidden = NO;
|
self.arrangeMicButton.hidden = NO;
|
||||||
@@ -339,7 +339,7 @@
|
|||||||
break;
|
break;
|
||||||
case NIMChatroomEventTypeRemoveManager:
|
case NIMChatroomEventTypeRemoveManager:
|
||||||
{
|
{
|
||||||
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind) {
|
if (self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_Blind || self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
for (NIMChatroomNotificationMember * member in content.targets) {
|
for (NIMChatroomNotificationMember * member in content.targets) {
|
||||||
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
if (member.userId.intValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
self.arrangeMicButton.hidden = YES;
|
self.arrangeMicButton.hidden = YES;
|
||||||
|
@@ -266,7 +266,7 @@
|
|||||||
[attribute appendAttributedString:[self createTextAttribute:@"进入" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
[attribute appendAttributedString:[self createTextAttribute:@"进入" color:[ThemeColor messageTextColor] font:kRoomMessageDefalutFont]];
|
||||||
NSString * groupTypeStr;
|
NSString * groupTypeStr;
|
||||||
UIColor * groupColor;
|
UIColor * groupColor;
|
||||||
if (userInfoModel.groupType == GroupTyp_Red) {
|
if (userInfoModel.groupType == GroupType_Red) {
|
||||||
groupTypeStr= @"红队";
|
groupTypeStr= @"红队";
|
||||||
groupColor = UIColorFromRGB(0xFB3D74);
|
groupColor = UIColorFromRGB(0xFB3D74);
|
||||||
}else{
|
}else{
|
||||||
|
@@ -359,7 +359,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
|
|||||||
if (attachment.data && [attachment.data allKeys].count > 0) {
|
if (attachment.data && [attachment.data allKeys].count > 0) {
|
||||||
for (NSDictionary * dic in [attachment.data allValues]) {
|
for (NSDictionary * dic in [attachment.data allValues]) {
|
||||||
RoomPKChooseUserModel * userModel = [RoomPKChooseUserModel modelWithDictionary:dic];
|
RoomPKChooseUserModel * userModel = [RoomPKChooseUserModel modelWithDictionary:dic];
|
||||||
if (userModel.groupType == GroupTyp_Red || userModel.groupType == GroupType_Blue) {
|
if (userModel.groupType == GroupType_Red || userModel.groupType == GroupType_Blue) {
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -134,7 +134,7 @@
|
|||||||
RoomPKTeamModel *redTeam;
|
RoomPKTeamModel *redTeam;
|
||||||
RoomPKTeamModel * blueTeam;
|
RoomPKTeamModel * blueTeam;
|
||||||
for (RoomPKTeamModel *team in _pkDetailInfo.teams) {
|
for (RoomPKTeamModel *team in _pkDetailInfo.teams) {
|
||||||
if (team.team == GroupTyp_Red) {
|
if (team.team == GroupType_Red) {
|
||||||
redTeam = team;
|
redTeam = team;
|
||||||
}else{
|
}else{
|
||||||
blueTeam = team;
|
blueTeam = team;
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
#pragma mark - Getters And Setters
|
#pragma mark - Getters And Setters
|
||||||
- (void)setGroupType:(GroupType)groupType {
|
- (void)setGroupType:(GroupType)groupType {
|
||||||
_groupType = groupType;
|
_groupType = groupType;
|
||||||
if (_groupType == GroupTyp_Red) {
|
if (_groupType == GroupType_Red) {
|
||||||
self.contentLabel.textColor = UIColorFromRGB(0xfd4d0e);
|
self.contentLabel.textColor = UIColorFromRGB(0xfd4d0e);
|
||||||
} else if(_groupType == GroupType_Blue) {
|
} else if(_groupType == GroupType_Blue) {
|
||||||
self.contentLabel.textColor = UIColorFromRGB(0x59b9fb);
|
self.contentLabel.textColor = UIColorFromRGB(0x59b9fb);
|
||||||
|
@@ -129,7 +129,7 @@
|
|||||||
|
|
||||||
- (void)setType:(GroupType)type {
|
- (void)setType:(GroupType)type {
|
||||||
_type = type;
|
_type = type;
|
||||||
if (_type == GroupTyp_Red) {
|
if (_type == GroupType_Red) {
|
||||||
CGColorRef color = UIColorFromRGB(0xFFA572).CGColor;
|
CGColorRef color = UIColorFromRGB(0xFFA572).CGColor;
|
||||||
self.firstUserView.layer.borderColor = color;
|
self.firstUserView.layer.borderColor = color;
|
||||||
self.secondUserView.layer.borderColor = color;
|
self.secondUserView.layer.borderColor = color;
|
||||||
|
@@ -200,7 +200,7 @@
|
|||||||
#pragma mark - Getters And Setters
|
#pragma mark - Getters And Setters
|
||||||
- (void)setGroupType:(GroupType)groupType {
|
- (void)setGroupType:(GroupType)groupType {
|
||||||
_groupType = groupType;
|
_groupType = groupType;
|
||||||
if (_groupType == GroupTyp_Red) {
|
if (_groupType == GroupType_Red) {
|
||||||
[self.chooseArray addObjectsFromArray:self.redUserArray];
|
[self.chooseArray addObjectsFromArray:self.redUserArray];
|
||||||
} else if (_groupType == GroupType_Blue) {
|
} else if (_groupType == GroupType_Blue) {
|
||||||
[self.chooseArray addObjectsFromArray:self.blueUserArray];
|
[self.chooseArray addObjectsFromArray:self.blueUserArray];
|
||||||
@@ -223,7 +223,7 @@
|
|||||||
userInfoModel.nick = microModel.userInfo.nick;
|
userInfoModel.nick = microModel.userInfo.nick;
|
||||||
userInfoModel.groupType = self.groupType;
|
userInfoModel.groupType = self.groupType;
|
||||||
userInfoModel.isEnableChoose = YES;
|
userInfoModel.isEnableChoose = YES;
|
||||||
if (self.groupType == GroupTyp_Red) {
|
if (self.groupType == GroupType_Red) {
|
||||||
for (int i = 0; i<self.redUserArray.count; i++) {
|
for (int i = 0; i<self.redUserArray.count; i++) {
|
||||||
RoomPKChooseUserModel * redInfoModel = [self.redUserArray objectAtIndex:i];
|
RoomPKChooseUserModel * redInfoModel = [self.redUserArray objectAtIndex:i];
|
||||||
if (userInfoModel.uid.integerValue == redInfoModel.uid.integerValue) {
|
if (userInfoModel.uid.integerValue == redInfoModel.uid.integerValue) {
|
||||||
@@ -265,7 +265,7 @@
|
|||||||
self.ownerUserInfo.groupType = self.groupType;
|
self.ownerUserInfo.groupType = self.groupType;
|
||||||
self.chooseButton.selected = NO;
|
self.chooseButton.selected = NO;
|
||||||
self.chooseButton.hidden = NO;
|
self.chooseButton.hidden = NO;
|
||||||
if (self.groupType == GroupTyp_Red) {
|
if (self.groupType == GroupType_Red) {
|
||||||
for (int i = 0; i<self.redUserArray.count; i++) {
|
for (int i = 0; i<self.redUserArray.count; i++) {
|
||||||
RoomPKChooseUserModel * redInfoModel = [self.redUserArray objectAtIndex:i];
|
RoomPKChooseUserModel * redInfoModel = [self.redUserArray objectAtIndex:i];
|
||||||
if (self.ownerUserInfo.uid.integerValue == redInfoModel.uid.integerValue) {
|
if (self.ownerUserInfo.uid.integerValue == redInfoModel.uid.integerValue) {
|
||||||
|
@@ -275,7 +275,7 @@
|
|||||||
_redTeamView = [[XPRoomPKPanelUserView alloc] init];
|
_redTeamView = [[XPRoomPKPanelUserView alloc] init];
|
||||||
_redTeamView.itemHeight = 45;
|
_redTeamView.itemHeight = 45;
|
||||||
_redTeamView.isShowAdd = NO;
|
_redTeamView.isShowAdd = NO;
|
||||||
_redTeamView.type = GroupTyp_Red;
|
_redTeamView.type = GroupType_Red;
|
||||||
}
|
}
|
||||||
return _redTeamView;
|
return _redTeamView;
|
||||||
}
|
}
|
||||||
|
@@ -215,13 +215,13 @@
|
|||||||
if (pkDetailInfo.roomPK.pkStatus == RoomPKStatusType_Playing) {
|
if (pkDetailInfo.roomPK.pkStatus == RoomPKStatusType_Playing) {
|
||||||
for (int i = 0; i < pkDetailInfo.roomPK.teams.count; i++) {
|
for (int i = 0; i < pkDetailInfo.roomPK.teams.count; i++) {
|
||||||
RoomPKTeamModel * teamInfo = [pkDetailInfo.roomPK.teams objectAtIndex:i];
|
RoomPKTeamModel * teamInfo = [pkDetailInfo.roomPK.teams objectAtIndex:i];
|
||||||
if (teamInfo.team == GroupTyp_Red) {
|
if (teamInfo.team == GroupType_Red) {
|
||||||
for (int i = 0; i < teamInfo.teamMembers.count; i++) {
|
for (int i = 0; i < teamInfo.teamMembers.count; i++) {
|
||||||
RoomPKTeamUserModel * teamUserModel = [teamInfo.teamMembers objectAtIndex:i];
|
RoomPKTeamUserModel * teamUserModel = [teamInfo.teamMembers objectAtIndex:i];
|
||||||
RoomPKChooseUserModel * redInfo = [[RoomPKChooseUserModel alloc] init];
|
RoomPKChooseUserModel * redInfo = [[RoomPKChooseUserModel alloc] init];
|
||||||
redInfo.avatar = teamUserModel.avatar;
|
redInfo.avatar = teamUserModel.avatar;
|
||||||
redInfo.uid = teamUserModel.uid;
|
redInfo.uid = teamUserModel.uid;
|
||||||
redInfo.groupType = GroupTyp_Red;
|
redInfo.groupType = GroupType_Red;
|
||||||
redInfo.position = [self findMicroInfoByUid:teamUserModel.uid].microState.position;
|
redInfo.position = [self findMicroInfoByUid:teamUserModel.uid].microState.position;
|
||||||
redInfo.nick = teamUserModel.nick;
|
redInfo.nick = teamUserModel.nick;
|
||||||
[redArray addObject:redInfo];
|
[redArray addObject:redInfo];
|
||||||
@@ -244,7 +244,7 @@
|
|||||||
MicroQueueModel * micModel = [queue.allValues objectAtIndex:i];
|
MicroQueueModel * micModel = [queue.allValues objectAtIndex:i];
|
||||||
if (micModel.userInfo && micModel.userInfo.uid > 0) {
|
if (micModel.userInfo && micModel.userInfo.uid > 0) {
|
||||||
UserInfoModel * userInfo = micModel.userInfo;
|
UserInfoModel * userInfo = micModel.userInfo;
|
||||||
if (userInfo.groupType == GroupTyp_Red) {
|
if (userInfo.groupType == GroupType_Red) {
|
||||||
RoomPKChooseUserModel * redInfo = [[RoomPKChooseUserModel alloc] init];
|
RoomPKChooseUserModel * redInfo = [[RoomPKChooseUserModel alloc] init];
|
||||||
redInfo.avatar = userInfo.avatar;
|
redInfo.avatar = userInfo.avatar;
|
||||||
redInfo.uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
|
redInfo.uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
|
||||||
@@ -668,7 +668,7 @@
|
|||||||
#pragma mark - XPRoomPKSelectUserViewDelegate
|
#pragma mark - XPRoomPKSelectUserViewDelegate
|
||||||
- (void)xPRoomPKSelectUserView:(XPRoomPKSelectUserView *)view groupType:(GroupType)groupType didChooseUserInfos:(NSArray<RoomPKChooseUserModel *> *)userInfos {
|
- (void)xPRoomPKSelectUserView:(XPRoomPKSelectUserView *)view groupType:(GroupType)groupType didChooseUserInfos:(NSArray<RoomPKChooseUserModel *> *)userInfos {
|
||||||
[TTPopup dismiss];
|
[TTPopup dismiss];
|
||||||
if (groupType == GroupTyp_Red) {
|
if (groupType == GroupType_Red) {
|
||||||
self.redChooseArray = userInfos;
|
self.redChooseArray = userInfos;
|
||||||
} else {
|
} else {
|
||||||
self.blueChooseArray = userInfos;
|
self.blueChooseArray = userInfos;
|
||||||
@@ -830,7 +830,7 @@
|
|||||||
MicroQueueModel * micModel = [_micQueue.allValues objectAtIndex:i];
|
MicroQueueModel * micModel = [_micQueue.allValues objectAtIndex:i];
|
||||||
if (micModel.userInfo && micModel.userInfo.uid > 0) {
|
if (micModel.userInfo && micModel.userInfo.uid > 0) {
|
||||||
UserInfoModel * userInfo = micModel.userInfo;
|
UserInfoModel * userInfo = micModel.userInfo;
|
||||||
if (userInfo.groupType == GroupTyp_Red) {
|
if (userInfo.groupType == GroupType_Red) {
|
||||||
RoomPKChooseUserModel * redInfo = [[RoomPKChooseUserModel alloc] init];
|
RoomPKChooseUserModel * redInfo = [[RoomPKChooseUserModel alloc] init];
|
||||||
redInfo.avatar = userInfo.avatar;
|
redInfo.avatar = userInfo.avatar;
|
||||||
redInfo.uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
|
redInfo.uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
|
||||||
@@ -898,7 +898,7 @@
|
|||||||
if (!_redTeamView) {
|
if (!_redTeamView) {
|
||||||
_redTeamView = [[XPRoomPKPanelUserView alloc] init];
|
_redTeamView = [[XPRoomPKPanelUserView alloc] init];
|
||||||
_redTeamView.itemHeight = 25;
|
_redTeamView.itemHeight = 25;
|
||||||
_redTeamView.type = GroupTyp_Red;
|
_redTeamView.type = GroupType_Red;
|
||||||
_redTeamView.delegate = self;
|
_redTeamView.delegate = self;
|
||||||
}
|
}
|
||||||
return _redTeamView;
|
return _redTeamView;
|
||||||
|
@@ -237,13 +237,13 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (teamInfo.team == GroupTyp_Red) {
|
if (teamInfo.team == GroupType_Red) {
|
||||||
redTeam = teamInfo;
|
redTeam = teamInfo;
|
||||||
} else if(teamInfo.team == GroupType_Blue) {
|
} else if(teamInfo.team == GroupType_Blue) {
|
||||||
blueTeam = teamInfo;
|
blueTeam = teamInfo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (myType == GroupTyp_Red) {///我是红队的
|
if (myType == GroupType_Red) {///我是红队的
|
||||||
[self handleMyInRedPKTeam:redTeam bluePKTeam:blueTeam];
|
[self handleMyInRedPKTeam:redTeam bluePKTeam:blueTeam];
|
||||||
} else if(myType == GroupType_Blue) {///我是蓝队的
|
} else if(myType == GroupType_Blue) {///我是蓝队的
|
||||||
[self handleMyInBluePKTeam:redTeam bluePKTeam:blueTeam];
|
[self handleMyInBluePKTeam:redTeam bluePKTeam:blueTeam];
|
||||||
@@ -261,7 +261,7 @@
|
|||||||
RoomPKTeamModel * blueTeam;
|
RoomPKTeamModel * blueTeam;
|
||||||
GroupType myType = GroupType_default;
|
GroupType myType = GroupType_default;
|
||||||
for (RoomPKTeamModel * teamInfo in _roomPKResultInfoModel.teams) {
|
for (RoomPKTeamModel * teamInfo in _roomPKResultInfoModel.teams) {
|
||||||
if (teamInfo.team == GroupTyp_Red) {
|
if (teamInfo.team == GroupType_Red) {
|
||||||
redTeam = teamInfo;
|
redTeam = teamInfo;
|
||||||
} else if(teamInfo.team == GroupType_Blue) {
|
} else if(teamInfo.team == GroupType_Blue) {
|
||||||
blueTeam = teamInfo;
|
blueTeam = teamInfo;
|
||||||
@@ -276,7 +276,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (myType == GroupTyp_Red) {///我是红队的
|
if (myType == GroupType_Red) {///我是红队的
|
||||||
[self handleMyInRedPKTeam:redTeam bluePKTeam:blueTeam];
|
[self handleMyInRedPKTeam:redTeam bluePKTeam:blueTeam];
|
||||||
} else if(myType == GroupType_Blue) {///我是蓝队的
|
} else if(myType == GroupType_Blue) {///我是蓝队的
|
||||||
[self handleMyInBluePKTeam:redTeam bluePKTeam:blueTeam];
|
[self handleMyInBluePKTeam:redTeam bluePKTeam:blueTeam];
|
||||||
@@ -350,9 +350,9 @@
|
|||||||
}
|
}
|
||||||
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
||||||
self.fightScoreLable.groupType = GroupTyp_Red;
|
self.fightScoreLable.groupType = GroupType_Red;
|
||||||
self.guardScoreLable.groupType = GroupTyp_Red;
|
self.guardScoreLable.groupType = GroupType_Red;
|
||||||
self.guardPersonLable.groupType = GroupTyp_Red;
|
self.guardPersonLable.groupType = GroupType_Red;
|
||||||
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
||||||
if (redPKTeam.protector.nick.length) {
|
if (redPKTeam.protector.nick.length) {
|
||||||
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
||||||
@@ -396,9 +396,9 @@
|
|||||||
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal];
|
[self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
||||||
self.fightScoreLable.groupType = GroupTyp_Red;
|
self.fightScoreLable.groupType = GroupType_Red;
|
||||||
self.guardScoreLable.groupType = GroupTyp_Red;
|
self.guardScoreLable.groupType = GroupType_Red;
|
||||||
self.guardPersonLable.groupType = GroupTyp_Red;
|
self.guardPersonLable.groupType = GroupType_Red;
|
||||||
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
||||||
if (redPKTeam.protector.nick.length) {
|
if (redPKTeam.protector.nick.length) {
|
||||||
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
||||||
@@ -475,11 +475,11 @@
|
|||||||
if (self.roomPKResultInfoModel.result == RoomPKResultType_Blue) {
|
if (self.roomPKResultInfoModel.result == RoomPKResultType_Blue) {
|
||||||
[self.resultButton setTitle:@"· 红队战绩 ·" forState:UIControlStateNormal];
|
[self.resultButton setTitle:@"· 红队战绩 ·" forState:UIControlStateNormal];
|
||||||
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal];
|
[self.checkButton setTitle:@"查看蓝队战绩>" forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
||||||
self.fightScoreLable.groupType = GroupTyp_Red;
|
self.fightScoreLable.groupType = GroupType_Red;
|
||||||
self.guardScoreLable.groupType = GroupTyp_Red;
|
self.guardScoreLable.groupType = GroupType_Red;
|
||||||
self.guardPersonLable.groupType = GroupTyp_Red;
|
self.guardPersonLable.groupType = GroupType_Red;
|
||||||
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
||||||
if (redPKTeam.protector.nick.length) {
|
if (redPKTeam.protector.nick.length) {
|
||||||
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
||||||
@@ -490,7 +490,7 @@
|
|||||||
} else {
|
} else {
|
||||||
[self.resultButton setTitle:@"· 蓝队战绩 ·" forState:UIControlStateNormal];
|
[self.resultButton setTitle:@"· 蓝队战绩 ·" forState:UIControlStateNormal];
|
||||||
[self.resultButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
[self.resultButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitle:@"查看我的战绩>" forState:UIControlStateNormal];
|
[self.checkButton setTitle:@"查看红队战绩>" forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
[self.checkButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
||||||
self.fightScoreLable.groupType = GroupType_Blue;
|
self.fightScoreLable.groupType = GroupType_Blue;
|
||||||
self.guardScoreLable.groupType = GroupType_Blue;
|
self.guardScoreLable.groupType = GroupType_Blue;
|
||||||
@@ -549,9 +549,9 @@
|
|||||||
[self.checkButton setTitle:@"查看蓝队战绩>" forState:UIControlStateNormal];
|
[self.checkButton setTitle:@"查看蓝队战绩>" forState:UIControlStateNormal];
|
||||||
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
[self.checkButton setTitleColor:kBlueTeamColor forState:UIControlStateNormal];
|
||||||
|
|
||||||
self.fightScoreLable.groupType = GroupTyp_Red;
|
self.fightScoreLable.groupType = GroupType_Red;
|
||||||
self.guardScoreLable.groupType = GroupTyp_Red;
|
self.guardScoreLable.groupType = GroupType_Red;
|
||||||
self.guardPersonLable.groupType = GroupTyp_Red;
|
self.guardPersonLable.groupType = GroupType_Red;
|
||||||
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
||||||
if (redPKTeam.protector.nick.length) {
|
if (redPKTeam.protector.nick.length) {
|
||||||
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
self.guardPersonLable.content = [NSString stringWithFormat:@"%@", redPKTeam.protector.nick];
|
||||||
@@ -566,9 +566,9 @@
|
|||||||
[self.resultButton setTitle:@"· 势均力敌 ·" forState:UIControlStateNormal];
|
[self.resultButton setTitle:@"· 势均力敌 ·" forState:UIControlStateNormal];
|
||||||
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
[self.resultButton setTitleColor:kRedTeamColor forState:UIControlStateNormal];
|
||||||
self.checkButton.hidden = YES;
|
self.checkButton.hidden = YES;
|
||||||
self.fightScoreLable.groupType = GroupTyp_Red;
|
self.fightScoreLable.groupType = GroupType_Red;
|
||||||
self.pkUserContaierView.hidden = YES;
|
self.pkUserContaierView.hidden = YES;
|
||||||
self.fightScoreLable.content = @"本局平局 战斗值";
|
self.fightScoreLable.title = @"本局平局 战斗值:";
|
||||||
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
self.fightScoreLable.content = [NSString stringWithFormat:@"%lld", redPKTeam.score];
|
||||||
[self loadTeamMemberUserAvatar:redPKTeam.teamMembers mvpUserId:redPKTeam.mvp];
|
[self loadTeamMemberUserAvatar:redPKTeam.teamMembers mvpUserId:redPKTeam.mvp];
|
||||||
}
|
}
|
||||||
|
@@ -237,7 +237,7 @@
|
|||||||
#pragma mark - XPRoomPKSelectUserViewDelegate
|
#pragma mark - XPRoomPKSelectUserViewDelegate
|
||||||
- (void)xPRoomPKSelectUserView:(XPRoomPKSelectUserView *)view groupType:(GroupType)groupType didChooseUserInfos:(NSArray<RoomPKChooseUserModel *> *)userInfos {
|
- (void)xPRoomPKSelectUserView:(XPRoomPKSelectUserView *)view groupType:(GroupType)groupType didChooseUserInfos:(NSArray<RoomPKChooseUserModel *> *)userInfos {
|
||||||
[TTPopup dismiss];
|
[TTPopup dismiss];
|
||||||
if (groupType == GroupTyp_Red) {
|
if (groupType == GroupType_Red) {
|
||||||
self.redUserArray = [NSMutableArray arrayWithArray:userInfos];;
|
self.redUserArray = [NSMutableArray arrayWithArray:userInfos];;
|
||||||
} else {
|
} else {
|
||||||
self.blueUserArray = [NSMutableArray arrayWithArray:userInfos];
|
self.blueUserArray = [NSMutableArray arrayWithArray:userInfos];
|
||||||
@@ -262,7 +262,7 @@
|
|||||||
RoomPKChooseUserModel * userInfo = [self.redUserArray objectAtIndex:i];
|
RoomPKChooseUserModel * userInfo = [self.redUserArray objectAtIndex:i];
|
||||||
if (i < self.redTeamViews.count) {
|
if (i < self.redTeamViews.count) {
|
||||||
XPRoomPKUserView * userView = [self.redTeamViews objectAtIndex:i];
|
XPRoomPKUserView * userView = [self.redTeamViews objectAtIndex:i];
|
||||||
if (userInfo.groupType == GroupTyp_Red) {
|
if (userInfo.groupType == GroupType_Red) {
|
||||||
userView.userInfo = userInfo;
|
userView.userInfo = userInfo;
|
||||||
} else {
|
} else {
|
||||||
userView.userInfo = nil;
|
userView.userInfo = nil;
|
||||||
@@ -370,7 +370,7 @@
|
|||||||
chooseUserView.delegate = self;
|
chooseUserView.delegate = self;
|
||||||
chooseUserView.redUserArray = self.redUserArray;
|
chooseUserView.redUserArray = self.redUserArray;
|
||||||
chooseUserView.blueUserArray = self.blueUserArray;
|
chooseUserView.blueUserArray = self.blueUserArray;
|
||||||
chooseUserView.groupType = GroupTyp_Red;
|
chooseUserView.groupType = GroupType_Red;
|
||||||
chooseUserView.microQueueArray = self.hostDelegate.getMicroQueue.allValues;
|
chooseUserView.microQueueArray = self.hostDelegate.getMicroQueue.allValues;
|
||||||
[TTPopup popupView:chooseUserView style:TTPopupStyleAlert];
|
[TTPopup popupView:chooseUserView style:TTPopupStyleAlert];
|
||||||
}
|
}
|
||||||
|
@@ -427,7 +427,7 @@
|
|||||||
|
|
||||||
self.groupTypeButton.hidden = YES;
|
self.groupTypeButton.hidden = YES;
|
||||||
if (self.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
if (self.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
if (userInfo.groupType == GroupTyp_Red) {
|
if (userInfo.groupType == GroupType_Red) {
|
||||||
self.groupTypeButton.hidden = NO;
|
self.groupTypeButton.hidden = NO;
|
||||||
[self.groupTypeButton setTitle:@"红队" forState:UIControlStateNormal];
|
[self.groupTypeButton setTitle:@"红队" forState:UIControlStateNormal];
|
||||||
[self.groupTypeButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFC4A95), UIColorFromRGB(0xFE6075)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
[self.groupTypeButton setBackgroundImage:[UIImage gradientColorImageFromColors:@[UIColorFromRGB(0xFC4A95), UIColorFromRGB(0xFE6075)] gradientType:GradientTypeLeftToRight imgSize:CGSizeMake(10, 10)] forState:UIControlStateNormal];
|
||||||
|
@@ -198,6 +198,26 @@ UIKIT_EXTERN NSString * kRoomBackMusicPlayMusicOrderKey;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
||||||
|
}else if(self.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
|
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
|
||||||
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
|
[Api getRoomPKUserList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
|
if (code == 200) {
|
||||||
|
ArrangeMicModel * arrangeMicModel= [ArrangeMicModel modelWithJSON:data.data];
|
||||||
|
if (arrangeMicModel.myPos.intValue > 0) {
|
||||||
|
__block NSString * grouptype = @"0";
|
||||||
|
[arrangeMicModel.queue enumerateObjectsUsingBlock:^(ArrangeMicUserModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||||
|
if (obj.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
|
grouptype = [NSString stringWithFormat:@"%ld", obj.groupType];
|
||||||
|
*stop = YES;
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
[Api cancelRoomPKArrangeMic:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
|
|
||||||
|
} roomUid:roomUid operUid:uid groupType:grouptype];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -381,6 +381,26 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
||||||
|
}else if(self.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
|
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
|
||||||
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
|
[Api getRoomPKUserList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
|
if (code == 200) {
|
||||||
|
ArrangeMicModel * arrangeMicModel= [ArrangeMicModel modelWithJSON:data.data];
|
||||||
|
if (arrangeMicModel.myPos.intValue > 0) {
|
||||||
|
__block NSString * grouptype = @"0";
|
||||||
|
[arrangeMicModel.queue enumerateObjectsUsingBlock:^(ArrangeMicUserModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||||
|
if (obj.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
|
grouptype = [NSString stringWithFormat:@"%ld", obj.groupType];
|
||||||
|
*stop = YES;
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
[Api cancelRoomPKArrangeMic:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
|
|
||||||
|
} roomUid:roomUid operUid:uid groupType:grouptype];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -778,7 +798,40 @@ UIKIT_EXTERN NSString * const kRoomMiniNotificationKey;
|
|||||||
[self.presenter reportUserOutRoom:roomUid];
|
[self.presenter reportUserOutRoom:roomUid];
|
||||||
[self dismissViewControllerAnimated:YES completion:nil];
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
||||||
} else if(self.roomInfo.type == RoomType_MiniGame) {
|
} else if(self.roomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
|
||||||
|
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.roomInfo.uid];
|
||||||
|
NSString * uid = [AccountInfoStorage instance].getUid;
|
||||||
|
[Api getRoomPKUserList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
|
if (code == 200) {
|
||||||
|
ArrangeMicModel * arrangeMicModel= [ArrangeMicModel modelWithJSON:data.data];
|
||||||
|
if (arrangeMicModel.myPos.intValue > 0) {
|
||||||
|
[TTPopup alertWithMessage:@"退出房间后将退出目前排麦,再次进入需要重新排麦,确认退出房间吗?" confirmHandler:^{
|
||||||
|
__block NSString * grouptype = @"0";
|
||||||
|
[arrangeMicModel.queue enumerateObjectsUsingBlock:^(ArrangeMicUserModel * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
|
||||||
|
if (obj.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
|
||||||
|
grouptype = [NSString stringWithFormat:@"%ld", obj.groupType];
|
||||||
|
*stop = YES;
|
||||||
|
}
|
||||||
|
}];
|
||||||
|
[Api cancelRoomPKArrangeMic:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||||
|
|
||||||
|
} roomUid:roomUid operUid:uid groupType:grouptype];
|
||||||
|
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
|
||||||
|
[[XPRoomMiniManager shareManager] resetLocalMessage];
|
||||||
|
[[RtcManager instance] exitRoom];
|
||||||
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
} cancelHandler:^{
|
||||||
|
|
||||||
|
}];
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self.presenter exitNIMRoom:[NSString stringWithFormat:@"%ld", self.roomInfo.roomId]];
|
||||||
|
[[XPRoomMiniManager shareManager] resetLocalMessage];
|
||||||
|
[[RtcManager instance] exitRoom];
|
||||||
|
[self dismissViewControllerAnimated:YES completion:nil];
|
||||||
|
} roomUid:roomUid operUid:uid page:@"1" pageSize:@"50"];
|
||||||
|
}else if(self.roomInfo.type == RoomType_MiniGame) {
|
||||||
if ([self.littleGameView isInSudGame]) {
|
if ([self.littleGameView isInSudGame]) {
|
||||||
TTAlertConfig *config = [[TTAlertConfig alloc] init];
|
TTAlertConfig *config = [[TTAlertConfig alloc] init];
|
||||||
config.cancelButtonConfig.title = @"取消";
|
config.cancelButtonConfig.title = @"取消";
|
||||||
|
Reference in New Issue
Block a user