Ver código fonte

【会员系统】AI功能处理

niehaoyu 3 dias atrás
pai
commit
4cd938d0bc

+ 1 - 1
PDF Office/PDF Master/Class/AIInfo/KMAIRequestServerManager.swift

@@ -953,7 +953,7 @@ class KMAIRequestServer {
                     }
                 } else {
                     if (completion != nil) {
-                        completion!(nil, nil, error as? NSError);
+                        completion!(nil, result, error as? NSError);
                     }
                 }
             } else {

+ 0 - 27
PDF Office/PDF Master/MemberCenter/Model/KMMemberInfo.swift

@@ -851,30 +851,6 @@ import Cocoa
     
     // 是否允许使用AI
     var isPermitAI: Bool {
-#if VERSION_FREE
-#if VERSION_DMG
-    // DMG
-  
-#else
-    // AppStore 免费版本
-        if KMMemberInfo.shared.isLogin {
-            if KMMemberInfo.shared.aiPoint > 0 {
-                return true
-            }
-            if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
-                return true
-            } else {
-                return false
-            }
-        } else {
-            if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
-                return true
-            }
-        }
-        return false
-#endif
-#else
-    // AppStore 付费版
         if KMMemberInfo.shared.isLogin {
             if KMMemberInfo.shared.aiPoint > 0 {
                 return true
@@ -882,14 +858,11 @@ import Cocoa
             if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
                 return true
             }
-            return false
         } else {
             if AIInfoManager.default().aiInfo.totalToken - AIInfoManager.default().aiInfo.usedTimes > 0 {
                 return true
             }
-            return false
         }
-#endif
         return false
     }