Browse Source

【综合】弹窗机制调整

niehaoyu 9 months ago
parent
commit
0dbd98cea9

+ 9 - 2
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -1007,9 +1007,16 @@ extension KMHomeViewController {
                     let discount = dataDict["discount"] as? Int
                     let coupon_code = dataDict["coupon_code"] as? String
                     let end_up_at = dataDict["end_up_at"] as? String
-                    
-                    self?.showCouponInfoWindow(discount: discount, couponCode: coupon_code, endUpAt: end_up_at)
 
+                    if let versionKey = KMAdsInfoManager.shareInstance.couponInfo?.versionKey {
+                        if (UserDefaults.standard.object(forKey: versionKey) != nil) {
+                            
+                        } else {
+                            UserDefaults.standard.set("Show", forKey: versionKey)
+                            UserDefaults.standard.synchronize()
+                            self?.showCouponInfoWindow(discount: discount, couponCode: coupon_code, endUpAt: end_up_at)
+                        }
+                    }
                 }
             } else {
 #if VERSION_DMG