瀏覽代碼

Merge branch 'develop_PDFReaderProNew' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderProNew

tangchao 3 月之前
父節點
當前提交
8fe5aa4b4a

+ 24 - 1
PDF Office/PDF Master/Class/Purchase/DMG/KMPurchaseEmbeddedWindowController.swift

@@ -700,7 +700,10 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
                 self?.product_Info.displayCnyPriceString = nil
                 self?.product_Info.individualPriceString = batchProductPrice.price
                 self?.product_Info.individualCnyPriceString = batchProductPrice.cnyPrice
-
+                
+                if self?._paymentMethod == .alipay || self?._paymentMethod == .wxpay {
+                    self?.updatePrice()
+                }
                 self?.priceRefresh(productsModel: self?.product_Info ?? KMListingProductsModel())
             }
         } else {
@@ -782,6 +785,10 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
                     self?.product_Info.individualCnyPriceString = couponModel.cnyPriceString
                     self?.product_Info.verifyofferCode = self?.coupomTextField.stringValue ?? ""
                     
+                    if self?._paymentMethod == .alipay || self?._paymentMethod == .wxpay {
+                        self?.updatePrice()
+                    }
+                    
                     self?.priceRefresh(productsModel: self?._product_Info ?? KMListingProductsModel())
                 }else {
                     let alert = NSAlert()
@@ -1161,6 +1168,22 @@ class KMPurchaseEmbeddedWindowController: NSWindowController {
         }
     }
     
+    private func updatePrice() {
+        if _paymentMethod == .wxpay {
+            wechatPayButton.image = NSImage(named: "EmbeddedPayment22")
+            wechatPayButton2.image = NSImage(named: "EmbeddedPayment22")
+            payBox.contentView = weChatPayView
+            weChatBox.fillColor = NSColor(named: "KMPurchaseBoxColor") ?? NSColor.blue
+            payBoxHeight.constant = 92.0
+        } else if _paymentMethod == .alipay {
+            alipayButton.image = NSImage(named: "EmbeddedPayment24")
+            payBox.contentView = weChatPayView
+            weChatBox.fillColor = NSColor(named: "KMPurchaseBoxColor") ?? NSColor.blue
+            payBoxHeight.constant = 92.0
+        }
+    }
+
+    
     func isSubscribeCode()-> Bool {//是否是订阅
         if(product_code == "standard-annual-subscription" ||
            product_code == "advanced-annual-subscription-blackFive" ||

+ 2 - 2
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -939,7 +939,7 @@ class KMProductModel: ObservableObject {
             return [
                 "Benefit",
                 ["Supported platforms",                                                 "mac, windows, ios, android",   "mac, windows, ios, android",   "mac, windows, ios, android",   "mac, windows", "mac"],
-                ["Maximum number of accessible devices",                                "4 devices",                    "4 devices",                    "4 devices",                    "1 devices",    "1 devices"],
+                ["Maximum number of accessible devices",                                "4 devices",                    "4 devices",                    "4 devices",                    "1 device",    "1 device"],
                 "PDF to Office",
                 ["Convert PDFs to Word, HTML, TXT, JPEG or PNG files",                  "Only first 10 pages",          "Standard",                     "Advanced",                     "Advanced",     "Advanced"],
                 ["Turn PDF to PPT, Excel, RTF, CSV, and more",                          "Only first 10 pages",          "Only first 10 pages",          "✓",                            "✓",            "✓"],
@@ -991,7 +991,7 @@ class KMProductModel: ObservableObject {
             return [
                 "Benefit",
                 ["Supported platforms",                                                 "mac, windows, ios, android",   "mac, windows, ios, android",   "mac, windows, ios, android",   "mac, windows", "mac"],
-                ["Maximum number of accessible devices",                                "4 devices",                    "4 devices",                    "4 devices",                    "1 devices",    "1 devices"],
+                ["Maximum number of accessible devices",                                "4 devices",                    "4 devices",                    "4 devices",                    "1 device",    "1 device"],
                 "PDF to Office",
                 ["Convert PDFs to Word, HTML, TXT, JPEG or PNG files",                  "Only first 10 pages",          "Standard",                     "Advanced",                     "Advanced",     "Advanced"],
                 ["Turn PDF to PPT, Excel, RTF, CSV, and more",                          "Only first 10 pages",          "Only first 10 pages",          "✓",                            "✓",            "✓"],