// // LMBindBankQianyueViewController.m // SweetParty // // Created by Xmac on 2024/9/12. // #import "LMBindBankQianyueViewController.h" @interface LMBindBankQianyueViewController () @property (weak, nonatomic) IBOutlet UITextField *nameTF; @property (weak, nonatomic) IBOutlet UITextField *cardTF; @property (weak, nonatomic) IBOutlet UITextField *bankTF; @property (weak, nonatomic) IBOutlet UITextField *openTF; @property (weak, nonatomic) IBOutlet UIButton *quitBtn; @end @implementation LMBindBankQianyueViewController - (void)viewDidLoad { [super viewDidLoad]; [self loadBar:YES needBack:YES needBackground:NO]; self.titleLabel.text = @"绑定银行卡"; self.titleLabel.textColor = HEXCOLOR(0x333333); self.leftButtonView.image = ImageNamed(@"blackBack"); self.barView.backgroundColor = kClearColor; self.bgView.backgroundColor = HEXCOLOR(0xFFFFFF); self.nameTF.attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"请输入您的真实姓名" attributes:@{NSForegroundColorAttributeName:HEXCOLORA(0x999999, 1)}]; self.cardTF.attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"请输入您的银行卡号" attributes:@{NSForegroundColorAttributeName:HEXCOLORA(0x999999, 1)}]; self.bankTF.attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"请输入您的开卡银行" attributes:@{NSForegroundColorAttributeName:HEXCOLORA(0x999999, 1)}]; self.openTF.attributedPlaceholder = [[NSMutableAttributedString alloc] initWithString:@"请输入银行卡开户行" attributes:@{NSForegroundColorAttributeName:HEXCOLORA(0x999999, 1)}]; _quitBtn.backgroundColor = [UIColor bm_colorGradientChangeWithSize:CGSizeMake(APPW-15*2, 44) direction:(FXGradientChangeDirectionHorizontal) startColor:mainLightColor endColor:mainDeepColor]; if (self.model.bank_card_number.length > 0) { self.nameTF.text = self.model.bank_user_name; self.cardTF.text = self.model.bank_card_number; self.bankTF.text = self.model.bank_card; self.openTF.text = self.model.open_bank; } } - (IBAction)onConfirm:(id)sender { if (self.nameTF.text.length==0) { [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"请输入真实姓名"]; return; } if (self.cardTF.text.length==0) { [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"请输入银行卡号"]; return; } if (self.bankTF.text.length==0) { [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"请输入银行名称"]; return; } if (self.openTF.text.length==0) { [SVProgressHUD showImage:[UIImage imageNamed:@""] status:@"请输入银行卡开户行"]; return; } NSMutableDictionary *dict = [NSMutableDictionary dictionary]; [dict setValue:self.bankTF.text forKey:@"bank_card"]; [dict setValue:self.cardTF.text forKey:@"bank_card_number"]; [dict setValue:self.nameTF.text forKey:@"bank_user_name"]; [dict setValue:self.openTF.text forKey:@"open_bank"]; [MBProgressHUD showLoadToView:MainWindow()]; [BJHttpTool BJ_binding_bank_cardWithParameters:dict success:^(id response) { if ([response[@"code"] integerValue]==200) { [self.navigationController popViewControllerAnimated:YES]; } [MBProgressHUD hideHUD]; [MBProgressHUD showAutoMessage:response[@"msg"]]; } failure:^(NSError *error) { }]; } @end