Преглед на файлове

【内嵌支付】修复比较表金额符号异常

wanjun преди 6 месеца
родител
ревизия
33816c3262
променени са 1 файла, в които са добавени 8 реда и са изтрити 4 реда
  1. 8 4
      PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.m

+ 8 - 4
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseCompareDMGWindowController.m

@@ -506,12 +506,16 @@ static NSString *const KMPurchaseCompareDMGCellIdentifier       = @"KMPurchaseCo
     NSString *originalText = @"";
     NSString *discountText = @"";
 #if VERSION_DMG
+    NSString *abbreviation = @"$";
+    if ([@"CNY" isEqualToString:NSLocalizedString(@"USD", nil)])  {
+        abbreviation = @"¥";
+    }
     if ([self.buySwitch state]) {
-        originalText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
-        discountText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
+        originalText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
+        discountText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_3"]];
     } else {
-        originalText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
-        discountText = [NSString stringWithFormat:@"$%@", [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
+        originalText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
+        discountText = [NSString stringWithFormat:@"%@%@", abbreviation, [[KMDMGProductsManager shareInstance] getActivityPrice:@"com.brother.pdfreaderpro.mac.product_1"]];
     }
 #endif
     NSMutableAttributedString *attributedText = [[NSMutableAttributedString alloc] initWithString:originalText];