无故事王国
2023-10-17 77041c81c325c0bc88c94dc28d732f656cc4c885
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
//  SearchStoreDetail_1_TCell.swift
//  WanPai
//
//  Created by 无故事王国 on 2023/6/30.
//
 
import UIKit
import JQTools
 
class SearchStoreDetail_1_TCell: UITableViewCell {
 
    var detailCourseModel:SearchStoreDetailCourseModel!{
        didSet{
            img_cover.sd_setImage(with: URL(string: detailCourseModel.coverDrawing))
            label_title.text = detailCourseModel.name
            label_teachTime.text = "上课时间:" + (detailCourseModel.classStartTime ?? "")
            label_enrollNum.text = "已报名\(detailCourseModel.applicantsNumber)人"
            let price = String(format: "%@|详情", detailCourseModel.originalPrice.currency())
            btn_price.setTitle(price, for: .normal)
 
            label_hasNum.attributedText = AttributedStringbuilder.build().add(string: "包含课时数:", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#737373")).add(string: "\(detailCourseModel.classHours)课时", withFont: UIFont.systemFont(ofSize: 14), withColor: UIColor(hexStr: "#F11010")).mutableAttributedString
        }
    }
 
    @IBOutlet weak var img_cover: UIImageView!
    @IBOutlet weak var label_title: UILabel!
    @IBOutlet weak var label_teachTime: UILabel!
    @IBOutlet weak var label_hasNum: UILabel!
    @IBOutlet weak var label_enrollNum: UILabel!
    @IBOutlet weak var btn_price: UIButton!
 
 
    override func awakeFromNib() {
        super.awakeFromNib()
        selectionStyle = .none
        btn_price.isUserInteractionEnabled = false
    }
}