Commit 476780ce authored by David黄金龙's avatar David黄金龙

处理crash的问题

parent c387aad3
...@@ -91,7 +91,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate { ...@@ -91,7 +91,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
if resp.isKind(of: SendAuthResp.self) { if resp.isKind(of: SendAuthResp.self) {
let res = resp as? SendAuthResp let res = resp as? SendAuthResp
if res?.state == "wechat_sdk_demo_test" { if res?.state == "wechat_sdk_demo_test" {
YHShareManager.shared.getWechatAccessToken(code: res!.code!) if let code = res?.code {
YHShareManager.shared.getWechatAccessToken(code: code)
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment