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