Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
04b72a58b2 | ||
![]() |
bd54fa6aa2 | ||
![]() |
2f516b8387 | ||
![]() |
eac71b03e1 | ||
![]() |
f8dfb745a0 |
2
Podfile
2
Podfile
@@ -49,7 +49,7 @@ target 'xplan-ios' do
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/WeChat_Lite'
|
||||
pod 'mob_sharesdk/ShareSDKPlatforms/Apple'
|
||||
pod 'mob_sharesdk/ShareSDKExtension'
|
||||
pod 'SVGAPlayer', '~> 2.3'
|
||||
pod 'SVGAPlayer'
|
||||
# 滑动标签栏
|
||||
pod 'JXCategoryView'
|
||||
pod 'JXPagingView/Pager'
|
||||
|
@@ -153,7 +153,7 @@ DEPENDENCIES:
|
||||
- mob_sharesdk/ShareSDKPlatforms/WeChat_Lite
|
||||
- NIMSDK_LITE (~> 8.9.0)
|
||||
- NTESQuickPass
|
||||
- pop
|
||||
- pop (~> 1.0.12)
|
||||
- QGVAPlayer
|
||||
- Qiniu
|
||||
- QY_NIM_iOS_SDK (~> 6.6.1)
|
||||
@@ -162,7 +162,7 @@ DEPENDENCIES:
|
||||
- SDWebImage
|
||||
- SDWebImageFLPlugin
|
||||
- SSKeychain
|
||||
- SVGAPlayer (~> 2.3)
|
||||
- SVGAPlayer
|
||||
- SZTextView
|
||||
- TXLiteAVSDK_TRTC (~> 11.4.14530)
|
||||
- TZImagePickerController
|
||||
@@ -271,6 +271,6 @@ SPEC CHECKSUMS:
|
||||
YYText: 5c461d709e24d55a182d1441c41dc639a18a4849
|
||||
YYWebImage: 5f7f36aee2ae293f016d418c7d6ba05c4863e928
|
||||
|
||||
PODFILE CHECKSUM: f44d894b616b0165722154f819e116f0d23597ff
|
||||
PODFILE CHECKSUM: 0f2e29ba8c875f839292918f612c6ec567ad4318
|
||||
|
||||
COCOAPODS: 1.12.1
|
||||
|
@@ -11395,7 +11395,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.5.0;
|
||||
MARKETING_VERSION = 1.5.2;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
@@ -11658,7 +11658,7 @@
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.5.0;
|
||||
MARKETING_VERSION = 1.5.2;
|
||||
OTHER_LDFLAGS = (
|
||||
"$(inherited)",
|
||||
"-ObjC",
|
||||
|
@@ -133,7 +133,7 @@
|
||||
if(charmList.count == 2){
|
||||
NSString *charmUrl = charmList[1];
|
||||
for (int i = 0;i < 110; i++) {
|
||||
NSString *num = i < 10 ? [NSString stringWithFormat:@"0%d",i+1] : [NSString stringWithFormat:@"%d",i+1];
|
||||
NSString *num = i < 9 ? [NSString stringWithFormat:@"0%d",i+1] : [NSString stringWithFormat:@"%d",i+1];
|
||||
if([charmUrl containsString:num]){
|
||||
getUrl = [NSString stringWithFormat:@"new_charm_%@",num];
|
||||
break;
|
||||
@@ -153,7 +153,7 @@
|
||||
if(wealthList.count == 2){
|
||||
NSString *wealthUrl = wealthList[1];
|
||||
for (int i = 0;i < 110; i++) {
|
||||
NSString *num = i < 10 ? [NSString stringWithFormat:@"0%d",i+1] : [NSString stringWithFormat:@"%d",i+1];
|
||||
NSString *num = i < 9 ? [NSString stringWithFormat:@"0%d",i+1] : [NSString stringWithFormat:@"%d",i+1];
|
||||
if([wealthUrl containsString:num]){
|
||||
getUrl = [NSString stringWithFormat:@"new_exper_%@",num];
|
||||
break;
|
||||
|
@@ -43,7 +43,7 @@ NSString * const KeyWithType(KeyType type) {
|
||||
///正式环境
|
||||
@(YES):@{
|
||||
@(KeyType_PasswordEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_NTESQuickLoginBusinessId) : @"3a94ceb70b144963a03bf98cb55b812a",
|
||||
@(KeyType_NTESQuickLoginBusinessId) : @"200c83103d4a413591c7969dd8d4d6e2",
|
||||
@(KeyType_QQAppid) : @"102044928",
|
||||
@(KeyType_QQSecret) : @"715dd2601777347cd57af77c3e28402f",
|
||||
@(KeyType_WechatAppid) : @"wx4b772d5ebc964a38",
|
||||
@@ -61,12 +61,12 @@ NSString * const KeyWithType(KeyType type) {
|
||||
@(KeyType_GuildUidKey) : @"8428524",
|
||||
@(KeyType_SystemNotifiUidKey) : @"8747473",
|
||||
@(KeyType_SecretaryUidKey) : @"1930010",
|
||||
@(KeyTyoe_BuglyKey) : @"6222885c55"
|
||||
@(KeyTyoe_BuglyKey) : @"7fcddf605c"
|
||||
},
|
||||
///测试环境
|
||||
@(NO):@{
|
||||
@(KeyType_PasswordEncode) : @"1ea53d260ecf11e7b56e00163e046a26",
|
||||
@(KeyType_NTESQuickLoginBusinessId) : @"3a94ceb70b144963a03bf98cb55b812a",
|
||||
@(KeyType_NTESQuickLoginBusinessId) : @"200c83103d4a413591c7969dd8d4d6e2",
|
||||
@(KeyType_QQAppid) : @"102044928",
|
||||
@(KeyType_QQSecret) : @"715dd2601777347cd57af77c3e28402f",
|
||||
@(KeyType_WechatAppid) : @"wx4b772d5ebc964a38",
|
||||
|
@@ -6,6 +6,8 @@
|
||||
// 抱用户上麦控制器
|
||||
|
||||
#import "BaseViewController.h"
|
||||
#import "RoomHostDelegate.h"
|
||||
#import "RoomInfoModel.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
@@ -18,6 +20,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,copy) NSString *roomId;
|
||||
///坑位信息
|
||||
@property (nonatomic,copy) NSString *position;
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate;
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
@@ -39,9 +39,18 @@
|
||||
@property (nonatomic,strong) NIMChatroomMember *lastMember;
|
||||
///临时成员最后一个
|
||||
@property (nonatomic,strong) NIMChatroomMember *tmpLastMember;
|
||||
@property (nonatomic, weak) id<RoomHostDelegate> hostDelegate;
|
||||
|
||||
@end
|
||||
|
||||
@implementation XPRoomInviteUserViewController
|
||||
- (instancetype)initWithDelegate:(id<RoomHostDelegate>)delegate{
|
||||
self = [super init];
|
||||
if (self) {
|
||||
_hostDelegate = delegate;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
@@ -270,6 +279,7 @@
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
if (self.datasource.count > 0) {
|
||||
|
||||
XPRoomOnlineTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([XPRoomOnlineTableViewCell class])];
|
||||
if (cell == nil) {
|
||||
cell = [[XPRoomOnlineTableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:NSStringFromClass([XPRoomOnlineTableViewCell class])];
|
||||
@@ -299,7 +309,12 @@
|
||||
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
[tableView deselectRowAtIndexPath:indexPath animated:YES];
|
||||
if (self.datasource.count > 0) {
|
||||
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
|
||||
NIMChatroomMember * member = [self.datasource safeObjectAtIndex1:indexPath.row];
|
||||
if (roomInfo.leaveMode && roomInfo.uid == member.userId.integerValue) {
|
||||
[XCHUDTool showErrorWithMessage:@"请先关闭离开模式"];
|
||||
return;
|
||||
}
|
||||
if ([AccountInfoStorage instance].getUid.integerValue == member.userId.integerValue) {
|
||||
[Api getUserInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
|
||||
if (code == 200) {
|
||||
|
@@ -370,6 +370,11 @@
|
||||
*stop = YES;
|
||||
}
|
||||
}];
|
||||
if (roomInfo.leaveMode && roomInfo.uid == targetUid.integerValue) {
|
||||
[XCHUDTool showErrorWithMessage:@"请先关闭离开模式"];
|
||||
return;
|
||||
}
|
||||
|
||||
model.nick = self.hostDelegate.getUserInfo.nick;
|
||||
model.uid = targetUid;
|
||||
model.delegate = self.hostDelegate;
|
||||
|
@@ -182,7 +182,7 @@
|
||||
if (member.type == NIMTeamMemberTypeOwner) {
|
||||
// 抱Ta上麦
|
||||
TTActionSheetConfig *inviteMic = [TTActionSheetConfig normalTitle:@"抱Ta上麦" clickAction:^{
|
||||
XPRoomInviteUserViewController * inviteUserMicVC = [[XPRoomInviteUserViewController alloc] init];
|
||||
XPRoomInviteUserViewController * inviteUserMicVC = [[XPRoomInviteUserViewController alloc] initWithDelegate:self.hostDelegate];
|
||||
inviteUserMicVC.roomId = roomId;
|
||||
inviteUserMicVC.position = position;
|
||||
inviteUserMicVC.blindDateVipUid = roomInfo.blindDateVipUid;
|
||||
|
@@ -426,6 +426,12 @@
|
||||
self.sexImageView.hidden = NO;
|
||||
self.postionLabel.hidden = YES;
|
||||
self.sexImageView.image = [UIImage imageNamed:userInfo.gender == GenderType_Male ? @"common_male" : @"common_female"];
|
||||
[self.stackView mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.centerX.mas_equalTo(self);
|
||||
make.top.mas_equalTo(self.avatarImageView.mas_bottom).offset(10);
|
||||
make.width.mas_lessThanOrEqualTo(kGetScaleWidth(200));
|
||||
}];
|
||||
|
||||
}
|
||||
self.forbidKickView.hidden = !userInfo.preventKick;
|
||||
} else {
|
||||
|
@@ -783,33 +783,11 @@
|
||||
NSString* uid = [NSString stringWithFormat:@"%ld", userInfo.uid];
|
||||
NSString* roomId = [NSString stringWithFormat:@"%ld", roomInfo.roomId];
|
||||
|
||||
// 1. 麦位上有人,弹窗用户资料卡
|
||||
NSString * targetUid;
|
||||
if (roomInfo.leaveMode && [position isEqualToString:@"-1"]) {
|
||||
targetUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
|
||||
}
|
||||
if (micModel.userInfo && micModel.userInfo.uid > 0) {
|
||||
targetUid = [NSString stringWithFormat:@"%ld", micModel.userInfo.uid];
|
||||
}
|
||||
|
||||
if (targetUid && targetUid.length > 0) {
|
||||
XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];
|
||||
model.uid = targetUid;
|
||||
model.position = position;
|
||||
model.posState = micModel.microState.posState;
|
||||
model.micState = micModel.microState.micState;
|
||||
model.nick = userInfo.nick;
|
||||
model.roomInfo = roomInfo;
|
||||
model.micQueue = self.micQueue;
|
||||
model.delegate = self.hostDelegate;
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
|
||||
if (roomInfo.leaveMode && roomInfo.uid == [AccountInfoStorage instance].getUid.integerValue) {
|
||||
[XCHUDTool showErrorWithMessage:@"请先关闭离开模式"];
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 2. 空麦位,上麦逻辑
|
||||
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
|
||||
@@ -817,11 +795,36 @@
|
||||
request.userIds = @[uid];
|
||||
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
|
||||
NIMChatroomMember * member = members.firstObject;
|
||||
if (!member) return;
|
||||
if (roomInfo.leaveMode && (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager)) {
|
||||
if (!member)return;
|
||||
if (roomInfo.leaveMode && member.type == NIMTeamMemberTypeManager && [position isEqualToString:@"-1"]) {
|
||||
[XCHUDTool showErrorWithMessage:@"请先关闭离开模式"];
|
||||
return;
|
||||
}
|
||||
// 1. 麦位上有人,弹窗用户资料卡
|
||||
NSString * targetUid;
|
||||
if (roomInfo.leaveMode && [position isEqualToString:@"-1"]) {
|
||||
targetUid = [NSString stringWithFormat:@"%ld", roomInfo.uid];
|
||||
}
|
||||
if (micModel.userInfo && micModel.userInfo.uid > 0) {
|
||||
targetUid = [NSString stringWithFormat:@"%ld", micModel.userInfo.uid];
|
||||
}
|
||||
if (targetUid && targetUid.length > 0) {
|
||||
XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];
|
||||
model.uid = targetUid;
|
||||
model.position = position;
|
||||
model.posState = micModel.microState.posState;
|
||||
model.micState = micModel.microState.micState;
|
||||
model.nick = userInfo.nick;
|
||||
model.roomInfo = roomInfo;
|
||||
model.micQueue = self.micQueue;
|
||||
model.delegate = self.hostDelegate;
|
||||
model.superMangerList = self.hostDelegate.getRoomSuperAdminList;
|
||||
XPUserCardViewController * userCardVC = [[XPUserCardViewController alloc] initWithUser:model];
|
||||
[self.hostDelegate.getCurrentNav presentViewController:userCardVC animated:YES completion:nil];
|
||||
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEventroom_mike_click eventAttributes:@{@"actionType" : @"userCard"}];
|
||||
return;
|
||||
}
|
||||
|
||||
void(^nimUpQueue)(NSString*, BOOL) = ^ (NSString* up, BOOL isFromDownMic){
|
||||
if (!self.hadGetQueueInfoSuccess) {
|
||||
return;
|
||||
|
Reference in New Issue
Block a user