Ver Fonte

【会员系统】比较表补充年订阅试用产品

wanjun há 3 semanas atrás
pai
commit
b0efc7732a

+ 1 - 0
PDF Office/PDF Master/Class/Purchase/IAPProductsManager.h

@@ -17,6 +17,7 @@ extern NSString * const KMIAPSubscriptionLoadedNotification;
 
 extern NSString * const KMStandardAnnualSubscriptionCodeKey_DMG; // "productName": "PDF Reader Pro Standard - Annual Plan"
 extern NSString * const KMAdvancedAnnualSubscriptionCodeKey_DMG; //"productName": "PDF Reader Pro Advanced - Annual Plan"
+extern NSString * const KMAdvancedAnnualSubscriptionTrailCodeKey_DMG; //"productName": "PDF Reader Pro Advanced - Annual Plan"
 extern NSString * const KMAdvancedPermanentCodeKey_DMG; // "productName": "PDF Reader Pro Permanent"
 
 extern NSString * const KMAISubscriptionYearTrailCodeKey_DMG;               // 0元试用AI 年订阅 产品Code

+ 1 - 0
PDF Office/PDF Master/Class/Purchase/IAPProductsManager.m

@@ -50,6 +50,7 @@ NSString * const KMAdvancedAdd2DevicesAllAccessPack12Months_Pro = @"com.pdfreade
 
 NSString * const KMStandardAnnualSubscriptionCodeKey_DMG                    = @"standard-annual-subscription"; // "productName": "PDF Reader Pro Standard - Annual Plan"
 NSString * const KMAdvancedAnnualSubscriptionCodeKey_DMG                    = @"advanced-annual-subscription"; //"productName": "PDF Reader Pro Advanced - Annual Plan"
+NSString * const KMAdvancedAnnualSubscriptionTrailCodeKey_DMG               = @"advanced-annual-subscription-trail"; //"productName": "PDF Reader Pro Advanced - Annual Plan"
 NSString * const KMAdvancedPermanentCodeKey_DMG                             = @"advanced-permanent"; // "productName": "PDF Reader Pro Permanent"
 
 NSString * const KMAISubscriptionYearTrailCodeKey_DMG                       = @"ai-subscription-year-trail"; // 0元试用AI 年订阅 产品Code

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

@@ -441,6 +441,12 @@ class KMProductModel: ObservableObject {
                     } else {
                         return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG))
                     }
+                } else if KMMemberInfo.shared.canTrail {
+                    if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
+                        return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionTrailCodeKey_DMG))
+                    } else {
+                        return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionTrailCodeKey_DMG))
+                    }
                 } else {
                     if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
                         return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionCodeKey_DMG))
@@ -588,6 +594,8 @@ class KMProductModel: ObservableObject {
             } else {
                 if isBlackFive {
                     code = KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG
+                } else if KMMemberInfo.shared.canTrail {
+                    code = KMAdvancedAnnualSubscriptionTrailCodeKey_DMG
                 } else {
                     code = KMAdvancedAnnualSubscriptionCodeKey_DMG
                 }

+ 3 - 0
PDF Office/PDF Master/MemberCenter/WindowsController/KMProductCompareWC.swift

@@ -366,6 +366,9 @@ class KMProductCompareWC: NSWindowController {
 #if VERSION_FREE
 #if VERSION_DMG
     // DMG
+        if KMMemberInfo.shared.canTrail {
+            advancedPlanPurchaseLbl.stringValue = NSLocalizedString("Free Trial", comment: "")
+        }
         if model.state == .dmg_Base {
             standardPlanPurchaseLabel.stringValue = model.getProductPrice(.pdfReaderProStandard_dmg)
             advancedPlanPurchaseLabel.stringValue = model.getProductPrice(.pdfReaderProAdvanced_dmg)