两折卖----返利app-----返利圈

AdJumpManager.m 3.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. //
  2. // AdJumpManager.m
  3. // YouHuiProject
  4. //
  5. // Created by 小花 on 2018/5/31.
  6. // Copyright © 2018年 kuxuan. All rights reserved.
  7. //
  8. #import "AdJumpManager.h"
  9. #import "LZMAdWebViewController.h"
  10. #import "LZMGoodDetailViewController.h"
  11. #import "LZMGoodDetailViewController.h"
  12. #import "LZMGoodListViewController.h"
  13. #import "LZMEventTool.h"
  14. #import "DetailRequestModel.h"
  15. #import <AlibcTradeSDK/AlibcTradeSDK.h>
  16. #import <AlibabaAuthSDK/ALBBSession.h>
  17. #import <AlibabaAuthSDK/ALBBSDK.h>
  18. @implementation AdJumpManager
  19. + (void)jumpToPageWithModel:(AdPopModel *)model ParentViewControll:(UIViewController *)parentVc {
  20. switch ([model.click_type integerValue]) {
  21. case 1:
  22. {
  23. LZMAdWebViewController *web = [[LZMAdWebViewController alloc] init];
  24. web.url = model.click_param;
  25. [parentVc.navigationController pushViewController:web animated:YES];
  26. }
  27. break;
  28. case 2:
  29. {
  30. LZMGoodDetailViewController *detail = [[LZMGoodDetailViewController alloc] init];
  31. DetailRequestModel *requestModel = [[DetailRequestModel alloc]
  32. initWithId:model.click_param
  33. is_coupon:model.is_coupon
  34. coupon_price:model.coupon_price price:model.price
  35. discount_price:model.discount_price
  36. commission_rate:model.commission_rate
  37. coupon_start_time:model.coupon_start_time
  38. coupon_end_time:model.coupon_end_time];
  39. detail.requestModel = requestModel;
  40. [parentVc.navigationController pushViewController:detail animated:YES];
  41. [LZMEventTool eventWithEventType:0 origin:@"0" category_id:@"0" goods_id:model.click_param source:AdvertisingAction];
  42. }
  43. break;
  44. case 3:
  45. {
  46. LZMGoodListViewController *list = [[LZMGoodListViewController alloc] init];
  47. list.cate_id = model.click_param;
  48. list.name = model.groupTitle;
  49. [parentVc.navigationController pushViewController:list animated:YES];
  50. }
  51. break;
  52. case 4:
  53. {
  54. [self jumpToTaobaoWithUrl:model.click_param parentVc:parentVc];
  55. }
  56. break;
  57. default:
  58. break;
  59. }
  60. }
  61. + (void)jumpToTaobaoWithUrl:(NSString *)url parentVc:(UIViewController *)parentVc{
  62. id<AlibcTradePage> page = [AlibcTradePageFactory page:url];
  63. //淘客信息
  64. AlibcTradeTaokeParams *taoKeParams=[[AlibcTradeTaokeParams alloc] init];
  65. taoKeParams.pid= ALTK_PID;
  66. //打开方式
  67. AlibcTradeShowParams* showParam = [[AlibcTradeShowParams alloc] init];
  68. showParam.openType = AlibcOpenTypeAuto;
  69. [[AlibcTradeSDK sharedInstance].tradeService show:parentVc page:page showParams:showParam taoKeParams:taoKeParams trackParam:nil tradeProcessSuccessCallback:^(AlibcTradeResult * _Nullable result) {
  70. } tradeProcessFailedCallback:^(NSError * _Nullable error) {
  71. }];
  72. }
  73. @end