sendAuthRequest接口修改为调用[WXApi sendAuthReq] 否则app store审核不过

This commit is contained in:
Jiang Hui 2020-03-09 09:50:09 +08:00
parent b1d5a9d0f2
commit b4c4ec15ba

View File

@ -173,7 +173,8 @@ RCT_EXPORT_METHOD(sendAuthRequest:(NSString *)scope
callback(@[success ? [NSNull null] : INVOKE_FAILED]); callback(@[success ? [NSNull null] : INVOKE_FAILED]);
return; 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) RCT_EXPORT_METHOD(sendSuccessResponse:(RCTResponseSenderBlock)callback)