|
@@ -12,6 +12,7 @@
|
|
|
|
|
|
@interface GoodsReviewsCell ()
|
|
@interface GoodsReviewsCell ()
|
|
@property (nonatomic, strong) UIImageView *headImg;
|
|
@property (nonatomic, strong) UIImageView *headImg;
|
|
|
|
+@property (nonatomic, strong) UILabel *headNameLab;
|
|
@property (nonatomic, strong) UILabel *nicknameLab;
|
|
@property (nonatomic, strong) UILabel *nicknameLab;
|
|
@property (nonatomic, strong) UILabel *creatLab;
|
|
@property (nonatomic, strong) UILabel *creatLab;
|
|
@property (nonatomic, strong) UIButton *zanBtn;
|
|
@property (nonatomic, strong) UIButton *zanBtn;
|
|
@@ -36,7 +37,10 @@
|
|
- (void)configData:(id)Data{
|
|
- (void)configData:(id)Data{
|
|
GoodsReviewsListM *model = (GoodsReviewsListM *)Data;
|
|
GoodsReviewsListM *model = (GoodsReviewsListM *)Data;
|
|
self.reviewM = model;
|
|
self.reviewM = model;
|
|
- self.headImg.image = UIImageDefaultImg_SD;
|
|
|
|
|
|
+// self.headImg.image = UIImageDefaultImg_SD;
|
|
|
|
+
|
|
|
|
+ self.headNameLab.text = [[model.nickname substringToIndex:1] uppercaseString];
|
|
|
|
+
|
|
self.nicknameLab.text = model.nickname;
|
|
self.nicknameLab.text = model.nickname;
|
|
self.creatLab.text = model.created_at;
|
|
self.creatLab.text = model.created_at;
|
|
self.sizeTitleLab.text = model.title;
|
|
self.sizeTitleLab.text = model.title;
|
|
@@ -59,6 +63,7 @@
|
|
|
|
|
|
- (void)setupSubviewS{
|
|
- (void)setupSubviewS{
|
|
[self.contentView addSubview:self.headImg];
|
|
[self.contentView addSubview:self.headImg];
|
|
|
|
+ [self.headImg addSubview:self.headNameLab];
|
|
[self.contentView addSubview:self.nicknameLab];
|
|
[self.contentView addSubview:self.nicknameLab];
|
|
[self.contentView addSubview:self.creatLab];
|
|
[self.contentView addSubview:self.creatLab];
|
|
[self.contentView addSubview:self.zanBtn];
|
|
[self.contentView addSubview:self.zanBtn];
|
|
@@ -67,7 +72,7 @@
|
|
[self.contentView addSubview:self.detailLab];
|
|
[self.contentView addSubview:self.detailLab];
|
|
[self.contentView addSubview:self.reviewsImgV];
|
|
[self.contentView addSubview:self.reviewsImgV];
|
|
[self setupSubViewsFrame];
|
|
[self setupSubViewsFrame];
|
|
- self.backgroundColor = [UIColor clearColor];
|
|
|
|
|
|
+ self.backgroundColor = [UIColor whiteColor];
|
|
@weakify(self)
|
|
@weakify(self)
|
|
self.reviewsImgV.ViewtapClose = ^(NSInteger num, id _Nonnull data) {
|
|
self.reviewsImgV.ViewtapClose = ^(NSInteger num, id _Nonnull data) {
|
|
|
|
|
|
@@ -89,6 +94,11 @@
|
|
make.width.mas_equalTo(40);
|
|
make.width.mas_equalTo(40);
|
|
make.height.mas_equalTo(40);
|
|
make.height.mas_equalTo(40);
|
|
}];
|
|
}];
|
|
|
|
+
|
|
|
|
+ [self.headNameLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
|
|
+ make.center.mas_equalTo(self.headImg);
|
|
|
|
+ }];
|
|
|
|
+
|
|
[self.nicknameLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
[self.nicknameLab mas_makeConstraints:^(MASConstraintMaker *make) {
|
|
make.left.equalTo(self.headImg.mas_right).offset(16);
|
|
make.left.equalTo(self.headImg.mas_right).offset(16);
|
|
make.top.equalTo(self.headImg);
|
|
make.top.equalTo(self.headImg);
|
|
@@ -186,11 +196,20 @@
|
|
|
|
|
|
-(UIImageView *)headImg{
|
|
-(UIImageView *)headImg{
|
|
if(!_headImg){
|
|
if(!_headImg){
|
|
- _headImg = [[UIImageView alloc]init];
|
|
|
|
- _headImg.image = UIImageDefaultImg_SD;
|
|
|
|
|
|
+ _headImg = [[UIImageView alloc] init];
|
|
|
|
+ _headImg.backgroundColor = _E0FFF5;
|
|
}
|
|
}
|
|
return _headImg;
|
|
return _headImg;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+- (UILabel *)headNameLab {
|
|
|
|
+ if(!_headNameLab){
|
|
|
|
+ _headNameLab = [UILabel labelCreateWithText:@"" font:[UIFont fontWithName:Rob_Regular size:24] textColor:_113632];
|
|
|
|
+ _headNameLab.textAlignment = NSTextAlignmentCenter;
|
|
|
|
+ }
|
|
|
|
+ return _headNameLab;
|
|
|
|
+}
|
|
|
|
+
|
|
-(UILabel *)nicknameLab{
|
|
-(UILabel *)nicknameLab{
|
|
if(!_nicknameLab){
|
|
if(!_nicknameLab){
|
|
_nicknameLab = [[UILabel alloc]init];
|
|
_nicknameLab = [[UILabel alloc]init];
|