ShopApplyStatusVC.m 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  1. //
  2. // ShopApplyStatusVC.m
  3. // yunbaolive
  4. //
  5. // Created by ybRRR on 2020/3/9.
  6. // Copyright © 2020 cat. All rights reserved.
  7. //
  8. #import "ShopApplyStatusVC.h"
  9. #import "ApplyShopVC.h"
  10. @interface ShopApplyStatusVC ()
  11. {
  12. NSDictionary *infoDic;
  13. UILabel *infoLb;
  14. }
  15. @end
  16. @implementation ShopApplyStatusVC
  17. - (void)viewDidLoad {
  18. [super viewDidLoad];
  19. self.titleL.text = YZMsg(@"开通小店");
  20. infoDic = [NSDictionary dictionary];
  21. UIImageView *statuImg = [[UIImageView alloc]init];
  22. statuImg.frame = CGRectMake(0, 64+statusbarHeight+30, 134, 114);
  23. statuImg.centerX = self.view.centerX;
  24. statuImg.image = [UIImage imageNamed:@"shupapply"];
  25. [self.view addSubview:statuImg];
  26. UILabel *statusLb = [[UILabel alloc]init];
  27. statusLb.font = [UIFont systemFontOfSize:16];
  28. statusLb.textAlignment = NSTextAlignmentCenter;
  29. statusLb.numberOfLines = 0;
  30. if ([self.statusStr isEqual:@"0"]) {
  31. statusLb.textColor = RGB(100, 100, 100);
  32. statusLb.text = YZMsg(@"信息审核中...");
  33. }else if ([self.statusStr isEqual:@"2"]){
  34. statusLb.textColor = Pink_Cor;
  35. statusLb.text = YZMsg(@"身份信息审核未通过");
  36. }
  37. [self.view addSubview:statusLb];
  38. [statusLb mas_makeConstraints:^(MASConstraintMaker *make) {
  39. make.left.right.equalTo(self.view);
  40. make.top.equalTo(statuImg.mas_bottom).offset(20);
  41. make.height.mas_equalTo(20);
  42. }];
  43. infoLb = [[UILabel alloc]init];
  44. infoLb.font = [UIFont systemFontOfSize:14];
  45. infoLb.textAlignment = NSTextAlignmentCenter;
  46. infoLb.textColor = [UIColor grayColor];
  47. infoLb.numberOfLines = 0;
  48. if ([self.statusStr isEqual:@"0"]) {
  49. infoLb.text = YZMsg(@"3个工作日内会有审核结果,请耐心等待");
  50. }else if ([self.statusStr isEqual:@"2"]){
  51. infoLb.text = YZMsg(@"证件照片信息模糊,请上传清晰照片");
  52. }
  53. [self.view addSubview:infoLb];
  54. [infoLb mas_makeConstraints:^(MASConstraintMaker *make) {
  55. make.left.right.equalTo(self.view);
  56. make.top.equalTo(statusLb.mas_bottom).offset(10);
  57. // make.height.mas_equalTo(20);
  58. }];
  59. UIButton *reApply = [UIButton buttonWithType:0];
  60. [reApply setBackgroundColor:Pink_Cor];
  61. [reApply setTitle:YZMsg(@"重新认证") forState:0];
  62. [reApply setTitleColor:[UIColor whiteColor] forState:0];
  63. reApply.titleLabel.font = [UIFont systemFontOfSize:14];
  64. reApply.layer.cornerRadius = 20;
  65. reApply.layer.masksToBounds = YES;
  66. [reApply addTarget:self action:@selector(goApplyShopVC) forControlEvents:UIControlEventTouchUpInside];
  67. if ([self.statusStr isEqual:@"0"]) {
  68. reApply.hidden = YES;
  69. }else if ([self.statusStr isEqual:@"2"]){
  70. reApply.hidden = NO;
  71. }
  72. [self.view addSubview:reApply];
  73. [reApply mas_makeConstraints:^(MASConstraintMaker *make) {
  74. make.centerX.equalTo(self.view);
  75. make.top.equalTo(infoLb.mas_bottom).offset(30);
  76. make.height.mas_equalTo(40);
  77. make.width.mas_equalTo(200);
  78. }];
  79. [self getApplyInfo];
  80. }
  81. -(void)goApplyShopVC{
  82. ApplyShopVC *shop = [[ApplyShopVC alloc]init];
  83. shop.fromWhere = @"reject";
  84. shop.applyDic = infoDic;
  85. [[YBBaseAppDelegate sharedAppDelegate]pushViewController:shop animated:YES];
  86. }
  87. -(void)getApplyInfo{
  88. YBWeakSelf;
  89. NSString *url = [purl stringByAppendingFormat:@"?service=Shop.getShopApplyInfo"];
  90. NSDictionary *signdic = @{@"uid":[Config getOwnID],@"token":[Config getOwnToken], @"time":[NSNumber numberWithLong: (long)[[NSDate date] timeIntervalSince1970]]};
  91. NSString *sign = [PublicObj sortString:signdic];
  92. NSDictionary *dic = @{
  93. @"uid":[Config getOwnID],
  94. @"token":[Config getOwnToken],
  95. @"time":[NSNumber numberWithLong: (long)[[NSDate date] timeIntervalSince1970]],
  96. @"sign":sign
  97. };
  98. [YBNetworking postWithUrl:@"Shop.getShopApplyInfo" Dic:dic Suc:^(int code, id info, NSString *msg) {
  99. if (code ==0) {
  100. infoDic = [info firstObject];
  101. infoLb.text = minstr([infoDic valueForKey:@"reason"]);
  102. }
  103. } Fail:^(id fail) {
  104. }];
  105. }
  106. @end