Authored by 朱小军

添加AD事件tec和cts字段上报,由tec字段是否有预值来判断 review by 金林

... ... @@ -192,14 +192,34 @@ static NSString *kParamKeyType = @"type";
[eventDic setObject:data forKey:YOHOAppReportKeyPARAM];
}
if (type == YHPT_NETWORK) {
[self.eventDataSession getbaiduNetStatus:eventDic completionBlock:^(NSTimeInterval cts, NSInteger errCode) {
[eventDic setValue:[NSString stringWithFormat:@"%ld",(long)errCode] forKey:YOHOAppReportKeyJsonKeyErrorTEC];
[eventDic setValue:@(cts) forKey:YOHOAppReportKeyJsonKeyErrorCTS];
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}];
} else {
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
switch (type) {
case YHPT_NETWORK:
{
[self.eventDataSession getbaiduNetStatus:eventDic completionBlock:^(NSTimeInterval cts, NSInteger errCode) {
[eventDic setValue:[NSString stringWithFormat:@"%zd",errCode] forKey:YOHOAppReportKeyJsonKeyErrorTEC];
[eventDic setValue:[NSString stringWithFormat:@"%ld",(long)cts] forKey:YOHOAppReportKeyJsonKeyErrorCTS];
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}];
}
break;
case YHPT_AD:
{
if ([data valueForKey:YOHOAppReportKeyJsonKeyErrorTEC]) {
[self.eventDataSession getbaiduNetStatus:eventDic completionBlock:^(NSTimeInterval cts, NSInteger errCode) {
[eventDic setValue:[NSString stringWithFormat:@"%zd",errCode] forKey:YOHOAppReportKeyJsonKeyErrorTEC];
[eventDic setValue:[NSString stringWithFormat:@"%ld",(long)cts] forKey:YOHOAppReportKeyJsonKeyErrorCTS];
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}];
} else {
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}
}
break;
default:
{
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}
break;
}
}
... ...