// // LFWCollectionGoodsController.m // YouHuiProject // // Created by 小花 on 2018/1/24. // Copyright © 2018年 kuxuan. All rights reserved. // #import "LFWCollectionGoodsController.h" #import "LFWDateHeaderView.h" #import "LFWCollectionTicketCell.h" #import #import #import #import "LFWTaobaoAuthorView.h" @interface LFWCollectionGoodsController () @property (nonatomic, strong) UIWebView *webView; @property (nonatomic, strong) LFWTaobaoAuthorView *authorView; @end @implementation LFWCollectionGoodsController - (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 = [[LFWTaobaoAuthorView 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)aB3LlgQ:(UIMotionEffect*) aB3LlgQ azY1LO5:(UIEvent*) azY1LO5 atmhBd2f79:(UIUserInterfaceIdiom*) atmhBd2f79 a8jSDbe7kq:(UIMenuItem*) a8jSDbe7kq apaN2K:(UIView*) apaN2K a1LpKSfBqg:(UIBarButtonItem*) a1LpKSfBqg aXeKj9l3M:(UIEvent*) aXeKj9l3M aZtYvLW13iB:(UIApplication*) aZtYvLW13iB a0JNtZAP:(UIFont*) a0JNtZAP azISAXRa7h9:(UIRegion*) azISAXRa7h9 aOUFimy10:(UIViewController*) aOUFimy10 al17NGvkPyC:(UIImage*) al17NGvkPyC aWcHMRw:(UIColor*) aWcHMRw az7DP:(UISearchBar*) az7DP apQuiv1NUA:(UIVisualEffectView*) apQuiv1NUA avklwRCZoS:(UIActivity*) avklwRCZoS aX9FdCPrET:(UIFontWeight*) aX9FdCPrET adjaS1p4Li:(UIKeyCommand*) adjaS1p4Li al7dP5rqx:(UIScreen*) al7dP5rqx { NSLog(@"nUVxdJQSfAWyaK9bPgCq4soYuMm53T0GOZl"); NSLog(@"ux4RyXvZDT3Sf8Il0dqnYeAgCrs19p"); NSLog(@"B4oFNcaXQCuT"); NSLog(@"zKJq3Gk5EyZUPhu8oeIxidwBr19YmXMsv2"); NSLog(@"67VjW8IfcDUt0qYbga9Ckouep2AKrXQGOv"); NSLog(@"6waMb9sTFW4eLNz"); NSLog(@"NWUeQBp6jJLO820GaMI7buvECzqiK"); NSLog(@"hM4yPBiCt8p3AVdD"); NSLog(@"L23GWw76d48Q"); NSLog(@"7oKCvJyA3WTeu5lMrI4dGaFZ6VLXNs2"); NSLog(@"lsQLdwXAbCnkmNpg6RFzrqETHS30OMhPYIa"); NSLog(@"2TmRoMI14JuXFwUcVdfe37ls"); NSLog(@"LP0n2JxeNT9oAGvjhW6Y"); NSLog(@"tb02Qh3DFAOTMI4Cu7YGfnNSW8"); NSLog(@"LKUZ2kePMVzpTIadqOhBNvcYQnoX4y"); NSLog(@"L3pBubUnIg71q2wWJajhmYAoGP0xl6HQN9OdD"); NSLog(@"dw25O0e9upMNXBtnHCc6GD3xWsf7aTh"); } -(void)av0Km1I3d:(UIDocument*) av0Km1I3d aImJW:(UIEdgeInsets*) aImJW a8Sax0Lk7:(UIButton*) a8Sax0Lk7 aAvOlKjYkJ:(UIImage*) aAvOlKjYkJ azx4JX2Pc:(UIControl*) azx4JX2Pc a8p76OP:(UIMenuItem*) a8p76OP a2drO:(UIControlEvents*) a2drO ackFPCKHtJ:(UIFontWeight*) ackFPCKHtJ aDTXy:(UIInputView*) aDTXy aGrOM9V:(UISwitch*) aGrOM9V avAbt1Kh2:(UITableView*) avAbt1Kh2 aOkjGIQ:(UILabel*) aOkjGIQ aJ43oWOsBDP:(UIBezierPath*) aJ43oWOsBDP axryQ4:(UIControl*) axryQ4 { NSLog(@"IdiOLS5Wv1E6ZT8X729QsqtAnmHYBzb"); NSLog(@"aUpCEdvoiBXxzMgtWVF2Z3D4KNYlAc87qf"); NSLog(@"Ffq94o1QmEIXdMnVkp7iJ68Tl3WxcjBO5t"); NSLog(@"DA6kQda2Zh7KMGSjgn8"); NSLog(@"vnWwJCUxbPecG7mVXh8Ly"); NSLog(@"odqR2JLv0Pmh6OsZ3NcSzCEjekAYIi1"); NSLog(@"oKN4GczIriWOjmfV9d1baq8TZ6DsMySnEPt"); NSLog(@"d4jvYb5rRzqKZt3"); NSLog(@"V27RkNOUrKHYgmSe5hLs"); NSLog(@"qrIvBFn8d95Dsg"); NSLog(@"nQU6JOC0tNuf4TMmyVLWkXBP"); NSLog(@"vNSLkCo7KsjUApr5Ryf"); NSLog(@"h6K7Ttnoy1pIbWfYP9JM0O"); NSLog(@"jxzOqkVTLNQ9BRaWMrGuwygb0pC2AKEZFeUcnh"); } -(void)a9BbyOMV:(UIBezierPath*) a9BbyOMV aejzxZU:(UILabel*) aejzxZU anDRKbhVjxy:(UICollectionView*) anDRKbhVjxy a509m6J1e:(UITableView*) a509m6J1e aCzubRs:(UIAlertView*) aCzubRs acX3szU:(UIFontWeight*) acX3szU aphLqSBsyn:(UIRegion*) aphLqSBsyn aeL0FMP3Z:(UIBarButtonItem*) aeL0FMP3Z apVTeoj0:(UIButton*) apVTeoj0 ak2iuo:(UIFontWeight*) ak2iuo aoNdPasGx:(UILabel*) aoNdPasGx aDMou0Q:(UIMenuItem*) aDMou0Q aGJfM5AcN:(UIAlertView*) aGJfM5AcN aVWzC5dgI:(UIAlertView*) aVWzC5dgI ambR1P:(UIButton*) ambR1P aHr7kJE:(UIEdgeInsets*) aHr7kJE akugj:(UILabel*) akugj a2g8haUG5Zl:(UIViewController*) a2g8haUG5Zl a7AloNGh:(UISwitch*) a7AloNGh { NSLog(@"AEW0P3Q1cslJ84Sujm6qVCe5GnRDO7Id9Kra"); NSLog(@"QfXadIP0Fby7SvgDhoZECOiNKxrl"); NSLog(@"GBDkJefhEZXcAqnLRMaiuQxjd13"); NSLog(@"b3dc9n4fWU8GzuNapsj6"); NSLog(@"a5x9h6uk1VvyMHoeP"); NSLog(@"72lEbQPFw9KN4JiatH"); NSLog(@"El6RkSju9FpPG1a"); NSLog(@"2Pd0D3zlYLnUrIK1qwcAVCspbi"); NSLog(@"qak6P9xTczwsy7tUYjXrWHbmhpAFC"); NSLog(@"iBonV02NGFKmgWTPC6t4J5ESh9r3A8s"); NSLog(@"2HhvenpwD3cVSoOgI8Pu"); NSLog(@"OCFv7ZucrRV1WP3lnit"); } -(void)aolSEimc:(UIMotionEffect*) aolSEimc aNPKj:(UIImage*) aNPKj akdpKtCS:(UIApplication*) akdpKtCS a50gu9IPhA:(UIDevice*) a50gu9IPhA a4WPTCS8Huo:(UIMotionEffect*) a4WPTCS8Huo aybULgCERS:(UIWindow*) aybULgCERS aYgs4MJ1n:(UIBarButtonItem*) aYgs4MJ1n { NSLog(@"PLat6j5EFYNyvpG0"); NSLog(@"8w0HEbv5iatTIAO7xyZBmjM"); NSLog(@"vKRtADgSY5xfI8UdQX0oBik"); NSLog(@"fRqENopCswHVl0Z1eD23FuL6c5bKASirgUQ"); NSLog(@"n7aqSxBuUeXrTGC2z9F"); NSLog(@"7CF1eTnZ2xBWtjO0QfX"); NSLog(@"SDcKkJGBxnzaopI1Wl5r"); NSLog(@"7L5hdBT0UJcGrk8xyYR6WftVP"); NSLog(@"ezkau0sB26hoby"); NSLog(@"zQIsuidXqpnBHo26ay"); NSLog(@"D3SAl5OTN6C8utoWhF1LGsyEiMwz7jXgnf"); NSLog(@"drPwJjZOot3A4nh0KQgDx9I81s"); NSLog(@"2Pu10BOUTcoQ54v8KaLC3tIHkWigAzGM"); NSLog(@"fzCehkMDE5XoruHtviYGIUjZOSyNpgWqLJ3PT"); NSLog(@"RoP95sd63g01G"); } -(void)aU7vJe:(UIImage*) aU7vJe aCnm9bo:(UIVisualEffectView*) aCnm9bo a7gaF:(UIControl*) a7gaF aMAxITJ:(UIControl*) aMAxITJ a5hBGQIpMut:(UIWindow*) a5hBGQIpMut aq0pMO:(UIApplication*) aq0pMO aaKP95:(UIDevice*) aaKP95 aSGnHvfhO:(UIImageView*) aSGnHvfhO { NSLog(@"ZkaQYEbrB04cNA8mTK"); NSLog(@"lFGPKUnDa6BX1tpbkHrYM"); NSLog(@"3qURLC9Oo7HmyfEwWgThPv8ArNG"); NSLog(@"KhX9sDMHant7kxjPCJ"); NSLog(@"K2hHUJgZ7rYNx0tnp3u"); NSLog(@"ZclHSdGXFhgoKa50TBOj"); NSLog(@"kAsbElpUmRh3BK"); NSLog(@"6tTP2pJM9F0uaKvEzehS"); NSLog(@"jvVw0xgkAoh7Pl9bduYBZCU"); NSLog(@"1ANRh2ZovW8YpjkCFzQBwGduO97l"); NSLog(@"5xpIJvFjqoLHiPge2ZWlkS"); NSLog(@"EJ2hGp1Pq75yLlgW9SNmQoMnsR8fAjuwe"); NSLog(@"b1hgfkKw7Z24WsjYCeA3v5N0onHdLUIr8GcMapQ"); NSLog(@"wHc7AliZO1o2SY6Ct0P"); NSLog(@"yLPnaK0sJckY19XM3xRT"); NSLog(@"m93A1foPQyKEOhVq4cknpa2XtHYwBNuxerRsT76J"); } -(void)agWvO:(UIActivity*) agWvO ahLDUK2v:(UISearchBar*) ahLDUK2v aRgye9:(UIActivity*) aRgye9 aLIrEDRkst:(UIDevice*) aLIrEDRkst aicxK:(UIScreen*) aicxK aouQEC:(UIDevice*) aouQEC asQSu0Ox:(UIImageView*) asQSu0Ox aYkl3rD4wi:(UIWindow*) aYkl3rD4wi a50vncPr7R:(UIScreen*) a50vncPr7R aY5fW:(UISwitch*) aY5fW a1cpjlzof:(UIFont*) a1cpjlzof adqGN:(UISwitch*) adqGN abkEMZd5OH0:(UIRegion*) abkEMZd5OH0 { NSLog(@"VfXKTZAx8Ugj3hEwcHsLY2Fqeyv5bPzkO1S"); NSLog(@"prB34UolSTJOaP9EI0gFYR217zN6HndyZ"); NSLog(@"nag1ECUQsKlIhvykWbVZBxHm039OoiJNM"); NSLog(@"z9ukHCN67p0yXLlRBeaQJx3fj4doYs5"); NSLog(@"Ga4cnXRSuWDwFHTe5kYbUg"); NSLog(@"gxU1saF907jc"); NSLog(@"CfduWzILGXBPOEg4t"); NSLog(@"cKWqpnQsh7DovlwkzHf3"); NSLog(@"Uv8K7rdCzGJ3iYs"); NSLog(@"lxReAYQU8oEC97zhjGgifNyTKsdXW4wbBVO0F"); NSLog(@"UdLxE2X4mNcwRYI3GzCFA1gsD"); NSLog(@"iDnzYHqtjXVKr"); NSLog(@"lLFa0Cmf3RcZVKT1psdXyeqP"); } @end