Merge pull request #31 from iojh/dev

sendAuthRequest接口修改为调用[WXApi sendAuthReq] 否则app store审核不过
This commit is contained in:
snowfox 2020-03-12 10:32:14 +08:00 committed by GitHub
commit dfb20cc249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,7 +173,8 @@ RCT_EXPORT_METHOD(sendAuthRequest:(NSString *)scope
callback(@[success ? [NSNull null] : INVOKE_FAILED]);
return;
};
[WXApi sendReq:req completion:completion];
UIViewController *rootViewController = [UIApplication sharedApplication].keyWindow.rootViewController;
[WXApi sendAuthReq:req viewController:rootViewController delegate:self completion:completion];
}
RCT_EXPORT_METHOD(sendSuccessResponse:(RCTResponseSenderBlock)callback)