Commit 237700ed1ac4b1bdf8890b4839d6647913888c6e
1 parent
30e63fe7
幼教中国-下滑页-我的课程没有内容时不显示区块
Showing
3 changed files
with
7 additions
and
2 deletions
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideViewController.swift
| ... | ... | @@ -380,7 +380,9 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa |
| 380 | 380 | if status == .success{ |
| 381 | 381 | self.myCurriculumDataArray.removeAllObjects() |
| 382 | 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 | 386 | self.myCurriculumIndex = -1 |
| 385 | 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 | 260 | contentView.addSubview(bgBackView) |
| 261 | 261 | |
| 262 | 262 | let contentsNum = model.list.count |
| 263 | + if contentsNum == 0{ | |
| 264 | + return | |
| 265 | + } | |
| 263 | 266 | //总显示块数/循环数 |
| 264 | 267 | var totalNum = (contentsNum >= 4) ? 4 : contentsNum |
| 265 | 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 | 30 | |
| 31 | 31 | var url:URL? |
| 32 | 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 | 34 | }else{ |
| 35 | 35 | url = nil |
| 36 | 36 | } | ... | ... |