Browse Source

【会员系统 】AI使用功能崩溃问题

dinglingui 6 days ago
parent
commit
a76bf66316
1 changed files with 1 additions and 1 deletions
  1. 1 1
      PDF Office/PDF Master/Class/AIInfo/KMAIRequestServerManager.swift

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

@@ -879,7 +879,7 @@ class KMAIRequestServer {
            }
             let jsonObject = try? JSONSerialization.jsonObject(with: data, options: []) as? NSDictionary ?? [:]
             if jsonObject != nil {
-                let codeStr: String = jsonObject!["code"] as! String
+                let codeStr: String = jsonObject!["code"] as? String ?? ""
                 var code: Int = 0
                 if let numCode = Int(codeStr) {
                     code = numCode