Няма описание

FKPacketIdCardController.m 3.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. //
  2. // FKPacketIdCardController.m
  3. // FirstLink
  4. //
  5. // Created by jack on 15/11/28.
  6. // Copyright © 2015年 FirstLink. All rights reserved.
  7. //
  8. #import "FKPacketIdCardController.h"
  9. #import "FLControllerHelper.h"
  10. #import "FKPacketIdCardCenter.h"
  11. #import "ShakeRedPacketController.h"
  12. #import "FKShareListController.h"
  13. @interface FKPacketIdCardController ()
  14. @end
  15. @implementation FKPacketIdCardController
  16. - (instancetype)initWithOrderId:(NSString *)orderId{
  17. self = [super init];
  18. if (self) {
  19. FKPacketIdCardCenter *packet = [[FKPacketIdCardCenter alloc]init];
  20. packet.orderId = orderId;
  21. self.idCardCenter = packet;
  22. }
  23. return self;
  24. }
  25. - (void)viewDidLoad {
  26. [super viewDidLoad];
  27. [self hideDefaultLeftNaviItem];
  28. }
  29. - (void)configNavBar{
  30. self.navigationItem.title = @"绑定身份信息";
  31. UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithTitle:@"关闭"
  32. style:UIBarButtonItemStylePlain
  33. target:self
  34. action:@selector(backToHome)];
  35. [rightItem setTitleTextAttributes:@{NSFontAttributeName : [UIFont systemFontOfSize:15]} forState:UIControlStateNormal];
  36. self.navigationItem.rightBarButtonItem = rightItem;
  37. // if ([self.navigationController respondsToSelector:@selector(interactivePopGestureRecognizer)]) {
  38. // self.navigationController.interactivePopGestureRecognizer.delegate = nil;
  39. // }
  40. }
  41. - (void)backToHome{
  42. [FLControllerHelper backToMainController];
  43. }
  44. - (void)goToBack{
  45. [self goToShakePacket];
  46. }
  47. - (void)upLoadFinish{
  48. [self goToShakePacket];
  49. }
  50. - (void)goToShakePacket{
  51. ShakeRedPacketController *shakeVc = [[ShakeRedPacketController alloc]init];
  52. FKPacketIdCardCenter *packCenter = (FKPacketIdCardCenter *)self.idCardCenter;
  53. if ([packCenter isKindOfClass:[FKPacketIdCardCenter class]]) {
  54. shakeVc.orderID = packCenter.orderId;
  55. }
  56. NSMutableArray *arrayM = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
  57. [arrayM removeLastObject];
  58. [arrayM addObject:shakeVc];
  59. [self.navigationController setViewControllers:arrayM animated:YES];
  60. }
  61. - (void)configActionBtnInPickCell:(FKBindIdCardPickCell *)pickCell{
  62. pickCell.moreIdBtn.hidden = YES;
  63. pickCell.moreIdBtn.userInteractionEnabled = NO;
  64. pickCell.cancelBtn.hidden = NO;
  65. pickCell.cancelBtn.userInteractionEnabled = YES;
  66. if (self.idCardCenter.idCardItemList.count > 0) {
  67. pickCell.moreIdBtn.hidden = NO;
  68. pickCell.moreIdBtn.userInteractionEnabled = YES;
  69. }
  70. [pickCell.saveBtn setBackgroundColor:UIColorFromRGB(0xff6362)];
  71. [pickCell.saveBtn setTitle:@"保存并分享" forState:UIControlStateNormal];
  72. }
  73. - (void)configTipCell:(FKBindTipCell *)tipCell{
  74. tipCell.titleLabel.text = @"请为您购买的直邮商品补全身份证信息";
  75. tipCell.iconImgView.image = [UIImage imageNamed:@"red_alert"];
  76. }
  77. #pragma mark - UIGestureRecognizeDelegate
  78. //- (BOOL)gestureRecognizerShouldBegin:(UIGestureRecognizer *)gestureRecognizer {
  79. // return NO;
  80. //}
  81. @end