移除 A/B 相关代码。

通过 [ClientConfig shareConfig].canOpen 控制页面,现在已没有相关配置,删除/调整相关内容,[ClientConfig shareConfig].canOpen == YES 的部分将保留等价逻辑/代码
This commit is contained in:
QQQ
2024-05-22 19:23:54 +08:00
parent 415b7e2bbb
commit adb07286a0
38 changed files with 407 additions and 830 deletions

View File

@@ -234,9 +234,6 @@ UIKIT_EXTERN NSString * adImageName;
/// 广
- (void)advertiseJumpHandleWithInfo:(AdvertiseModel *)info {
if (![ClientConfig shareConfig].canOpen) {
return;
}
if (UIApplication.sharedApplication.keyWindow != self.window) {
//
return;

View File

@@ -22,7 +22,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic,strong) ClientDataModel *configInfo;
///开箱子 大于等级 展示
@property (nonatomic, assign) NSInteger openCandyTreeLimitLevel;
@property (nonatomic,assign) BOOL canOpen;
@property(nonatomic,assign) BOOL isTF;
///是否刷新了
@property (nonatomic,assign) BOOL isLoad;

View File

@@ -44,9 +44,9 @@
return isTestFlight;
}
- (void)clientInit {
self.canOpen = YES;
@kWeakify(self);
[Api clientInitConfig:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
if (code == 200) {
self.retryCount = 0;
NSDictionary * initData = data.data;

View File

@@ -40,24 +40,14 @@
#pragma mark - Life Style
- (instancetype)initWithItems:(NSArray<XPShareItem *> *)items itemSize:(CGSize)itemSize shareInfo:(XPShareInfoModel *)shareInfo {
if (self = [super init]) {
NSMutableArray *itemList = [NSMutableArray array];
for (XPShareItem * item in items) {
if (item.type == XPShareItemTagAppFriends || item.type == XPShareItemTagCopyLink) {
item.disable = YES;
} else {
item.disable = [self isInstallClient:[self getSharePlatformType:item.type]];
}
if(item.disable == YES){
[itemList addObject:item];
}
}
if([ClientConfig shareConfig].canOpen){
self.items = [NSMutableArray arrayWithArray:items];
}else{
self.items = itemList;
}
self.items = [NSMutableArray arrayWithArray:items];
self.itemSize =itemSize;
self.shareInfo = shareInfo;
[self initSubViews];

View File

@@ -170,15 +170,9 @@
- (void)xPSessionFindNewTableViewCell:(XPSessionFindNewTableViewCell *)cell didClickAvatar:(FindNewUserInfoModel *)userInfo {
if (userInfo.uid > 0) {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = userInfo.uid.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = userInfo.uid.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = userInfo.uid.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}
}

View File

@@ -76,15 +76,6 @@
XPMonentsDetailViewController * detailView = [[XPMonentsDetailViewController alloc] init];
detailView.monentsInfo = self.monents;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:detailView animated:YES];
if ([ClientConfig shareConfig].canOpen) {
XPMonentsDetailViewController * detailView = [[XPMonentsDetailViewController alloc] init];
detailView.monentsInfo = self.monents;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:detailView animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailView = [[XPMomentsSimpleDetailViewController alloc] init];
detailView.monentsInfo = self.monents;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:detailView animated:YES];
}
}
- (void)render:(MessageBaseModel *)message {

View File

@@ -152,16 +152,9 @@
case SecretaryRouterType_UserInfo:
{
if (value.length > 0) {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = value.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = value.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = value.integerValue;
[[XCCurrentVCStackManager shareManager].getCurrentVC.navigationController pushViewController:userInfoVC animated:YES];
}
}
break;

View File

@@ -88,16 +88,12 @@
if (self.datasource.count > 0) {
SessionSettingModel * model = [self.datasource safeObjectAtIndex1:indexPath.row];
if (model.settingType == SessionSettingType_report) {
if ([ClientConfig shareConfig].canOpen) {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_report_click];
XPWebViewController *webVC = [[XPWebViewController alloc] init];
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%ld&source=CHAT",URLWithType(kReportRoomURL),self.userInfo.uid];
webVC.url = urlstr;
[self.navigationController pushViewController:webVC animated:YES];
} else {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"SessionInfoViewController1")];
}
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_report_click];
XPWebViewController *webVC = [[XPWebViewController alloc] init];
webVC.url = [NSString stringWithFormat:@"%@?reportUid=%ld&source=CHAT",
URLWithType(kReportRoomURL),
self.userInfo.uid];
[self.navigationController pushViewController:webVC animated:YES];
}
}
}
@@ -182,16 +178,9 @@
#pragma mark - Event Response
- (void)didTapUserRecognizer {
[StatisticsServiceHelper trackEventWithKey:StatisticsServiceEvent_chat_set_data_click];
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * mineVC = [[XPMineUserInfoViewController alloc] init];
mineVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:mineVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * mineVC = [[XPMineSimpleUserInfoViewController alloc] init];
mineVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:mineVC animated:YES];
}
XPMineUserInfoViewController * mineVC = [[XPMineUserInfoViewController alloc] init];
mineVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:mineVC animated:YES];
}
#pragma mark - Getters And Setters

View File

@@ -513,16 +513,9 @@
- (void)didTapAvatar:(NSString *)uid {
if (uid.length > 0 && ![NIMMessageUtils isOfficalAccount:uid]) {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = uid.integerValue;
[[self getKeyWindowNav] pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = uid.integerValue;
[[self getKeyWindowNav] pushViewController:infoVC animated:YES];
}
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = uid.integerValue;
[[self getKeyWindowNav] pushViewController:infoVC animated:YES];
}
}

View File

@@ -52,115 +52,80 @@
self.phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : YMLocalizedString(@"XPMineSettingPresent0");
self.payItem.subTitle = userinfo.isBindPaymentPwd ? YMLocalizedString(@"XPMineSettingPresent26") : YMLocalizedString(@"XPMineSettingPresent2");
} else {
if ([ClientConfig shareConfig].canOpen) {
XPMineSettingItemModel * phoneItem = [[XPMineSettingItemModel alloc] init];
phoneItem.title = YMLocalizedString(@"XPMineSettingPresent3");
phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : YMLocalizedString(@"XPMineSettingPresent4");
phoneItem.type = XPMineSettingItemType_Phone;
self.phoneItem = phoneItem;
XPMineSettingItemModel * loginItem = [[XPMineSettingItemModel alloc] init];
loginItem.title = userinfo.isBindPasswd ? YMLocalizedString(@"XPMineLoginPasswordViewController6") : YMLocalizedString(@"XPMineSettingPresent6");
loginItem.subTitle = YMLocalizedString(@"XPMineSettingPresent7");
loginItem.type = XPMineSettingItemType_Login_Password;
self.loginItem = loginItem;
XPMineSettingItemModel * shieldItem = [[XPMineSettingItemModel alloc] init];
shieldItem.title = YMLocalizedString(@"XPMineSettingPresent27");
XPMineSettingItemModel * phoneItem = [[XPMineSettingItemModel alloc] init];
phoneItem.title = YMLocalizedString(@"XPMineSettingPresent3");
phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : YMLocalizedString(@"XPMineSettingPresent4");
phoneItem.type = XPMineSettingItemType_Phone;
self.phoneItem = phoneItem;
shieldItem.type = XPMineSettingItemType_Shield_management;
XPMineSettingItemModel * blackListItem = [[XPMineSettingItemModel alloc] init];
blackListItem.title = YMLocalizedString(@"XPMineSettingPresent8");
blackListItem.subTitle = @"";
blackListItem.type = XPMineSettingItemType_Black_Manager;
XPMineSettingItemModel * languageItem = [[XPMineSettingItemModel alloc] init];
languageItem.title = YMLocalizedString(@"XPMineSettingPresent28");
languageItem.subTitle = @"";
languageItem.type = XPMineSettingItemType_Language;
XPMineSettingItemModel * loginItem = [[XPMineSettingItemModel alloc] init];
loginItem.title = userinfo.isBindPasswd ? YMLocalizedString(@"XPMineLoginPasswordViewController6") : YMLocalizedString(@"XPMineSettingPresent6");
loginItem.subTitle = YMLocalizedString(@"XPMineSettingPresent7");
loginItem.type = XPMineSettingItemType_Login_Password;
self.loginItem = loginItem;
XPMineSettingItemModel * shieldItem = [[XPMineSettingItemModel alloc] init];
shieldItem.title = YMLocalizedString(@"XPMineSettingPresent27");
shieldItem.type = XPMineSettingItemType_Shield_management;
XPMineSettingItemModel * blackListItem = [[XPMineSettingItemModel alloc] init];
blackListItem.title = YMLocalizedString(@"XPMineSettingPresent8");
blackListItem.subTitle = @"";
blackListItem.type = XPMineSettingItemType_Black_Manager;
XPMineSettingItemModel * languageItem = [[XPMineSettingItemModel alloc] init];
languageItem.title = YMLocalizedString(@"XPMineSettingPresent28");
languageItem.subTitle = @"";
languageItem.type = XPMineSettingItemType_Language;
XPMineSettingItemModel * payItem = [[XPMineSettingItemModel alloc] init];
payItem.title = YMLocalizedString(@"XPMineSettingPresent9");
payItem.subTitle = userinfo.isBindPaymentPwd ? YMLocalizedString(@"XPMineSettingPresent26") : YMLocalizedString(@"XPMineSettingPresent11");
payItem.type = XPMineSettingItemType_Pay_Password;
self.payItem = payItem;
XPMineSettingItemModel * notificaItem = [[XPMineSettingItemModel alloc] init];
notificaItem.title = YMLocalizedString(@"XPMineSettingPresent12");
notificaItem.subTitle = YMLocalizedString(@"XPMineSettingPresent13");
notificaItem.type = XPMineSettingItemType_Notification_Remind;
XPMineSettingItemModel * privacyItem = [[XPMineSettingItemModel alloc] init];
privacyItem.title = YMLocalizedString(@"XPMineSettingPresent14");
privacyItem.subTitle = @"";
privacyItem.type = XPMineSettingItemType_Permission;
XPMineSettingItemModel * helperItem = [[XPMineSettingItemModel alloc] init];
helperItem.title = YMLocalizedString(@"XPMineSettingPresent15");
helperItem.subTitle = @"";
helperItem.type = XPMineSettingItemType_Helper;
XPMineSettingItemModel * feedbackItem = [[XPMineSettingItemModel alloc] init];
feedbackItem.title = YMLocalizedString(@"XPMineSettingPresent16");
feedbackItem.subTitle = @"";
feedbackItem.type = XPMineSettingItemType_Feedback;
XPMineSettingItemModel * clearMemoryItem = [[XPMineSettingItemModel alloc] init];
clearMemoryItem.title = YMLocalizedString(@"XPMineSettingPresent17");
clearMemoryItem.subTitle = @"";
clearMemoryItem.type = XPMineSettingItemType_Clear_Memory;
XPMineSettingItemModel *updateItem = [[XPMineSettingItemModel alloc] init];
updateItem.title = YMLocalizedString(@"XPMineSettingPresent18");
updateItem.subTitle = @"";
updateItem.type = XPMineSettingItemType_CheckUpdate;
XPMineSettingItemModel * aboutusItem = [[XPMineSettingItemModel alloc] init];
aboutusItem.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineAboutUsViewController0"), AppName];
aboutusItem.subTitle = @"";
aboutusItem.type = XPMineSettingItemType_About_Us;
NSArray * oneSection = @[phoneItem];
NSArray * twoSection = @[loginItem,payItem, notificaItem,shieldItem, blackListItem,languageItem];
NSArray * threeSection = @[privacyItem];
NSArray * fourthSection = @[helperItem, clearMemoryItem, updateItem, aboutusItem];
self.datasouce = @[oneSection, twoSection, threeSection, fourthSection];
}else{
XPMineSettingItemModel * blackListItem = [[XPMineSettingItemModel alloc] init];
blackListItem.title = YMLocalizedString(@"XPMineSettingPresent20");
blackListItem.subTitle = @"";
blackListItem.type = XPMineSettingItemType_Black_Manager;
XPMineSettingItemModel * phoneItem = [[XPMineSettingItemModel alloc] init];
phoneItem.title = YMLocalizedString(@"XPMineSettingPresent21");
phoneItem.subTitle = userinfo.isBindPhone ? userinfo.phone : @"";
phoneItem.type = XPMineSettingItemType_Phone;
self.phoneItem = phoneItem;
XPMineSettingItemModel * loginItem = [[XPMineSettingItemModel alloc] init];
loginItem.title = userinfo.isBindPasswd ? YMLocalizedString(@"XPMineLoginPasswordViewController6") : YMLocalizedString(@"XPMineSettingPresent23");
loginItem.subTitle = @"";
loginItem.type = XPMineSettingItemType_Login_Password;
self.loginItem = loginItem;
XPMineSettingItemModel * clearMemoryItem = [[XPMineSettingItemModel alloc] init];
clearMemoryItem.title = YMLocalizedString(@"XPMineSettingPresent24");
clearMemoryItem.subTitle = @"";
clearMemoryItem.type = XPMineSettingItemType_Clear_Memory;
XPMineSettingItemModel * deleteItem = [[XPMineSettingItemModel alloc] init];
deleteItem.title = YMLocalizedString(@"XPMineSettingPresent25");
deleteItem.subTitle = @"";
deleteItem.type = XPMineSettingItemType_Delete_Account;
NSArray * oneSection = @[blackListItem];
NSArray * twoSection = @[phoneItem, loginItem];
NSArray * threeSection = @[clearMemoryItem, deleteItem];
self.datasouce = @[oneSection, twoSection, threeSection];
}
XPMineSettingItemModel * payItem = [[XPMineSettingItemModel alloc] init];
payItem.title = YMLocalizedString(@"XPMineSettingPresent9");
payItem.subTitle = userinfo.isBindPaymentPwd ? YMLocalizedString(@"XPMineSettingPresent26") : YMLocalizedString(@"XPMineSettingPresent11");
payItem.type = XPMineSettingItemType_Pay_Password;
self.payItem = payItem;
XPMineSettingItemModel * notificaItem = [[XPMineSettingItemModel alloc] init];
notificaItem.title = YMLocalizedString(@"XPMineSettingPresent12");
notificaItem.subTitle = YMLocalizedString(@"XPMineSettingPresent13");
notificaItem.type = XPMineSettingItemType_Notification_Remind;
XPMineSettingItemModel * privacyItem = [[XPMineSettingItemModel alloc] init];
privacyItem.title = YMLocalizedString(@"XPMineSettingPresent14");
privacyItem.subTitle = @"";
privacyItem.type = XPMineSettingItemType_Permission;
XPMineSettingItemModel * helperItem = [[XPMineSettingItemModel alloc] init];
helperItem.title = YMLocalizedString(@"XPMineSettingPresent15");
helperItem.subTitle = @"";
helperItem.type = XPMineSettingItemType_Helper;
XPMineSettingItemModel * feedbackItem = [[XPMineSettingItemModel alloc] init];
feedbackItem.title = YMLocalizedString(@"XPMineSettingPresent16");
feedbackItem.subTitle = @"";
feedbackItem.type = XPMineSettingItemType_Feedback;
XPMineSettingItemModel * clearMemoryItem = [[XPMineSettingItemModel alloc] init];
clearMemoryItem.title = YMLocalizedString(@"XPMineSettingPresent17");
clearMemoryItem.subTitle = @"";
clearMemoryItem.type = XPMineSettingItemType_Clear_Memory;
XPMineSettingItemModel *updateItem = [[XPMineSettingItemModel alloc] init];
updateItem.title = YMLocalizedString(@"XPMineSettingPresent18");
updateItem.subTitle = @"";
updateItem.type = XPMineSettingItemType_CheckUpdate;
XPMineSettingItemModel * aboutusItem = [[XPMineSettingItemModel alloc] init];
aboutusItem.title = [NSString stringWithFormat:YMLocalizedString(@"XPMineAboutUsViewController0"), AppName];
aboutusItem.subTitle = @"";
aboutusItem.type = XPMineSettingItemType_About_Us;
NSArray * oneSection = @[phoneItem];
NSArray * twoSection = @[loginItem,payItem, notificaItem,shieldItem, blackListItem,languageItem];
NSArray * threeSection = @[privacyItem];
NSArray * fourthSection = @[helperItem, clearMemoryItem, updateItem, aboutusItem];
self.datasouce = @[oneSection, twoSection, threeSection, fourthSection];
}
[[self getView] getMineSettingDatasourceSuccess:self.datasouce];

View File

@@ -139,18 +139,18 @@
- (void)showRightNavHandle {
NSMutableArray<TTActionSheetConfig *> *array = [NSMutableArray array];
NSString *uid = [NSString stringWithFormat:@"%ld",self.uid];
@kWeakify(self);
TTActionSheetConfig *report = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMineSimpleUserInfoViewController0") clickAction:^{
if ([ClientConfig shareConfig].canOpen) {
XPWebViewController *vc = [[XPWebViewController alloc]init];
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%@&source=PERSONAL",URLWithType(kReportRoomURL),uid];
vc.url = urlstr;
[self.navigationController pushViewController:vc animated:YES];
} else {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPMineSimpleUserInfoViewController1")];
}
@kStrongify(self);
XPWebViewController *vc = [[XPWebViewController alloc]init];
NSString *urlstr = [NSString stringWithFormat:@"%@?reportUid=%@&source=PERSONAL",URLWithType(kReportRoomURL),uid];
vc.url = urlstr;
[self.navigationController pushViewController:vc animated:YES];
}];
TTActionSheetConfig *black = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMineSimpleUserInfoViewController2") clickAction:^{
@kStrongify(self);
[self addOrRemoveBlack:NO uid:uid];
}];
@@ -299,18 +299,10 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (self.userInfo.dynamicInfo.count > 0) {
if ([ClientConfig shareConfig].canOpen) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.userInfo.dynamicInfo safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.userInfo.dynamicInfo safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
[self.navigationController pushViewController:detailVC animated:YES];
}
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.userInfo.dynamicInfo safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
[self.navigationController pushViewController:detailVC animated:YES];
}
}

View File

@@ -266,26 +266,22 @@
[self.presenter getNobleChargeProductListWithChannelType:@"9"];
[self getWalletInfo];
if([ClientConfig shareConfig].canOpen){
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
if(data.data[@"isNative"] != nil){
self.pi_IsNative = [data.data[@"isNative"] boolValue];
}
@kWeakify(self);
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
if(code == 200){
if(data.data[@"isNative"] != nil){
self.pi_IsNative = [data.data[@"isNative"] boolValue];
}
}];
}
}
}];
}
-(void)getWalletInfo{
NSString * uid = [AccountInfoStorage instance].getUid;
NSString * ticket = [AccountInfoStorage instance].getTicket;
@kWeakify(self);
[Api getUserWalletInfo:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
if(code == 200){
WalletInfoModel * model = [WalletInfoModel modelWithDictionary:data.data];
self.infoModel = model;

View File

@@ -90,56 +90,38 @@
- (void)viewDidLoad {
[super viewDidLoad];
#ifdef DEBUG
if([ClientConfig shareConfig].canOpen){
[self showLoading];
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self hideHUD];
if(code == 200){
if(data.data[@"isNative"] != nil){
BOOL is = [data.data[@"isNative"] boolValue];
[self initWebView:is];
}
return;
[self showLoading];
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self hideHUD];
if(code == 200){
if(data.data[@"isNative"] != nil){
BOOL is = [data.data[@"isNative"] boolValue];
[self initWebView:is];
}
} else {
[self initWebView:YES];
}];
return;
}
[self initWebView:YES];
}
}];
#else
if(isEnterprise == YES){
if([ClientConfig shareConfig].canOpen){
[self showLoading];
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self hideHUD];
if(code == 200){
if(data.data[@"isNative"] != nil){
BOOL is = [data.data[@"isNative"] boolValue];
[self initWebView:is];
}
return;
[self showLoading];
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
[self hideHUD];
if(code == 200){
if(data.data[@"isNative"] != nil){
BOOL is = [data.data[@"isNative"] boolValue];
[self initWebView:is];
}
[self initWebView:YES];
}];
return;
}
[self initWebView:YES];
return;
}
[self initWebView:YES];
}];
return;
}else{
[self initWebView:NO];
}
#endif
}
-(void)initWebView:(BOOL)is{
if(is == YES){
@@ -161,9 +143,6 @@
- (void)createUI {
self.view.backgroundColor = [UIColor whiteColor];
[self.view addSubview:self.headerView];
[self.view addSubview:self.collectionView];
[self.view addSubview:self.rechargeBtn];
@@ -179,7 +158,6 @@
make.height.mas_equalTo(height);
}];
[self.stackView mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.mas_equalTo(self.view);
make.bottom.mas_equalTo(-34);
@@ -193,17 +171,11 @@
make.bottom.equalTo(self.stackView.mas_top).mas_offset(-kGetScaleWidth(10));
}];
[self.collectionView mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(self.headerView.mas_bottom).mas_offset(-kGetScaleWidth(22));
make.leading.trailing.mas_equalTo(0);
make.bottom.equalTo(self.rechargeBtn.mas_top).mas_offset(-kGetScaleWidth(10));
}];
[self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(kStatusBarHeight);
@@ -219,9 +191,7 @@
- (void)initHttpData {
[self getRechargeList];
if([ClientConfig shareConfig].canOpen){
[self.presenter getBannerList];
}
[self.presenter getBannerList];
[self getUserWalletBalanceInfo];
[self checkTranscationIds];
}

View File

@@ -238,12 +238,7 @@
}
break;
case XPMineSettingItemType_Delete_Account: {
if ([ClientConfig shareConfig].canOpen) {
[self pushWebViewWIthUrl:URLWithType(kAccountlogoutURL)];
} else {
[self pushWebViewWIthUrl:@"molistar/modules/logOff/index.html"];
}
[self pushWebViewWIthUrl:URLWithType(kAccountlogoutURL)];
}
break;
case XPMineSettingItemType_Shield_management:
@@ -428,15 +423,9 @@
_logoutButton.layer.cornerRadius = 50/2;
_logoutButton.titleLabel.font = [UIFont systemFontOfSize:16];
[_logoutButton addTarget:self action:@selector(logoutButtonAction:) forControlEvents:UIControlEventTouchUpInside];
if ([ClientConfig shareConfig].canOpen) {
[_logoutButton setTitle:YMLocalizedString(@"XPMineSettingViewController7") forState:UIControlStateNormal];
_logoutButton.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor];
[_logoutButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateNormal];
}else{
[_logoutButton setTitle:YMLocalizedString(@"XPMineSettingViewController8") forState:UIControlStateNormal];
_logoutButton.backgroundColor = UIColorFromRGB(0xCED3D8);
[_logoutButton setTitleColor:UIColor.whiteColor forState:UIControlStateNormal];
}
[_logoutButton setTitle:YMLocalizedString(@"XPMineSettingViewController7") forState:UIControlStateNormal];
_logoutButton.backgroundColor = [DJDKMIMOMColor appCellBackgroundColor];
[_logoutButton setTitleColor:[DJDKMIMOMColor mainTextColor] forState:UIControlStateNormal];
}
return _logoutButton;
}

View File

@@ -96,16 +96,9 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
XPMineAnchorFansTeamModel *item = [self.datasource safeObjectAtIndex1:indexPath.row];
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = item.teamUid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = item.teamUid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = item.teamUid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {

View File

@@ -157,16 +157,9 @@
- (void)onAvatarClick:(XPMineVisitorTableViewCell *)cell {
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
XPMineVisitorItemModel *item = [self.datasource safeObjectAtIndex1:indexPath.row];
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = item.uid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = item.uid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = item.uid;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
- (void)onChatClick:(XPMineVisitorTableViewCell *)cell {

View File

@@ -144,16 +144,9 @@
break;
case XPMineItemType_Personinfo:
{
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:infoVC animated:YES];
}
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = self.userInfo.uid;
[self.navigationController pushViewController:infoVC animated:YES];
}
break;
case XPMineItemType_My_Room:

View File

@@ -191,20 +191,11 @@
- (void)collectionView:(UICollectionView *)collectionView didSelectItemAtIndexPath:(NSIndexPath *)indexPath {
if (self.datasource.count > 0) {
if ([ClientConfig shareConfig].canOpen) {
XPMomentsSimpleDetailViewController *detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
XPMomentsSimpleDetailViewController *detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
}

View File

@@ -280,38 +280,29 @@
///
- (void)momentsSimpleDetailNavAvatarAction {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = self.monentsInfo.uid.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = self.monentsInfo.uid.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = self.monentsInfo.uid.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
///
- (void)momentsSimpleDetailNavMoreAction {
TTActionSheetConfig *action;
@kWeakify(self);
if (self.monentsInfo.uid.integerValue == [AccountInfoStorage instance].getUid.integerValue) {
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMomentsSimpleDetailViewController4") clickAction:^{
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsTopicLatestViewController1") confirmHandler:^{
@kStrongify(self);
[self.presenter deleteMonents:self.monentsInfo.dynamicId worldId:[NSString stringWithFormat:@"%ld", self.monentsInfo.worldId]];
} cancelHandler:^{
}];
} cancelHandler:^{}];
}];
} else {
action = [TTActionSheetConfig normalTitle:YMLocalizedString(@"XPMomentsSimpleDetailViewController6") clickAction:^{
if ([ClientConfig shareConfig].canOpen) {
NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.monentsInfo.uid, @"WORLDDYNAMIC"];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = url;
[self.navigationController pushViewController:webVC animated:YES];
} else {
[XNDJTDDLoadingTool showErrorWithMessage:YMLocalizedString(@"XPMomentsSimpleDetailViewController7")];
}
@kStrongify(self);
NSString * url= [NSString stringWithFormat:@"%@?reportUid=%@&source=%@", URLWithType(kReportRoomURL),self.monentsInfo.uid, @"WORLDDYNAMIC"];
XPWebViewController * webVC = [[XPWebViewController alloc] init];
webVC.url = url;
[self.navigationController pushViewController:webVC animated:YES];
}];
}
[TTPopup actionSheetWithItems:@[action]];
@@ -330,16 +321,9 @@
}
}
- (void)xPMonentsCommentTableViewCell:(XPMonentsCommentTableViewCell *)view didClickAvatar:(NSString *)commentInfo {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = commentInfo.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = commentInfo.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = commentInfo.integerValue;
[self.navigationController pushViewController:userInfoVC animated:YES];
}
#pragma mark - XPMonentsTableViewCellDelegate
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClickLike:(MonentsInfoModel *)monentsInfo {

View File

@@ -132,15 +132,9 @@
MonentsInfoModel * monents = [[MonentsInfoModel alloc] init];
monents.dynamicId = model.dynamicId;
if ([ClientConfig shareConfig].canOpen) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
detailVC.monentsInfo = monents;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
detailVC.monentsInfo = monents;
[self.navigationController pushViewController:detailVC animated:YES];
}
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
detailVC.monentsInfo = monents;
[self.navigationController pushViewController:detailVC animated:YES];
}
}
#pragma mark -JXCategoryListContainerViewDelegate

View File

@@ -94,22 +94,14 @@
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
if (self.datasource.count > 0) {
if ([ClientConfig shareConfig].canOpen) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
if(monentsInfo.dynamicId == nil)return;
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
detailVC.monentsInfo = monentsInfo;
if(monentsInfo.dynamicId == nil)return;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
MonentsInfoModel * monentsInfo = [self.datasource safeObjectAtIndex1:indexPath.row];
if(monentsInfo.dynamicId == nil) {
return;
}
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
}
#pragma mark - XPMonentsTableViewCellDelegate
@@ -126,19 +118,10 @@
[self showErrorToast:YMLocalizedString(@"XPMineUserDataViewController5")];
return;
}
if ([ClientConfig shareConfig].canOpen) {
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}else{
XPMomentsSimpleDetailViewController * detailVC = [[XPMomentsSimpleDetailViewController alloc] init];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
XPMonentsDetailViewController * detailVC = [[XPMonentsDetailViewController alloc] init];
detailVC.monentsInfo = monentsInfo;
detailVC.delegate = self;
[self.navigationController pushViewController:detailVC animated:YES];
}
- (void)xPMonentsTableViewCell:(XPMonentsTableViewCell *)view didClicDelete:(MonentsInfoModel *)monentsInfo {
[TTPopup alertWithMessage:YMLocalizedString(@"XPMonentsMineViewController2") confirmHandler:^{

View File

@@ -104,7 +104,6 @@
[self.datasource addObject:self.addPicImage];
self.addTopicView.hidden = ![ClientConfig shareConfig].canOpen;
for (id view in self.textView.subviews) {
if ([view isKindOfClass:[UITextView class]]){
UITextView *textView = view;

View File

@@ -68,6 +68,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}];
}
- (void)toMineUserInfoView:(HomeSearchResultModel *)model {
XPMineUserInfoViewController *infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = model.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
#pragma mark - UITableViewDelegate And UITableViewDataSource
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 74;
@@ -89,38 +95,25 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
[tableView deselectRowAtIndexPath:indexPath animated:YES];
HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row];
BOOL result = [[NSUserDefaults standardUserDefaults] boolForKey:kFromSearchToHomeViewKey];
if (!result) {
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kFromSearchToHomeViewKey];
[[NSUserDefaults standardUserDefaults] synchronize];
[[NSNotificationCenter defaultCenter] postNotificationName:kTabShowAnchorCardKey object:@{@"delayShow" : @(YES)}];
}
[self dismissViewControllerAnimated:YES completion:nil];
HomeSearchResultModel * resultModel = [self.datasource safeObjectAtIndex1:indexPath.row];
if (self.type == SearchType_Room) {
if (resultModel.valid) {
[XPRoomViewController openRoom:resultModel.uid viewController:self.presentingViewController];
} else {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
[self toMineUserInfoView:resultModel];
}
} else {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = resultModel.uid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
[self toMineUserInfoView:resultModel];
}
}

View File

@@ -222,15 +222,9 @@ NSString * const XPConstSearchRecordStoreKey = @"XPConstSearchRecordStoreKey";
if (resultModel.valid) {
[XPRoomViewController openRoom:resultModel.roomUid viewController:self.presentingViewController];
} else {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = resultModel.roomUid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * infoVC = [[XPMineSimpleUserInfoViewController alloc] init];
infoVC.uid = resultModel.roomUid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
XPMineUserInfoViewController * infoVC = [[XPMineUserInfoViewController alloc] init];
infoVC.uid = resultModel.roomUid.integerValue;
[(UINavigationController *)self.presentingViewController pushViewController:infoVC animated:YES];
}
}
}

View File

@@ -232,9 +232,6 @@
#pragma mark - NIMBroadcastDelegate
// 广
- (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage{
if (![ClientConfig shareConfig].canOpen) {
return;
}
if (broadcastMessage.content) {
NSDictionary *msgDictionary = [broadcastMessage.content toJSONObject];
AttachmentModel *attachment = [AttachmentModel modelWithJSON:msgDictionary[@"body"]];
@@ -268,21 +265,6 @@
- (void)handleNIMCustomMessage:(NIMMessage *)message {
NIMCustomObject *obj = (NIMCustomObject *)message.messageObject;
if (obj.attachment != nil && [obj.attachment isKindOfClass:[AttachmentModel class]]) {
if (![ClientConfig shareConfig].canOpen) {
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
if (attachment.first == CustomMessageType_Gift) {
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
receiveInfo.isLuckyBagGift = attachment.second == Custom_Message_Sub_Gift_LuckySend;
receiveInfo.isBatch = YES;
[self receiveGiftHandleSendGiftAnimation:attachment];
} else if (attachment.first == CustomMessageType_AllMicroSend) { //
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
receiveInfo.isLuckyBagGift = (attachment.second == Custom_Message_Sub_AllMicroLuckySend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend);
receiveInfo.isBatch = (attachment.second == Custom_Message_Sub_AllBatchSend || attachment.second == Custom_Message_Sub_AllBatchMicroLuckySend);
[self receiveGiftHandleSendGiftAnimation:attachment];
}
return;
}
AttachmentModel *attachment = (AttachmentModel *)obj.attachment;
if (attachment.first == CustomMessageType_Gift) {
GiftReceiveInfoModel * receiveInfo = [GiftReceiveInfoModel modelWithJSON:attachment.data];
@@ -2058,9 +2040,49 @@
NSString *fullPath = [filePath stringByAppendingPathComponent:fileName];
if ([[NSFileManager defaultManager] fileExistsAtPath:fullPath]){
NSData *data = [NSData dataWithContentsOfFile:fullPath options:0 error:NULL];
@kWeakify(self);
[self.parser parseWithData:data cacheKey:nil completionBlock:^(SVGAVideoEntity * _Nonnull videoItem) {
@kStrongify(self);
if (videoItem != nil) {
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
[self.giftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.middleLevelView);
make.width.mas_equalTo(KScreenWidth);
make.height.mas_equalTo(KScreenHeight);
}];
}
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
self.giftEffectView.alpha = 1;
self.giftEffectView.loops = 1;
self.giftEffectView.clearsAfterStop = YES;
self.giftEffectView.videoItem = videoItem;
[self.giftEffectView startAnimation];
} else {
self.isLargeGiftAnimating = NO;
}
} failureBlock:^(NSError * _Nonnull error) {
@kStrongify(self);
self.giftEffectView.hidden = YES;
self.isLargeGiftAnimating = NO;
}];
} else {
@kWeakify(self);
[self.parser parseWithURL:[NSURL URLWithString:encodingUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
@kStrongify(self);
if (videoItem != nil) {
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
@@ -2090,50 +2112,12 @@
return;
}
self.isLargeGiftAnimating = NO;
} failureBlock:^(NSError * _Nonnull error) {
} failureBlock:^(NSError * _Nullable error) {
@kStrongify(self);
self.giftEffectView.hidden = YES;
self.isLargeGiftAnimating = NO;
}];
return;
};
[self.parser parseWithURL:[NSURL URLWithString:encodingUrl] completionBlock:^(SVGAVideoEntity * _Nullable videoItem) {
if (videoItem != nil) {
self.giftEffectView.hidden = NO;
if (self.giftEffectView.superview == nil) {
[self.middleLevelView addSubview:self.giftEffectView];
[self.giftEffectView mas_makeConstraints:^(MASConstraintMaker *make) {
make.center.mas_equalTo(self.middleLevelView);
make.width.mas_equalTo(KScreenWidth);
make.height.mas_equalTo(KScreenHeight);
}];
}
CGFloat width = videoItem.videoSize.width;
CGFloat height = videoItem.videoSize.height;
if (width > height) {
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
} else {//
CGFloat resizeH = KScreenWidth * height / width;//
if (resizeH > KScreenHeight) {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFill;
} else {//
self.giftEffectView.contentMode = UIViewContentModeScaleAspectFit;
}
}
self.giftEffectView.alpha = 1;
self.giftEffectView.loops = 1;
self.giftEffectView.clearsAfterStop = YES;
self.giftEffectView.videoItem = videoItem;
[self.giftEffectView startAnimation];
return;
}
self.isLargeGiftAnimating = NO;
} failureBlock:^(NSError * _Nullable error) {
self.giftEffectView.hidden = YES;
self.isLargeGiftAnimating = NO;
}];
}
}
/// pag
- (void)playGiftEffectWithPagUrl:(NSString *)pagUrl {

View File

@@ -304,33 +304,6 @@
make.centerY.equalTo(self.rankStackView);
}];
}
- (void)showLittleGameMiniView:(RoomType)type micCount:(NSInteger)micCount {
// if([ClientConfig shareConfig].canOpen){
// if (type == RoomType_MiniGame) {
// if (!self.littleGameMiniView.superview) {
// [self addSubview:self.littleGameMiniView];
// [self.littleGameMiniView mas_makeConstraints:^(MASConstraintMaker *make) {
// make.trailing.mas_equalTo(0);
// make.top.mas_equalTo(kNavigationHeight);
// make.height.mas_equalTo(23);
// }];
// }
// self.littleGameMiniView.micCount = micCount;
// if (micCount > 6) {
// [self.littleGameMiniView removeFromSuperview];
// }
// } else {
// if (self.littleGameMiniView.superview) {
// [self.littleGameMiniView removeFromSuperview];
// }
// }
// }else{
// if (self.littleGameMiniView.superview) {
// [self.littleGameMiniView removeFromSuperview];
// }
// }
}
- (void)configLittleGameState {
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
@@ -598,7 +571,6 @@
}
[self updateRoomTopic];
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
[self configLittleGameState];
[self configPlayMusicRoomTypeChange];
[self configRoomPKPanelView:NO];
@@ -622,7 +594,7 @@
self.contributeEnterView.title = YMLocalizedString(@"XPRoomFunctionContainerView7");
[self updateContrionEntranceWithRoomUid:roomUid type:@"day"];//
}
if ([ClientConfig shareConfig].canOpen && ![[AccountInfoStorage instance].getUid isEqualToString:roomUid]) {//
if (![[AccountInfoStorage instance].getUid isEqualToString:roomUid]) {//
NSString * uid = [[AccountInfoStorage instance] getUid];
[Api attentionStatusCompletion:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {//
BOOL isLike = ((NSNumber *)data.data).boolValue;
@@ -676,7 +648,6 @@
[self handleAcrollPKCountView:roomInfo.pkBeginTime];
}
[self updateRoomTopic];
[self showLittleGameMiniView:roomInfo.type micCount:roomInfo.mgMicNum];
[self configLittleGameState];
[self configRoomPKPanelView:YES];
[self handleNewUserGreet];
@@ -689,9 +660,6 @@
}
- (void)onRoomMiniEntered {
if (![ClientConfig shareConfig].canOpen) {
return;
}
if ([XPRoomMiniManager shareManager].getCurrentMusic) {
if (!self.musicPlayView.superview) {
[self addSubview:self.musicPlayView];
@@ -1031,10 +999,6 @@
} else if(self.delegate.getRoomInfo.roomModeType == RoomModeType_Open_PK_Mode) {
self.roompkPanelView.micQueue = queue;
}else {
if (![ClientConfig shareConfig].canOpen) {
return;
}
MicroQueueModel * currentUserModel;
NSString * uid = [AccountInfoStorage instance].getUid;
for (MicroQueueModel * microModel in queue.allValues) {
@@ -1146,15 +1110,9 @@
#pragma mark - XPAnchorPkPanelViewDelegate
- (void)xPAnchorPKPanelView:(XPAnchorPkPanelView *)view showUserCard:(NSString *)uid {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.delegate.getCurrentNav pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.delegate.getCurrentNav pushViewController:userInfoVC animated:YES];
}
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.delegate.getCurrentNav pushViewController:userInfoVC animated:YES];
}
///
@@ -1663,9 +1621,6 @@
}
- (void)configPlayMusicRoomTypeChange {
if (![ClientConfig shareConfig].canOpen) {
return;
}
RoomInfoModel * roomInfo = self.delegate.getRoomInfo;
if (roomInfo.type == RoomType_MiniGame) {
[self pauseLayer:self.musicEnterButton.imageView.layer];

View File

@@ -101,7 +101,10 @@
-(void)getFirstRechargeRewardList{
[XNDJTDDLoadingTool showLoading];
@kWeakify(self);
[Api firstRechargeRewardList:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
[XNDJTDDLoadingTool hideHUD];
if(code == 200){
NSArray * array = [FirstRechargeModel modelsWithArray:data.data];
@@ -111,21 +114,15 @@
[XNDJTDDLoadingTool showErrorWithMessage:msg];
} channelType:@"3"];
[self checkTranscationIds];
if([ClientConfig shareConfig].canOpen){
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
if(code == 200){
if(data.data[@"isNative"] != nil){
self.pi_IsNative = [data.data[@"isNative"] boolValue];
}
[Api requestMineChannel:^(BaseModel * _Nullable data, NSInteger code, NSString * _Nullable msg) {
@kStrongify(self);
if(code == 200){
if(data.data[@"isNative"] != nil){
self.pi_IsNative = [data.data[@"isNative"] boolValue];
}
}];
}
}
}];
}
#pragma mark - Private Method
- (void)initSubViews {

View File

@@ -205,9 +205,6 @@
}
- (NSDictionary *)supportMessageDic {
if (![ClientConfig shareConfig].canOpen) {
return @{};
}
return @{
@(CustomMessageType_Chat_Hall_Headlinesn):
[NSSet setWithObjects:

View File

@@ -231,37 +231,33 @@
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
if ([ClientConfig shareConfig].canOpen) {
///
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:model.defUser newUser:model.newUser fromSayHelloChannel:model.fromSayHelloChannel]];
if ([self isCurrentRoomSuperAdmin:message.from]) {
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
}
if (model.vipIcon) {//VIPicon
[attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon size:CGSizeMake(20, 20)]];
///
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:model.defUser newUser:model.newUser fromSayHelloChannel:model.fromSayHelloChannel]];
if ([self isCurrentRoomSuperAdmin:message.from]) {
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
}
if (model.vipIcon) {//VIPicon
[attribute appendAttributedString:[self createUrlImageAttribute:model.vipIcon size:CGSizeMake(20, 20)]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (model.experUrl) {
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(model.isCustomWord == YES){
if (model.inRoomNameplatePic.length > 0){
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (model.experUrl) {
[attribute appendAttributedString:[self createUrlImageAttribute:model.experUrl]];
}else{
if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //
[attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
} else if (model.inRoomNameplatePic.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(model.isCustomWord == YES){
if (model.inRoomNameplatePic.length > 0){
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}else{
if (model.inRoomNameplatePic.length > 0 && model.inRoomNameplateWord.length > 0) { //
[attribute appendAttributedString:[self createNameplateAttibute:model.inRoomNameplateWord image:model.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
} else if (model.inRoomNameplatePic.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:model.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}
}
[attribute appendAttributedString:[self createTextAttribute:nick color:[DJDKMIMOMColor messageDefaultTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
@@ -340,61 +336,56 @@
NSMutableAttributedString * attribute = [[NSMutableAttributedString alloc] init];
NSDictionary * dic = [(NSDictionary *)messageExt.roomExt.toJSONObject objectForKey:message.from];
XPMessageRemoteExtModel * extModel = [XPMessageRemoteExtModel modelWithDictionary:dic];
if ([ClientConfig shareConfig].canOpen) {
///
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:extModel.defUser newUser:extModel.newUser fromSayHelloChannel:extModel.fromSayHelloChannel]];
if ([self isCurrentRoomSuperAdmin:message.from]) {
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.vipIcon.length > 0) {//VIPicon
messageInfo.vipIcon = extModel.vipIcon;
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.vipIcon size:CGSizeMake(20, 20)]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.experUrl.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(extModel.isCustomWord == YES){
if (extModel.inRoomNameplatePic.length > 0) {
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}else{
if (extModel.inRoomNameplatePic.length > 0 && extModel.inRoomNameplateWord.length > 0) {
[attribute appendAttributedString:[self createNameplateAttibute:extModel.inRoomNameplateWord image:extModel.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}
[attribute appendAttributedString:[self createNickAtrribute:nick uid:message.from.integerValue]];
if (extModel.carName.length > 0) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser1") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:extModel.carName color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.fromType > 0) {
if (extModel.fromType == UserEnterRoomFromType_Home_Recommend) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser2") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_User || extModel.fromType == UserEnterRoomFromType_New_User_Greet) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser3") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_Game_Detail) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser4") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser5") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
}
}
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser6") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
} else {
[attribute appendAttributedString:[self createNickAtrribute:nick uid:message.from.integerValue]];
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser7") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
///
[attribute appendAttributedString:[self createOfficalAndNewuserAttribute:extModel.defUser newUser:extModel.newUser fromSayHelloChannel:extModel.fromSayHelloChannel]];
if ([self isCurrentRoomSuperAdmin:message.from]) {
[attribute appendAttributedString:[self createLanguageImageAttribute:@"common_super_admin"]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.vipIcon.length > 0) {//VIPicon
messageInfo.vipIcon = extModel.vipIcon;
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.vipIcon size:CGSizeMake(20, 20)]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.experUrl.length > 0) {//
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.experUrl]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if(extModel.isCustomWord == YES){
if (extModel.inRoomNameplatePic.length > 0) {
[attribute appendAttributedString:[self createUrlImageAttribute:extModel.inRoomNameplatePic]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}else{
if (extModel.inRoomNameplatePic.length > 0 && extModel.inRoomNameplateWord.length > 0) {
[attribute appendAttributedString:[self createNameplateAttibute:extModel.inRoomNameplateWord image:extModel.inRoomNameplatePic textFont:[UIFont systemFontOfSize:9]]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
}
[attribute appendAttributedString:[self createNickAtrribute:nick uid:message.from.integerValue]];
if (extModel.carName.length > 0) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser1") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createTextAttribute:extModel.carName color:[DJDKMIMOMColor messageNickColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createSapceAttribute:2]];
}
if (extModel.fromType > 0) {
if (extModel.fromType == UserEnterRoomFromType_Home_Recommend) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser2") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_User || extModel.fromType == UserEnterRoomFromType_New_User_Greet) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser3") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
} else if(extModel.fromType == UserEnterRoomFromType_Follow_Game_Detail) {
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser4") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
[attribute appendAttributedString:[self createNickAtrribute:extModel.fromNick uid:extModel.fromUid.integerValue]];
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser5") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
}
}
[attribute appendAttributedString:[self createTextAttribute:YMLocalizedString(@"XPRoomMessageParser6") color:[DJDKMIMOMColor messageTextColor] font:kRoomMessageDefalutFont]];
messageInfo.content = attribute;
return messageInfo;
}
@@ -1329,9 +1320,6 @@
- (void)showUserCard:(NSInteger)uid {
if (![ClientConfig shareConfig].canOpen) {
return;
}
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
NSString * targetUid = [NSString stringWithFormat:@"%ld", uid];
XPUserCardInfoModel * model = [[XPUserCardInfoModel alloc] init];

View File

@@ -250,9 +250,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
[self addSubview:self.messageTableView];
[self addSubview:self.messageTipsBtn];
[self addSubview:self.atTipBtn];
if ([ClientConfig shareConfig].canOpen) {
self.messageTableView.tableHeaderView = self.headerView;
}
self.messageTableView.tableHeaderView = self.headerView;
}
- (void)initSubViewConstraints {
@@ -423,9 +421,6 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
}
- (NSDictionary *)supportMessageDic {
if (![ClientConfig shareConfig].canOpen) {
return @{};
}
return @{
@(CustomMessageType_AllMicroSend):
[NSSet setWithObjects:
@@ -579,7 +574,7 @@ NSString * const kRoomShowTopicKey = @"kRoomShowTopicKey";
///
- (void)createUserEnterRoomAddRoomtopicMessage {
if ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion == YES || ![ClientConfig shareConfig].canOpen) {
if ([ClientConfig shareConfig].configInfo.appStoreAuditNoticeVersion == YES) {
return;
}
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;

View File

@@ -169,7 +169,6 @@
[array addObject:wishGift];
}
if (isCreator || isManager || isSuperAdmin) {
if (roomInfo.canOpenBlindDate && roomInfo.type != RoomType_Anchor && roomInfo.type != RoomType_MiniGame) {
[array insertObject:dating atIndex:0];
@@ -187,18 +186,9 @@
[array addObject:trumpet];
[array addObject:giftEffect];
}
}else{
[array addObject:giftEffect];
}
if (![ClientConfig shareConfig].canOpen) {
[array removeAllObjects];
[array addObject:clearScreen];
[array addObject:roomSetting];
}
[array addObject:report];
if(roomInfo.hasRoomAlbum == YES){
[array insertObject:roomPhotoAlbum atIndex:1];

View File

@@ -156,10 +156,6 @@
#pragma mark - Getters And Setters
- (void)setTitleArray:(NSArray *)titleArray {
if (![ClientConfig shareConfig].canOpen) {
self.hidden = YES;
return;
}
_titleArray = titleArray;
if (titleArray.count == 0){
[self onCloseButtonClick];

View File

@@ -392,13 +392,9 @@
self.micStateImageView.hidden = micState.micState == MicroMicStateType_Open;
UIImage *image;
if (micState.posState == MicroPosStateType_Free) {
image = [UIImage imageNamed:@"room_position_normal"];
image = [UIImage imageNamed:@"room_position_normal"];
} else {
image = [UIImage imageNamed:@"room_position_lock"];
image = [UIImage imageNamed:@"room_position_lock"];
}
CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width);
UIGraphicsBeginImageContextWithOptions(scaledToSize, false, 0.0);
@@ -457,15 +453,9 @@
} else {
self.nickLabel.textColor = [DJDKMIMOMColor positionNickColor];
self.avatarImageView.image = nil;
if ([ClientConfig shareConfig].canOpen) {
if (self.microModel.microState.position == -1) {
self.nickLabel.hidden = YES;
}
} else {
self.nickLabel.hidden = YES;
}
if (self.microModel.microState.position == -1) {
self.nickLabel.hidden = YES;
}
}
NSString * headWearUrl = userInfo.headwearEffect.length ? userInfo.headwearEffect : userInfo.headWearUrl.length ? userInfo.headWearUrl : userInfo.headwearPic;
if (headWearUrl.length > 0 && !userInfo.vipMic) {

View File

@@ -26,13 +26,9 @@
UIImage *image;
if (micState.posState == MicroPosStateType_Free) {
image = [UIImage imageNamed:@"room_position_normal"];
image = [UIImage imageNamed:@"room_position_normal"];
} else {
image = [UIImage imageNamed:@"room_position_lock"];
image = [UIImage imageNamed:@"room_position_lock"];
}
CGSize scaledToSize = CGSizeMake(self.frame.size.width, self.frame.size.width);

View File

@@ -72,12 +72,7 @@
}
- (CGFloat)hightForStageView {
if ([ClientConfig shareConfig].canOpen) {
return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2;
} else {
return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2 - 20;
}
return ownerTopMargin + ownerHeight + marginV1 + mcHeight + marginV2 + mcHeight + marginV2;
}
- (CGPoint)animationPointAtStageViewByUid:(NSString *)uid {

View File

@@ -265,9 +265,6 @@
- (void)microQueueUpdated:(BOOL)isHandleRTC {
BOOL selfNeedBroadcast = NO;
RoomInfoModel * roomInfo = self.hostDelegate.getRoomInfo;
if (![ClientConfig shareConfig].canOpen) {
roomInfo.showGiftValue = NO;
}
BOOL leaveMode = roomInfo.leaveMode;
NSMutableArray *statisMicArray = [NSMutableArray array];
for (int i = 0; i < self.countOfMircoView; i++) {
@@ -768,42 +765,19 @@
}
if (targetUid && targetUid.length > 0) {
if ([ClientConfig shareConfig].canOpen) {
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"}];
} else {
// 2.
NIMChatroomMembersByIdsRequest *request = [[NIMChatroomMembersByIdsRequest alloc]init];
request.roomId = roomId;
request.userIds = @[uid];
[[NIMSDK sharedSDK].chatroomManager fetchChatroomMembersByIds:request completion:^(NSError * _Nullable error, NSArray<NIMChatroomMember *> * _Nullable members) {
NIMChatroomMember * member = members.firstObject;
if (!member) return;
// 2.1
if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) {
TTActionSheetConfig *lockMic = [TTActionSheetConfig normalTitle:YMLocalizedString(@"StageView2") clickAction:^{
NIMChatroomQueueRemoveRequest *request = [[NIMChatroomQueueRemoveRequest alloc]init];
request.key = position;
request.roomId = roomId;
[[NIMSDK sharedSDK].chatroomManager removeChatroomQueueObject:request completion:^(NSError * _Nullable error, NSDictionary<NSString *,NSString *> * _Nullable element) {
NSLog(@"%@", error);
}];
}];
[TTPopup actionSheetWithItems:@[lockMic]];
}
}];
}
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;
}
@@ -865,9 +839,6 @@
if (member.type == NIMTeamMemberTypeOwner || member.type == NIMTeamMemberTypeManager) {
// 2.1.1
NSString * upTitle = YMLocalizedString(@"StageView5");
if (![ClientConfig shareConfig].canOpen) {
upTitle = YMLocalizedString(@"StageView6");
}
TTActionSheetConfig *upMic = [TTActionSheetConfig normalTitle:upTitle clickAction:^{
NSString* selfUid = [NSString stringWithFormat:@"%ld", (long)self.hostDelegate.getUserInfo.uid];
UIView* microView = [self findMicroViewByUid:selfUid];
@@ -885,9 +856,6 @@
}else {
lockTitle = micModel.microState.posState == MicroPosStateType_Free ? YMLocalizedString(@"StageView23") : YMLocalizedString(@"StageView10");
}
if (![ClientConfig shareConfig].canOpen) {
lockTitle = micModel.microState.posState == MicroPosStateType_Free ? YMLocalizedString(@"StageView24") : YMLocalizedString(@"StageView12");
}
TTActionSheetConfig *lockMic = [TTActionSheetConfig normalTitle:lockTitle clickAction:^{
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
NSString * state = micModel.microState.posState == MicroPosStateType_Free ? @"1" : @"0";
@@ -900,9 +868,6 @@
// 2.1.3 /
NSString * muteTitle = micModel.microState.micState == MicroMicStateType_Open ? YMLocalizedString(@"StageView25") : YMLocalizedString(@"StageView14");
if (![ClientConfig shareConfig].canOpen) {
muteTitle = micModel.microState.micState == MicroMicStateType_Open ? YMLocalizedString(@"StageView26") : YMLocalizedString(@"StageView16");
}
TTActionSheetConfig *muteMic = [TTActionSheetConfig normalTitle:muteTitle clickAction:^{
NSString * roomUid = [NSString stringWithFormat:@"%ld", self.hostDelegate.getRoomInfo.uid];
NSString * state = micModel.microState.micState == MicroMicStateType_Open ? @"1" : @"0";
@@ -923,12 +888,7 @@
inviteUserMicVC.blindDateVipUid = roomInfo.blindDateVipUid;
[self.hostDelegate.getCurrentNav pushViewController:inviteUserMicVC animated:YES];
}];
if ([ClientConfig shareConfig].canOpen) {
[TTPopup actionSheetWithItems:@[upMic,inviteMic, lockMic, muteMic]];
} else {
[TTPopup actionSheetWithItems:@[ muteMic,upMic, lockMic]];
}
[TTPopup actionSheetWithItems:@[upMic, inviteMic, lockMic, muteMic]];
} else {
// 2.2
if (micModel.microState.posState == MicroPosStateType_Lock) {

View File

@@ -308,10 +308,8 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
}
///
// [self.presenter getRoomFirstCharegWindow:self.roomUid];
if ([ClientConfig shareConfig].canOpen) {
///id
[self.presenter getUnlockRoomAlbumPhotoListWithRoomUid:self.roomUid];
}
///id
[self.presenter getUnlockRoomAlbumPhotoListWithRoomUid:self.roomUid];
//x
[[NIMSDK sharedSDK].chatroomManager addDelegate:self];
[[NIMSDK sharedSDK].chatManager addDelegate:self];
@@ -418,12 +416,7 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[self.view addSubview:self.roomHeaderView];
[self.view addSubview:self.functionView];
[self.view addSubview:self.animationView];
self.activityContainerView.hidden = YES;
self.littleGameView.hidden = YES;
if ([ClientConfig shareConfig].canOpen) {
self.littleGameView.hidden = NO;
self.activityContainerView.hidden = NO;
}
@kWeakify(self);
self.activityContainerView.openRedPacketHandle = ^(XPRedPacketModel * _Nullable redModel,RoomType type,BOOL isChangeRoom) {
@kStrongify(self);
@@ -891,10 +884,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
[self changeStageViewOnRoomUpdate];
[self.roomHeaderView onRoomEntered];
[self.activityContainerView onRoomEntered];
[self.menuContainerView onRoomEntered];
[self.backContainerView onRoomEntered];
[self.littleGameView onRoomEntered];
@@ -1745,9 +1734,6 @@ NSString * const kHadQuitOtherRoomKey = @"kHadQuitOtherRoomKey";//是否退出
#pragma mark - NIMBroadcastDelegate
// 广
- (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage{
if (![ClientConfig shareConfig].canOpen) {
return;
}
if (broadcastMessage.content) {
NSDictionary *msgDictionary = [broadcastMessage.content toJSONObject];
AttachmentModel *attachment = [AttachmentModel modelWithJSON:msgDictionary[@"body"]];

View File

@@ -224,13 +224,11 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
///
[self.presenter checkTranscation];
///
if ([ClientConfig shareConfig].canOpen) {
[self.presenter getVersionUpdate];
if (self.inviteCode && self.inviteCode.length > 0) {
///
[self.presenter checkInviteUserInfo:self.inviteCode];
}
[self.presenter getVersionUpdate];
if (self.inviteCode && self.inviteCode.length > 0) {
///
[self.presenter checkInviteUserInfo:self.inviteCode];
}
[self requestGiftList];
///
@@ -241,19 +239,17 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
XPAdImageTool.shareImageTool.isImLogin = YES;
if ([ClientConfig shareConfig].canOpen) {
if ([self hadLaunchApp] && [self canShowAnchorCard]) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.view.window && self.isViewLoaded) {
[self.presenter getAnchorCardInfo];
}
});
}
if (self.needShowAnchorCard && !self.delayShowAnchorCard) {
[self.presenter getAnchorCardInfo];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kHadLaunchApp];///
[[NSUserDefaults standardUserDefaults] synchronize];
}
if ([self hadLaunchApp] && [self canShowAnchorCard]) {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
if (self.view.window && self.isViewLoaded) {
[self.presenter getAnchorCardInfo];
}
});
}
if (self.needShowAnchorCard && !self.delayShowAnchorCard) {
[self.presenter getAnchorCardInfo];
[[NSUserDefaults standardUserDefaults] setBool:YES forKey:kHadLaunchApp];///
[[NSUserDefaults standardUserDefaults] synchronize];
}
}
@@ -270,51 +266,47 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}
self.userInfo = userInfo;
[AccountInfoStorage instance].name = self.userInfo.nick;
if ((userInfo.nick == nil || userInfo.avatar == nil) && self.isFormLogin == NO) {
[self completeUserInfo];
return;
}
if ([ClientConfig shareConfig].canOpen) {
if(self.isReload == NO){
[self initTabs:YES];
self.isInitReload = YES;
}
}else{
if(self.isReload == NO){
[self initTabs:YES];
self.isInitReload = YES;
}
if ([ClientConfig shareConfig].canOpen) {
if (self.inviteCode.length <= 0) {
[self initQuickEnterRoom];
}
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
if (self.inviteCode.length <= 0) {
[self initQuickEnterRoom];
}
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
}
-(void)loginIng{
if ((self.userInfo.nick == nil || self.userInfo.avatar == nil) && self.isFormLogin == NO) {
[self completeUserInfo];
return;
}
if(self.isReload == NO){
[self initTabs:YES];
self.isInitReload = YES;
}
if ([ClientConfig shareConfig].canOpen) {
if (self.inviteCode.length <= 0) {
[self initQuickEnterRoom];
}
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
if (self.inviteCode.length <= 0) {
[self initQuickEnterRoom];
}
if (self.inviteCode) {
self.inviteCode = nil;
}
[self monentsUnReadCount];
}
- (void)getAuthorizationCodeInfoWithPhonefail{
[self completeUserInfo];
@@ -567,7 +559,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
#pragma mark - NIMChatManagerDelegate
- (void)onRecvMessages:(NSArray<NIMMessage *> *)messages {
if (![ClientConfig shareConfig].canOpen || [AccountInfoStorage instance].getTicket.length == 0) {
if ([AccountInfoStorage instance].getTicket.length == 0) {
return;
}
for (NIMMessage * message in messages) {
@@ -597,7 +589,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)onReceiveBroadcastMessage:(NIMBroadcastMessage *)broadcastMessage {
if (![ClientConfig shareConfig].canOpen || [AccountInfoStorage instance].getUid.length == 0) {
if ([AccountInfoStorage instance].getUid.length == 0) {
return;
}
if (broadcastMessage.content) {
@@ -608,7 +600,7 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
return;
}
// MARK: if else
if (attachment.first == CustomMessageType_RedPacket) {
[self receiveRedPacketDealWithData:attachment];
} else if (attachment.first == CustomMessageType_Gift && attachment.second == Custom_Message_Sub_Gift_ChannelNotify){///广
@@ -620,7 +612,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
[self getVersionUpdate:updateModel];
}
}else if(attachment.first == CustomMessageType_LuckyBag && attachment.second == Custom_Message_Sub_Room_Gift_LuckBag_FullScree){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveLuckyGiftBigPrize:attachment];
}else if(attachment.first == CustomMessageType_Graffiti_Star_Kitchen && attachment.second == Custom_Message_Sub_Star_Kitchen_FullScreen){
@@ -647,7 +638,6 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
}else if (attachment.first == CustomMessageType_Noble_VIP && attachment.second == Custom_Message_Sub_Room_Noble_LevelUp_Suspend) {///VIP
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveNobleLevelUp:attachment];
}else if (attachment.first == CustomMessageType_General_Floating_Screen && attachment.second == Custom_Message_Sub_General_Floating_Screen_All_Room){
if([XPSkillCardPlayerManager shareInstance].isInRoomVC == YES)return;
[self.roomAnimation receiveRoomGeneralFloatingScreen:attachment];
@@ -731,20 +721,12 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
UIViewController * home;
UIViewController * monents;
///ipXPNewHomeViewController
[[NSNotificationCenter defaultCenter]postNotificationName:@"kInLoginVC" object:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:@"kInLoginVC" object:nil];
if (logined) {
msg = [[XPSessionMainViewController alloc] init];
if ([ClientConfig shareConfig].canOpen) {
home = [[XPNewHomeViewController alloc] init];
monents = [[XPMonentsViewController alloc] init];
me = [[XPMineViewController alloc] init];
}else{
home = [[XPHomeSloganViewController alloc] init];
monents = [[XPMomentListViewController alloc] init];
me = [[XPSimpleMineViewController alloc] init];
}
home = [[XPNewHomeViewController alloc] init];
monents = [[XPMonentsViewController alloc] init];
me = [[XPMineViewController alloc] init];
} else {
game = [[XPBlankViewController alloc]init];
msg = [[XPSessionMainViewController alloc]init];
@@ -952,24 +934,14 @@ UIKIT_EXTERN NSString *kTabShowAnchorCardKey;
- (void)xPAnchorCardViewClickAvatar:(NSString *)uid {
if (uid.length) {
if ([ClientConfig shareConfig].canOpen) {
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.selectedViewController.navigationController pushViewController:userInfoVC animated:YES];
}else{
XPMineSimpleUserInfoViewController * userInfoVC = [[XPMineSimpleUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.selectedViewController.navigationController pushViewController:userInfoVC animated:YES];
}
[self.anchorCardView removeFromSuperview];
self.anchorCardView = nil;
self.needShowAnchorCard = NO;
} else {
[self.anchorCardView removeFromSuperview];
self.anchorCardView = nil;
self.needShowAnchorCard = NO;
XPMineUserInfoViewController * userInfoVC = [[XPMineUserInfoViewController alloc] init];
userInfoVC.uid = uid.integerValue;
[self.selectedViewController.navigationController pushViewController:userInfoVC animated:YES];
}
[self.anchorCardView removeFromSuperview];
self.anchorCardView = nil;
self.needShowAnchorCard = NO;
}
- (void)handleAnchorCardSwipeFrom:(UISwipeGestureRecognizer *)recognizer{