MyOrderTableViewCell.swift 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. //
  2. // MyOrderTableViewCell.swift
  3. // CommonFrame
  4. //
  5. // Created by Virgil on 2019/4/19.
  6. // Copyright © 2019 Virgil. All rights reserved.
  7. //
  8. import UIKit
  9. class MyOrderTableViewCell: UITableViewCell {
  10. @IBOutlet weak var lblState: UILabel!
  11. @IBOutlet weak var lblMoney: UILabel!
  12. @IBOutlet weak var imgShow: UIImageView!
  13. @IBOutlet weak var lblCount: UILabel!
  14. @IBOutlet weak var lblDate: UILabel!
  15. @IBOutlet weak var lblName: UILabel!
  16. @IBOutlet weak var viewContent: UIView!
  17. override func awakeFromNib() {
  18. super.awakeFromNib()
  19. // Initialization code
  20. }
  21. func initCell(rowIndex: Int, dic: NSDictionary) {
  22. imgShow.sd_setImage(with: NSURL.init(string: dic["image"]as!String)! as URL)
  23. lblName.text = dic.getString(key: "name")
  24. lblCount.text = "x\(dic.getInt(key: "num"))"
  25. lblMoney.text = "合计¥\(dic.getDouble(key: "price")*dic.getDouble(key: "num"))"
  26. }
  27. override func setSelected(_ selected: Bool, animated: Bool) {
  28. super.setSelected(selected, animated: animated)
  29. // Configure the view for the selected state
  30. }
  31. }