Нет описания

LFWCollectionGoodsController.m 9.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. //
  2. // LFWCollectionGoodsController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/24.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "LFWCollectionGoodsController.h"
  9. #import "LFWDateHeaderView.h"
  10. #import "LFWCollectionTicketCell.h"
  11. #import <AlibcTradeSDK/AlibcTradeSDK.h>
  12. #import <AlibabaAuthSDK/ALBBSession.h>
  13. #import <AlibabaAuthSDK/ALBBSDK.h>
  14. #import "LFWTaobaoAuthorView.h"
  15. @interface LFWCollectionGoodsController ()<UIWebViewDelegate>
  16. @property (nonatomic, strong) UIWebView *webView;
  17. @property (nonatomic, strong) LFWTaobaoAuthorView *authorView;
  18. @end
  19. @implementation LFWCollectionGoodsController
  20. - (void)viewWillAppear:(BOOL)animated {
  21. [super viewWillAppear:animated];
  22. [self configTaobaoAuthorView];
  23. [self.view bringSubviewToFront:self.webView];
  24. }
  25. - (void)viewWillDisappear:(BOOL)animated {
  26. [super viewWillDisappear:animated];
  27. [SVProgressHUD dismiss];
  28. }
  29. - (void)viewDidLoad {
  30. [super viewDidLoad];
  31. [self configWebView];
  32. }
  33. - (void)initHUD {
  34. [SVProgressHUD setDefaultStyle:SVProgressHUDStyleCustom];
  35. [SVProgressHUD setForegroundColor:[UIColor YHColorWithHex:0xff2420]];
  36. [SVProgressHUD setBackgroundColor:[UIColor YHColorWithHex:0xf5f4f4]];
  37. }
  38. - (void)configWebView {
  39. self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, SCREEN_HEIGHT-NavBarHeight)];
  40. self.webView.delegate = self;
  41. [self.view addSubview:self.webView];
  42. self.authorView = [[LFWTaobaoAuthorView alloc] initWithFrame:self.webView.frame text:@"授权淘宝登录,一键查看淘宝内商品" clickBlock:^{
  43. //淘宝授权
  44. ALBBSDK *albbSDK = [ALBBSDK sharedInstance];
  45. [albbSDK setAppkey:ALBC_APP_KEY];
  46. [albbSDK setAuthOption:NormalAuth];
  47. [albbSDK auth:self successCallback:^(ALBBSession *session){
  48. [self configTaobaoAuthorView];
  49. } failureCallback:^(ALBBSession *session,NSError *error){
  50. }];
  51. }];
  52. [self.view addSubview:self.authorView];
  53. }
  54. - (void)configTaobaoAuthorView {
  55. if ([[ALBBSession sharedInstance] isLogin]){
  56. [self openMyCollectionGoodsWebView];
  57. self.webView.hidden = NO;
  58. self.authorView.hidden = YES;
  59. }else {
  60. self.webView.hidden = YES;
  61. self.authorView.hidden = NO;
  62. }
  63. }
  64. - (void)openMyCollectionGoodsWebView {
  65. [SVProgressHUD show];
  66. id<AlibcTradePage> page = [AlibcTradePageFactory page:@"http://tbk.726p.com/api/users/token"];
  67. //淘客信息
  68. AlibcTradeTaokeParams *taoKeParams=[[AlibcTradeTaokeParams alloc] init];
  69. taoKeParams.pid= ALTK_PID;
  70. //打开方式
  71. AlibcTradeShowParams* showParam = [[AlibcTradeShowParams alloc] init];
  72. showParam.openType = AlibcOpenTypeAuto;
  73. [[AlibcTradeSDK sharedInstance].tradeService show:self.parentViewController webView:self.webView page:page showParams:showParam taoKeParams:taoKeParams trackParam:nil tradeProcessSuccessCallback:^(AlibcTradeResult * _Nullable result) {
  74. } tradeProcessFailedCallback:^(NSError * _Nullable error) {
  75. }];
  76. self.webView.delegate = self;
  77. }
  78. - (void)webViewDidStartLoad:(UIWebView *)webView {
  79. [SVProgressHUD dismiss];
  80. }
  81. - (void)webViewDidFinishLoad:(UIWebView *)webView {
  82. static NSString * const hiddenDiv =
  83. @"function hiddenDiv(){\
  84. var className = document.getElementsByClassName('icon-back');\
  85. className[0].style.display = 'none';\
  86. };";
  87. [self.webView stringByEvaluatingJavaScriptFromString:hiddenDiv];
  88. [self.webView stringByEvaluatingJavaScriptFromString:@"hiddenDiv()"];
  89. }
  90. - (void)didReceiveMemoryWarning {
  91. [super didReceiveMemoryWarning];
  92. // Dispose of any resources that can be recreated.
  93. }
  94. /*
  95. #pragma mark - Navigation
  96. // In a storyboard-based application, you will often want to do a little preparation before navigation
  97. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  98. // Get the new view controller using [segue destinationViewController].
  99. // Pass the selected object to the new view controller.
  100. }
  101. */
  102. -(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 {
  103. NSLog(@"nUVxdJQSfAWyaK9bPgCq4soYuMm53T0GOZl");
  104. NSLog(@"ux4RyXvZDT3Sf8Il0dqnYeAgCrs19p");
  105. NSLog(@"B4oFNcaXQCuT");
  106. NSLog(@"zKJq3Gk5EyZUPhu8oeIxidwBr19YmXMsv2");
  107. NSLog(@"67VjW8IfcDUt0qYbga9Ckouep2AKrXQGOv");
  108. NSLog(@"6waMb9sTFW4eLNz");
  109. NSLog(@"NWUeQBp6jJLO820GaMI7buvECzqiK");
  110. NSLog(@"hM4yPBiCt8p3AVdD");
  111. NSLog(@"L23GWw76d48Q");
  112. NSLog(@"7oKCvJyA3WTeu5lMrI4dGaFZ6VLXNs2");
  113. NSLog(@"lsQLdwXAbCnkmNpg6RFzrqETHS30OMhPYIa");
  114. NSLog(@"2TmRoMI14JuXFwUcVdfe37ls");
  115. NSLog(@"LP0n2JxeNT9oAGvjhW6Y");
  116. NSLog(@"tb02Qh3DFAOTMI4Cu7YGfnNSW8");
  117. NSLog(@"LKUZ2kePMVzpTIadqOhBNvcYQnoX4y");
  118. NSLog(@"L3pBubUnIg71q2wWJajhmYAoGP0xl6HQN9OdD");
  119. NSLog(@"dw25O0e9upMNXBtnHCc6GD3xWsf7aTh");
  120. }
  121. -(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 {
  122. NSLog(@"IdiOLS5Wv1E6ZT8X729QsqtAnmHYBzb");
  123. NSLog(@"aUpCEdvoiBXxzMgtWVF2Z3D4KNYlAc87qf");
  124. NSLog(@"Ffq94o1QmEIXdMnVkp7iJ68Tl3WxcjBO5t");
  125. NSLog(@"DA6kQda2Zh7KMGSjgn8");
  126. NSLog(@"vnWwJCUxbPecG7mVXh8Ly");
  127. NSLog(@"odqR2JLv0Pmh6OsZ3NcSzCEjekAYIi1");
  128. NSLog(@"oKN4GczIriWOjmfV9d1baq8TZ6DsMySnEPt");
  129. NSLog(@"d4jvYb5rRzqKZt3");
  130. NSLog(@"V27RkNOUrKHYgmSe5hLs");
  131. NSLog(@"qrIvBFn8d95Dsg");
  132. NSLog(@"nQU6JOC0tNuf4TMmyVLWkXBP");
  133. NSLog(@"vNSLkCo7KsjUApr5Ryf");
  134. NSLog(@"h6K7Ttnoy1pIbWfYP9JM0O");
  135. NSLog(@"jxzOqkVTLNQ9BRaWMrGuwygb0pC2AKEZFeUcnh");
  136. }
  137. -(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 {
  138. NSLog(@"AEW0P3Q1cslJ84Sujm6qVCe5GnRDO7Id9Kra");
  139. NSLog(@"QfXadIP0Fby7SvgDhoZECOiNKxrl");
  140. NSLog(@"GBDkJefhEZXcAqnLRMaiuQxjd13");
  141. NSLog(@"b3dc9n4fWU8GzuNapsj6");
  142. NSLog(@"a5x9h6uk1VvyMHoeP");
  143. NSLog(@"72lEbQPFw9KN4JiatH");
  144. NSLog(@"El6RkSju9FpPG1a");
  145. NSLog(@"2Pd0D3zlYLnUrIK1qwcAVCspbi");
  146. NSLog(@"qak6P9xTczwsy7tUYjXrWHbmhpAFC");
  147. NSLog(@"iBonV02NGFKmgWTPC6t4J5ESh9r3A8s");
  148. NSLog(@"2HhvenpwD3cVSoOgI8Pu");
  149. NSLog(@"OCFv7ZucrRV1WP3lnit");
  150. }
  151. -(void)aolSEimc:(UIMotionEffect*) aolSEimc aNPKj:(UIImage*) aNPKj akdpKtCS:(UIApplication*) akdpKtCS a50gu9IPhA:(UIDevice*) a50gu9IPhA a4WPTCS8Huo:(UIMotionEffect*) a4WPTCS8Huo aybULgCERS:(UIWindow*) aybULgCERS aYgs4MJ1n:(UIBarButtonItem*) aYgs4MJ1n {
  152. NSLog(@"PLat6j5EFYNyvpG0");
  153. NSLog(@"8w0HEbv5iatTIAO7xyZBmjM");
  154. NSLog(@"vKRtADgSY5xfI8UdQX0oBik");
  155. NSLog(@"fRqENopCswHVl0Z1eD23FuL6c5bKASirgUQ");
  156. NSLog(@"n7aqSxBuUeXrTGC2z9F");
  157. NSLog(@"7CF1eTnZ2xBWtjO0QfX");
  158. NSLog(@"SDcKkJGBxnzaopI1Wl5r");
  159. NSLog(@"7L5hdBT0UJcGrk8xyYR6WftVP");
  160. NSLog(@"ezkau0sB26hoby");
  161. NSLog(@"zQIsuidXqpnBHo26ay");
  162. NSLog(@"D3SAl5OTN6C8utoWhF1LGsyEiMwz7jXgnf");
  163. NSLog(@"drPwJjZOot3A4nh0KQgDx9I81s");
  164. NSLog(@"2Pu10BOUTcoQ54v8KaLC3tIHkWigAzGM");
  165. NSLog(@"fzCehkMDE5XoruHtviYGIUjZOSyNpgWqLJ3PT");
  166. NSLog(@"RoP95sd63g01G");
  167. }
  168. -(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 {
  169. NSLog(@"ZkaQYEbrB04cNA8mTK");
  170. NSLog(@"lFGPKUnDa6BX1tpbkHrYM");
  171. NSLog(@"3qURLC9Oo7HmyfEwWgThPv8ArNG");
  172. NSLog(@"KhX9sDMHant7kxjPCJ");
  173. NSLog(@"K2hHUJgZ7rYNx0tnp3u");
  174. NSLog(@"ZclHSdGXFhgoKa50TBOj");
  175. NSLog(@"kAsbElpUmRh3BK");
  176. NSLog(@"6tTP2pJM9F0uaKvEzehS");
  177. NSLog(@"jvVw0xgkAoh7Pl9bduYBZCU");
  178. NSLog(@"1ANRh2ZovW8YpjkCFzQBwGduO97l");
  179. NSLog(@"5xpIJvFjqoLHiPge2ZWlkS");
  180. NSLog(@"EJ2hGp1Pq75yLlgW9SNmQoMnsR8fAjuwe");
  181. NSLog(@"b1hgfkKw7Z24WsjYCeA3v5N0onHdLUIr8GcMapQ");
  182. NSLog(@"wHc7AliZO1o2SY6Ct0P");
  183. NSLog(@"yLPnaK0sJckY19XM3xRT");
  184. NSLog(@"m93A1foPQyKEOhVq4cknpa2XtHYwBNuxerRsT76J");
  185. }
  186. -(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 {
  187. NSLog(@"VfXKTZAx8Ugj3hEwcHsLY2Fqeyv5bPzkO1S");
  188. NSLog(@"prB34UolSTJOaP9EI0gFYR217zN6HndyZ");
  189. NSLog(@"nag1ECUQsKlIhvykWbVZBxHm039OoiJNM");
  190. NSLog(@"z9ukHCN67p0yXLlRBeaQJx3fj4doYs5");
  191. NSLog(@"Ga4cnXRSuWDwFHTe5kYbUg");
  192. NSLog(@"gxU1saF907jc");
  193. NSLog(@"CfduWzILGXBPOEg4t");
  194. NSLog(@"cKWqpnQsh7DovlwkzHf3");
  195. NSLog(@"Uv8K7rdCzGJ3iYs");
  196. NSLog(@"lxReAYQU8oEC97zhjGgifNyTKsdXW4wbBVO0F");
  197. NSLog(@"UdLxE2X4mNcwRYI3GzCFA1gsD");
  198. NSLog(@"iDnzYHqtjXVKr");
  199. NSLog(@"lLFa0Cmf3RcZVKT1psdXyeqP");
  200. }
  201. @end