Commit c47bc9526359713c6eada7109254afb2c7ed81bc

Authored by “张旭”
1 parent dfe5ed8e

全部课程类型 区块加副标题

metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
... ... @@ -107,7 +107,16 @@ class CNDownSlideSingleCourseCell: UITableViewCell {
107 107 bgBackView.layer.cornerRadius = 12
108 108 bgBackView.backgroundColor = .white
109 109  
110   - let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30))
  110 + var titleTop:CGFloat = DownSlideRecommendLeftGap
  111 + if model.blockSubTitle?.count ?? 0 > 0{
  112 + let subtitleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 17))
  113 + subtitleLbl.text = model.blockSubTitle
  114 + subtitleLbl.font = Font_12
  115 + subtitleLbl.textColor = HexColor("#999999")
  116 + bgBackView.addSubview(subtitleLbl)
  117 + titleTop = DownSlideRecommendLeftGap+17+1
  118 + }
  119 + let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: titleTop, width: DownSlideSingleCourseW-DownSlideRecommendLeftGap*2, height: 30))
111 120 titleLbl.text = model.blockName ?? "全部课程"
112 121 titleLbl.font = BoldFont_21
113 122 titleLbl.textColor = HexColor("#333333")
... ...
metaCode/Classes/Main/Model/CNLiveDownSlideModel.swift
... ... @@ -13,6 +13,8 @@ class CNLiveDownSlideModel: BaseModel {
13 13 var blockId: String?
14 14 ///大块标题
15 15 var blockName: String?
  16 + ///大块副标题
  17 + var blockSubTitle: String?
16 18 ///类型 type=4一排两个 74今日推荐 12列表全部课程 75单课程大图/
17 19 var type: String?
18 20 ///显示几行
... ...