Commit 9c9a2d85 authored by 叶凤鸣's avatar 叶凤鸣

添加isPush

parent 2c98ab14
...@@ -347,6 +347,7 @@ static NSString *sdkVersion = @"110"; ...@@ -347,6 +347,7 @@ static NSString *sdkVersion = @"110";
[dict setObject:page.extraParam ? : @"" forKey:@"extra_param"]; [dict setObject:page.extraParam ? : @"" forKey:@"extra_param"];
[dict setObject:page.homeTabName ? : @"" forKey:@"tab_name"]; [dict setObject:page.homeTabName ? : @"" forKey:@"tab_name"];
[dict setObject:page.currentTabName ? : @"" forKey:@"referrer_tab_name"]; [dict setObject:page.currentTabName ? : @"" forKey:@"referrer_tab_name"];
[dict setObject:@(page.isPush) forKey:@"is_push"];
NSAssert(page.inTime.length > 0, @"页面显示时间不能为空!"); NSAssert(page.inTime.length > 0, @"页面显示时间不能为空!");
[Phobos track:@"page_view" attributes:dict]; [Phobos track:@"page_view" attributes:dict];
if (page.inTime.length > 0) { if (page.inTime.length > 0) {
......
...@@ -68,4 +68,11 @@ ...@@ -68,4 +68,11 @@
*/ */
@property (nonatomic, copy) NSString *currentTabName; @property (nonatomic, copy) NSString *currentTabName;
/**
is_push:判断是否是推送标识
1: 是推送页面跳转
0: 普通页面跳转
*/
@property (nonatomic, assign) BOOL isPush;
@end @end
...@@ -187,4 +187,13 @@ ...@@ -187,4 +187,13 @@
return currentTabName == nil ? @"" : currentTabName; return currentTabName == nil ? @"" : currentTabName;
} }
- (BOOL)isPush {
NSNumber *isPush = objc_getAssociatedObject(self, @selector(isPush));
return isPush == nil ? NO : isPush.boolValue;
}
- (void)setIsPush:(BOOL)isPush {
objc_setAssociatedObject(self, @selector(isPush), @(isPush), OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}
@end @end
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