Commit 237700ed1ac4b1bdf8890b4839d6647913888c6e

Authored by “张旭”
1 parent 30e63fe7

幼教中国-下滑页-我的课程没有内容时不显示区块

metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideViewController.swift
@@ -380,7 +380,9 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa @@ -380,7 +380,9 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa
380 if status == .success{ 380 if status == .success{
381 self.myCurriculumDataArray.removeAllObjects() 381 self.myCurriculumDataArray.removeAllObjects()
382 let albumBaseModel = result as! CNLiveAlbumBaseModel 382 let albumBaseModel = result as! CNLiveAlbumBaseModel
383 - self.myCurriculumDataArray.addObjects(from: [albumBaseModel]) 383 + if albumBaseModel.list.count > 0{
  384 + self.myCurriculumDataArray.addObjects(from: [albumBaseModel])
  385 + }
384 self.myCurriculumIndex = -1 386 self.myCurriculumIndex = -1
385 if self.myCurriculumDataArray.count>0{ 387 if self.myCurriculumDataArray.count>0{
386 //有我的课程 388 //有我的课程
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
@@ -260,6 +260,9 @@ class CNDownSlideSingleCourseCell: UITableViewCell { @@ -260,6 +260,9 @@ class CNDownSlideSingleCourseCell: UITableViewCell {
260 contentView.addSubview(bgBackView) 260 contentView.addSubview(bgBackView)
261 261
262 let contentsNum = model.list.count 262 let contentsNum = model.list.count
  263 + if contentsNum == 0{
  264 + return
  265 + }
263 //总显示块数/循环数 266 //总显示块数/循环数
264 var totalNum = (contentsNum >= 4) ? 4 : contentsNum 267 var totalNum = (contentsNum >= 4) ? 4 : contentsNum
265 var cellH = DownSlideAllCourseTitleH + DownSlideAllCourseRowH * CGFloat(totalNum)+DownSlideRecommendLeftGap 268 var cellH = DownSlideAllCourseTitleH + DownSlideAllCourseRowH * CGFloat(totalNum)+DownSlideRecommendLeftGap
metaCode/Classes/Main/HomePage/View/VerticalViews/UpSlide/CNUpSlideView.swift
@@ -30,7 +30,7 @@ class CNUpSlideView:UIView{ @@ -30,7 +30,7 @@ class CNUpSlideView:UIView{
30 30
31 var url:URL? 31 var url:URL?
32 if (_downPath != ""){ 32 if (_downPath != ""){
33 - url = URL.init(string: "http://wjjh5.cnlive.com/cnBlockMore.html?channelName=yjzg&pageId=&isShowTitle=true&blockType=28&contentType=13&title=%E5%9B%AD%E9%95%BF%E8%AF%BE%E7%A8%8B&pageName=&moreUrl=https%3A%2F%2Fcmsapi.cnlive.com%2FcontentApi%2FgetBlockContents%3FblockId%3D12165")//_downPath!)//"https://managemall.cnlive.com/html/mall/1/#/pages/main/goodsList/goodsList?scene=app")// 33 + url = URL.init(string: _downPath!)//"https://managemall.cnlive.com/html/mall/1/#/pages/main/goodsList/goodsList?scene=app")//
34 }else{ 34 }else{
35 url = nil 35 url = nil
36 } 36 }