Commit 9bbc8ba27605f74159ede1fcdd9910ec5ac1d0bc
1 parent
119cdd1a
产品反馈问题部分
Showing
8 changed files
with
55 additions
and
12 deletions
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideDetailViewController.swift
| ... | ... | @@ -100,7 +100,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou |
| 100 | 100 | self.view.layer.masksToBounds = true |
| 101 | 101 | self.view.backgroundColor = .white |
| 102 | 102 | self.view.addSubview(self.tableView) |
| 103 | - self.tableView.frame = CGRect(x: 0, y: KStatusBarHeight, width: KSreenWidth, height: KSreenHeight-KStatusBarHeight) | |
| 103 | + self.tableView.frame = CGRect(x: 0, y: 0, width: KSreenWidth, height: KSreenHeight) | |
| 104 | 104 | view.addSubview(closeBtn) |
| 105 | 105 | view.addGestureRecognizer(dismissPanGesture) |
| 106 | 106 | } |
| ... | ... | @@ -217,6 +217,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou |
| 217 | 217 | return cell |
| 218 | 218 | } |
| 219 | 219 | cell.iconImgView.image = self.cell.bgImageView.image |
| 220 | + cell.titleLabel.text = self.cell.slideModel?.contents[0].title ?? "" | |
| 220 | 221 | return cell |
| 221 | 222 | }else if self.cellType == .course || self.cellType == .playletToCourse{ |
| 222 | 223 | |
| ... | ... | @@ -239,6 +240,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou |
| 239 | 240 | return cell |
| 240 | 241 | } |
| 241 | 242 | cell.iconImgView.image = self.cell.bgImageView.image |
| 243 | + cell.titleLabel.text = self.cell.slideModel?.contents[0].title ?? "" | |
| 242 | 244 | return cell |
| 243 | 245 | |
| 244 | 246 | } |
| ... | ... | @@ -269,10 +271,10 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou |
| 269 | 271 | }else if self.cellType == .course || self.cellType == .playletToCourse{ |
| 270 | 272 | if self.slideModel?.type == SlideModelTypeAllCourse12{ |
| 271 | 273 | //全部课程 |
| 272 | - return allCourseCellHeight | |
| 274 | + return allCourseCellHeight+get_system_statusBar_height() | |
| 273 | 275 | }else if self.slideModel?.type == SlideModelTypeOneCourse75{ |
| 274 | 276 | //大图课程 |
| 275 | - return KSreenWidth*(KSreenWidth/DownSlideSingleCourseW) | |
| 277 | + return KSreenWidth | |
| 276 | 278 | } |
| 277 | 279 | } |
| 278 | 280 | }else{ |
| ... | ... | @@ -281,6 +283,37 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou |
| 281 | 283 | return 75 |
| 282 | 284 | } |
| 283 | 285 | |
| 286 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
| 287 | + let albumModel = self.dataArray[indexPath.row] as! CNLiveAlbumModel | |
| 288 | + if indexPath.section == 0{ | |
| 289 | + if self.cellType == .playlet{ | |
| 290 | + //短剧大图,跳转播放页 | |
| 291 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: albumModel.contentId), animated: pushAnimated) | |
| 292 | + }else if self.cellType == .course || self.cellType == .playletToCourse{ | |
| 293 | + if self.slideModel?.type == SlideModelTypeAllCourse12{ | |
| 294 | + //全部课程,跳转h5 | |
| 295 | + | |
| 296 | + }else if self.slideModel?.type == SlideModelTypeOneCourse75{ | |
| 297 | + //大图课程,跳转h5 | |
| 298 | + CNLiveDownSlideTool.pushWebVCWithCNLiveAlbumMdl(albumModel: albumModel,controller: self) | |
| 299 | + } | |
| 300 | + } | |
| 301 | + }else{ | |
| 302 | + //视频跳转播放页;课程跳转h5 | |
| 303 | + if albumModel.model == kCNDownSlideContentsModelModelAlbum_ugc{ | |
| 304 | + //视频 | |
| 305 | + //短剧-跳转短剧播放页 | |
| 306 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: albumModel.contentId), animated: pushAnimated) | |
| 307 | + | |
| 308 | + }else if albumModel.model == "1" || albumModel.model == "2" || albumModel.model == "3" || albumModel.model == "4"{ | |
| 309 | + //课程 | |
| 310 | + CNLiveDownSlideTool.pushWebVCWithCNLiveAlbumMdl(albumModel: albumModel,controller: self) | |
| 311 | + }else{ | |
| 312 | + | |
| 313 | + } | |
| 314 | + } | |
| 315 | + } | |
| 316 | + | |
| 284 | 317 | // MARK: - 在追短剧--获取全部专辑列表 |
| 285 | 318 | func getBlockContents(page:NSInteger){ |
| 286 | 319 | showLoading(message: "") | ... | ... |
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideViewController.swift
| ... | ... | @@ -165,7 +165,7 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa |
| 165 | 165 | ///(3)“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle |
| 166 | 166 | if slideModel.contents.first?.model ?? "0" == "1" || slideModel.contents.first?.model ?? "0" == "2" || slideModel.contents.first?.model ?? "0" == "3" || slideModel.contents.first?.model ?? "0" == "4"{ |
| 167 | 167 | cellType = .course |
| 168 | - }else if slideModel.contents.first?.model ?? "0" == "album_ugc"{ | |
| 168 | + }else if slideModel.contents.first?.model ?? "0" == kCNDownSlideContentsModelModelAlbum_ugc{ | |
| 169 | 169 | cellType = .playlet |
| 170 | 170 | }else{ |
| 171 | 171 | //新类型 | ... | ... |
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
| ... | ... | @@ -128,6 +128,8 @@ class CNDownSlideSingleCourseCell: UITableViewCell { |
| 128 | 128 | //小icon |
| 129 | 129 | let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, titleLbl.bottom+DownSlideRecommendLeftGap+CGFloat(i)*(DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowImageWH+DownSlideAllCourseRowBottomYGap), CGFloat(DownSlideAllCourseRowImageWH), CGFloat(DownSlideAllCourseRowImageWH))) |
| 130 | 130 | imageView.kf.setImage(with: URL(string:contentMdl.poster!)) |
| 131 | + imageView.layer.cornerRadius = 12 | |
| 132 | + imageView.clipsToBounds = true | |
| 131 | 133 | bgBackView.addSubview(imageView) |
| 132 | 134 | |
| 133 | 135 | let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) |
| ... | ... | @@ -202,7 +204,7 @@ class CNDownSlideSingleCourseCell: UITableViewCell { |
| 202 | 204 | |
| 203 | 205 | let moreLabel = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: 15, width: DownSlideSingleCourseW - 50 - DownSlideRecommendLeftGap , height: 30)) |
| 204 | 206 | moreLabel.text = model.blockName ?? "更多" |
| 205 | - moreLabel.font = Font_15 | |
| 207 | + moreLabel.font = BoldFont_15_Fit | |
| 206 | 208 | moreLabel.textColor = HexColor("#333333") |
| 207 | 209 | singleCourseBottomView.addSubview(moreLabel) |
| 208 | 210 | ... | ... |
metaCode/Classes/Main/HomePages/Controller/AuthController/CNLiveAuthViewController.swift
| ... | ... | @@ -221,7 +221,7 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa |
| 221 | 221 | ///(3)“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle |
| 222 | 222 | if slideModel.contents.first?.model ?? "0" == "1" || slideModel.contents.first?.model ?? "0" == "2" || slideModel.contents.first?.model ?? "0" == "3" || slideModel.contents.first?.model ?? "0" == "4"{ |
| 223 | 223 | cellType = .playletToCourse |
| 224 | - }else if slideModel.contents.first?.model ?? "0" == "album_ugc"{ | |
| 224 | + }else if slideModel.contents.first?.model ?? "0" == kCNDownSlideContentsModelModelAlbum_ugc{ | |
| 225 | 225 | cellType = .playlet |
| 226 | 226 | }else{ |
| 227 | 227 | //新类型 | ... | ... |
metaCode/Classes/Main/HomePages/Model/CNLiveAlbumModel.swift
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumCell.swift
| ... | ... | @@ -97,7 +97,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 97 | 97 | //课程-跳转h5网页 |
| 98 | 98 | self.cellType = .course |
| 99 | 99 | self.playBtn.setTitle("进入", for: .normal) |
| 100 | - }else if model.model == "album_ugc"{ | |
| 100 | + }else if model.model == kCNDownSlideContentsModelModelAlbum_ugc{ | |
| 101 | 101 | //短剧-跳转短剧播放页 |
| 102 | 102 | self.cellType = .playlet |
| 103 | 103 | self.playBtn.setTitle("播放", for: .normal) |
| ... | ... | @@ -121,6 +121,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 121 | 121 | self.playBtn.left = KSreenWidth-80-30 |
| 122 | 122 | } |
| 123 | 123 | } |
| 124 | + | |
| 124 | 125 | @objc func playBtnAction(){ |
| 125 | 126 | var aid = "" |
| 126 | 127 | if self.albumModel != nil{ |
| ... | ... | @@ -134,7 +135,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 134 | 135 | if (self.albumModel?.model == "1" || self.albumModel?.model == "2" || self.albumModel?.model == "3" || self.albumModel?.model == "4"){ |
| 135 | 136 | //课程-跳转h5网页 |
| 136 | 137 | self.enterBlock!(self.albumModel!) |
| 137 | - }else if self.albumModel?.model == "album_ugc"{ | |
| 138 | + }else if self.albumModel?.model == kCNDownSlideContentsModelModelAlbum_ugc{ | |
| 138 | 139 | //短剧-跳转短剧播放页 |
| 139 | 140 | navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: aid), animated: pushAnimated) |
| 140 | 141 | } | ... | ... |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumImageCell.swift
| ... | ... | @@ -11,11 +11,18 @@ class CNLiveAlbumImageCell:UITableViewCell{ |
| 11 | 11 | |
| 12 | 12 | //MARK: - 懒加载 |
| 13 | 13 | lazy var iconImgView :UIImageView = { |
| 14 | - let iconImgView = UIImageView(frame: CGRect(x: (KSreenWidth - KSreenWidth*(KSreenWidth/DownSlideSingleCourseW))/2, y: 0, width: KSreenWidth*(KSreenWidth/DownSlideSingleCourseW), height: KSreenWidth*(KSreenWidth/DownSlideSingleCourseW))) | |
| 14 | + let iconImgView = UIImageView(frame: CGRect(x: 0, y: 0, width: KSreenWidth, height: KSreenWidth)) | |
| 15 | 15 | iconImgView.contentMode = .scaleAspectFill |
| 16 | 16 | return iconImgView |
| 17 | 17 | }() |
| 18 | 18 | |
| 19 | + lazy var titleLabel: UILabel = { | |
| 20 | + let titleLbl = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: DownSlideRecommendLeftGap+get_system_statusBar_height(), width: KSreenWidth-DownSlideRecommendLeftGap*2, height: 30)) | |
| 21 | + titleLbl.font = BoldFont_21 | |
| 22 | + titleLbl.textColor = HexColor("#FFFFFF") | |
| 23 | + return titleLbl | |
| 24 | + }() | |
| 25 | + | |
| 19 | 26 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
| 20 | 27 | super.init(style: style, reuseIdentifier: reuseIdentifier) |
| 21 | 28 | self.selectionStyle = .none |
| ... | ... | @@ -29,6 +36,7 @@ class CNLiveAlbumImageCell:UITableViewCell{ |
| 29 | 36 | private func setupUI() { |
| 30 | 37 | contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) |
| 31 | 38 | self.contentView.addSubview(self.iconImgView) |
| 39 | + self.contentView.addSubview(self.titleLabel) | |
| 32 | 40 | self.contentView.clipsToBounds = true |
| 33 | 41 | } |
| 34 | 42 | ... | ... |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveDuanjuTitleCell.swift
| ... | ... | @@ -18,11 +18,10 @@ class CNLiveDuanjuTitleCell:UITableViewCell{ |
| 18 | 18 | |
| 19 | 19 | if self.cellType == .course || self.cellType == .playletToCourse{ |
| 20 | 20 | self.blockTitleLabl.text = _blockName ?? "全部课程" |
| 21 | - self.blockTitleLabl.top = (allCourseCellHeight-30)/2 | |
| 21 | + self.blockTitleLabl.top = (allCourseCellHeight-30)/2+get_system_statusBar_height() | |
| 22 | 22 | }else if self.cellType == .playlet{ |
| 23 | 23 | self.blockTitleLabl.text = _blockName ?? "在追短剧" |
| 24 | 24 | self.blockTitleLabl.top = (45-30)/2 |
| 25 | - | |
| 26 | 25 | } |
| 27 | 26 | } |
| 28 | 27 | } | ... | ... |