Commit 5e06b70a authored by zhangshuai's avatar zhangshuai

修改 后置 缓存

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