YOUPAILZLiveVerifyResultVC.m 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. //
  2. // YOUPAILZLiveVerifyResultVC.m
  3. // VQU
  4. //
  5. // Created by CY on 2021/6/15.
  6. // Copyright © 2021 leo. All rights reserved.
  7. //
  8. #import "YOUPAILZLiveVerifyResultVC.h"
  9. @interface YOUPAILZLiveVerifyResultVC ()
  10. @end
  11. @implementation YOUPAILZLiveVerifyResultVC
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. self.view.backgroundColor = [UIColor whiteColor];
  15. [self youpaifinitUI];
  16. }
  17. - (void)youpaifinitUI{
  18. UIImage *image;
  19. NSString *titleStr = @"";
  20. NSString *contentStr = @"";
  21. NSString *btnStr = @"";
  22. if (self.youpaipstate == LZLiveVerifyStateWithSuccess) {
  23. image = [UIImage imageNamed:@"vqu_images_L_live_verify_success"];
  24. titleStr = @"审核通过";
  25. contentStr =@"恭喜您已通过真人认证,请开启您的花蝶交友之旅吧~";
  26. btnStr =@"好的";
  27. }else if (self.youpaipstate == LZLiveVerifyStateWithInReview){
  28. image = [UIImage imageNamed:@"vqu_images_L_live_verify_inreview"];
  29. titleStr = @"审核中";
  30. contentStr =@"认证审核中,1小时内完成,认证结果会通过系统通知告知您。";
  31. btnStr =@"好的";
  32. }else if (self.youpaipstate == LZLiveVerifyStateWithInError){
  33. image = [UIImage imageNamed:@"vqu_images_L_live_verify_error"];
  34. titleStr = @"审核失败";
  35. contentStr =@"很抱歉,您的认证信息中有部分信息未能通过审核,请重新填写。";
  36. btnStr =@"重新填写";
  37. }
  38. self.title = titleStr;
  39. UIImageView *imageV = [[UIImageView alloc] initWithImage:image];
  40. [self.view addSubview:imageV];
  41. [imageV mas_makeConstraints:^(MASConstraintMaker *make) {
  42. make.centerX.equalTo(self.view);
  43. make.top.mas_equalTo(ScaleSize(187));
  44. make.size.mas_offset(CGSizeMake(ScaleSize(214.0f), ScaleSize(187.0f)));
  45. }];
  46. UILabel *contentL = [[UILabel alloc] init];
  47. contentL.textColor = HexColorFromRGB(0xA3AABE);
  48. contentL.font = LCFont13;
  49. contentL.numberOfLines = 0;
  50. contentL.text = contentStr;
  51. contentL.textAlignment = NSTextAlignmentCenter;
  52. [self.view addSubview:contentL];
  53. [contentL mas_makeConstraints:^(MASConstraintMaker *make) {
  54. make.left.offset(35.0f);
  55. make.right.offset(-35.0f);
  56. make.top.equalTo(imageV.mas_bottom).offset(2.5f);
  57. make.height.mas_equalTo(37);
  58. }];
  59. //按钮
  60. UIButton *youpaipBtn = [UIButton new];
  61. [self.view addSubview:youpaipBtn];
  62. [youpaipBtn mas_makeConstraints:^(MASConstraintMaker *make) {
  63. make.left.mas_equalTo(47.5);
  64. make.right.mas_equalTo(-47.5);
  65. make.bottom.mas_equalTo(-75);
  66. make.height.mas_equalTo(49);
  67. }];
  68. [youpaipBtn setTitle:btnStr forState:UIControlStateNormal];
  69. youpaipBtn.layer.cornerRadius = 24.5;
  70. youpaipBtn.layer.masksToBounds = YES;
  71. [youpaipBtn setBackgroundImage:[LCTools ColorImage:CGSizeMake(KScreenWidth-47.5*2, 49) FromColors:@[LZBFB6FFColor,LZ7C69FEColor] ByGradientType:1] forState:UIControlStateNormal];
  72. [youpaipBtn addTarget:self action:@selector(youpaiWithInReviewClick) forControlEvents:UIControlEventTouchUpInside];
  73. }
  74. -(void)youpaiWithInReviewClick{
  75. if (self.youpaipstate == LZLiveVerifyStateWithInError) {
  76. if (self.sex == 2) {
  77. [self.navigationController popToRootViewControllerAnimated:YES];
  78. }else{
  79. [self.navigationController popViewControllerAnimated:NO];
  80. if (self.didReviewClickBlock) {
  81. self.didReviewClickBlock();
  82. }
  83. }
  84. }else{
  85. [self.navigationController popToRootViewControllerAnimated:YES];
  86. }
  87. }
  88. @end