Sfoglia il codice sorgente

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

dinglingui 1 settimana fa
parent
commit
a76bf66316

+ 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