BrokerageCell.swift 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // BrokerageCell.swift
  3. // ADHTuanCan
  4. //
  5. // Created by 敖德亨 on 2023/11/8.
  6. //
  7. import UIKit
  8. class BrokerageCell: UITableViewCell {
  9. @IBOutlet weak var typeLab: UILabel!
  10. @IBOutlet weak var timeLab: UILabel!
  11. @IBOutlet weak var numLab: UILabel!
  12. override func awakeFromNib() {
  13. super.awakeFromNib()
  14. // Initialization code
  15. }
  16. override func setSelected(_ selected: Bool, animated: Bool) {
  17. super.setSelected(selected, animated: animated)
  18. // Configure the view for the selected state
  19. }
  20. //佣金
  21. func configModel(model : BrokerageListItemModel){
  22. self.typeLab.text = "\(model.remarks ?? "")"
  23. self.timeLab.text = "\(model.settleTime ?? "")"
  24. if model.isAdd === 1{
  25. self.numLab.text = "+\(model.eventAmount ?? "")"
  26. }else{
  27. self.numLab.text = "-\(model.eventAmount ?? "")"
  28. }
  29. }
  30. //推广
  31. func configPromotionModel(model : PromotionListItemModel){
  32. self.typeLab.text = "\(model.remarks ?? "")"
  33. self.timeLab.text = "\(model.settleTime ?? "")"
  34. self.numLab.text = LanguagesUtil.createTextBy(Ctext: "\(model.eventCount ?? "")次", Etext: "\(model.eventCount ?? "") times")
  35. }
  36. }