Commit e403d611 authored by 周亮's avatar 周亮

暂提

parent 0f35f164
......@@ -284,7 +284,8 @@ static dispatch_semaphore_t _phobos_semaphore;
[dict setObject:PhobosSafeString(page.messageId) forKey:@"message_id"];
[dict setObject:PhobosSafeString(page.inTimeMillis) forKey:@"in_time_millis"];
[dict setObject:PhobosSafeString([PhobosUtil currentMMTime]) forKey:@"out_time_millis"];
[dict setObject:@(page.isFirst) forKey:@"is_first"];
//首次进来为1,再次进入的时候都为0
[dict setObject:page.isFirst ? @(0):@(1) forKey:@"is_first"];
if (page.inTime.length > 0) {
// 页面显示时间为空时不记录页面pv事件
......
......@@ -362,7 +362,8 @@ static OldPhobos *sharedClient = nil;
[dict setObject:PhobosSafeString(page.messageId) forKey:@"message_id"];
[dict setObject:PhobosSafeString(page.inTimeMillis) forKey:@"in_time_millis"];
[dict setObject:PhobosSafeString([PhobosUtil currentMMTime]) forKey:@"out_time_millis"];
[dict setObject:@(page.isFirst) forKey:@"is_first"];
//首次进来为1,再次进入的时候都为0
[dict setObject:page.isFirst ? @(0):@(1) forKey:@"is_first"];
if (page.inTime.length > 0) {
// 页面显示时间为空时不记录页面pv事件
......
......@@ -137,8 +137,9 @@ static BOOL isGray = NO;
- (void)onPVEnd:(UIResponder<PhobosPVProtocol> *)page {
[_rePhobos onPVEnd:page];
[_oldPhobos onPVEnd:page];
//发送完一次pv就要置为0
page.isFirst = 0;
if (page.isFirst == 0) {
page.isFirst = 1;
}
}
/**
......
......@@ -93,7 +93,7 @@ typedef void(^PhobosUpdatePVBlock)(void);
是否是第一次来到这个页面,在viewDidLoad赋值为1
在即将消失的方法赋值为0
*/
@property (nonatomic, assign) NSInteger isFirst;
@property (nonatomic, assign) BOOL isFirst;
/// 业务层更新PVStart信息
@property (nonatomic, copy) PhobosUpdatePVBlock updatePVStartBlock;
......
......@@ -254,11 +254,11 @@
objc_setAssociatedObject(self, @selector(updatePVStartBlock), updatePVStartBlock, OBJC_ASSOCIATION_COPY_NONATOMIC);
}
- (void)setIsFirst:(NSInteger)isFirst {
- (void)setIsFirst:(BOOL)isFirst {
objc_setAssociatedObject(self, @selector(isFirst), @(isFirst), OBJC_ASSOCIATION_ASSIGN);
}
- (NSInteger)isFirst {
- (BOOL)isFirst {
NSNumber *num = objc_getAssociatedObject(self, _cmd);
return [num integerValue];
}
......
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