return
}
let responseStr = response.data.string ?? ""
-// if let code = dict["code"] as? Int,code == 50000{
-// YLprogressHUD.showAutoHiden(text: "当前账号已经退出登录"){
-// CacheManager.shared.user.logout()
-// }
-// }
+ if let code = dict["code"] as? Int,code == 50001,let msg = dict["msg"] as? String,msg == "账号未登录"{
+ CacheManager.shared.user.logout()
+ }
if let res = T.deserialize(from: dict){
completionHandler(res,responseStr)
return
return
}
completionHandler(T(),"请求失败".l10n)
-// if let code = dict["code"] as? Int,code == 50001{
-// YLprogressHUD.showAutoHiden(text: "当前账号已经退出登录"){
-// CacheManager.shared.user.logout()
-// }
-// }
+ if let code = dict["code"] as? Int,code == 50001,let msg = dict["msg"] as? String,msg == "账号未登录"{
+ CacheManager.shared.user.logout()
+ }
}
}