Commit 265d8164 authored by 汪洋's avatar 汪洋

整理代码

parent 8719ca28
...@@ -120,7 +120,7 @@ typedef NS_ENUM(NSUInteger, GMShareContentType){ ...@@ -120,7 +120,7 @@ typedef NS_ENUM(NSUInteger, GMShareContentType){
#ifdef APPSTORE #ifdef APPSTORE
#define WEIXIN_APPID @"wx4326da3ad2429149" #define WEIXIN_APPID @"wx4326da3ad2429149"
#define WEIXIN_SECRET @"971147c78f55c3a657394a7a31f4266a #define WEIXIN_SECRET @"971147c78f55c3a657394a7a31f4266a"
#else #else
#define WEIXIN_APPID @"wx403cd28c142c7d87" #define WEIXIN_APPID @"wx403cd28c142c7d87"
#define WEIXIN_SECRET @"035af39ad74bbc01b7517a291c836827" #define WEIXIN_SECRET @"035af39ad74bbc01b7517a291c836827"
......
...@@ -62,9 +62,9 @@ ...@@ -62,9 +62,9 @@
SendAuthReq* req = [[SendAuthReq alloc ] init]; SendAuthReq* req = [[SendAuthReq alloc ] init];
req.scope = @"snsapi_userinfo" ; req.scope = @"snsapi_userinfo" ;
req.state = @"Gengmei" ; req.state = @"Gengmei" ;
//第三方向微信终端发送一个SendAuthReq消息结构 // 第三方向微信终端发送一个SendAuthReq消息结构
#warning TODOl待验证
[WXApi sendReq:req completion:^(BOOL success) { [WXApi sendReq:req completion:^(BOOL success) {
}]; }];
} }
} }
......
...@@ -227,7 +227,11 @@ ...@@ -227,7 +227,11 @@
if (error == nil) { if (error == nil) {
NSDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil]; NSDictionary *responseObject = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
NSString *refreshToken = responseObject[@"refresh_token"]; NSString *refreshToken = responseObject[@"refresh_token"];
if (refreshToken) {
[self refreshAccessTokenByRefreshToken:refreshToken]; [self refreshAccessTokenByRefreshToken:refreshToken];
} else {
assert("获取accessToken出错");
}
} else { } else {
NSLog(@"获取accessToken出错"); NSLog(@"获取accessToken出错");
} }
......
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