Commit d08b786f authored by shenyong's avatar shenyong

fix bugs

parent 38d42796
...@@ -239,6 +239,7 @@ class AdvManager : NSObject, FullScreenContentDelegate { ...@@ -239,6 +239,7 @@ class AdvManager : NSObject, FullScreenContentDelegate {
/// 开始显示 /// 开始显示
/// - Parameter completed: 准备完成后回调 /// - Parameter completed: 准备完成后回调
func showRewardedInterstitialAd(vc:UIViewController,from:String = "",isByInter:Bool = false) { func showRewardedInterstitialAd(vc:UIViewController,from:String = "",isByInter:Bool = false) {
isFromHome = false
// 检查是否在上次广告展示后的 30 秒内 // 检查是否在上次广告展示后的 30 秒内
if let lastAdShowTime = rewardlastAdShowTime { if let lastAdShowTime = rewardlastAdShowTime {
let timeSinceLastAd = Date().timeIntervalSince(lastAdShowTime) let timeSinceLastAd = Date().timeIntervalSince(lastAdShowTime)
......
...@@ -187,7 +187,7 @@ class HomeViewController:BaseViewController { ...@@ -187,7 +187,7 @@ class HomeViewController:BaseViewController {
if IAPManager.share.isSubscribed == false { if IAPManager.share.isSubscribed == false {
self.adManager.finisedCallBack = { self.adManager.finisedCallBack = {
Print("执行成功",cIndex) Print("执行成功",cIndex)
if self.adManager.adFromVC == cIndex{ if self.adManager.adFromVC == cIndex,self.adManager.isFromHome{
self.isAdCallBack = true self.isAdCallBack = true
self.junmToModule(cIndex, self) self.junmToModule(cIndex, self)
} }
...@@ -195,7 +195,7 @@ class HomeViewController:BaseViewController { ...@@ -195,7 +195,7 @@ class HomeViewController:BaseViewController {
self.adManager.failueFinishedCallBack = { self.adManager.failueFinishedCallBack = {
// 首页特殊要求广告没准备好也需要跳转 // 首页特殊要求广告没准备好也需要跳转
Print("执行失败",cIndex) Print("执行失败",cIndex)
if self.adManager.adFromVC == cIndex{ if self.adManager.adFromVC == cIndex,self.adManager.isFromHome{
self.junmToModule(cIndex, self) self.junmToModule(cIndex, self)
} }
} }
......
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