//
//  SLBaseTableViewCell.m
//  SLAiELTS
//
//  Created by Gusont on 2023/3/9.
//

#import "SLBaseTableViewCell.h"

@implementation SLBaseTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)confignCell:(SLPageModelDetail *)detail {
    self.baseCellView.titleLabel.text = detail.title;
    self.baseCellView.subTitleLabel.text = detail.subTitle;
    if ([detail.title isEqualToString:@"头像"]) {
        [self.baseCellView updateConstraintsWith:SLBaseCellView4];
        NSString *headUrl = [NSString stringWithFormat:@"%@%@",[SLHttpCenter SharedInstance].serverUrl, [SLGlobalInfo SharedInstance].loginInfo.user.userHead];
        [self.baseCellView.leftImageView sd_setImageWithURL:[NSURL URLWithString:headUrl] placeholderImage:ImageName(@"icon_ellipse")];
    }else if ([detail.title isEqualToString:@"退出登录"]) {
        [self.baseCellView updateConstraintsWith:SLBaseCellView2];
    }else {
        [self.baseCellView updateConstraintsWith:SLBaseCellView1];
    }
}

@end
