Просмотр исходного кода

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

zenghong 1 неделя назад
Родитель
Сommit
437f70c9aa

+ 4 - 3
PDF Office/PDF Master/Class/Purchase/DMG/Verification/KMVerificationMessageViewController.m

@@ -233,9 +233,10 @@ NSPopoverDelegate>
                     }];
                 }
             }
-        } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type3 ||
-                   [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type11) {
-            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedString(@"Renew now", nil)];
+        } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type3 ) {
+            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedStringFromTable(@"Buy Now", @"MemberCenterLocalizable", nil)];
+        } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type11) {
+            self.button.title = [NSString stringWithFormat:@" %@ ",NSLocalizedStringFromTable(@"Renew now", @"MemberCenterLocalizable", nil)];
         } else if ([KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type5 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypeLite_type9 ||
                    [KMMemberInfo shared].userScenarioType == KMUserScenarioTypePro_type1 ||

+ 4 - 5
PDF Office/PDF Master/MemberCenter/Model/KMMemberInfo.swift

@@ -14,13 +14,13 @@ import Cocoa
     case lite_type3     // 免费版 无旧买断 试用过期或取消 (右上角导航栏按钮 - “登录领福利” + 开通会员)
     case lite_type4     // 免费版 无旧买断 可升级订阅 (右上角导航栏按钮 - “登录领福利”)
     case lite_type5     // 免费版 无旧买断 多平台永久 (右上角导航栏按钮 - “登录领福利” + 升级全平台)
-    case lite_type6     // 免费版 无旧买断 全平台高级年订阅 (右上角导航栏按钮 - “登录领福利”)
+    case lite_type6     // 免费版 无旧买断 全平台年订阅 (右上角导航栏按钮 - “登录领福利”)
     case lite_type7     // 免费版 无旧买断 会员到期 (右上角导航栏按钮 - “登录领福利” + 续费)
     case lite_type8     // 免费版 无旧买断 订阅中取消 (右上角导航栏按钮 - “登录领福利” + 续费)
     case lite_type9     // 免费版 有旧买断 免费未试用 (右上角导航栏按钮 - “登录领福利” + “升级至Pro”)
     case lite_type10    // 免费版 有旧买断 免费试用中 (右上角导航栏按钮 - “登录领福利”)
     case lite_type11    // 免费版 有旧买断 试用过期或取消 (右上角导航栏按钮 - “登录领福利” + 开通会员)
-    case lite_type12    // 免费版 有旧买断 全平台高级版年订阅 (右上角导航栏按钮 - “登录领福利”)
+    case lite_type12    // 免费版 有旧买断 订阅 (右上角导航栏按钮 - “登录领福利”)
     case lite_type13    // 免费版 有旧买断 订阅中取消 (右上角导航栏按钮 - “登录领福利” + 续费)
     case pro_type1      // 付费版 有旧PDF To Office (右上角导航栏按钮 - “登录领福利” + 升级(全平台))
     case pro_type2      // 付费版 有旧PDF To Office 全平台高级年订阅 (右上角导航栏按钮 - “登录领福利”)
@@ -262,10 +262,9 @@ import Cocoa
                     return .lite_type10
                 } else if KMMemberInfo.shared.vip_status == 4 {
                     return .lite_type11
-                }
-                if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_cycle == 4 && platformsArray.count == 4 {
+                } else if(KMMemberInfo.shared.vip_status == 1) {
                     return .lite_type12
-                } 
+                }
                 if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_payType == 0 {
                     return .lite_type13
                 }

+ 29 - 4
PDF Office/PDF Master/MemberCenter/ViewController/KMUserInfoViewController.swift

@@ -264,7 +264,12 @@ class KMUserInfoViewController: NSViewController {
             lockedLabel.stringValue = NSLocalizedString("Annual Plan", tableName: "MemberCenterLocalizable", comment: "")
             lockedImageView.image = NSImage(named: "UpgradeImage2")
             number1Label.stringValue = NSLocalizedString("", tableName: "MemberCenterLocalizable", comment: "")
-            number2Label.stringValue = NSLocalizedString("Advanced Version", tableName: "MemberCenterLocalizable", comment: "")
+            if KMMemberInfo.shared.vip_levels == "2" {
+                number2Label.stringValue = NSLocalizedString("Standard Version", tableName: "MemberCenterLocalizable", comment: "")
+            } else {
+                number2Label.stringValue = NSLocalizedString("Advanced Version", tableName: "MemberCenterLocalizable", comment: "")
+            }
+                
             number1ImageView.isHidden = false
             number1Label.isHidden = true
             centerBackgroud.image = NSImage(named: "ButtonBackgroundImage5")
@@ -346,10 +351,22 @@ class KMUserInfoViewController: NSViewController {
             number4_1Label.textColor = NSColor(hex: "42464D")
             number5Label.textColor = NSColor(hex: "42464D")
         } else if KMMemberInfo.shared.userScenarioType == .lite_type12 {
-            lockedLabel.stringValue = NSLocalizedString("Annual Plan", tableName: "MemberCenterLocalizable", comment: "")
+            if(KMMemberInfo.shared.vip_cycle == 1) {
+                lockedLabel.stringValue = NSLocalizedString("Monthly Plan", tableName: "MemberCenterLocalizable", comment: "")
+            } else if(KMMemberInfo.shared.vip_cycle == 2) {
+                lockedLabel.stringValue = NSLocalizedString("", tableName: "MemberCenterLocalizable", comment: "")
+            } else if(KMMemberInfo.shared.vip_cycle == 3) {
+                lockedLabel.stringValue = NSLocalizedString("6-Month Plan", tableName: "MemberCenterLocalizable", comment: "")
+            } else if(KMMemberInfo.shared.vip_cycle == 4) {
+                lockedLabel.stringValue = NSLocalizedString("Annual Plan", tableName: "MemberCenterLocalizable", comment: "")
+            }
             lockedImageView.image = NSImage(named: "UpgradeImage2")
             number1Label.stringValue = NSLocalizedString("", tableName: "MemberCenterLocalizable", comment: "")
-            number2Label.stringValue = NSLocalizedString("Advanced Version", tableName: "MemberCenterLocalizable", comment: "")
+            if(KMMemberInfo.shared.vip_levels == "2") {
+                number2Label.stringValue = NSLocalizedString("Standard Version", tableName: "MemberCenterLocalizable", comment: "")
+            } else if((KMMemberInfo.shared.vip_levels == "3")) {
+                number2Label.stringValue = NSLocalizedString("Advanced Version", tableName: "MemberCenterLocalizable", comment: "")
+            }
             number1ImageView.isHidden = false
             number1Label.isHidden = true
             centerBackgroud.image = NSImage(named: "ButtonBackgroundImage5")
@@ -359,7 +376,15 @@ class KMUserInfoViewController: NSViewController {
             number4_1Label.textColor = NSColor(named: "FFFFFF")
             number5Label.textColor = NSColor(named: "FFFFFF")
         } else if KMMemberInfo.shared.userScenarioType == .lite_type13 {
-            lockedLabel.stringValue = NSLocalizedString("Annual Plan", tableName: "MemberCenterLocalizable", comment: "")
+            if(KMMemberInfo.shared.vip_cycle == 1) {
+                lockedLabel.stringValue = NSLocalizedString("Monthly Plan", tableName: "MemberCenterLocalizable", comment: "")
+            } else if(KMMemberInfo.shared.vip_cycle == 2) {
+                lockedLabel.stringValue = NSLocalizedString("", tableName: "MemberCenterLocalizable", comment: "")
+            } else if(KMMemberInfo.shared.vip_cycle == 3) {
+                lockedLabel.stringValue = NSLocalizedString("6-Month Plan", tableName: "MemberCenterLocalizable", comment: "")
+            } else if(KMMemberInfo.shared.vip_cycle == 4) {
+                lockedLabel.stringValue = NSLocalizedString("Annual Plan", tableName: "MemberCenterLocalizable", comment: "")
+            }
             lockedImageView.image = NSImage(named: "UpgradeImage2")
             number1Label.stringValue = NSLocalizedString("", tableName: "MemberCenterLocalizable", comment: "")
             if KMMemberInfo.shared.vip_levels == "2" {

+ 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 {

+ 14 - 10
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -341,7 +341,7 @@ class KMProductCompareWC: NSWindowController {
         standardPlanPurchaseLbl.stringValue = NSLocalizedString("Subscribe", comment: "")
         if KMMemberInfo.shared.userScenarioType == .lite_type3 ||
             KMMemberInfo.shared.userScenarioType == .lite_type11 {
-            advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Renew now", comment: "")
+            advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Renew now",tableName: "MemberCenterLocalizable", comment: "")
         } else {
             advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Subscribe", comment: "")
         }
@@ -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