40 lines
1.1 KiB
Objective-C
Executable File
40 lines
1.1 KiB
Objective-C
Executable File
//
|
|
// SPMineDressCell.m
|
|
// SweetParty
|
|
//
|
|
// Created by bj_szd on 2022/6/6.
|
|
//
|
|
|
|
#import "SPMineDressCell.h"
|
|
|
|
@implementation SPMineDressCell
|
|
|
|
- (void)awakeFromNib {
|
|
[super awakeFromNib];
|
|
// Initialization code
|
|
}
|
|
|
|
- (void)setModel:(SPMineDressModel *)model {
|
|
_model = model;
|
|
|
|
[self.iconImgV sd_setImageWithURL:[NSURL URLWithString:model.base_image]];
|
|
self.nameLab.text = model.title;
|
|
self.timeLab.text = [NSString stringWithFormat:@"%@", [NSString timestampToDay:model.end_time]];
|
|
|
|
if (model.is_using == 1) {
|
|
self.bgImgV.image = ImageNamed(@"mall_bg_sel");
|
|
self.useBtn.selected = YES;
|
|
[self.useBtn setBackgroundColor:HEXCOLORA(0x000000, 0.1)];
|
|
self.nameLab.textColor = HEXCOLOR(0x333333);
|
|
self.timeLab.textColor = HEXCOLOR(0x333333);
|
|
}else {
|
|
self.bgImgV.image = ImageNamed(@"mall_bg_nor");
|
|
self.useBtn.selected = NO;
|
|
[self.useBtn styleGradiBlueColor];
|
|
self.nameLab.textColor = HEXCOLOR(0x333333);
|
|
self.timeLab.textColor = HEXCOLOR(0x333333);
|
|
}
|
|
}
|
|
|
|
@end
|