SPSBCancelAccountViewController.m 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. //
  2. // SPSBCancelAccountViewController.m
  3. // 我的社保
  4. //
  5. // Created by shanp on 2021/5/22.
  6. //
  7. #import "SPSBCancelAccountViewController.h"
  8. #import "SPSBUIGeneralHeader.h"
  9. #import "SPSBCancelAccountDetailsViewController.h"
  10. @interface SPSBCancelAccountViewController ()
  11. @end
  12. @implementation SPSBCancelAccountViewController
  13. - (void)viewDidLoad {
  14. [super viewDidLoad];
  15. [self setupUI];
  16. }
  17. #pragma mark - Action
  18. - (void)nextAction {
  19. [self.navigationController pushViewController:SPSBCancelAccountDetailsViewController.new animated:true];
  20. }
  21. #pragma mark - Network Action
  22. #pragma mark - UI
  23. - (void)setupUI {
  24. self.title = @"注销帐号";
  25. UIScrollView *bgView = [UIScrollView convenienceWithBackgroundColor:spsb_FFFFFF_color(1.f)];
  26. [self.view addSubview:bgView];
  27. [bgView makeConstraints:^(JXHConstraintMaker *make) {
  28. make.edges.equalTo(self.view);
  29. }];
  30. UIView *view = UIView.new;
  31. [bgView addSubview:view];
  32. [view makeConstraints:^(JXHConstraintMaker *make) {
  33. make.top.and.leading.and.trailing.equalTo(0);
  34. make.width.equalTo(jxh_screenWidth());
  35. }];
  36. UILabel *label = [UILabel convenienceWithFont:spsb_font(16) textColor:spsb_333333_color() limitWidth:jxh_screenWidth() - 56];
  37. [label setAttributedStringWithText:@"1. 申请注销前请及时备份你的资料,一旦注销,将清空你的账号下的个人信息,包括但不仅限于订单信息,参保人信息等,请谨慎操作。\n2. 如果您有订单,请确保订单已经完成(状态为参保成功或者已完全退费),否则请等待订单完成后再申请注销。\n3. 如果您有补差订单,请先完成补差,否则不支持注销。\n4. 注销后如果要使用同一个手机号,请重新注册。" textAlignment:NSTextAlignmentLeft lineSpacing:5 lineHeight:0 paragraphSpacing:10 lineBreakMode:NSLineBreakByWordWrapping];
  38. [bgView addSubview:label];
  39. [label makeConstraints:^(JXHConstraintMaker *make) {
  40. make.leading.equalTo(28);
  41. make.top.equalTo(20);
  42. make.trailing.equalTo(-28);
  43. }];
  44. UIButton *nextButton = [UIButton convenienceWithFont:spsb_semiboldFont(16) target:self action:@selector(nextAction)];
  45. [nextButton setTitle:@"申请注销" titleColor:spsb_FFFFFF_color(1.f) image:nil backgroundImage:jxh_getImage(confirm_n) state:JXHButtonControlStateNormal];
  46. [nextButton setBackgroundImage:jxh_getImage(confirm_h) state:JXHButtonControlStateHighlighted];
  47. [nextButton setLayerCornerRadius:22.5 clipToBounds:true];
  48. [bgView addSubview:nextButton];
  49. [nextButton makeConstraints:^(JXHConstraintMaker *make) {
  50. make.top.equalTo(label.bottom).offset(40);
  51. make.leading.equalTo(28);
  52. make.trailing.equalTo(-28);
  53. make.height.equalTo(45);
  54. make.bottom.equalTo(-40);
  55. }];
  56. }
  57. @end