Commit c47bc9526359713c6eada7109254afb2c7ed81bc

Authored by “张旭”
1 parent dfe5ed8e

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

metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
@@ -107,7 +107,16 @@ class CNDownSlideSingleCourseCell: UITableViewCell { @@ -107,7 +107,16 @@ class CNDownSlideSingleCourseCell: UITableViewCell {
107 bgBackView.layer.cornerRadius = 12 107 bgBackView.layer.cornerRadius = 12
108 bgBackView.backgroundColor = .white 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 titleLbl.text = model.blockName ?? "全部课程" 120 titleLbl.text = model.blockName ?? "全部课程"
112 titleLbl.font = BoldFont_21 121 titleLbl.font = BoldFont_21
113 titleLbl.textColor = HexColor("#333333") 122 titleLbl.textColor = HexColor("#333333")
metaCode/Classes/Main/Model/CNLiveDownSlideModel.swift
@@ -13,6 +13,8 @@ class CNLiveDownSlideModel: BaseModel { @@ -13,6 +13,8 @@ class CNLiveDownSlideModel: BaseModel {
13 var blockId: String? 13 var blockId: String?
14 ///大块标题 14 ///大块标题
15 var blockName: String? 15 var blockName: String?
  16 + ///大块副标题
  17 + var blockSubTitle: String?
16 ///类型 type=4一排两个 74今日推荐 12列表全部课程 75单课程大图/ 18 ///类型 type=4一排两个 74今日推荐 12列表全部课程 75单课程大图/
17 var type: String? 19 var type: String?
18 ///显示几行 20 ///显示几行