// // QXDressShopCell.m // QXLive // // Created by 启星 on 2026/1/3. // #import "QXDressShopCell.h" #import "NSString+QX.h" @implementation QXDressShopCell -(void)setModel:(QXShopDressModel *)model{ _model = model; [self.dressImageView sd_setImageWithURL:[NSURL URLWithString:model.base_image]]; if (model.discount.intValue == 0) { self.discountView.hidden = YES; NSString *coin = [NSString stringWithFormat:@"%@",model.price]; NSAttributedString *str = [[NSAttributedString alloc] initWithString:coin]; [self.coinBtn setAttributedTitle:str forState:(UIControlStateNormal)]; }else{ self.discountView.hidden = NO; self.discountLabel.text = model.discount_str; NSString *coin = [NSString stringWithFormat:@"%@ %@",model.price,model.original_price]; NSAttributedString *str = [coin deleteLineWithTextColor:RGB16(0xAAAAAA) lineColor:RGB16(0xAAAAAA) range:[coin rangeOfString:model.original_price]]; [self.coinBtn setAttributedTitle:str forState:(UIControlStateNormal)]; } self.nameLabel.text = model.title; } - (void)awakeFromNib { [super awakeFromNib]; // Initialization code } @end