Pārlūkot izejas kodu

【会员系统】导航栏Button检测到黑五活动开启时,比较表切换为购买比较表

wanjun 3 dienas atpakaļ
vecāks
revīzija
6f27bd645f

+ 34 - 6
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -534,13 +534,41 @@ NSPopoverDelegate>
 }
 
 - (IBAction)buttonAction:(id)sender {
-    KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
-    if (type == KMUserScenarioTypeDmg_type4) {
-        [[KMProductCompareWC shared] setOrientation:YES];
-        [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypeTrial];
-        [[KMProductCompareWC shared] showWindow:nil];
+    if (KMAdvertisementManager.manager.info.topRightInfoContent != nil) {
+        if (KMAdvertisementManager.manager.info.topRightInfoContent.content.firstObject != nil) {
+            [[KMProductCompareWC shared] setOrientation:YES];
+#if VERSION_FREE
+#if VERSION_DMG
+    // DMG
+            [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypeDmg_Base];
+#else
+    // AppStore 免费版本
+            [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypeLite_Base];
+#endif
+#else
+    // AppStore 付费版
+            [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypePro_Base];
+#endif
+            [[KMProductCompareWC shared] showWindow:nil];
+        } else {
+            KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
+            if (type == KMUserScenarioTypeDmg_type4) {
+                [[KMProductCompareWC shared] setOrientation:YES];
+                [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypeTrial];
+                [[KMProductCompareWC shared] showWindow:nil];
+            } else {
+                [[KMMemberInfo shared] advancedFunctionUsage];
+            }
+        }
     } else {
-        [[KMMemberInfo shared] advancedFunctionUsage];
+        KMUserScenarioType type = [KMMemberInfo shared].userScenarioType;
+        if (type == KMUserScenarioTypeDmg_type4) {
+            [[KMProductCompareWC shared] setOrientation:YES];
+            [[KMProductCompareWC shared] setOrientationType:KMCompareTableTypeTrial];
+            [[KMProductCompareWC shared] showWindow:nil];
+        } else {
+            [[KMMemberInfo shared] advancedFunctionUsage];
+        }
     }
 }