一折买app------返利---------返利宝

YZMACollectionGoodsController.m 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. //
  2. // YZMACollectionGoodsController.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/1/24.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "YZMACollectionGoodsController.h"
  9. #import "YZMADateHeaderView.h"
  10. #import "YZMACollectionTicketCell.h"
  11. #import <AlibcTradeSDK/AlibcTradeSDK.h>
  12. #import <AlibabaAuthSDK/ALBBSession.h>
  13. #import <AlibabaAuthSDK/ALBBSDK.h>
  14. #import "YZMATaobaoAuthorView.h"
  15. @interface YZMACollectionGoodsController ()<UIWebViewDelegate>
  16. @property (nonatomic, strong) UIWebView *webView;
  17. @property (nonatomic, strong) YZMATaobaoAuthorView *authorView;
  18. @end
  19. @implementation YZMACollectionGoodsController
  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 = [[YZMATaobaoAuthorView 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)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 {
  103. NSLog(@"ARGUbTYcFpWlmMrCvZ9en57jukOzwQhL");
  104. NSLog(@"9eFvH0X1WKt");
  105. NSLog(@"MRfujdvKZIgLFDmYUxhk9orqHN5sGJWibP");
  106. NSLog(@"K8getx7yJzAQ3pfZ5SU4qvRWEs");
  107. NSLog(@"s4vNpfZcFO16th8dQuae5TCPSXEYbA9xy3M0BK2");
  108. NSLog(@"S9jKkBPGUriNHQnmsXpD0FuZdcRY34y2IzMTv");
  109. NSLog(@"uTUzsh5k2PpWAN3CE8KcrDx647B");
  110. NSLog(@"MR01C94rISgUxP8KEHajc5h");
  111. NSLog(@"9MldjnsivXIpLzqr8ZNGYF0CAh6bDxaoKe1ft");
  112. NSLog(@"ofyT985LWkHIFQ");
  113. NSLog(@"1MYtpyOnmc2W5B3iA");
  114. NSLog(@"KtAMbQ3NShkImgUup50JeHDEifj");
  115. NSLog(@"B2T6rDYZC7qHFkucL4UlgJM5xp3aIvh8tSm");
  116. NSLog(@"BnbD0VoJdxEKHRjw2SA");
  117. NSLog(@"KUlaW1hPJgdw9izoexTSyDmI7pn53LkF0AYs");
  118. NSLog(@"QgdX6EebFp8N");
  119. NSLog(@"jka9ghVKR8i1ArTE5Lx6");
  120. NSLog(@"BOnzCXHxUrvqZi4EQm2t081cdg");
  121. NSLog(@"3MkebSuE5oznPhWx2I8FNiRKpdAtOrDjLqB");
  122. NSLog(@"YHGpvFLeUZSzf5IACj3Dauibyh");
  123. }
  124. -(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 {
  125. NSLog(@"gliAqzoWSh5N0y");
  126. NSLog(@"9uF3AcOKdk8oQytLnHaW5pvPU6E40wflG");
  127. NSLog(@"ZylrbFHTOxpQImVGuL5vtUKa3DS0qoC6Bd1A8Yej");
  128. NSLog(@"XwIgxtVkcbnvTjELumJs3iy0U7d2SCQD");
  129. NSLog(@"7KYtIw3pON");
  130. NSLog(@"epxKgQlW3BPCdZR4cOSX7f1y8YwoFvsubM52n");
  131. NSLog(@"RskXeI4P09YFzUjyDBL2no");
  132. NSLog(@"S0fHbEnQL5NP");
  133. NSLog(@"bacY3UWsmXAgSO7frjvxI0NCtJu5ePk");
  134. NSLog(@"YapmObwIu1UxX96J4njoTQWiCHvkBqSP8");
  135. NSLog(@"9UF3BKzPfeAqkhV2Ri1nT7ycjDJxlCWSa");
  136. NSLog(@"0K82qtsx4jGiBDm");
  137. NSLog(@"VGN0FXUCY8afKc4BOIjb");
  138. NSLog(@"g5tchJvLb7BwadWOSDCeqxrF4YNE8RQI23ZU");
  139. NSLog(@"vB3HRYUjZ29NAhLtwk7gVd");
  140. NSLog(@"YihNLz78QmxE6qg50MPpw3r");
  141. NSLog(@"ogm6hldyCAUz1TFuqN8IiBYxOf4rwnMQVJKPe2sD");
  142. NSLog(@"s8LWCmIVeSQYXDO29RZ");
  143. NSLog(@"OmgaHWqtub8vDY4Ey9eUP5ClRGVsF");
  144. }
  145. -(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 {
  146. NSLog(@"gcvIr74OHDdnYzeBUxoK2ZtswRfyNVJqTjhGlXS8");
  147. NSLog(@"Z0vznESMKcl7Ao");
  148. NSLog(@"uEcG8AlWv9doteyMg5knRf4");
  149. NSLog(@"zOd9eb1VY8rNfkviaMLZjEuCQGo5SH7DB");
  150. NSLog(@"oKP4tR20s9kJ5y");
  151. NSLog(@"JjKBl3kIdAToufqPZD7HRCmSFiUG5n");
  152. NSLog(@"a1Yx9yiFj5DQrX7pSVgHPwvzN24TeOMEfG");
  153. NSLog(@"LHApwU9NuCmetckVPYG7Z5dRax");
  154. NSLog(@"D5Z1FmSaWIrU2YVp7");
  155. NSLog(@"xyNO3mIrVHM0JXF781");
  156. NSLog(@"Z3bnuz1fTaoLwC4EHV");
  157. NSLog(@"hQgLykBpHow0I2Sauib");
  158. NSLog(@"Zg0Apw7n4PWauNs");
  159. NSLog(@"CMglNfjdWwucBSL9Ri4KJ");
  160. }
  161. @end