// // LMTixianRecordDetailViewController.m // SweetParty // // Created by Xmac on 2024/9/25. // #import "LMTixianRecordDetailViewController.h" #import "LMTixianRecordDetailModel.h" #import "NSString+category.h" @interface LMTixianRecordDetailViewController () @property (weak, nonatomic) IBOutlet UIImageView *typeIcon; @property (weak, nonatomic) IBOutlet UILabel *typeNameLabel; @property (weak, nonatomic) IBOutlet UILabel *moneyLabel; @property (weak, nonatomic) IBOutlet UILabel *statusLabel; @property (weak, nonatomic) IBOutlet UILabel *rateLabel; @property (weak, nonatomic) IBOutlet UILabel *rataTimeLabel; @property (weak, nonatomic) IBOutlet UILabel *tixianMoneyLabel; @property (weak, nonatomic) IBOutlet UILabel *sevrMoneyLabel; @property (weak, nonatomic) IBOutlet UILabel *contentLabel; @property (weak, nonatomic) IBOutlet UILabel *addTimeLabel; @property (weak, nonatomic) IBOutlet UILabel *accountLabel; @property (nonatomic, strong) LMTixianRecordDetailModel *model; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *topLayout; @end @implementation LMTixianRecordDetailViewController - (void)viewDidLoad { [super viewDidLoad]; [self showNaviBarWithTitle:@"提现记录"]; self.topLayout.constant = yb_NavigationBar_H+30; [self requestRecordDetails]; } - (void)setupInfo { if (self.model.status == 1){ self.statusLabel.text = @"待审核"; }else if (self.model.status == 2){ self.statusLabel.text = @"已到账"; }else if (self.model.status == 3){ self.statusLabel.text = @"打款失败"; }else{ self.statusLabel.text = @"未知"; } if (self.model.type == 1){ self.typeNameLabel.text = @"支付宝"; self.typeIcon.image = ImageNamed(@"tixianRecord_ali"); }else if (self.model.type == 2){ self.typeNameLabel.text = @"银行卡"; self.typeIcon.image = ImageNamed(@"tixianRecord_bank"); } self.moneyLabel.text = self.model.general_money; self.rateLabel.text = [NSString stringWithFormat:@"申请提现%@,扣除手续费%@,应到账%@",self.model.money,self.model.server_money,self.model.general_money]; self.tixianMoneyLabel.text = [NSString stringWithFormat:@"¥%@",self.model.money]; self.sevrMoneyLabel.text = [NSString stringWithFormat:@"¥%@",self.model.server_money]; self.contentLabel.text = _model.remarke; self.addTimeLabel.text = _model.add_time.formateDateYMD_HM; self.rataTimeLabel.text = _model.add_time.formateDateYMD_HM; self.accountLabel.text = _model.account; } - (void)requestRecordDetails { NSDictionary *params = @{@"wid":C_string(self.wid)}; [RCMicHTTP postWithURLString:@"api/user/get_one_withdrawal_detail" parameters:params response:^(RCMicHTTPResult *result) { self.model = [LMTixianRecordDetailModel mj_objectWithKeyValues:result.content]; [self setupInfo]; }]; } @end