dkahgld

ZBGoodDetailShopViewCell.m 1.5KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. //
  2. // ZBGoodDetailShopView.m
  3. // ZBProject
  4. //
  5. // Created by 学丽 on 2019/3/27.
  6. // Copyright © 2019 ZB. All rights reserved.
  7. //
  8. #import "ZBGoodDetailShopViewCell.h"
  9. @implementation ZBGoodDetailShopViewCell
  10. -(instancetype)initWithFrame:(CGRect)frame
  11. {
  12. self=[super initWithFrame:frame];
  13. if (self) {
  14. self.backgroundColor=[UIColor whiteColor];
  15. self.shopImg=[[UIImageView alloc]initWithFrame:CGRectMake(10, 11, 47, 47)];
  16. self.shopImg.backgroundColor=[UIColor lineColor];
  17. [self addSubview:self.shopImg];
  18. self.shoptitleL=[[UILabel alloc]initWithFrame:CGRectMake(75, 11, SCREEN_WIDTH-100, 20)];
  19. self.shoptitleL.text=@"---";
  20. self.shoptitleL.font=[UIFont systemFontOfSize:15];
  21. self.shoptitleL.textColor=[UIColor YHColorWithHex:0x333333];
  22. [self addSubview:self.shoptitleL];
  23. self.statusLabel=[[UILabel alloc]initWithFrame:CGRectMake(75, 38, SCREEN_WIDTH-70, 20)];
  24. self.statusLabel.text=@"---";
  25. self.statusLabel.font=[UIFont systemFontOfSize:12];
  26. self.statusLabel.textColor=[UIColor YHColorWithHex:0x999999];
  27. [self addSubview:self.statusLabel];
  28. }
  29. return self;
  30. }
  31. -(void)setModel:(ZBShopModel *)model
  32. {
  33. _model = model;
  34. [self.shopImg sd_setImageWithURL:[NSURL URLWithString:model.pic_path]];
  35. self.shoptitleL.text=model.title;
  36. self.statusLabel.text=[NSString stringWithFormat:@"店铺描述:%@ 服务态度:%@ 发货速度:%@ ",model.item_score,model.service_score,model.delivery_score];
  37. }
  38. @end