// // LDTaobaoAuthorTool.m // YouHuiProject // // Created by 小花 on 2019/1/30. // Copyright © 2019年 kuxuan. All rights reserved. // #import "LDTaobaoAuthorTool.h" #import "LDTaobaoWebAuthorController.h" #import #import @implementation LDTaobaoAuthorTool + (void)taobaoAuthorManager:(NSString *)url type:(NSString *)authorType currentVc:(UIViewController *)Vc { if (![[ALBBSession sharedInstance] isLogin]) { //淘宝未授权 ALBBSDK *albbSDK = [ALBBSDK sharedInstance]; [albbSDK setAppkey:ALBC_APP_KEY]; [albbSDK setAuthOption:NormalAuth]; [albbSDK auth:Vc successCallback:^(ALBBSession *session){ LDTaobaoWebAuthorController *webAutuhor = [[LDTaobaoWebAuthorController alloc] init]; webAutuhor.url = url; webAutuhor.authorType = authorType; [Vc.navigationController pushViewController:webAutuhor animated:YES]; } failureCallback:^(ALBBSession *session,NSError *error){ NSLog(@"session == %@,error == %@",session,error); }]; }else { LDTaobaoWebAuthorController *webAutuhor = [[LDTaobaoWebAuthorController alloc] init]; webAutuhor.url = url; webAutuhor.authorType = authorType; [Vc.navigationController pushViewController:webAutuhor animated:YES]; } } @end