Commit 9bbc8ba27605f74159ede1fcdd9910ec5ac1d0bc

Authored by “张旭”
1 parent 119cdd1a

产品反馈问题部分

metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideDetailViewController.swift
@@ -100,7 +100,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou @@ -100,7 +100,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou
100 self.view.layer.masksToBounds = true 100 self.view.layer.masksToBounds = true
101 self.view.backgroundColor = .white 101 self.view.backgroundColor = .white
102 self.view.addSubview(self.tableView) 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 view.addSubview(closeBtn) 104 view.addSubview(closeBtn)
105 view.addGestureRecognizer(dismissPanGesture) 105 view.addGestureRecognizer(dismissPanGesture)
106 } 106 }
@@ -217,6 +217,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou @@ -217,6 +217,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou
217 return cell 217 return cell
218 } 218 }
219 cell.iconImgView.image = self.cell.bgImageView.image 219 cell.iconImgView.image = self.cell.bgImageView.image
  220 + cell.titleLabel.text = self.cell.slideModel?.contents[0].title ?? ""
220 return cell 221 return cell
221 }else if self.cellType == .course || self.cellType == .playletToCourse{ 222 }else if self.cellType == .course || self.cellType == .playletToCourse{
222 223
@@ -239,6 +240,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou @@ -239,6 +240,7 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou
239 return cell 240 return cell
240 } 241 }
241 cell.iconImgView.image = self.cell.bgImageView.image 242 cell.iconImgView.image = self.cell.bgImageView.image
  243 + cell.titleLabel.text = self.cell.slideModel?.contents[0].title ?? ""
242 return cell 244 return cell
243 245
244 } 246 }
@@ -269,10 +271,10 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou @@ -269,10 +271,10 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou
269 }else if self.cellType == .course || self.cellType == .playletToCourse{ 271 }else if self.cellType == .course || self.cellType == .playletToCourse{
270 if self.slideModel?.type == SlideModelTypeAllCourse12{ 272 if self.slideModel?.type == SlideModelTypeAllCourse12{
271 //全部课程 273 //全部课程
272 - return allCourseCellHeight 274 + return allCourseCellHeight+get_system_statusBar_height()
273 }else if self.slideModel?.type == SlideModelTypeOneCourse75{ 275 }else if self.slideModel?.type == SlideModelTypeOneCourse75{
274 //大图课程 276 //大图课程
275 - return KSreenWidth*(KSreenWidth/DownSlideSingleCourseW) 277 + return KSreenWidth
276 } 278 }
277 } 279 }
278 }else{ 280 }else{
@@ -281,6 +283,37 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou @@ -281,6 +283,37 @@ class CNUpSlideDetailViewController: CNLiveBaseViewController,UITableViewDataSou
281 return 75 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 // MARK: - 在追短剧--获取全部专辑列表 317 // MARK: - 在追短剧--获取全部专辑列表
285 func getBlockContents(page:NSInteger){ 318 func getBlockContents(page:NSInteger){
286 showLoading(message: "") 319 showLoading(message: "")
metaCode/Classes/Main/HomePage/Controller/DownSlideController/CNUpSlideViewController.swift
@@ -165,7 +165,7 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa @@ -165,7 +165,7 @@ class CNUpSlideViewController: CNLiveBaseViewController,UITableViewDelegate,UITa
165 ///(3)“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle 165 ///(3)“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle
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"{ 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 cellType = .course 167 cellType = .course
168 - }else if slideModel.contents.first?.model ?? "0" == "album_ugc"{ 168 + }else if slideModel.contents.first?.model ?? "0" == kCNDownSlideContentsModelModelAlbum_ugc{
169 cellType = .playlet 169 cellType = .playlet
170 }else{ 170 }else{
171 //新类型 171 //新类型
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
@@ -128,6 +128,8 @@ class CNDownSlideSingleCourseCell: UITableViewCell { @@ -128,6 +128,8 @@ class CNDownSlideSingleCourseCell: UITableViewCell {
128 //小icon 128 //小icon
129 let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, titleLbl.bottom+DownSlideRecommendLeftGap+CGFloat(i)*(DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowImageWH+DownSlideAllCourseRowBottomYGap), CGFloat(DownSlideAllCourseRowImageWH), CGFloat(DownSlideAllCourseRowImageWH))) 129 let imageView = UIImageView(frame: CGRectMake(DownSlideRecommendLeftGap, titleLbl.bottom+DownSlideRecommendLeftGap+CGFloat(i)*(DownSlideAllCourseRowTopYGap+DownSlideAllCourseRowImageWH+DownSlideAllCourseRowBottomYGap), CGFloat(DownSlideAllCourseRowImageWH), CGFloat(DownSlideAllCourseRowImageWH)))
130 imageView.kf.setImage(with: URL(string:contentMdl.poster!)) 130 imageView.kf.setImage(with: URL(string:contentMdl.poster!))
  131 + imageView.layer.cornerRadius = 12
  132 + imageView.clipsToBounds = true
131 bgBackView.addSubview(imageView) 133 bgBackView.addSubview(imageView)
132 134
133 let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) 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,7 +204,7 @@ class CNDownSlideSingleCourseCell: UITableViewCell {
202 204
203 let moreLabel = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: 15, width: DownSlideSingleCourseW - 50 - DownSlideRecommendLeftGap , height: 30)) 205 let moreLabel = UILabel(frame: CGRect(x: DownSlideRecommendLeftGap, y: 15, width: DownSlideSingleCourseW - 50 - DownSlideRecommendLeftGap , height: 30))
204 moreLabel.text = model.blockName ?? "更多" 206 moreLabel.text = model.blockName ?? "更多"
205 - moreLabel.font = Font_15 207 + moreLabel.font = BoldFont_15_Fit
206 moreLabel.textColor = HexColor("#333333") 208 moreLabel.textColor = HexColor("#333333")
207 singleCourseBottomView.addSubview(moreLabel) 209 singleCourseBottomView.addSubview(moreLabel)
208 210
metaCode/Classes/Main/HomePages/Controller/AuthController/CNLiveAuthViewController.swift
@@ -221,7 +221,7 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa @@ -221,7 +221,7 @@ class CNLiveAuthViewController:CNLiveBaseViewController,UITableViewDelegate,UITa
221 ///(3)“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle 221 ///(3)“album”,“album_video”,“album_ugc” -> http://wjjh5.cnlive.com/cnYmAlbumVideoList.html?aid=contentId&title=titlle
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"{ 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 cellType = .playletToCourse 223 cellType = .playletToCourse
224 - }else if slideModel.contents.first?.model ?? "0" == "album_ugc"{ 224 + }else if slideModel.contents.first?.model ?? "0" == kCNDownSlideContentsModelModelAlbum_ugc{
225 cellType = .playlet 225 cellType = .playlet
226 }else{ 226 }else{
227 //新类型 227 //新类型
metaCode/Classes/Main/HomePages/Model/CNLiveAlbumModel.swift
@@ -36,7 +36,7 @@ class CNLiveAlbumModel:BaseModel{ @@ -36,7 +36,7 @@ class CNLiveAlbumModel:BaseModel{
36 var contentId = "" 36 var contentId = ""
37 var pid = "" 37 var pid = ""
38 var tag = "" 38 var tag = ""
39 - var model = "" 39 + var model = ""//1,2,3,4课程 album_ugc短剧
40 var thirdUrl = "" 40 var thirdUrl = ""
41 var publishTime = "" 41 var publishTime = ""
42 var shareUrl = "" 42 var shareUrl = ""
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumCell.swift
@@ -97,7 +97,7 @@ class CNLiveAlbumCell:UITableViewCell{ @@ -97,7 +97,7 @@ class CNLiveAlbumCell:UITableViewCell{
97 //课程-跳转h5网页 97 //课程-跳转h5网页
98 self.cellType = .course 98 self.cellType = .course
99 self.playBtn.setTitle("进入", for: .normal) 99 self.playBtn.setTitle("进入", for: .normal)
100 - }else if model.model == "album_ugc"{ 100 + }else if model.model == kCNDownSlideContentsModelModelAlbum_ugc{
101 //短剧-跳转短剧播放页 101 //短剧-跳转短剧播放页
102 self.cellType = .playlet 102 self.cellType = .playlet
103 self.playBtn.setTitle("播放", for: .normal) 103 self.playBtn.setTitle("播放", for: .normal)
@@ -121,6 +121,7 @@ class CNLiveAlbumCell:UITableViewCell{ @@ -121,6 +121,7 @@ class CNLiveAlbumCell:UITableViewCell{
121 self.playBtn.left = KSreenWidth-80-30 121 self.playBtn.left = KSreenWidth-80-30
122 } 122 }
123 } 123 }
  124 +
124 @objc func playBtnAction(){ 125 @objc func playBtnAction(){
125 var aid = "" 126 var aid = ""
126 if self.albumModel != nil{ 127 if self.albumModel != nil{
@@ -134,7 +135,7 @@ class CNLiveAlbumCell:UITableViewCell{ @@ -134,7 +135,7 @@ class CNLiveAlbumCell:UITableViewCell{
134 if (self.albumModel?.model == "1" || self.albumModel?.model == "2" || self.albumModel?.model == "3" || self.albumModel?.model == "4"){ 135 if (self.albumModel?.model == "1" || self.albumModel?.model == "2" || self.albumModel?.model == "3" || self.albumModel?.model == "4"){
135 //课程-跳转h5网页 136 //课程-跳转h5网页
136 self.enterBlock!(self.albumModel!) 137 self.enterBlock!(self.albumModel!)
137 - }else if self.albumModel?.model == "album_ugc"{ 138 + }else if self.albumModel?.model == kCNDownSlideContentsModelModelAlbum_ugc{
138 //短剧-跳转短剧播放页 139 //短剧-跳转短剧播放页
139 navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: aid), animated: pushAnimated) 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 +11,18 @@ class CNLiveAlbumImageCell:UITableViewCell{
11 11
12 //MARK: - 懒加载 12 //MARK: - 懒加载
13 lazy var iconImgView :UIImageView = { 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 iconImgView.contentMode = .scaleAspectFill 15 iconImgView.contentMode = .scaleAspectFill
16 return iconImgView 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 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { 26 override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
20 super.init(style: style, reuseIdentifier: reuseIdentifier) 27 super.init(style: style, reuseIdentifier: reuseIdentifier)
21 self.selectionStyle = .none 28 self.selectionStyle = .none
@@ -29,6 +36,7 @@ class CNLiveAlbumImageCell:UITableViewCell{ @@ -29,6 +36,7 @@ class CNLiveAlbumImageCell:UITableViewCell{
29 private func setupUI() { 36 private func setupUI() {
30 contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex) 37 contentView.backgroundColor = HexColor(kCNDownSlideBackgroundColorHex)
31 self.contentView.addSubview(self.iconImgView) 38 self.contentView.addSubview(self.iconImgView)
  39 + self.contentView.addSubview(self.titleLabel)
32 self.contentView.clipsToBounds = true 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,11 +18,10 @@ class CNLiveDuanjuTitleCell:UITableViewCell{
18 18
19 if self.cellType == .course || self.cellType == .playletToCourse{ 19 if self.cellType == .course || self.cellType == .playletToCourse{
20 self.blockTitleLabl.text = _blockName ?? "全部课程" 20 self.blockTitleLabl.text = _blockName ?? "全部课程"
21 - self.blockTitleLabl.top = (allCourseCellHeight-30)/2 21 + self.blockTitleLabl.top = (allCourseCellHeight-30)/2+get_system_statusBar_height()
22 }else if self.cellType == .playlet{ 22 }else if self.cellType == .playlet{
23 self.blockTitleLabl.text = _blockName ?? "在追短剧" 23 self.blockTitleLabl.text = _blockName ?? "在追短剧"
24 self.blockTitleLabl.top = (45-30)/2 24 self.blockTitleLabl.top = (45-30)/2
25 -  
26 } 25 }
27 } 26 }
28 } 27 }