Browse Source

【综合】试用过期挽回调整

niehaoyu 9 months ago
parent
commit
abc8b50e41

+ 10 - 7
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -1012,14 +1012,17 @@ 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
+                    let pop_up = dataDict["pop_up"] as? Bool
 
-                    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)
+                    if pop_up == true {
+                        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)
+                            }
                         }
                     }
                 }