SPSBDisplayIdentityCardViewController.m 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. //
  2. // SPSBDisplayIdentityCardViewController.m
  3. // 我的社保
  4. //
  5. // Created by jiaxian_he on 2021/5/19.
  6. //
  7. #import "SPSBDisplayIdentityCardViewController.h"
  8. #import "SPSBUIGeneralHeader.h"
  9. #import "SPSBKeyProfile.h"
  10. @interface SPSBDisplayIdentityCardViewController ()
  11. @end
  12. @implementation SPSBDisplayIdentityCardViewController
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. [self setupUI];
  16. }
  17. #pragma mark - Action
  18. #pragma mark - NetworkAction
  19. #pragma mark - UI
  20. - (void)setupUI {
  21. self.title = @"身份信息";
  22. self.view.backgroundColor = spsb_F5F5F5_color();
  23. UILabel *tipsLabel = [UILabel convenienceWithFont:spsb_font(14) textColor:spsb_999999_color() limitWidth:jxh_screenWidth() - 30];
  24. [tipsLabel setAttributedStringWithText:[NSString stringWithFormat:@"若需修改身份证号码,请联系在线客服或拔打客服热线:%@", [jxh_userDefaults() objectForKey:SPSBCustomerServicePhone]] lineSpacing:4];
  25. [self.view addSubview:tipsLabel];
  26. [tipsLabel makeConstraints:^(JXHConstraintMaker *make) {
  27. make.leading.equalTo(15);
  28. make.top.equalTo(self.view.safetop).offset(20);
  29. make.trailing.equalTo(-15);
  30. }];
  31. UIView *backgroundView = UIView.new;
  32. backgroundView.backgroundColor = spsb_FFFFFF_color(1.f);
  33. [self.view addSubview:backgroundView];
  34. [backgroundView makeConstraints:^(JXHConstraintMaker *make) {
  35. make.top.equalTo(tipsLabel.bottom).offset(15);
  36. make.leading.and.trailing.equalTo(0);
  37. make.height.equalTo(44);
  38. }];
  39. UILabel *titleLabel = [UILabel convenienceWithFont:spsb_font(16) text:@"身份证号" textColor:spsb_333333_color()];
  40. [backgroundView addSubview:titleLabel];
  41. [titleLabel makeConstraints:^(JXHConstraintMaker *make) {
  42. make.leading.equalTo(15);
  43. make.centerY.equalTo(backgroundView);
  44. }];
  45. UILabel *contentLabel = [UILabel convenienceWithFont:spsb_font(16) text:_spsb_identityCardNum textColor:spsb_999999_color() textAlignment:NSTextAlignmentRight];
  46. [backgroundView addSubview:contentLabel];
  47. [contentLabel makeConstraints:^(JXHConstraintMaker *make) {
  48. make.trailing.equalTo(-15);
  49. make.centerY.equalTo(backgroundView);
  50. }];
  51. [backgroundView createLineWithLocation:JXHLineLocationTop headOffset:0 footOffset:0];
  52. [backgroundView createLineWithLocation:JXHLineLocationBottom headOffset:0 footOffset:0];
  53. }
  54. @end