Forráskód Böngészése

Merge branch 'develop_PDFReaderPro_V4.7.0' of git.kdan.cc:Mac_PDF/PDF_Office into develop_PDFReaderPro_V4.7.0

dinglingui 3 hónapja
szülő
commit
63dff2c58a

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

@@ -641,4 +641,48 @@ import Cocoa
         }
         return false
     }
+    
+    func clearMemberInfoCache() -> Void {
+        currentLogoutStatus = .null
+        _refresh_token = ""
+        _access_token = ""
+        _token_type = ""
+        _expires_in = ""
+        _scope = ""
+        userID = ""
+        userEmail = ""
+        fullName = ""
+        _activeVips = []
+        _activeAis = []
+        vip_id = ""
+        vip_userId = ""
+        vip_status = 0
+        vip_endDate = ""
+        vip_payType = 0
+        vip_productName = ""
+        vip_levels = ""
+        vip_platforms = ""
+        vip_point = 0
+        vip_maxDeviceNum = 0
+        vip_paymentModel = ""
+        vip_isAi = ""
+        vip_cycle = 0
+        ai_id = ""
+        ai_userId = ""
+        ai_status = 0
+        ai_endDate = ""
+        ai_payType = 0
+        ai_productName = ""
+        ai_levels = ""
+        ai_platforms = ""
+        ai_point = 0
+        ai_maxDeviceNum = 0
+        ai_paymentModel = ""
+        ai_isAi = ""
+        ai_cycle = 0
+        aiPoint = 0
+        validFlag = ""
+        isHaveAIDiscount = ""
+        canTrail = false
+    }
 }

+ 1 - 0
PDF Office/PDF Master/MemberCenter/ViewModel/KMUserInfoVCModel.swift

@@ -184,6 +184,7 @@ class KMUserInfoVCModel: ObservableObject {
             if success {
                 let islogout: Bool = resultDict.result!
                 if islogout {
+                    KMMemberInfo.shared.clearMemberInfoCache()
                     KMMemberInfo.shared.isLogin = false
                     KMMemberInfo.shared.access_token = ""
                     NotificationCenter.default.post(name: NSNotification.Name(rawValue: "MemberCenterLogoutSuccess"), object: nil)

+ 1 - 1
PDF Office/PDF Master/MemberCenter/WindowsController/KMFreeGetAIWC.swift

@@ -97,7 +97,7 @@ class KMFreeGetAIWC: NSWindowController {
 #endif
 #else
     // AppStore 付费版
-            
+            IAPProductsManager.default().makeSubProduct(IAPProductsManager.default().aiAllAccessPack12month_pro, discount: IAPProductsManager.default().isCancelAutoRenew())
 #endif
 
         }