Browse Source

【会员系统】免费版,有旧版买断,免费账户升级产品错误问题

wangshuai 1 week ago
parent
commit
c3bf47d177

+ 12 - 8
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -464,16 +464,20 @@ class KMProductModel: ObservableObject {
             }
         } else if state == .lite_MacWindows {
             if tag == 2 {
-                let platforms = KMMemberInfo.shared.vip_platforms
-                let platformsArray = platforms
-                    .components(separatedBy: ",")
-                    .map { $0.trimmingCharacters(in: .whitespaces) }
-                if platformsArray.count == 1 {
+                if KMMemberInfo.shared.userScenarioType == .lite_type5 {
                     membershipPurchase(.advancedAddDevicesAllAccessPack12months_lite)
-                } else if platformsArray.count == 2 {
-                    membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_lite)
                 } else {
-                    membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_lite)
+                    let platforms = KMMemberInfo.shared.vip_platforms
+                    let platformsArray = platforms
+                        .components(separatedBy: ",")
+                        .map { $0.trimmingCharacters(in: .whitespaces) }
+                    if platformsArray.count == 1 {
+                        membershipPurchase(.advancedAddDevicesAllAccessPack12months_lite)
+                    } else if platformsArray.count == 2 {
+                        membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_lite)
+                    } else {
+                        membershipPurchase(.advancedAdd2DevicesAllAccessPack12months_lite)
+                    }
                 }
             }
         } else if state == .pro_Base {

+ 13 - 9
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -362,16 +362,20 @@ class KMProductCompareWC: NSWindowController {
         if model.state == .lite_Base {
             permanentPurchaseLabel.stringValue = model.getProductPrice(.allAccessPackPermanent_lite)
         } else if model.state == .lite_MacWindows {
-            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_lite)
-            } else if platformsArray.count == 2 {
-                advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAdd2DevicesAllAccessPack12months_lite)
+            if KMMemberInfo.shared.userScenarioType == .lite_type5 {
+                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_lite)
+                } else if platformsArray.count == 2 {
+                    advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAdd2DevicesAllAccessPack12months_lite)
+                } else {
+                    advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAdd2DevicesAllAccessPack12months_lite)
+                }
             } else {
-                advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAdd2DevicesAllAccessPack12months_lite)
+                advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.advancedAddDevicesAllAccessPack12months_lite)
             }
         } else {
             // model.state == .trial