1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- //
- // MealEcaluateCell.swift
- // ADHTuanCan
- //
- // Created by 敖德亨 on 2023/11/11.
- //
- import UIKit
- class MealEcaluateCell: UITableViewCell {
- @IBOutlet weak var headImg: UIImageView!
-
- @IBOutlet weak var nameLab: UILabel!
-
-
- @IBOutlet weak var timeLab: UILabel!
-
-
- @IBOutlet weak var contentLab: UILabel!
-
- @IBOutlet var imgBackViewList: [UIView]!
-
- @IBOutlet var foodImgList: [UIImageView]!
-
-
- override func awakeFromNib() {
- super.awakeFromNib()
- // Initialization code
- }
-
- func configModel(model : NeedEvaluateListModel){
- for item in imgBackViewList {
- let vview : UIView = item
- vview.isHidden = true
- }
-
- var linksNum = model.links?.count ?? 0
-
- if linksNum > 4{
- linksNum = 4
- }
-
- for i in 0..<linksNum{
- let vview : UIView = imgBackViewList[i]
- vview.isHidden = false
-
- let foodImg = foodImgList[i]
- foodImg.sd_setImage(url: URL.init(string: model.links![i] ?? "") ,placeHolderImage: UIImage.init(named: "placeHolderImage"))
- }
-
- self.headImg.sd_setImage(url: URL.init(string: model.avatar ?? "") ,placeHolderImage: UIImage.init(named: "placeHolderImage"))
- self.nameLab.text = "\(model.name ?? "")"
- self.timeLab.text = "\(model.praiseTime ?? "")"
-
- }
-
- }
|