Преглед изворни кода

【内嵌支付】修复“比较表默认要选中高级包”

wanjun пре 6 месеци
родитељ
комит
667fb384f7

+ 9 - 1
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.m

@@ -244,6 +244,7 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
     self.originalPriceLabel.font = [NSFont fontWithName:@"Ubuntu" size:14.0];
     self.discountPriceLabel2.textColor = [NSColor colorWithRed:255.0/255.0 green:231.0/255.0 blue:106.0/255.0 alpha:1.0];
     self.discountPriceLabel2.font = [NSFont fontWithName:@"Ubuntu" size:36.0];
+    [self.discountPriceLabel2 setHidden:YES];
 
     self.freeVersionLbl.stringValue = NSLocalizedString(@"Free Version", nil);
     self.parmanentVerLbl.stringValue = NSLocalizedString(@"Permanent License", nil);
@@ -517,7 +518,8 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
                            range:NSMakeRange(0, originalText.length)];
     self.originalPriceLabel.attributedStringValue = attributedText;
     self.discountPriceLabel.stringValue = discountText;
-    
+    self.discountPriceLabel2.stringValue = discountText;
+
     if (KMAdvertisementManager.manager.info.discountContent.content.count > 0) {
         KMAdvertisementItemInfo *info = KMAdvertisementManager.manager.info.discountContent.content.firstObject;
         if ([KMAdvertisementManager checkAdvertisementValid:info]) {
@@ -542,8 +544,12 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
             self.discountTipImage.hidden = YES;
             if ([originalText isEqualToString:discountText]) {
                 [self.originalPriceLabel setHidden:YES];
+                [self.discountPriceLabel setHidden:YES];
+                [self.discountPriceLabel2 setHidden:NO];
             } else {
                 [self.originalPriceLabel setHidden:NO];
+                [self.discountPriceLabel setHidden:NO];
+                [self.discountPriceLabel2 setHidden:YES];
             }
         }
     }
@@ -556,6 +562,8 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
     [self.window center];
     [self.window orderFront:nil];
     
+    [self.buySwitch setState:NSControlStateValueOn];
+    [self updatePriceLabel];
     [self updatePurchaseInformation];
 }