Commit 5dcebb768f38f8be711dbb8195881cb33771bfc6
1 parent
de2aa036
no message
Showing
1 changed file
with
30 additions
and
5 deletions
VLionADSDKDemo/VLionADSDKDemo/NativeAdListsController.m
| ... | ... | @@ -54,7 +54,12 @@ |
| 54 | 54 | [[VLionManager manager] vl_nativeAdNewsWithTagId:@"" handler:^(VLionNativeAdNewsModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 55 | 55 | NSLog(@"model:%@",adModel); |
| 56 | 56 | if (errorDic) { |
| 57 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 57 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 58 | + if(adModel.tagid == 0) | |
| 59 | + { | |
| 60 | + tagid = @"null"; | |
| 61 | + } | |
| 62 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 58 | 63 | }else |
| 59 | 64 | { |
| 60 | 65 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| ... | ... | @@ -65,7 +70,12 @@ |
| 65 | 70 | [[VLionManager manager] vl_nativeAdAppWallWithTagId:@"" handler:^(VLionNativeAdAppWallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 66 | 71 | NSLog(@"model:%@",adModel); |
| 67 | 72 | if (errorDic) { |
| 68 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 73 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 74 | + if(adModel.tagid == 0) | |
| 75 | + { | |
| 76 | + tagid = @"null"; | |
| 77 | + } | |
| 78 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 69 | 79 | }else |
| 70 | 80 | { |
| 71 | 81 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| ... | ... | @@ -77,7 +87,12 @@ |
| 77 | 87 | [[VLionManager manager] vl_nativeAdShufflingWithTagId:@"339" handler:^(VLionNativeAdShufflingModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 78 | 88 | NSLog(@"model:%@",adModel); |
| 79 | 89 | if (errorDic) { |
| 80 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 90 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 91 | + if(adModel.tagid == 0) | |
| 92 | + { | |
| 93 | + tagid = @"null"; | |
| 94 | + } | |
| 95 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 81 | 96 | }else |
| 82 | 97 | { |
| 83 | 98 | NSString *string = @""; |
| ... | ... | @@ -118,7 +133,12 @@ |
| 118 | 133 | [[VLionManager manager] vl_nativeAdWaterfallWithTagId:@"" handler:^(VLionNativeAdWaterfallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 119 | 134 | NSLog(@"model:%@",adModel); |
| 120 | 135 | if (errorDic) { |
| 121 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 136 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 137 | + if(adModel.tagid == 0) | |
| 138 | + { | |
| 139 | + tagid = @"null"; | |
| 140 | + } | |
| 141 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 122 | 142 | }else |
| 123 | 143 | { |
| 124 | 144 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| ... | ... | @@ -129,7 +149,12 @@ |
| 129 | 149 | case 10004: {//信息流 |
| 130 | 150 | [[VLionManager manager] vl_nativeAdInformationFlowWithTagId:@"425" handler:^(VLionNativeAdInformationFlowModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 131 | 151 | if (errorDic) { |
| 132 | - [self toast:[NSString stringWithFormat:@"错误码:%@,%@",errorDic[@"errorCode"],errorDic[@"errorMessage"]]]; | |
| 152 | + NSString *tagid = [NSString stringWithFormat:@"%d",adModel.tagid]; | |
| 153 | + if(adModel.tagid == 0) | |
| 154 | + { | |
| 155 | + tagid = @"null"; | |
| 156 | + } | |
| 157 | + [self toast:[NSString stringWithFormat:@"错误码:%@,%@\n请求广告位id:%@",errorDic[@"errorCode"],errorDic[@"errorMessage"],tagid]]; | |
| 133 | 158 | }else |
| 134 | 159 | { |
| 135 | 160 | NSString *string = @""; | ... | ... |