Commit 99bab52d540838c26a1f8b3d98e105a6d83084fb

Authored by “张旭”
1 parent 698c7dab

数字简历页面-官方认证-数字资产页-其他证书 样式修改

metaCode/Classes/Main/HomePage/View/DigitalAuthViews/数字资产cell/CNLiveDigitalThreeCerCollectCell .swift
... ... @@ -25,12 +25,29 @@ class CNLiveDigitalThreeCerCollectCell: UICollectionViewCell {
25 25 let iconImgView = UIImageView(frame: CGRect(x: 18, y: 0, width: 85, height: 101))
26 26 iconImgView.contentMode = .scaleAspectFill
27 27 iconImgView.clipsToBounds = true
  28 + iconImgView.layer.cornerRadius = 5
28 29 return iconImgView
29 30 }()
30 31  
  32 + lazy var titleLbl: UILabel = {
  33 + let imgW:CGFloat = self.iconImgView.width
  34 + let titleX:Float = Float(15.0*imgW/85)
  35 + let titleY:Float = Float(19.0*imgW/85)
  36 + let titleW:Float = Float(55.0*imgW/85)
  37 + let titleH:Float = 30.0
  38 + let titleLbl = UILabel()
  39 + titleLbl.frame = CGRect(x: CGFloat(titleX), y: CGFloat(titleY), width: CGFloat(titleW), height: CGFloat(titleH))
  40 + titleLbl.numberOfLines = 2
  41 + titleLbl.font = BoldFont_11
  42 + titleLbl.textColor = HexColor("#333333")
  43 + titleLbl.textAlignment = .center
  44 + return titleLbl
  45 + }()
  46 +
31 47 override init(frame: CGRect) {
32 48 super.init(frame: frame)
33 49 self.contentView.addSubview(self.iconImgView)
  50 + self.iconImgView.addSubview(self.titleLbl)
34 51 }
35 52  
36 53 required init?(coder: NSCoder) {
... ... @@ -38,6 +55,14 @@ class CNLiveDigitalThreeCerCollectCell: UICollectionViewCell {
38 55 }
39 56  
40 57 func setupNewUI(model:CNLiveVitaeCertificateModel){
41   - self.iconImgView.kf.setImage(with: URL(string: model.img))
  58 + if model.status == 1{
  59 + self.iconImgView.image = UIImage(named: "mine_jianli_cerBg_authed")
  60 + }else{
  61 + self.iconImgView.image = UIImage(named: "mine_jianli_cerBg_unauthed")
  62 + }
  63 +
  64 + self.titleLbl.text = model.title
  65 +
  66 +// self.iconImgView.kf.setImage(with: URL(string: model.img))
42 67 }
43 68 }
... ...