| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- //
- // HJAuthFailedViewController.m
- // HappyJob
- //
- // Created by Bob on 2019/4/19.
- // Copyright © 2019 Bob. All rights reserved.
- //
- #import "HJAuthFailedViewController.h"
- #import "HJAuthViewController.h"
- @interface HJAuthFailedViewController ()
- @property (nonatomic, strong) UIView *bgView;
- @property (nonatomic, strong) UIImageView *imageV;
- @property (nonatomic, strong) UILabel *label;
- @property (nonatomic, strong) UIButton *uploadBtn;
- @end
- @implementation HJAuthFailedViewController
- - (void)viewWillAppear:(BOOL)animated {
-
- [super viewWillAppear:animated];
- [self.navigationController setNavigationBarHidden:NO animated:animated];
-
- }
- - (void)viewDidLoad {
-
- [super viewDidLoad];
- [self hj_setupNavBar];
- self.title = @"实名认证";
- [self initSubViews];
-
- }
- #pragma mark - init
- - (void)initSubViews {
-
- [self.view addSubview:self.bgView];
- [self.bgView addSubview:self.imageV];
- [self.bgView addSubview:self.label];
- [self.view addSubview:self.uploadBtn];
- [self.bgView mas_makeConstraints:^(MASConstraintMaker *make) {
-
- make.center.equalTo(self.view);
- }];
- [self.imageV mas_makeConstraints:^(MASConstraintMaker *make) {
-
- make.centerX.equalTo(self.bgView);
- make.top.equalTo(self.bgView.mas_top).offset(0);
- }];
- [self.label mas_makeConstraints:^(MASConstraintMaker *make) {
-
- make.centerX.equalTo(self.bgView);
- make.top.equalTo(self.imageV.mas_bottom).offset(57);
- make.bottom.equalTo(self.bgView.mas_bottom).offset(0);
- }];
- [self.uploadBtn mas_makeConstraints:^(MASConstraintMaker *make) {
-
- make.left.equalTo(self.view).offset(15);
- make.right.equalTo(self.view).offset(-15);
- make.bottom.equalTo(self.view).offset(-20);
- make.height.mas_equalTo(50);
- }];
-
- }
- #pragma mark - event response
- - (void)uploadButtonClicked {
-
- HJAuthViewController *vc = [[HJAuthViewController alloc]init];
- [self.navigationController pushViewController:vc animated:YES];
- }
- #pragma mark - setter & getter
- - (UIView *)bgView {
-
- if (_bgView == nil)
- {
- _bgView = [[UIView alloc]init];
- }
- return _bgView;
- }
- - (UIImageView *)imageV {
-
- if (_imageV == nil)
- {
- _imageV = [[UIImageView alloc]init];
- _imageV.image = [UIImage imageNamed:@"info_merge_fail"];
- }
- return _imageV;
- }
- - (UILabel *)label {
-
- if (_label == nil)
- {
- _label = [[UILabel alloc]init];
- _label.text = @"您的审核未通过,\n原因可能是信息或上传图片与要求不符,\n请按照提示要求重新上传您的实名认证资料。";
- _label.font = [UIFont systemFontOfSize:14];
- _label.textColor = COLOR_BACK6;
- _label.numberOfLines = 0;
- _label.textAlignment = NSTextAlignmentCenter;
- }
- return _label;
- }
- - (UIButton *)uploadBtn {
-
- if (_uploadBtn == nil)
- {
- _uploadBtn = [UIButton buttonWithType:UIButtonTypeCustom];
- [_uploadBtn setTitle:@"重新上传" forState:UIControlStateNormal];
- _uploadBtn.titleLabel.font = [UIFont systemFontOfSize:18];
- [_uploadBtn addTarget:self action:@selector(uploadButtonClicked) forControlEvents:UIControlEventTouchUpInside];
- [_uploadBtn az_setGradientBackgroundWithColors:@[COLOR_GRADIENT_START, COLOR_GRADIENT_END] locations:@[@(0.0),@(1.0f)] startPoint:CGPointMake(0, 0) endPoint:CGPointMake(1, 0)];
- _uploadBtn.layer.cornerRadius = 5;
- _uploadBtn.layer.masksToBounds = YES;
-
- }
- return _uploadBtn;
- }
- @end
|