|
@@ -12,12 +12,12 @@ import Cocoa
|
|
|
case lite_type1 = 0 // 免费版 无旧买断 免费未试用 (右上角导航栏按钮 - “登录领福利” + “试用”)
|
|
|
case lite_type2 // 免费版 无旧买断 免费试用中 (右上角导航栏按钮 - “登录领福利”)
|
|
|
case lite_type3 // 免费版 无旧买断 试用过期或取消 (右上角导航栏按钮 - “登录领福利” + 开通会员)
|
|
|
- case lite_type4 // 免费版 无旧买断 可升级订阅 (右上角导航栏按钮 - “登录领福利” + 升级)
|
|
|
+ case lite_type4 // 免费版 无旧买断 可升级订阅 (右上角导航栏按钮 - “登录领福利”)
|
|
|
case lite_type5 // 免费版 无旧买断 多平台永久 (右上角导航栏按钮 - “登录领福利” + 升级全平台)
|
|
|
case lite_type6 // 免费版 无旧买断 全平台高级年订阅 (右上角导航栏按钮 - “登录领福利”)
|
|
|
case lite_type7 // 免费版 无旧买断 会员到期 (右上角导航栏按钮 - “登录领福利” + 续费)
|
|
|
case lite_type8 // 免费版 无旧买断 订阅中取消 (右上角导航栏按钮 - “登录领福利” + 续费)
|
|
|
- case lite_type9 // 免费版 有旧买断 免费未试用 (右上角导航栏按钮 - “登录领福利” + “升级至Pro” + 立即试用)
|
|
|
+ case lite_type9 // 免费版 有旧买断 免费未试用 (右上角导航栏按钮 - “登录领福利” + “升级至Pro”)
|
|
|
case lite_type10 // 免费版 有旧买断 免费试用中 (右上角导航栏按钮 - “登录领福利”)
|
|
|
case lite_type11 // 免费版 有旧买断 试用过期或取消 (右上角导航栏按钮 - “登录领福利” + 开通会员)
|
|
|
case lite_type12 // 免费版 有旧买断 全平台高级版年订阅 (右上角导航栏按钮 - “登录领福利”)
|
|
@@ -248,7 +248,9 @@ import Cocoa
|
|
|
}
|
|
|
#else
|
|
|
// AppStore 免费版本
|
|
|
- if IAPProductsManager.default().allAccessPackPermanent_lite.isSubscribed == true || IAPProductsManager.default().isAvailableAllFunction() == true {
|
|
|
+ if IAPProductsManager.default().allAccessPack6months_lite.isSubscribed == true || IAPProductsManager.default().allAccessPackNew6months_lite.isSubscribed == true ||
|
|
|
+ IAPProductsManager.default().allAccessPack12months_lite.isSubscribed == true ||
|
|
|
+ IAPProductsManager.default().allAccessProduct.isSubscribed == true {
|
|
|
// 有旧买断
|
|
|
if KMMemberInfo.shared.canTrail {
|
|
|
return .lite_type9
|
|
@@ -264,6 +266,7 @@ import Cocoa
|
|
|
if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_payType == 0 {
|
|
|
return .lite_type13
|
|
|
}
|
|
|
+ return .lite_type9
|
|
|
} else {
|
|
|
// 无旧买断
|
|
|
if KMMemberInfo.shared.canTrail && KMMemberInfo.shared.vip_levels == "1" {
|
|
@@ -319,11 +322,13 @@ import Cocoa
|
|
|
#if VERSION_FREE
|
|
|
#if VERSION_DMG
|
|
|
// DMG
|
|
|
-
|
|
|
+ if KMMemberInfo.shared.isLogin {
|
|
|
+
|
|
|
+ }
|
|
|
#else
|
|
|
// AppStore 免费版本
|
|
|
if KMMemberInfo.shared.isLogin {
|
|
|
- if IAPProductsManager.default().allAccessPackPermanent_lite.isSubscribed == true || IAPProductsManager.default().isAvailableAllFunction() == true {
|
|
|
+ if IAPProductsManager.default().isAvailableAllFunction() == true {
|
|
|
return true
|
|
|
} else {
|
|
|
if userScenarioType == .lite_type2 || userScenarioType == .lite_type4 || userScenarioType == .lite_type5 || userScenarioType == .lite_type6 {
|
|
@@ -348,21 +353,57 @@ import Cocoa
|
|
|
|
|
|
// 是否允许使用转档
|
|
|
var isPermitConvert: Bool {
|
|
|
- if KMMemberInfo.shared.isLogin {
|
|
|
- if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
- return true
|
|
|
- } else {
|
|
|
- if userScenarioType == .lite_type4 || userScenarioType == .lite_type5 || userScenarioType == .lite_type6 || userScenarioType == .lite_type12 {
|
|
|
+ get {
|
|
|
+#if VERSION_FREE
|
|
|
+#if VERSION_DMG
|
|
|
+ // DMG
|
|
|
+ if KMMemberInfo.shared.isLogin {
|
|
|
+
|
|
|
+ }
|
|
|
+#else
|
|
|
+ // AppStore 免费版本
|
|
|
+ if KMMemberInfo.shared.isLogin {
|
|
|
+ if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
return true
|
|
|
} else {
|
|
|
- return false
|
|
|
+ if userScenarioType == .lite_type4 ||
|
|
|
+ userScenarioType == .lite_type5 ||
|
|
|
+ userScenarioType == .lite_type6 ||
|
|
|
+ userScenarioType == .lite_type12 {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
}
|
|
|
+ } else {
|
|
|
+ if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
}
|
|
|
- } else {
|
|
|
- if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
- return true
|
|
|
+#endif
|
|
|
+#else
|
|
|
+ // AppStore 付费版
|
|
|
+ if KMMemberInfo.shared.isLogin {
|
|
|
+ if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ if userScenarioType == .pro_type1 ||
|
|
|
+ userScenarioType == .pro_type2 ||
|
|
|
+ userScenarioType == .pro_type4 ||
|
|
|
+ userScenarioType == .pro_type5 {
|
|
|
+ return true
|
|
|
+ } else {
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if IAPProductsManager.default().isAvailableAdvancedPDFToOffice() {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ return false
|
|
|
}
|
|
|
- return false
|
|
|
+#endif
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -425,26 +466,46 @@ import Cocoa
|
|
|
.components(separatedBy: ",")
|
|
|
.map { $0.trimmingCharacters(in: .whitespaces) }
|
|
|
if KMMemberInfo.shared.isLogin {
|
|
|
- if userScenarioType == .lite_type1 {
|
|
|
+ if userScenarioType == .lite_type1 ||
|
|
|
+ userScenarioType == .lite_type3 ||
|
|
|
+ userScenarioType == .lite_type11 ||
|
|
|
+ userScenarioType == .lite_type4 ||
|
|
|
+ userScenarioType == .lite_type5 ||
|
|
|
+ userScenarioType == .lite_type9 ||
|
|
|
+ userScenarioType == .lite_type13 ||
|
|
|
+ userScenarioType == .lite_type7 ||
|
|
|
+ userScenarioType == .lite_type8 {
|
|
|
KMProductCompareWC.shared.orientation = true
|
|
|
- KMProductCompareWC.shared.orientationType = .trial
|
|
|
+ if userScenarioType == .lite_type1 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .trial
|
|
|
+ } else if userScenarioType == .lite_type3 || userScenarioType == .lite_type11 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
+ } else if userScenarioType == .lite_type4 || userScenarioType == .lite_type5 || userScenarioType == .lite_type9 || userScenarioType == .lite_type13 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
+ } else if userScenarioType == .lite_type7 || userScenarioType == .lite_type8 {
|
|
|
+ if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_cycle == 4 && platformsArray.count == 4 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
+ } else {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
+ }
|
|
|
+ }
|
|
|
KMProductCompareWC.shared.showWindow(nil)
|
|
|
- } else if userScenarioType == .lite_type2 || userScenarioType == .lite_type6 || userScenarioType == .lite_type10 || userScenarioType == .lite_type12 {
|
|
|
+ } else if userScenarioType == .lite_type2 ||
|
|
|
+ userScenarioType == .lite_type6 ||
|
|
|
+ userScenarioType == .lite_type10 ||
|
|
|
+ userScenarioType == .lite_type12 ||
|
|
|
+ userScenarioType == .pro_type2 ||
|
|
|
+ userScenarioType == .pro_type5 {
|
|
|
|
|
|
- } else if userScenarioType == .lite_type3 || userScenarioType == .lite_type11 {
|
|
|
- KMProductCompareWC.shared.orientation = true
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
- KMProductCompareWC.shared.showWindow(nil)
|
|
|
- } else if userScenarioType == .lite_type4 || userScenarioType == .lite_type5 || userScenarioType == .lite_type9 || userScenarioType == .lite_type13 {
|
|
|
+ } else if userScenarioType == .pro_type1 ||
|
|
|
+ userScenarioType == .pro_type3 ||
|
|
|
+ userScenarioType == .pro_type4 {
|
|
|
KMProductCompareWC.shared.orientation = true
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
- KMProductCompareWC.shared.showWindow(nil)
|
|
|
- } else if userScenarioType == .lite_type7 || userScenarioType == .lite_type8 {
|
|
|
- KMProductCompareWC.shared.orientation = true
|
|
|
- if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_cycle == 4 && platformsArray.count == 4 {
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
- } else {
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
+ if userScenarioType == .pro_type1 ||
|
|
|
+ userScenarioType == .pro_type4 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .pro_Advanced
|
|
|
+ } else if userScenarioType == .pro_type3 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .pro_Base
|
|
|
}
|
|
|
KMProductCompareWC.shared.showWindow(nil)
|
|
|
}
|
|
@@ -452,26 +513,46 @@ import Cocoa
|
|
|
KMLoginWindowsController.shared.openWindow() { [weak self] success in
|
|
|
guard let self = self else { return }
|
|
|
if success {
|
|
|
- if self.userScenarioType == .lite_type1 {
|
|
|
+ if self.userScenarioType == .lite_type1 ||
|
|
|
+ self.userScenarioType == .lite_type3 ||
|
|
|
+ self.userScenarioType == .lite_type11 ||
|
|
|
+ self.userScenarioType == .lite_type4 ||
|
|
|
+ self.userScenarioType == .lite_type5 ||
|
|
|
+ self.userScenarioType == .lite_type9 ||
|
|
|
+ self.userScenarioType == .lite_type13 ||
|
|
|
+ self.userScenarioType == .lite_type7 ||
|
|
|
+ self.userScenarioType == .lite_type8 {
|
|
|
KMProductCompareWC.shared.orientation = true
|
|
|
- KMProductCompareWC.shared.orientationType = .trial
|
|
|
+ if self.userScenarioType == .lite_type1 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .trial
|
|
|
+ } else if self.userScenarioType == .lite_type3 || self.userScenarioType == .lite_type11 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
+ } else if self.userScenarioType == .lite_type4 || self.userScenarioType == .lite_type5 || self.userScenarioType == .lite_type9 || self.userScenarioType == .lite_type13 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
+ } else if self.userScenarioType == .lite_type7 || self.userScenarioType == .lite_type8 {
|
|
|
+ if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_cycle == 4 && platformsArray.count == 4 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
+ } else {
|
|
|
+ KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
+ }
|
|
|
+ }
|
|
|
KMProductCompareWC.shared.showWindow(nil)
|
|
|
- } else if self.userScenarioType == .lite_type2 || self.userScenarioType == .lite_type6 || self.userScenarioType == .lite_type10 || self.userScenarioType == .lite_type12 {
|
|
|
+ } else if self.userScenarioType == .lite_type2 ||
|
|
|
+ self.userScenarioType == .lite_type6 ||
|
|
|
+ self.userScenarioType == .lite_type10 ||
|
|
|
+ self.userScenarioType == .lite_type12 ||
|
|
|
+ userScenarioType == .pro_type2 ||
|
|
|
+ userScenarioType == .pro_type5{
|
|
|
|
|
|
- } else if self.userScenarioType == .lite_type3 || self.userScenarioType == .lite_type11 {
|
|
|
+ } else if userScenarioType == .pro_type1 ||
|
|
|
+ userScenarioType == .pro_type3 ||
|
|
|
+ userScenarioType == .pro_type4 {
|
|
|
KMProductCompareWC.shared.orientation = true
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
- KMProductCompareWC.shared.showWindow(nil)
|
|
|
- } else if self.userScenarioType == .lite_type4 || self.userScenarioType == .lite_type5 || self.userScenarioType == .lite_type9 || self.userScenarioType == .lite_type13 {
|
|
|
- KMProductCompareWC.shared.orientation = true
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
- KMProductCompareWC.shared.showWindow(nil)
|
|
|
- } else if self.userScenarioType == .lite_type7 || self.userScenarioType == .lite_type8 {
|
|
|
- KMProductCompareWC.shared.orientation = true
|
|
|
- if KMMemberInfo.shared.vip_paymentModel == "1" && KMMemberInfo.shared.vip_cycle == 4 && platformsArray.count == 4 {
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_MacWindows
|
|
|
- } else {
|
|
|
- KMProductCompareWC.shared.orientationType = .lite_Base
|
|
|
+ if userScenarioType == .pro_type1 ||
|
|
|
+ userScenarioType == .pro_type4 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .pro_Advanced
|
|
|
+ } else if userScenarioType == .pro_type3 {
|
|
|
+ KMProductCompareWC.shared.orientationType = .pro_Base
|
|
|
}
|
|
|
KMProductCompareWC.shared.showWindow(nil)
|
|
|
}
|