Bläddra i källkod

Merge branch 'develop_PDFReaderProNew' into develop_PDFReaderProNew_v4.7.0_AppStroe

tangchao 2 dagar sedan
förälder
incheckning
decebd6de6

+ 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"
+        }
     }
 }

+ 68 - 36
PDF Office/PDF Master/MemberCenter/ViewModel/KMProductModel.swift

@@ -176,7 +176,11 @@ class KMProductModel: ObservableObject {
                 if model.upgradePriceString?.isEmpty == false {
                     return String(format: "%.2f", Float(model.upgradePriceString ?? "0") ?? 0)
                 } else if model.displayPriceString?.isEmpty == false {
-                    return String(format: "%.2f", Float(model.displayPriceString ?? "0") ?? 0)
+                    if model.displayPriceString == "0.00" {
+                        return String(format: "%.2f", Float(model.priceString ?? "0") ?? 0)
+                    } else {
+                        return String(format: "%.2f", Float(model.displayPriceString ?? "0") ?? 0)
+                    }
                 } else {
                     return String(format: "%.2f", Float(model.priceString ?? "0") ?? 0)
                 }
@@ -194,7 +198,11 @@ class KMProductModel: ObservableObject {
                 if model.cnyUpgradePriceString?.isEmpty == false {
                     return String(format: "%.2f", Float(model.cnyUpgradePriceString ?? "0") ?? 0)
                 } else if model.displayCnyPriceString?.isEmpty == false {
-                    return String(format: "%.2f", Float(model.displayCnyPriceString ?? "0") ?? 0)
+                    if model.displayCnyPriceString == "0.00" {
+                        return String(format: "%.2f", Float(model.cnyPriceString ?? "0") ?? 0)
+                    } else {
+                        return String(format: "%.2f", Float(model.displayCnyPriceString ?? "0") ?? 0)
+                    }
                 } else {
                     return String(format: "%.2f", Float(model.cnyPriceString ?? "0") ?? 0)
                 }
@@ -515,38 +523,52 @@ class KMProductModel: ObservableObject {
                     return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMStandardAnnualSubscriptionCodeKey_DMG))
                 }
             } else if type == .pdfReaderProAdvanced_dmg {
-                if isBlackFive {
-                    if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
-                        return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG))
-                    } else {
-                        return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG))
-                    }
-                } else if KMMemberInfo.shared.canTrail && state == .trial {
-                    if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
-                        return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionTrailCodeKey_DMG))
+                if state == .dmg_Base {
+                    if isBlackFive {
+                        if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
+                            return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG))
+                        } else {
+                            return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG))
+                        }
                     } else {
-                        return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionTrailCodeKey_DMG))
+                        if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
+                            return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionCodeKey_DMG))
+                        } else {
+                            return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionCodeKey_DMG))
+                        }
                     }
                 } else {
-                    if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
-                        return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionCodeKey_DMG))
+                    if KMMemberInfo.shared.canTrail && state == .trial {
+                        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 {
-                        return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionCodeKey_DMG))
+                        if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
+                            return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedAnnualSubscriptionCodeKey_DMG))
+                        } else {
+                            return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedAnnualSubscriptionCodeKey_DMG))
+                        }
                     }
                 }
             } else if type == .pdfReaderProPermanent_dmg {
-                if isBlackFive {
-                    if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
-                        return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedPermanentBlackFiveCodeKey_DMG))
+                if state == .dmg_Base {
+                    if isBlackFive {
+                        if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
+                            return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedPermanentBlackFiveCodeKey_DMG))
+                        } else {
+                            return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedPermanentBlackFiveCodeKey_DMG))
+                        }
                     } else {
-                        return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedPermanentBlackFiveCodeKey_DMG))
+                        if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
+                            return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedPermanentCodeKey_DMG))
+                        } else {
+                            return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedPermanentCodeKey_DMG))
+                        }
                     }
                 } else {
-                    if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
-                        return String(format: "USD $%@", getDMGPrice(productCode: KMAdvancedPermanentCodeKey_DMG))
-                    } else {
-                        return String(format: "CNY ¥%@", getDMGCNYPrice(productCode: KMAdvancedPermanentCodeKey_DMG))
-                    }
+                    
                 }
             } else if type == .pdfReaderProAIAnnual_dmg {
                 if NSLocalizedString("USD", tableName: "MemberCenterLocalizable", comment: "") == "USD" {
@@ -674,8 +696,6 @@ class KMProductModel: ObservableObject {
             } else {
                 if isBlackFive {
                     code = KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG
-                } else if KMMemberInfo.shared.canTrail && state == .trial {
-                    code = KMAdvancedAnnualSubscriptionTrailCodeKey_DMG
                 } else {
                     code = KMAdvancedAnnualSubscriptionCodeKey_DMG
                 }
@@ -737,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 {
@@ -757,12 +783,18 @@ class KMProductModel: ObservableObject {
 #if VERSION_DMG
     // DMG
             var code = ""
-            if isBlackFive {
-                code = KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG
-            } else if KMMemberInfo.shared.canTrail && state == .trial {
-                code = KMAdvancedAnnualSubscriptionTrailCodeKey_DMG
+            if state == .dmg_Base {
+                if isBlackFive {
+                    code = KMAdvancedAnnualSubscriptionBlackFiveCodeKey_DMG
+                } else {
+                    code = KMAdvancedAnnualSubscriptionCodeKey_DMG
+                }
             } else {
-                code = KMAdvancedAnnualSubscriptionCodeKey_DMG
+                if KMMemberInfo.shared.canTrail && state == .trial {
+                    code = KMAdvancedAnnualSubscriptionTrailCodeKey_DMG
+                } else {
+                    code = KMAdvancedAnnualSubscriptionCodeKey_DMG
+                }
             }
             let embeddedWC = KMPurchaseEmbeddedWindowController.currentCode(code)
             embeddedWC.showWindow(nil)

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

BIN
PDF Office/PDF Master/Third Pard Library/Sparkle/PDFReaderPro_v4.6.4.dmg


+ 4 - 4
PDF Office/PDF Master/Third Pard Library/Sparkle/pdfreaderprocast.xml

@@ -6,7 +6,7 @@
     <description>Most recent changes with links to updates.</description>
     <language>en</language>
       <item>
-        <title>Version 4.7.0(202411200)</title>
+        <title>Version 4.7.0(202411202)</title>
         <description>
             <![CDATA[
             <ul>
@@ -17,9 +17,9 @@
             </ul>
             ]]>
         </description>
-        <pubDate>Wed, 20 Nov 2024 15:20:11 +0000</pubDate>
-        <enclosure url="https://www.pdfreaderpro.com/downloads/PDFReaderPro_v4.6.4.dmg" sparkle:version="202411200" length="389447473" type="application/octet-stream" sparkle:dsaSignature="MEYCIQC/0Xue526tNtT0fFRE6T3InGX0KBBlFYGZoSaS2OAxAwIhAKmzrRrD8xBn
-5TB+fBx8wIrEssvQn0z4fJ3LwVTswOlM"/>
+        <pubDate>Thu, 21 Nov 2024 15:20:11 +0000</pubDate>
+        <enclosure url="https://www.pdfreaderpro.com/downloads/PDFReaderPro_v4.7.0.dmg" sparkle:version="202411202" length="395946897" type="application/octet-stream" sparkle:dsaSignature="MEYCIQCjQ2wJ/ayoHRWM5cCgzmtSzQSjJ06lcCx/UzN/AIbt3wIhAL66WSzdVWCM
+b/2KGQ3P8zkGJbPcPh3tJsSKoe/SJ5Ri"/>
       </item>
   </channel>
 </rss>

+ 4 - 4
PDF Office/PDF Master/Third Pard Library/Sparkle/pdfreaderprocast_zh_Hans.xml

@@ -6,7 +6,7 @@
     <description>Most recent changes with links to updates.</description>
     <language>en</language>
       <item>
-        <title>Version 4.7.0(202411200)</title>
+        <title>Version 4.7.0(202411202)</title>
         <description>
             <![CDATA[
             <ul>
@@ -17,9 +17,9 @@
             </ul>
             ]]>
         </description>
-        <pubDate>Wed, 20 Nov 2024 15:20:11 +0000</pubDate>
-        <enclosure url="https://www.pdfreaderpro.com/downloads/PDFReaderPro_v4.6.4.dmg" sparkle:version="202411200" length="389447473" type="application/octet-stream" sparkle:dsaSignature="MEYCIQC/0Xue526tNtT0fFRE6T3InGX0KBBlFYGZoSaS2OAxAwIhAKmzrRrD8xBn
-5TB+fBx8wIrEssvQn0z4fJ3LwVTswOlM"/>
+        <pubDate>Thu, 21 Nov 2024 15:20:11 +0000</pubDate>
+        <enclosure url="https://www.pdfreaderpro.com/downloads/PDFReaderPro_v4.7.0.dmg" sparkle:version="202411202" length="395946897" type="application/octet-stream" sparkle:dsaSignature="MEYCIQCjQ2wJ/ayoHRWM5cCgzmtSzQSjJ06lcCx/UzN/AIbt3wIhAL66WSzdVWCM
+b/2KGQ3P8zkGJbPcPh3tJsSKoe/SJ5Ri"/>
       </item>
   </channel>
 </rss>

+ 4 - 4
PDF Office/PDF Master/Third Pard Library/Sparkle/pdfreaderprocast_zh_Hant.xml

@@ -6,7 +6,7 @@
     <description>Most recent changes with links to updates.</description>
     <language>en</language>
       <item>
-        <title>Version 4.7.0(202411200)</title>
+        <title>Version 4.7.0(202411202)</title>
         <description>
             <![CDATA[
             <ul>
@@ -17,9 +17,9 @@
             </ul>
             ]]>
         </description>
-        <pubDate>Wed, 20 Nov 2024 15:20:11 +0000</pubDate>
-        <enclosure url="https://www.pdfreaderpro.com/downloads/PDFReaderPro_v4.6.4.dmg" sparkle:version="202411200" length="389447473" type="application/octet-stream" sparkle:dsaSignature="MEYCIQC/0Xue526tNtT0fFRE6T3InGX0KBBlFYGZoSaS2OAxAwIhAKmzrRrD8xBn
-5TB+fBx8wIrEssvQn0z4fJ3LwVTswOlM"/>
+        <pubDate>Thu, 21 Nov 2024 15:20:11 +0000</pubDate>
+        <enclosure url="https://www.pdfreaderpro.com/downloads/PDFReaderPro_v4.7.0.dmg" sparkle:version="202411202" length="395946897" type="application/octet-stream" sparkle:dsaSignature="MEYCIQCjQ2wJ/ayoHRWM5cCgzmtSzQSjJ06lcCx/UzN/AIbt3wIhAL66WSzdVWCM
+b/2KGQ3P8zkGJbPcPh3tJsSKoe/SJ5Ri"/>
       </item>
   </channel>
 </rss>