소스 검색

【会员】用户被挤下线流程优化

lizhe 1 년 전
부모
커밋
adda062e06

+ 8 - 6
PDF Office/PDF Master/Class/KMLightMember/Controller/AccountInfo/KMAccountInfoWindowController.swift

@@ -197,13 +197,15 @@ class KMAccountInfoWindowController: NSWindowController {
                 KMLightMemberManager.manager.reloadUserInfo()
             } else {
                 if error?.code == 304 {
-                    if self?.window != nil {
-                        accountInfoMainWindow?.endSheet((self?.window)!)
+                    DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + 0.3) {
+                        if self?.window != nil {
+                            accountInfoMainWindow?.endSheet((self?.window)!)
+                        }
+                        self?.window?.close()
+                        KMLightMemberManager.manager.logOut()
+                        accountInfoController = nil
+                        accountInfoMainWindow = nil
                     }
-                    self?.window?.close()
-                    KMLightMemberManager.manager.logOut()
-                    accountInfoController = nil
-                    accountInfoMainWindow = nil
                 }
             }
         }

+ 2 - 0
PDF Office/PDF Master/Class/KMResourceDownload/KMResourceDownloadManager.swift

@@ -55,6 +55,8 @@ class KMResourceDownloadManager: NSObject {
     func documentAIBundleExists() -> Bool {
         let filePath: String = kResourcePath! + "/DocumentAI.bundle"
         let fileManager = FileManager.default
+        debugPrint(filePath)
+        debugPrint(FileManager.default.temporaryDirectory.appendingPathComponent("XMLResources"))
         let exists = fileManager.fileExists(atPath: filePath as String)
         if exists {
             self.checkDocumentAIVersion()