Forráskód Böngészése

【会员系统】会员系统开始隐藏左下角广告

niehaoyu 4 napja
szülő
commit
93642d4f68

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

@@ -338,11 +338,11 @@ import Cocoa
             self.fastToolItemAction(item.type!)
         }
         
-        if KMMemberInfo.shared.isMemberAllFunction {
+//        if KMMemberInfo.shared.isMemberAllFunction {
             self.advertisementShowView.isHidden = true
-        } else {
-            self.advertisementShowView.isHidden = false
-        }
+//        } else {
+//            self.advertisementShowView.isHidden = false
+//        }
         
         NotificationCenter.default.addObserver(self, selector: #selector(purchaseStateUpdateNoti), name: NSNotification.Name(rawValue: "KMIAPProductPurchasedNotification"), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(purchaseStateUpdateNoti), name: NSNotification.Name(rawValue: "kDeviceActivateNotification"), object: nil)

+ 17 - 0
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -295,6 +295,23 @@ NSPopoverDelegate>
         type == KMUserScenarioTypeDmg_type45 ||
         type == KMUserScenarioTypeDmg_type48) {
         [self.button setTitleColor:[NSColor whiteColor]];
+        
+        if (KMAdvertisementManager.manager.info.topRightInfoContent != nil) {
+            if (KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject != nil) {
+                KMAdvertisementItemInfo *info = KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject;
+                NSString *name = [KMAdvertisementModelTransition transitionLanguageWithLangeuage:info.name];
+                self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(name, nil)];
+                
+                NSURL *url = [NSURL URLWithString: [KMAdvertisementModelTransition transitionImagePathWithImage:info.image highlight: YES]];
+                __weak typeof(self)weakSelf = self;
+                NSImage * img = [KMAdvertisementImage imageWithURLWithUrl:url completion:^(NSImage *image) {
+                    if (image != nil) {
+                        weakSelf.bgImg.image = image;
+                    }
+                }];
+            }
+        }
+        
         self.bgImg.hidden = NO;
         self.button.hidden = NO;
         self.button.frame = CGRectMake(totalWidth, kbottomGap, buttonWidth, self.view.frame.size.height -2 *kbottomGap);