|
@@ -851,16 +851,32 @@ import Cocoa
|
|
|
|
|
|
// 是否允许使用AI
|
|
|
var isPermitAI: Bool {
|
|
|
- if KMMemberInfo.shared.isLogin {
|
|
|
- if KMMemberInfo.shared.aiPoint > 0 {
|
|
|
- return true
|
|
|
- }
|
|
|
- if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
|
|
|
- return true
|
|
|
- }
|
|
|
+ var isSubscribed = false
|
|
|
+#if VERSION_FREE
|
|
|
+#if VERSION_DMG
|
|
|
+ // DMG
|
|
|
+#else
|
|
|
+ // AppStore 免费版本
|
|
|
+ isSubscribed = IAPProductsManager.default().aiAllAccessPack1month_lite.isSubscribed
|
|
|
+#endif
|
|
|
+#else
|
|
|
+ // AppStore 付费版
|
|
|
+ isSubscribed = IAPProductsManager.default().aiAllAccessPack1month_pro.isSubscribed
|
|
|
+#endif
|
|
|
+ if isSubscribed {
|
|
|
+ return true
|
|
|
} else {
|
|
|
- if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
|
|
|
- return true
|
|
|
+ if KMMemberInfo.shared.isLogin {
|
|
|
+ if KMMemberInfo.shared.aiPoint > 0 {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
|
|
|
+ return true
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return false
|