Commit aa154aba authored by guanghui.shi's avatar guanghui.shi

添加注释

parent 4635c526
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
#import "QGAnalyticsService.h" #import "QGAnalyticsService.h"
#import "QGUserInfo.h" #import "QGUserInfo.h"
#import "QGGlobalConst.h"
@interface QGActivityPopManager () @interface QGActivityPopManager ()
...@@ -234,6 +234,13 @@ static NSString * floats_pop_sets = @"floats_pop_sets"; ...@@ -234,6 +234,13 @@ static NSString * floats_pop_sets = @"floats_pop_sets";
if (index == QGActivityPositionMine) { if (index == QGActivityPositionMine) {
return @"弹窗-我的"; return @"弹窗-我的";
} }
if (index == QGActivityPositionMall) {
return @"弹窗-省钱";
}
if (index == QGActivityPositionCashback) {
return @"弹窗-赚钱";
}
return nil; return nil;
} }
...@@ -318,10 +325,8 @@ static NSString * floats_pop_sets = @"floats_pop_sets"; ...@@ -318,10 +325,8 @@ static NSString * floats_pop_sets = @"floats_pop_sets";
// 点击或者关闭后不再显示,需要标记并且忽略日期 // 点击或者关闭后不再显示,需要标记并且忽略日期
if (model.showType == 1 || model.showType == 2) { if (model.showType == 1 || model.showType == 2) {
// 已经标记过,忽略本条数据 // 如果没有被标记过
if ([self.invalidActivityPops valueForKey:[NSString stringWithFormat:@"%@",model.uniqueId]]){ if (![self.invalidActivityPops valueForKey:[NSString stringWithFormat:@"%@",model.uniqueId]]){
continue;
}else{
[activityModels addObject:model]; [activityModels addObject:model];
} }
}else if (model.showType == 3) { // 每天仅弹出一次,需要标记但是需要比对日期 }else if (model.showType == 3) { // 每天仅弹出一次,需要标记但是需要比对日期
...@@ -351,18 +356,12 @@ static NSString * floats_pop_sets = @"floats_pop_sets"; ...@@ -351,18 +356,12 @@ static NSString * floats_pop_sets = @"floats_pop_sets";
// 浮窗只能有一个 // 浮窗只能有一个
break; break;
} }
}else{ }else if (model.showType == 2){
if (model.showType == 2) { // 只处理showType = 1 || showType = 2 的,其他的一概丢弃 [floatsModels addObject:model];
[floatsModels addObject:model];
break;
}
continue;
} }
} }
[self.floatsPops setValue:floatsModels forKey:[NSString stringWithFormat:@"%ld",(long)index]]; [self.floatsPops setValue:floatsModels forKey:[NSString stringWithFormat:@"%ld",(long)index]];
return floatsModels; return floatsModels;
} }
...@@ -394,32 +393,6 @@ static NSString * floats_pop_sets = @"floats_pop_sets"; ...@@ -394,32 +393,6 @@ static NSString * floats_pop_sets = @"floats_pop_sets";
} }
//- (void)viewDidAppearInController:(UIViewController *)controller
//{
// /// 没有等待的窗口
// if (self.waitPops.count == 0) return;
//
// [self.lock lock];
// [self.waitPops enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(QGActivityPopView * _Nonnull pop, NSUInteger idx, BOOL * _Nonnull stop) {
// dispatch_async(dispatch_get_main_queue(), ^{
// if ([pop.controller isEqual:controller] && [self canShowStatusWithController:pop.controller]) {
// [pop showInView:pop.controller.view];
// /// 显示即标记
// if (pop.popModel.showType == 3) {
// [self saveUniqueIdWithModel:pop.popModel];
// }
// [self.waitPops removeObject:pop];
// QGAppCoreModelClickEvent *event = [QGAppCoreModelClickEvent acmcEventWithPage:[self pageNameWithIndex:pop.position] path:nil name:nil detail_name:@"显示弹窗"];
// [QGAnalyticsService analyticsTrackWithEvent:event];
// *stop = YES;
// }
// });
// }];
//
// [self.lock unlock];
//
//}
- (NSLock *)lock - (NSLock *)lock
{ {
if (!_lock) { if (!_lock) {
......
...@@ -17,11 +17,11 @@ typedef void (^QGActivityShouldWaitBlock)(QGActivityPopView * _Nullable pop); ...@@ -17,11 +17,11 @@ typedef void (^QGActivityShouldWaitBlock)(QGActivityPopView * _Nullable pop);
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface QGActivityPopView : QGBasePopView @interface QGActivityPopView : QGBasePopView
///位置
@property (nonatomic, assign)NSInteger position; @property (nonatomic, assign)NSInteger position;
///在哪个类显示
@property (nonatomic, strong)UIViewController *controller; @property (nonatomic, strong)UIViewController *controller;
///model
@property (nonatomic, strong,readonly)QGActivityPopModel *popModel; @property (nonatomic, strong,readonly)QGActivityPopModel *popModel;
/// 指定初始化方法,如果model = nil 则视图立刻消失 /// 指定初始化方法,如果model = nil 则视图立刻消失
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment