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,7 +54,12 @@ | ||
| 54 | [[VLionManager manager] vl_nativeAdNewsWithTagId:@"" handler:^(VLionNativeAdNewsModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { | 54 | [[VLionManager manager] vl_nativeAdNewsWithTagId:@"" handler:^(VLionNativeAdNewsModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 55 | NSLog(@"model:%@",adModel); | 55 | NSLog(@"model:%@",adModel); |
| 56 | if (errorDic) { | 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 | }else | 63 | }else |
| 59 | { | 64 | { |
| 60 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; | 65 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| @@ -65,7 +70,12 @@ | @@ -65,7 +70,12 @@ | ||
| 65 | [[VLionManager manager] vl_nativeAdAppWallWithTagId:@"" handler:^(VLionNativeAdAppWallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { | 70 | [[VLionManager manager] vl_nativeAdAppWallWithTagId:@"" handler:^(VLionNativeAdAppWallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 66 | NSLog(@"model:%@",adModel); | 71 | NSLog(@"model:%@",adModel); |
| 67 | if (errorDic) { | 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 | }else | 79 | }else |
| 70 | { | 80 | { |
| 71 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; | 81 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| @@ -77,7 +87,12 @@ | @@ -77,7 +87,12 @@ | ||
| 77 | [[VLionManager manager] vl_nativeAdShufflingWithTagId:@"339" handler:^(VLionNativeAdShufflingModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { | 87 | [[VLionManager manager] vl_nativeAdShufflingWithTagId:@"339" handler:^(VLionNativeAdShufflingModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 78 | NSLog(@"model:%@",adModel); | 88 | NSLog(@"model:%@",adModel); |
| 79 | if (errorDic) { | 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 | }else | 96 | }else |
| 82 | { | 97 | { |
| 83 | NSString *string = @""; | 98 | NSString *string = @""; |
| @@ -118,7 +133,12 @@ | @@ -118,7 +133,12 @@ | ||
| 118 | [[VLionManager manager] vl_nativeAdWaterfallWithTagId:@"" handler:^(VLionNativeAdWaterfallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { | 133 | [[VLionManager manager] vl_nativeAdWaterfallWithTagId:@"" handler:^(VLionNativeAdWaterfallModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 119 | NSLog(@"model:%@",adModel); | 134 | NSLog(@"model:%@",adModel); |
| 120 | if (errorDic) { | 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 | }else | 142 | }else |
| 123 | { | 143 | { |
| 124 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; | 144 | [self toast:[NSString stringWithFormat:@"model:%@",adModel]]; |
| @@ -129,7 +149,12 @@ | @@ -129,7 +149,12 @@ | ||
| 129 | case 10004: {//信息流 | 149 | case 10004: {//信息流 |
| 130 | [[VLionManager manager] vl_nativeAdInformationFlowWithTagId:@"425" handler:^(VLionNativeAdInformationFlowModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { | 150 | [[VLionManager manager] vl_nativeAdInformationFlowWithTagId:@"425" handler:^(VLionNativeAdInformationFlowModel * _Nullable adModel, NSDictionary * _Nullable errorDic) { |
| 131 | if (errorDic) { | 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 | }else | 158 | }else |
| 134 | { | 159 | { |
| 135 | NSString *string = @""; | 160 | NSString *string = @""; |