CMSAPPCollectionViewCell.swift 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // CMSAPPCollectionViewCell.swift
  3. // O2Platform
  4. //
  5. // Created by FancyLou on 2022/6/9.
  6. // Copyright © 2022 zoneland. All rights reserved.
  7. //
  8. import UIKit
  9. class CMSAPPCollectionViewCell: UICollectionViewCell {
  10. @IBOutlet weak var appNameLabel: UILabel!
  11. @IBOutlet weak var appIconImageView: UIImageView!
  12. @IBOutlet weak var descLabel: UILabel!
  13. @IBOutlet weak var numberLabel: UILabel!
  14. var cmsData:CMSData? {
  15. didSet {
  16. if let appIcon = cmsData?.appIcon {
  17. self.appIconImageView.image = UIImage.base64ToImage(appIcon, defaultImage: UIImage(named:"icon_cms_application_default")!)
  18. }else{
  19. self.appIconImageView.image = UIImage(named:"icon_cms_application_default")!
  20. }
  21. self.appNameLabel.text = cmsData?.appName
  22. self.descLabel.text = cmsData?.descriptionField
  23. self.numberLabel.text = "分类: \(cmsData?.categoryList?.count ?? 0)"
  24. }
  25. }
  26. }