Quellcode durchsuchen

【会员系统】修复AI购买页价格传值报错

wanjun vor 4 Monaten
Ursprung
Commit
c1eb4dbaaa

+ 7 - 4
PDF Office/PDF Master/Class/AIInfo/AIPurchaseWindowController/AIPurchaseWindowController.swift

@@ -141,12 +141,15 @@ class AIPurchaseWindowController: NSWindowController, NSWindowDelegate {
     
     func reloadData() -> Void {
         self.purchaseButton.isEnabled = true
+        var priceLabel = ""
 #if VERSION_FREE
-#if !VERSION_DMG
-        let priceLabel = IAPProductsManager.default().aiAllAccessPack1month_lite.price()
+#if VERSION_DMG
+        priceLabel = IAPProductsManager.default().dmgpdfReaderProAI_Monthly.price()
+#else
+        priceLabel = IAPProductsManager.default().aiAllAccessPack1month_lite.price()
 #endif
 #else
-        let priceLabel = IAPProductsManager.default().aiAllAccessPack1month_pro.price()
+        priceLabel = IAPProductsManager.default().aiAllAccessPack1month_pro.price()
 #endif
         
         let allowPurchaseAI = KMMemberInfo.shared.allowPurchaseAI
@@ -157,7 +160,7 @@ class AIPurchaseWindowController: NSWindowController, NSWindowDelegate {
             self.purchaseButton.isEnabled = false
             self.purchaseButton.layer?.backgroundColor = NSColor.white.withAlphaComponent(0.2).cgColor
         }
-        self.priceLabel.stringValue = priceLabel!
+        self.priceLabel.stringValue = priceLabel
     }
     
     func appStoreRestoreFinish() -> Void {