优化提交
This commit is contained in:
@@ -30,6 +30,7 @@
|
||||
#import "QXMessageServices.h"
|
||||
|
||||
#import "QXMeetActivityDriftView.h" // 巡乐会
|
||||
#import "QXChirldModeViewController.h"
|
||||
|
||||
@interface QXTabbarController ()<UITabBarControllerDelegate,QXTabBarDelegate,UINavigationControllerDelegate,MQTTClientModelDelegate,V2TIMConversationListener>
|
||||
@property(nonatomic,strong) QXTabBar *customTabBar;
|
||||
@@ -55,7 +56,8 @@
|
||||
return;
|
||||
}
|
||||
if (QXGlobal.shareGlobal.isLogin) {
|
||||
[self performSelector:@selector(popChirldView) afterDelay:1];
|
||||
// [self performSelector:@selector(popChirldView) afterDelay:1];
|
||||
[self popChirldView];
|
||||
}
|
||||
QXLOG(@"视图即将展示");
|
||||
}
|
||||
@@ -87,7 +89,8 @@
|
||||
}];
|
||||
}
|
||||
-(void)pushToChirld{
|
||||
QXChirldViewController *vc = [[QXChirldViewController alloc] init];
|
||||
QXChirldModeViewController *vc = [[QXChirldModeViewController alloc] init];
|
||||
vc.type = 0;
|
||||
[self.navigationController pushViewController:vc animated:YES];
|
||||
}
|
||||
|
||||
@@ -258,9 +261,26 @@
|
||||
|
||||
-(void)socketManager:(NSString *)socketManager receivedMessage:(NSDictionary *)message topic:(NSString *)topic{
|
||||
if ([topic isEqualToString:qx_room_topic]) {
|
||||
QXGiftScrollModel *model = [QXGiftScrollModel yy_modelWithJSON:message[@"msg"][@"list"]];
|
||||
[self.homeVC giftScrollViewShowWithModel:model];
|
||||
[[QXGiftDriftView shareView] addGiftModel:model];
|
||||
// NSDictionary*dict = message[@"msg"];
|
||||
// BOOL isList = YES;
|
||||
// for (NSString *key in dict.allKeys) {
|
||||
// if ([key isEqualToString:@"list"]) {
|
||||
// isList = NO;
|
||||
// break;
|
||||
// }
|
||||
// }
|
||||
// if (isList) {
|
||||
NSArray *array = [NSArray yy_modelArrayWithClass:[QXGiftScrollModel class] json:message[@"msg"][@"list"]];
|
||||
if (array.count == 0) {
|
||||
return;
|
||||
}
|
||||
[self.homeVC giftScrollViewShowWithModelList:array];
|
||||
[[QXGiftDriftView shareView] addGiftModelList:array];
|
||||
// }else{
|
||||
// QXGiftScrollModel *model = [QXGiftScrollModel yy_modelWithJSON:message[@"msg"][@"list"]];
|
||||
// [self.homeVC giftScrollViewShowWithModel:model];
|
||||
// [[QXGiftDriftView shareView] addGiftModel:model];
|
||||
// }
|
||||
}else if([topic isEqualToString:qx_ac_topic]){
|
||||
QXMeetActivityDriftModel *model = [QXMeetActivityDriftModel yy_modelWithJSON:message[@"msg"]];
|
||||
[[QXMeetActivityDriftView shareView] addActivityModel:model];
|
||||
|
||||
@@ -17,6 +17,8 @@ typedef NS_ENUM(NSInteger) {
|
||||
QXAlertViewTypeAgreeSong,
|
||||
/// pk弹窗
|
||||
QXAlertViewTypeAgreePK,
|
||||
/// 没有取消
|
||||
QXAlertViewTypeNoCancel
|
||||
}QXAlertViewType;
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
|
||||
@@ -114,6 +114,17 @@
|
||||
}];
|
||||
}
|
||||
break;
|
||||
case QXAlertViewTypeNoCancel:{
|
||||
self.cancelBtn.hidden = YES;
|
||||
self.commitBtn.hidden = NO;
|
||||
[self.commitBtn mas_remakeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self).offset(-12);
|
||||
make.height.mas_equalTo(42);
|
||||
make.width.mas_equalTo(ScaleWidth(220));
|
||||
make.centerX.equalTo(self);
|
||||
}];
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -53,12 +53,12 @@
|
||||
self.contentLabel.text = QXText(@"为了呵护未成年人健康成长,蜜耳语音特别推出青少年模式,该模式下部分功能无法正常使用,请监护人主动选择并设置监护密码");
|
||||
[self addSubview:self.contentLabel];
|
||||
|
||||
self.goBtn = [[UIButton alloc] init];
|
||||
[self.goBtn setTitleColor:RGB16(0xF4DF39) forState:(UIControlStateNormal)];
|
||||
[self.goBtn setTitle:[NSString stringWithFormat:@"%@>",QXText(@"进入青少年模式")] forState:(UIControlStateNormal)];
|
||||
self.goBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
[self.goBtn addTarget:self action:@selector(gotoChirld) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.goBtn];
|
||||
// self.goBtn = [[UIButton alloc] init];
|
||||
// [self.goBtn setTitleColor:RGB16(0xF4DF39) forState:(UIControlStateNormal)];
|
||||
// [self.goBtn setTitle:[NSString stringWithFormat:@"%@>",QXText(@"进入青少年模式")] forState:(UIControlStateNormal)];
|
||||
// self.goBtn.titleLabel.font = [UIFont systemFontOfSize:12];
|
||||
// [self.goBtn addTarget:self action:@selector(gotoChirld) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
// [self addSubview:self.goBtn];
|
||||
|
||||
self.closeBtn = [[UIButton alloc] init];
|
||||
[self.closeBtn setBackgroundImage:[UIImage imageNamed:@"home_white_close"] forState:(UIControlStateNormal)];
|
||||
@@ -96,10 +96,10 @@
|
||||
self.setBtn = [[UIButton alloc] init];
|
||||
[self.setBtn addRoundedCornersWithRadius:21];
|
||||
self.setBtn.backgroundColor = QXConfig.themeColor;
|
||||
[self.setBtn setTitle:QXText(@"设置青少年模式") forState:(UIControlStateNormal)];
|
||||
[self.setBtn setTitle:QXText(@"进入青少年模式") forState:(UIControlStateNormal)];
|
||||
[self.setBtn setTitleColor:QXConfig.btnTextColor forState:(UIControlStateNormal)];
|
||||
self.setBtn.titleLabel.font = [UIFont systemFontOfSize:14];
|
||||
[self.setBtn addTarget:self action:@selector(setAction) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self.setBtn addTarget:self action:@selector(gotoChirld) forControlEvents:(UIControlEventTouchUpInside)];
|
||||
[self addSubview:self.setBtn];
|
||||
[self.setBtn mas_makeConstraints:^(MASConstraintMaker *make) {
|
||||
make.bottom.equalTo(self.bgImageView).offset(-12);
|
||||
|
||||
@@ -290,11 +290,11 @@
|
||||
|
||||
-(NSAttributedString *)changePrice:(NSString*)price giftPrice:(NSString*)giftPrice{
|
||||
NSString *str = [NSString stringWithFormat:@"%@ %@",price,giftPrice];
|
||||
NSAttributedString *attr = [str deleteLineWithTextColor:RGB16(0x999999) lineColor:RGB16(0x999999) range:[str rangeOfString:giftPrice]];
|
||||
NSAttributedString *attr = [str deleteLineWithTextColor:RGB16(0x333333) lineColor:RGB16(0x333333) range:[str rangeOfString:giftPrice]];
|
||||
NSMutableAttributedString *att = [[NSMutableAttributedString alloc] initWithAttributedString:attr];
|
||||
[att yy_setFont:[UIFont systemFontOfSize:14] range:[str rangeOfString:price]];
|
||||
[att yy_setFont:[UIFont boldSystemFontOfSize:14] range:[str rangeOfString:price]];
|
||||
[att yy_setFont:[UIFont systemFontOfSize:12] range:[str rangeOfString:giftPrice]];
|
||||
[att yy_setColor:RGB16(0x333333) range:[price rangeOfString:str]];
|
||||
[att yy_setColor:RGB16(0xFFE200) range:[str rangeOfString:price]];
|
||||
return att;
|
||||
}
|
||||
-(void)rechargeAction{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
_cellType = cellType;
|
||||
switch (cellType) {
|
||||
case QXGiftCellTypeNiceGift:{
|
||||
[self.selecteBtn setBackgroundImage:[UIImage imageWithColor:RGB16(0xE9E9E9)] forState:(UIControlStateNormal)];
|
||||
self.numberWidthConstraint.constant = 23;
|
||||
self.numberHeightConstraint.constant = 9;
|
||||
self.cornHeight.constant = 10;
|
||||
|
||||
@@ -14,6 +14,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@property (nonatomic,strong)NSMutableArray *dataArray;
|
||||
@property (nonatomic,strong)QXGiftScrollModel *model;
|
||||
-(void)addGiftModel:(QXGiftScrollModel*)model;
|
||||
-(void)addGiftModelList:(NSArray<QXGiftScrollModel*>*)list;
|
||||
+(instancetype)shareView;
|
||||
@end
|
||||
|
||||
|
||||
@@ -70,7 +70,10 @@
|
||||
[self.dataArray addObject:model];
|
||||
[self giftAction];
|
||||
}
|
||||
|
||||
-(void)addGiftModelList:(NSArray<QXGiftScrollModel *> *)list{
|
||||
[self.dataArray addObjectsFromArray:list];
|
||||
[self giftAction];
|
||||
}
|
||||
|
||||
-(void)giftAction{
|
||||
if (self.isPlaying) {
|
||||
|
||||
@@ -26,7 +26,7 @@ NS_ASSUME_NONNULL_BEGIN
|
||||
@end
|
||||
|
||||
@interface QXMeetActivityDriftModel : NSObject
|
||||
@property (nonatomic,strong)NSString *roomId;
|
||||
@property (nonatomic,strong)NSString *room_id;
|
||||
@property (nonatomic,strong)NSString *text;
|
||||
@property (nonatomic,assign)NSInteger from_type;
|
||||
@end
|
||||
|
||||
@@ -52,8 +52,8 @@
|
||||
self.userInteractionEnabled = YES;
|
||||
MJWeakSelf
|
||||
[self addTapBlock:^(id _Nonnull obj) {
|
||||
if ([weakSelf.model.roomId isExist]) {
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:weakSelf.model.roomId isRejoin:NO navagationController:weakSelf.viewController.navigationController];
|
||||
if ([weakSelf.model.room_id isExist]) {
|
||||
[[QXGlobal shareGlobal] joinRoomWithRoomId:weakSelf.model.room_id isRejoin:NO navagationController:weakSelf.viewController.navigationController];
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user