Commit 4e304e7e1a5aac45801b00e8f7a93a2566e55a56
1 parent
9bbc8ba2
* [x] 认证-单图课程标题加黑
* [x] 认证-全部课程图片圆角 * [x] 认证-单图课程详情页-图片不放大 * [x] 认证-单图课程详情页-图片点击和第一条效果一致 * [x] 认证-单图课程详情页-图片从状态栏开始显示 * [x] 认证-单图课程详情页-列表内容整体点击都可进入详情 * [x] 详情页-列表内容整体点击都可进入详情 * [x] 认证-单图课程详情页-列表图片截取是中间吗? 列表也得裁剪 * [x] 认证-单图课程详情页-列表进入按钮和首页的进入按钮为渐变色 * [x] 认证-单图课程详情页-列表页副标题显示字数太短
Showing
4 changed files
with
26 additions
and
4 deletions
metaCode/Classes/Main/HomePage/View/VerticalViews/DownSlide/CNDownSlideSingleCourseCell.swift
| ... | ... | @@ -3,7 +3,7 @@ |
| 3 | 3 | // metaCode |
| 4 | 4 | // |
| 5 | 5 | // Created by zx on 2023/10/16. |
| 6 | -// 单课程大图专辑 | |
| 6 | +// 单课程大图专辑 | 全部课程列表 | |
| 7 | 7 | |
| 8 | 8 | |
| 9 | 9 | import Foundation |
| ... | ... | @@ -130,6 +130,7 @@ class CNDownSlideSingleCourseCell: UITableViewCell { |
| 130 | 130 | imageView.kf.setImage(with: URL(string:contentMdl.poster!)) |
| 131 | 131 | imageView.layer.cornerRadius = 12 |
| 132 | 132 | imageView.clipsToBounds = true |
| 133 | + imageView.contentMode = .scaleAspectFill | |
| 133 | 134 | bgBackView.addSubview(imageView) |
| 134 | 135 | |
| 135 | 136 | let titleLbl = UILabel(frame: CGRect(x: imageView.right+DownSlideRecommendLeftGap, y: imageView.top, width: DownSlideSingleCourseW-90-imageView.right, height: 21)) |
| ... | ... | @@ -139,7 +140,7 @@ class CNDownSlideSingleCourseCell: UITableViewCell { |
| 139 | 140 | bgBackView.addSubview(titleLbl) |
| 140 | 141 | |
| 141 | 142 | let subTitleLbl = UILabel(frame: CGRect(x: titleLbl.left, y:titleLbl.bottom+3 , width: titleLbl.width, height: 17)) |
| 142 | - subTitleLbl.text = contentMdl.subTitle ?? "" | |
| 143 | + subTitleLbl.text = contentMdl.subTitle ?? "" | |
| 143 | 144 | subTitleLbl.font = Font_12 |
| 144 | 145 | subTitleLbl.textColor = HexColor("#999999") |
| 145 | 146 | bgBackView.addSubview(subTitleLbl) | ... | ... |
metaCode/Classes/Main/HomePages/Controller/AuthController/push相关/CNHomepageDuanJuDetailViewController.swift
| ... | ... | @@ -137,6 +137,14 @@ class CNHomepageDuanJuDetailViewController: CNLiveBaseViewController ,UITableVi |
| 137 | 137 | return cell |
| 138 | 138 | } |
| 139 | 139 | } |
| 140 | + | |
| 141 | + func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { | |
| 142 | + let albumModel = self.dataArray[indexPath.row] as! CNLiveAlbumMsgModel | |
| 143 | + //短剧-跳转短剧播放页 | |
| 144 | + navigationViewController().visibleViewController?.navigationController?.pushViewController(CNLiveShortVideoViewController(aid: albumModel.albumId), animated: pushAnimated) | |
| 145 | + | |
| 146 | + } | |
| 147 | + | |
| 140 | 148 | func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { |
| 141 | 149 | if indexPath.section == 0{ |
| 142 | 150 | return 45//10+30+5 | ... | ... |
metaCode/Classes/Main/HomePages/View/HomepageDetail/CNLiveAlbumCell.swift
| ... | ... | @@ -47,6 +47,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 47 | 47 | let iconImgView = UIImageView(frame: CGRect(x: 15, y: 15, width: 45, height: 45)) |
| 48 | 48 | iconImgView.layer.cornerRadius = 5 |
| 49 | 49 | iconImgView.clipsToBounds = true |
| 50 | + iconImgView.contentMode = .scaleAspectFill | |
| 50 | 51 | return iconImgView |
| 51 | 52 | }() |
| 52 | 53 | ///标题 |
| ... | ... | @@ -60,13 +61,14 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 60 | 61 | }() |
| 61 | 62 | ///副标题 |
| 62 | 63 | lazy var subTitleLabel: UILabel = { |
| 63 | - let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, self.titleLabl.bottom+5, 60, 17)) | |
| 64 | + let titleLabel = UILabel.init(frame: CGRectMake(self.iconImgView.right+15, self.titleLabl.bottom+5, self.titleLabl.width, 17)) | |
| 64 | 65 | titleLabel.textColor = HexColor("#999999") |
| 65 | 66 | titleLabel.textAlignment = .left |
| 66 | 67 | titleLabel.font = Font_12 |
| 67 | 68 | titleLabel.text = "共68集" |
| 68 | 69 | return titleLabel |
| 69 | 70 | }() |
| 71 | + let playBtnSubLayer = "playBtnSubLayer" | |
| 70 | 72 | lazy var playBtn: QMUIButton = { |
| 71 | 73 | let playBtn = QMUIButton.init(type: .custom) |
| 72 | 74 | playBtn.frame = CGRect(x: KSreenWidth-80, y: 0, width: 65, height: 26) |
| ... | ... | @@ -75,9 +77,17 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 75 | 77 | playBtn.clipsToBounds = true |
| 76 | 78 | playBtn.setTitle("播放", for: .normal) |
| 77 | 79 | playBtn.setTitleColor(HexColor("#FFFFFF"), for: .normal) |
| 78 | - playBtn.backgroundColor = HexColor("#609AFF") | |
| 79 | 80 | playBtn.titleLabel?.font = Font_13 |
| 80 | 81 | playBtn.addTarget(self, action: #selector(playBtnAction), for: .touchUpInside) |
| 82 | + | |
| 83 | + let gradient = CAGradientLayer() | |
| 84 | + gradient.frame = playBtn.bounds | |
| 85 | + gradient.colors = [HexColor("#67C5FF")!.cgColor, HexColor("#609AFF")!.cgColor] | |
| 86 | + gradient.locations = [0, 1] | |
| 87 | + gradient.startPoint = CGPoint(x: 0, y: 0.5) | |
| 88 | + gradient.endPoint = CGPoint(x: 0.5, y: 0.5) | |
| 89 | + gradient.name = playBtnSubLayer | |
| 90 | + playBtn.layer.insertSublayer(gradient, at: 0) | |
| 81 | 91 | return playBtn |
| 82 | 92 | }() |
| 83 | 93 | override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) { |
| ... | ... | @@ -106,6 +116,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 106 | 116 | self.subTitleLabel.text = model.subTitle |
| 107 | 117 | self.iconImgView.kf.setImage(with: URL(string: model.poster)) |
| 108 | 118 | self.titleLabl.width = KSreenWidth-(self.iconImgView.right+15)-80 |
| 119 | + self.subTitleLabel.width = self.titleLabl.width | |
| 109 | 120 | self.playBtn.left = KSreenWidth-80 |
| 110 | 121 | } |
| 111 | 122 | func setupNewUIMsgModel(model:CNLiveAlbumMsgModel,isDetail:Bool){ |
| ... | ... | @@ -115,6 +126,7 @@ class CNLiveAlbumCell:UITableViewCell{ |
| 115 | 126 | self.subTitleLabel.text = model.subTitle |
| 116 | 127 | self.iconImgView.kf.setImage(with: URL(string: model.albumImg)) |
| 117 | 128 | self.titleLabl.width = KSreenWidth-(self.iconImgView.right+15)-80-30 |
| 129 | + self.subTitleLabel.width = self.titleLabl.width | |
| 118 | 130 | if self.isDetail{ |
| 119 | 131 | self.playBtn.left = KSreenWidth-80 |
| 120 | 132 | }else{ | ... | ... |
metaCode/Classes/Main/HomePages/View/PlayletHomePage/CNLivePlayletHomePageHeaderCell.swift
| ... | ... | @@ -41,6 +41,7 @@ class CNLivePlayletHomePageHeaderCell:UITableViewCell{ |
| 41 | 41 | lazy var iconImgView :UIImageView = { |
| 42 | 42 | let iconImgView = UIImageView(frame: CGRect(x: 15, y: 20, width: 112, height: 147)) |
| 43 | 43 | iconImgView.layer.cornerRadius = 5 |
| 44 | + iconImgView.contentMode = .scaleAspectFill | |
| 44 | 45 | iconImgView.clipsToBounds = true |
| 45 | 46 | return iconImgView |
| 46 | 47 | }() | ... | ... |