Commit 5e06b70a authored by zhangshuai's avatar zhangshuai

修改 后置 缓存

parent 2c2dcef3
...@@ -112,10 +112,12 @@ ...@@ -112,10 +112,12 @@
if (success) { if (success) {
UIView * flowView = [IOSADManager shareADManager].flowBgView; UIView * flowView = [IOSADManager shareADManager].flowBgView;
[self.adContentView addSubview:flowView]; if (flowView) {
[weakSelf.adContentView addSubview:flowView];
}
} }
CGFloat offset = (UIScreen.mainScreen.bounds.size.height - self.mainContentView.bounds.size.height) / 2 - 40 - statusBarFrameHeight; CGFloat offset = (UIScreen.mainScreen.bounds.size.height - weakSelf.mainContentView.bounds.size.height) / 2 - 40 - statusBarFrameHeight;
[UIView animateWithDuration:0.25 animations:^{ [UIView animateWithDuration:0.25 animations:^{
weakSelf.mainContentView.transform = CGAffineTransformMakeTranslation(0, -offset); weakSelf.mainContentView.transform = CGAffineTransformMakeTranslation(0, -offset);
weakSelf.adContentView.transform = CGAffineTransformMakeTranslation(0, -offset); weakSelf.adContentView.transform = CGAffineTransformMakeTranslation(0, -offset);
......
...@@ -427,22 +427,23 @@ static IOSADManager * manager = nil; ...@@ -427,22 +427,23 @@ static IOSADManager * manager = nil;
[weakSelf.ruishiAd showAdWithData:showData withADType:adType]; [weakSelf.ruishiAd showAdWithData:showData withADType:adType];
} }
if ([showData.adPlatform isEqualToString:@"sigmob"]){
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // if ([showData.adPlatform isEqualToString:@"sigmob"]){
if (weakSelf.videoModels.count <= 1) { // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[weakSelf requestVideoAD]; // if (weakSelf.videoModels.count <= 1) {
}else{ // [weakSelf requestVideoAD];
[weakSelf loadAdWithData:weakSelf.videoModels[1] withADType:ADType_Video]; // }else{
} // [weakSelf loadAdWithData:weakSelf.videoModels[1] withADType:ADType_Video];
}); // }
// });
} else { //
if (weakSelf.videoModels.count <= 1) { // } else {
[weakSelf requestVideoAD]; // if (weakSelf.videoModels.count <= 1) {
}else{ // [weakSelf requestVideoAD];
[weakSelf loadAdWithData:weakSelf.videoModels[1] withADType:ADType_Video]; // }else{
} // [weakSelf loadAdWithData:weakSelf.videoModels[1] withADType:ADType_Video];
} // }
// }
// dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ // dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// if (weakSelf.videoModels.count <= 1) { // if (weakSelf.videoModels.count <= 1) {
...@@ -743,6 +744,7 @@ static IOSADManager * manager = nil; ...@@ -743,6 +744,7 @@ static IOSADManager * manager = nil;
if(model.loadADType == ADType_Video){ if(model.loadADType == ADType_Video){
// [NSObject cancelPreviousPerformRequestsWithTarget:self]; // [NSObject cancelPreviousPerformRequestsWithTarget:self];
weakSelf.adShowBlock(success); weakSelf.adShowBlock(success);
...@@ -774,6 +776,12 @@ static IOSADManager * manager = nil; ...@@ -774,6 +776,12 @@ static IOSADManager * manager = nil;
[weakSelf clearCache:model]; [weakSelf clearCache:model];
if (weakSelf.videoModels.count < 1) {
[weakSelf requestVideoAD];
}else{
[weakSelf loadAdWithData:weakSelf.videoModels.firstObject withADType:ADType_Video];
}
}else if(model.loadADType == ADType_OpenScreen){ }else if(model.loadADType == ADType_OpenScreen){
if (success) { if (success) {
[[CGUserManager shared] addLocCollection:@"splash_back" value:@"splash_display_success"]; [[CGUserManager shared] addLocCollection:@"splash_back" value:@"splash_display_success"];
......
...@@ -46,11 +46,11 @@ ...@@ -46,11 +46,11 @@
}else if (AdType == ADType_Video){ //视频 }else if (AdType == ADType_Video){ //视频
// GYAdsTrackModel * oldData = [IOSADManager shareADManager].cachevideo.firstObject; GYAdsTrackModel * oldData = [IOSADManager shareADManager].cachevideo.firstObject;
// if ([oldData.adPlatform isEqualToString: @"chuanshanjia"]) { if ([oldData.adPlatform isEqualToString: @"chuanshanjia"]) {
// self.loadSuccessCallbackBlock(self.currentData, NO); self.loadSuccessCallbackBlock(self.currentData, NO);
// return; return;
// } }
BURewardedVideoModel * rewardedModel = [[BURewardedVideoModel alloc] init]; BURewardedVideoModel * rewardedModel = [[BURewardedVideoModel alloc] init];
rewardedModel.userId = USERID; rewardedModel.userId = USERID;
......
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