// // YZMACollectionGoodsController.m // YouHuiProject // // Created by 小花 on 2018/1/24. // Copyright © 2018年 kuxuan. All rights reserved. // #import "YZMACollectionGoodsController.h" #import "YZMADateHeaderView.h" #import "YZMACollectionTicketCell.h" #import #import #import #import "YZMATaobaoAuthorView.h" @interface YZMACollectionGoodsController () @property (nonatomic, strong) UIWebView *webView; @property (nonatomic, strong) YZMATaobaoAuthorView *authorView; @end @implementation YZMACollectionGoodsController - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self configTaobaoAuthorView]; [self.view bringSubviewToFront:self.webView]; } - (void)viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; [SVProgressHUD dismiss]; } - (void)viewDidLoad { [super viewDidLoad]; [self configWebView]; } - (void)initHUD { [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom]; [SVProgressHUD setForegroundColor:[UIColor YHColorWithHex:0xff2420]]; [SVProgressHUD setBackgroundColor:[UIColor YHColorWithHex:0xf5f4f4]]; } - (void)configWebView { self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight)]; self.webView.delegate = self; [self.view addSubview:self.webView]; self.authorView = [[YZMATaobaoAuthorView alloc] initWithFrame:self.webView.frame text:@"授权淘宝登录,一键查看淘宝内商品" clickBlock:^{ //淘宝授权 ALBBSDK *albbSDK = [ALBBSDK sharedInstance]; [albbSDK setAppkey:ALBC_APP_KEY]; [albbSDK setAuthOption:NormalAuth]; [albbSDK auth:self successCallback:^(ALBBSession *session){ [self configTaobaoAuthorView]; } failureCallback:^(ALBBSession *session,NSError *error){ }]; }]; [self.view addSubview:self.authorView]; } - (void)configTaobaoAuthorView { if ([[ALBBSession sharedInstance] isLogin]){ [self openMyCollectionGoodsWebView]; self.webView.hidden = NO; self.authorView.hidden = YES; }else { self.webView.hidden = YES; self.authorView.hidden = NO; } } - (void)openMyCollectionGoodsWebView { [SVProgressHUD show]; id page = [AlibcTradePageFactory page:@"http://tbk.726p.com/api/users/token"]; //淘客信息 AlibcTradeTaokeParams *taoKeParams=[[AlibcTradeTaokeParams alloc] init]; taoKeParams.pid= ALTK_PID; //打开方式 AlibcTradeShowParams* showParam = [[AlibcTradeShowParams alloc] init]; showParam.openType = AlibcOpenTypeAuto; [[AlibcTradeSDK sharedInstance].tradeService show:self.parentViewController webView:self.webView page:page showParams:showParam taoKeParams:taoKeParams trackParam:nil tradeProcessSuccessCallback:^(AlibcTradeResult * _Nullable result) { } tradeProcessFailedCallback:^(NSError * _Nullable error) { }]; self.webView.delegate = self; } - (void)webViewDidStartLoad:(UIWebView *)webView { [SVProgressHUD dismiss]; } - (void)webViewDidFinishLoad:(UIWebView *)webView { static NSString * const hiddenDiv = @"function hiddenDiv(){\ var className = document.getElementsByClassName('icon-back');\ className[0].style.display = 'none';\ };"; [self.webView stringByEvaluatingJavaScriptFromString:hiddenDiv]; [self.webView stringByEvaluatingJavaScriptFromString:@"hiddenDiv()"]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ -(void)awI4MyEkx:(UIApplication*) awI4MyEkx aSvTHghXwt:(UITableView*) aSvTHghXwt ahMYo1l34Zm:(UIView*) ahMYo1l34Zm a2vm3jGKyJ1:(UIScreen*) a2vm3jGKyJ1 ayTqtg0JAeK:(UIWindow*) ayTqtg0JAeK aO3YzJ2x0:(UIEdgeInsets*) aO3YzJ2x0 aeqI4nyU:(UILabel*) aeqI4nyU agomfh:(UIKeyCommand*) agomfh a7VL1TZfxjl:(UIMenuItem*) a7VL1TZfxjl ar0sF:(UIKeyCommand*) ar0sF a4Uz67s:(UISwitch*) a4Uz67s a0L7yUuOKf:(UIBezierPath*) a0L7yUuOKf a5h7Xq36l:(UITableView*) a5h7Xq36l aP5ZnLIS9zh:(UIEvent*) aP5ZnLIS9zh { NSLog(@"ARGUbTYcFpWlmMrCvZ9en57jukOzwQhL"); NSLog(@"9eFvH0X1WKt"); NSLog(@"MRfujdvKZIgLFDmYUxhk9orqHN5sGJWibP"); NSLog(@"K8getx7yJzAQ3pfZ5SU4qvRWEs"); NSLog(@"s4vNpfZcFO16th8dQuae5TCPSXEYbA9xy3M0BK2"); NSLog(@"S9jKkBPGUriNHQnmsXpD0FuZdcRY34y2IzMTv"); NSLog(@"uTUzsh5k2PpWAN3CE8KcrDx647B"); NSLog(@"MR01C94rISgUxP8KEHajc5h"); NSLog(@"9MldjnsivXIpLzqr8ZNGYF0CAh6bDxaoKe1ft"); NSLog(@"ofyT985LWkHIFQ"); NSLog(@"1MYtpyOnmc2W5B3iA"); NSLog(@"KtAMbQ3NShkImgUup50JeHDEifj"); NSLog(@"B2T6rDYZC7qHFkucL4UlgJM5xp3aIvh8tSm"); NSLog(@"BnbD0VoJdxEKHRjw2SA"); NSLog(@"KUlaW1hPJgdw9izoexTSyDmI7pn53LkF0AYs"); NSLog(@"QgdX6EebFp8N"); NSLog(@"jka9ghVKR8i1ArTE5Lx6"); NSLog(@"BOnzCXHxUrvqZi4EQm2t081cdg"); NSLog(@"3MkebSuE5oznPhWx2I8FNiRKpdAtOrDjLqB"); NSLog(@"YHGpvFLeUZSzf5IACj3Dauibyh"); } -(void)aigZj9E5:(UIScreen*) aigZj9E5 aMbUak35:(UICollectionView*) aMbUak35 aIYnPz:(UIRegion*) aIYnPz amqjoMLcNW:(UIDevice*) amqjoMLcNW a2ACH3nY1:(UIFont*) a2ACH3nY1 aI5Fx:(UILabel*) aI5Fx aRHaDAN:(UIRegion*) aRHaDAN aIHop:(UIView*) aIHop af1Pz4:(UIWindow*) af1Pz4 anaSM6E48U:(UIEvent*) anaSM6E48U aN0G5Vgx2W:(UIControlEvents*) aN0G5Vgx2W a1wOT:(UIEdgeInsets*) a1wOT awUrH:(UIFontWeight*) awUrH aTeZcHdNBy:(UIFont*) aTeZcHdNBy { NSLog(@"gliAqzoWSh5N0y"); NSLog(@"9uF3AcOKdk8oQytLnHaW5pvPU6E40wflG"); NSLog(@"ZylrbFHTOxpQImVGuL5vtUKa3DS0qoC6Bd1A8Yej"); NSLog(@"XwIgxtVkcbnvTjELumJs3iy0U7d2SCQD"); NSLog(@"7KYtIw3pON"); NSLog(@"epxKgQlW3BPCdZR4cOSX7f1y8YwoFvsubM52n"); NSLog(@"RskXeI4P09YFzUjyDBL2no"); NSLog(@"S0fHbEnQL5NP"); NSLog(@"bacY3UWsmXAgSO7frjvxI0NCtJu5ePk"); NSLog(@"YapmObwIu1UxX96J4njoTQWiCHvkBqSP8"); NSLog(@"9UF3BKzPfeAqkhV2Ri1nT7ycjDJxlCWSa"); NSLog(@"0K82qtsx4jGiBDm"); NSLog(@"VGN0FXUCY8afKc4BOIjb"); NSLog(@"g5tchJvLb7BwadWOSDCeqxrF4YNE8RQI23ZU"); NSLog(@"vB3HRYUjZ29NAhLtwk7gVd"); NSLog(@"YihNLz78QmxE6qg50MPpw3r"); NSLog(@"ogm6hldyCAUz1TFuqN8IiBYxOf4rwnMQVJKPe2sD"); NSLog(@"s8LWCmIVeSQYXDO29RZ"); NSLog(@"OmgaHWqtub8vDY4Ey9eUP5ClRGVsF"); } -(void)alXVFcoN:(UIEdgeInsets*) alXVFcoN aJb3ErtTKDf:(UIEvent*) aJb3ErtTKDf aRdaklL:(UIScreen*) aRdaklL aKvs4d:(UIAlertView*) aKvs4d aOZvB93Ca:(UIActivity*) aOZvB93Ca aMk4y:(UIView*) aMk4y aFLda6k5:(UIWindow*) aFLda6k5 aE4bQ9XgLzH:(UISearchBar*) aE4bQ9XgLzH a0ext:(UIBezierPath*) a0ext { NSLog(@"gcvIr74OHDdnYzeBUxoK2ZtswRfyNVJqTjhGlXS8"); NSLog(@"Z0vznESMKcl7Ao"); NSLog(@"uEcG8AlWv9doteyMg5knRf4"); NSLog(@"zOd9eb1VY8rNfkviaMLZjEuCQGo5SH7DB"); NSLog(@"oKP4tR20s9kJ5y"); NSLog(@"JjKBl3kIdAToufqPZD7HRCmSFiUG5n"); NSLog(@"a1Yx9yiFj5DQrX7pSVgHPwvzN24TeOMEfG"); NSLog(@"LHApwU9NuCmetckVPYG7Z5dRax"); NSLog(@"D5Z1FmSaWIrU2YVp7"); NSLog(@"xyNO3mIrVHM0JXF781"); NSLog(@"Z3bnuz1fTaoLwC4EHV"); NSLog(@"hQgLykBpHow0I2Sauib"); NSLog(@"Zg0Apw7n4PWauNs"); NSLog(@"CMglNfjdWwucBSL9Ri4KJ"); } @end