Authored by 刘金林

Merge branch 'patch_tec' into 'master'

更正tec,cts上报的节点



See merge request !22
... ... @@ -9,7 +9,7 @@
Pod::Spec.new do |s|
s.name = "YHEventReport"
s.version = "0.8.4.1"
s.version = "0.8.4.2"
s.summary = "YHEventReport."
s.description = "无埋点SDK"
s.homepage = "http://git.yoho.cn/mobile/YH_EventReport"
... ...
... ... @@ -11,8 +11,6 @@ target 'YHEventReport' do
pod 'SDWebImage', :git=> 'http://git.yoho.cn/ios/yh_sdwebimage.git', :branch => 'yh_dev_433_branch', :subspecs => [
'Core',
'GIF',
'WebP',
]
end
... ...
... ... @@ -188,16 +188,17 @@ static NSString *kParamKeyType = @"type";
if (IsDictionaryClass(performanceDic)) {
[eventDic addEntriesFromDictionary:performanceDic];
}
if (IsDictionaryClass(eventDic)) {
[eventDic setObject:data forKey:YOHOAppReportKeyPARAM];
}
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];
NSMutableDictionary *appendDict = [[NSMutableDictionary alloc] initWithDictionary:data];
[appendDict setValue:[NSString stringWithFormat:@"%zd",errCode] forKey:YOHOAppReportKeyJsonKeyErrorTEC];
[appendDict setValue:[NSString stringWithFormat:@"%ld",(long)cts] forKey:YOHOAppReportKeyJsonKeyErrorCTS];
[eventDic setValue:appendDict forKey:YOHOAppReportKeyPARAM];
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}];
}
... ... @@ -206,17 +207,23 @@ static NSString *kParamKeyType = @"type";
{
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];
NSMutableDictionary *appendDict = [[NSMutableDictionary alloc] initWithDictionary:data];
[appendDict setValue:[NSString stringWithFormat:@"%zd",errCode] forKey:YOHOAppReportKeyJsonKeyErrorTEC];
[appendDict setValue:[NSString stringWithFormat:@"%ld",(long)cts] forKey:YOHOAppReportKeyJsonKeyErrorCTS];
[eventDic setValue:appendDict forKey:YOHOAppReportKeyPARAM];
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}];
} else {
[eventDic setValue:data forKey:YOHOAppReportKeyPARAM];
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}
}
break;
default:
{
[eventDic setValue:data forKey:YOHOAppReportKeyPARAM];
[self pushData:eventDic dataType:YHEventReportDataTypeCustom];
}
break;
... ...