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

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

tangchao преди 2 дни
родител
ревизия
0bc6226cd1

+ 5 - 1
PDF Office/PDF Master/Class/AIInfo/AIInfoConfig.swift

@@ -47,6 +47,10 @@ class AIInfoConfig: NSObject {
     }
     
     var memberAIActionURL: String {
-        return "http://139.196.160.101:8081"
+        if kTestMode == 1{
+            return "http://139.196.160.101:8081"
+        } else {
+            return "https://pdfmaster.pdfreaderpro.com"
+        }
     }
 }

+ 11 - 5
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -757,13 +757,19 @@ class KMProductModel: ObservableObject {
                 }
             }
         } else if state == .pro_Advanced {
+            let platforms = KMMemberInfo.shared.vip_platforms
+            let platformsArray = platforms
+                .components(separatedBy: ",")
+                .map { $0.trimmingCharacters(in: .whitespaces) }
             if KMMemberInfo.shared.userScenarioType == .pro_type1 {
-                membershipPurchase(.advancedAddDevicesAllAccessPack12months_pro)
+                if platformsArray.count == 1 {
+                    membershipPurchase(.advancedAddDevicesAllAccessPack12months_pro)
+                } else if platformsArray.count == 2 {
+                    membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_pro)
+                } else {
+                    membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_pro)
+                }
             } else if KMMemberInfo.shared.userScenarioType == .pro_type4 {
-                let platforms = KMMemberInfo.shared.vip_platforms
-                let platformsArray = platforms
-                    .components(separatedBy: ",")
-                    .map { $0.trimmingCharacters(in: .whitespaces) }
                 if platformsArray.count == 1 {
                     membershipPurchase(.advancedAddDevicesAllAccessPack12months_pro)
                 } else if platformsArray.count == 2 {

+ 11 - 5
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -440,13 +440,19 @@ class KMProductCompareWC: NSWindowController {
                 permanentPurchaseLabel.stringValue = model.getProductPrice(.pdfToOfficePackPermanent_pro)
             }
         } else if model.state == .pro_Advanced {
+            let platforms = KMMemberInfo.shared.vip_platforms
+            let platformsArray = platforms
+                .components(separatedBy: ",")
+                .map { $0.trimmingCharacters(in: .whitespaces) }
             if KMMemberInfo.shared.userScenarioType == .pro_type1 {
-                advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAddDevicesAllAccessPack12months_pro)
+                if platformsArray.count == 1 {
+                    advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAddDevicesAllAccessPack12months_pro)
+                } else if platformsArray.count == 2 {
+                    advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAdd2DevicesAllAccessPack12months_pro)
+                } else {
+                    advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAdd2DevicesAllAccessPack12months_pro)
+                }
             } else if KMMemberInfo.shared.userScenarioType == .pro_type4 {
-                let platforms = KMMemberInfo.shared.vip_platforms
-                let platformsArray = platforms
-                    .components(separatedBy: ",")
-                    .map { $0.trimmingCharacters(in: .whitespaces) }
                 if platformsArray.count == 1 {
                     advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAddDevicesAllAccessPack12months_pro)
                 } else if platformsArray.count == 2 {